/* Home page. Colours and type come from theme.css; this file is only the layout and the small previews. */

/* Transparent so the sky (z-index -1) shows; the page colour comes from <html> */
body.home {
  position: relative;
  background: transparent;
}

/* ---------- Night sky: soft stars and one arc of light at the top ---------- */
.sky {
  position: absolute;
  inset: 0 0 auto;
  height: 980px;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(61, 99, 245, 0.34), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.sky-arc {
  --size: min(2000px, 190vw);
  position: absolute;
  left: 50%;
  top: calc(var(--size) * -0.8);
  width: var(--size);
  height: var(--size);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, #050a18 97.4%, rgba(141, 168, 255, 0.55) 99.4%, transparent 100%);
  box-shadow: 0 30px 140px 10px rgba(61, 99, 245, 0.35);
}
.sky-stars,
.sky-stars::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1px 1px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 140px 90px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 230px 190px, #fff, transparent), radial-gradient(1px 1px at 90px 250px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 300px 40px, rgba(255, 255, 255, 0.7), transparent);
  background-size: 340px 300px;
  opacity: 0.45;
}
.sky-stars::after {
  content: '';
  background-size: 520px 460px;
  background-position: 170px 120px;
  opacity: 0.8;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle {
  to { opacity: 0.25; }
}

/* ---------- Hero ---------- */
.h-hero {
  display: grid;
  justify-items: center;
  padding: 96px 0 48px;
  text-align: center;
}
.h-logo {
  width: 76px;
  height: 76px;
  margin-bottom: 26px;
  border-radius: 22px;
  object-fit: cover;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px -12px rgba(61, 99, 245, 0.7);
}
.h-hero h1 {
  display: grid;
  margin: 0;
  font-size: clamp(40px, 7vw, 78px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
}
[dir='rtl'] .h-hero h1 {
  line-height: 1.25;
  letter-spacing: 0;
}
.h-fade {
  background: linear-gradient(180deg, #ffffff 10%, #7c8199 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.h-lead {
  max-width: 560px;
  margin: 22px 0 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}
.h-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.h-actions .btn-lg svg {
  width: 18px;
  height: 18px;
}
[dir='rtl'] .h-actions .btn-lg svg {
  transform: scaleX(-1);
}
.h-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
.h-tags li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  font-size: 13.5px;
}
.h-tags b {
  font-weight: 600;
}

/* ---------- Dashboard preview ---------- */
.h-preview {
  margin: 30px auto 0;
  max-width: 1040px;
  perspective: 1600px;
}
.pv-window {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 380px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(11, 15, 25, 0.9);
  box-shadow: 0 -1px 0 rgba(141, 168, 255, 0.35), 0 40px 100px -30px rgba(0, 0, 0, 0.8);
  transform: rotateX(14deg);
  transform-origin: top;
  font-size: 13px;
  text-align: start;
  /* The fade at the bottom sits on the tilted window itself: on the outer box it also cut off the tilted edges */
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.pv-side {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px 12px;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
}
.pv-side p {
  margin: 12px 8px 2px;
  color: #5d6280;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.pv-server {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}
.pv-server img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.pv-server span {
  display: grid;
}
.pv-server small {
  color: var(--muted);
  font-size: 11px;
}
.pv-item {
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--muted);
}
.pv-item.on {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(111, 141, 255, 0.3);
}
.pv-main {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 20px;
}
.pv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--display);
  font-size: 20px;
}
.pv-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-family: var(--mono);
  font-size: 11px;
}
.pv-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.pv-stats div {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.pv-stats small {
  color: var(--muted);
  font-size: 11px;
}
.pv-stats b {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
}
/* A tiny line chart under each number */
.pv-spark {
  height: 26px;
  margin-top: 8px;
  opacity: 0.8;
  clip-path: polygon(0 80%, 15% 60%, 30% 70%, 45% 35%, 60% 50%, 75% 20%, 90% 30%, 100% 10%, 100% 100%, 0 100%);
}
.pv-spark.s1 { color: var(--success); background: linear-gradient(180deg, rgba(61, 220, 151, 0.45), transparent); }
.pv-spark.s2 { color: var(--accent); background: linear-gradient(180deg, rgba(111, 141, 255, 0.45), transparent); }
.pv-spark.s3 { color: var(--danger); background: linear-gradient(180deg, rgba(255, 92, 108, 0.4), transparent); }
.pv-spark.s4 { color: var(--warning); background: linear-gradient(180deg, rgba(255, 181, 71, 0.4), transparent); }
.pv-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pv-cards div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.pv-cards small {
  color: var(--muted);
}

/* ---------- Why ---------- */
.h-why {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 40px 0 20px;
}
.why {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.why-ico {
  font-size: 20px;
}
.why h3 {
  margin: 12px 0 6px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
[dir='rtl'] .why h3 {
  letter-spacing: 0;
}
.why p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Numbers ---------- */
.h-numbers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 40px 0 20px;
  padding: 26px 0;
  border-block: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}
.h-numbers div {
  display: grid;
  gap: 4px;
}
.h-numbers div + div {
  border-inline-start: 1px solid rgba(255, 255, 255, 0.06);
}
.h-numbers b {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.h-numbers span {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Section headings ---------- */
section.container {
  padding: 80px 0 0;
}
.h-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}
.h-head h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.04em;
}
[dir='rtl'] .h-head h2 {
  letter-spacing: 0;
}
.h-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* ---------- Modules ---------- */
.m-group {
  margin-bottom: 56px;
}
.m-group-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.m-group-head h3 {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 700;
}
.m-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.m-dot {
  width: 10px;
  height: 10px;
  margin-top: 10px;
  flex: none;
  border-radius: 50%;
}
.m-dot.red { background: var(--danger); box-shadow: 0 0 14px var(--danger); }
.m-dot.green { background: var(--success); box-shadow: 0 0 14px var(--success); }
.m-dot.amber { background: var(--warning); box-shadow: 0 0 14px var(--warning); }
.m-dot.blue { background: #5b8cff; box-shadow: 0 0 14px #5b8cff; }
.m-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.m-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(10px);
  transition: border-color 0.25s, transform 0.25s;
}
.m-card:hover {
  border-color: rgba(111, 141, 255, 0.45);
  transform: translateY(-2px);
}
.m-card h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
}
.m-card > p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

/* The little previews inside each card */
.mock {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(5, 10, 24, 0.6);
  font-size: 12.5px;
  direction: ltr;
  text-align: left;
}
.mock small {
  color: var(--muted);
}
.mock-toggles {
  display: grid;
  gap: 8px;
}
.mock-toggles div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mock-toggles i {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #2a3148;
}
.mock-toggles i::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8a8fa9;
  transition: left 0.2s;
}
.mock-toggles i.on {
  background: var(--accent-strong);
}
.mock-toggles i.on::after {
  left: 14px;
  background: #fff;
}
.mock-chat {
  display: grid;
  gap: 8px;
}
.mc-line.del {
  color: #8a8fa9;
  text-decoration: line-through;
  text-decoration-color: var(--danger);
}
.mc-line b {
  color: #c9cdfb;
}
.mc-bot {
  padding: 6px 8px;
  border-inline-start: 3px solid var(--warning);
  border-radius: 4px;
  background: rgba(255, 181, 71, 0.08);
}
.mock-backup {
  display: grid;
  gap: 10px;
}
.mb-top {
  display: flex;
  justify-content: space-between;
}
.mb-top span,
.mb-stats span {
  color: var(--muted);
}
.mb-stats {
  display: flex;
  gap: 12px;
}
.mb-stats b {
  color: var(--text);
}
.mb-btn,
.mg-btn {
  justify-self: start;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 600;
}
.mock-log {
  display: grid;
  gap: 8px;
}
.mock-log div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mock-log span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mock-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(120deg, rgba(61, 99, 245, 0.55), rgba(5, 10, 24, 0.6));
}
.mock-welcome i {
  width: 44px;
  height: 44px;
  flex: none;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.mock-welcome div {
  display: grid;
  line-height: 1.25;
}
.mock-welcome b {
  letter-spacing: 0.08em;
}
.mock-ticket {
  display: grid;
  gap: 4px;
}
.mock-ticket div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.mock-ticket span {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}
.mock-level {
  display: grid;
  gap: 8px;
}
.mock-level div {
  display: flex;
  justify-content: space-between;
}
.ml-bar,
.mbar,
.mp-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #1b2236;
}
.ml-bar i,
.mbar i,
.mp-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.ml-bar i {
  width: 72%;
  background: linear-gradient(90deg, var(--accent-strong), var(--cyan));
}
.ml-up {
  color: var(--success) !important;
}
.mock-giveaway {
  display: grid;
  gap: 4px;
}
.mock-giveaway .mg-btn {
  margin-top: 6px;
  background: #5865f2;
}
.mock-balance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mock-balance div {
  display: grid;
}
.mock-balance b {
  font-family: var(--mono);
  font-weight: 500;
}
.mbal-streak {
  grid-column: 1 / -1;
  color: var(--warning);
}
.mock-cards {
  display: grid;
  gap: 6px;
}
.hand {
  display: flex;
  gap: 6px;
}
.hand span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 46px;
  border-radius: 6px;
  background: #f4f4f7;
  color: #111;
  font-weight: 700;
}
.hand span.red {
  color: #d1293d;
}
.mock-cards b {
  color: var(--success);
}
.mock-shop {
  display: grid;
  gap: 6px;
}
.mock-shop div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mock-shop b {
  flex: 1;
  font-weight: 500;
}
.mock-shop em {
  color: var(--muted);
  font-family: var(--mono);
  font-style: normal;
  font-size: 11.5px;
}
.mock-badges {
  display: grid;
  gap: 10px;
}
.gems {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gems i {
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  border-radius: 3px;
  background: #3a3d52;
}
.gems i.on {
  background: linear-gradient(135deg, #ffa3f5, #d946c9);
}
.gems i.now {
  width: 15px;
  height: 15px;
  box-shadow: 0 0 12px rgba(255, 106, 213, 0.8);
}
.mbar i {
  width: 44%;
  background: linear-gradient(90deg, #ff73fa, #b44cf0);
}
.mock-ar {
  display: grid;
  gap: 2px;
}
.mock-ar small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.mock-ar span {
  color: var(--success);
}
.mock-player {
  display: grid;
  gap: 4px;
}
.mp-bar {
  margin-top: 6px;
}
.mp-bar i {
  width: 38%;
  background: var(--success);
}

/* ---------- Final call to action ---------- */
.h-cta {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 64px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: radial-gradient(ellipse 60% 90% at 50% 0%, rgba(61, 99, 245, 0.3), transparent 70%), var(--bg-2);
  text-align: center;
}
.h-cta small {
  color: var(--accent-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.h-cta h2 {
  max-width: 620px;
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
}

/* ---------- Footer ---------- */
.h-footer {
  margin-top: 90px;
  padding: 48px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.h-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.h-footer-grid > div {
  display: grid;
  align-content: start;
  gap: 10px;
}
.h-footer-grid p {
  max-width: 380px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.h-footer-grid b {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.h-footer-grid a:not(.brand) {
  color: var(--muted);
  font-size: 14px;
}
.h-footer-grid a:not(.brand):hover {
  color: var(--text);
}
.h-copy {
  margin-top: 36px;
  color: #5d6280;
  font-size: 13px;
}

/* ---------- Fading in ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
  .m-grid,
  .h-why {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pv-window {
    grid-template-columns: minmax(0, 1fr);
  }
  .pv-side {
    display: none;
  }
}
@media (max-width: 640px) {
  .h-hero {
    padding-top: 64px;
  }
  .m-grid,
  .h-why,
  .h-footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .h-numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
  }
  .h-numbers div:nth-child(3) {
    border-inline-start: 0;
  }
  .pv-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pv-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .pv-window {
    transform: none;
  }
  section.container {
    padding-top: 56px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .sky-stars::after {
    animation: none;
  }
}
