/* ===== Design tokens ===== */
:root {
  --bg: #0e1424;
  --bg-alt: #141c30;
  --surface: #1b2540;
  --surface-2: #223057;
  --text: #eef2fb;
  --muted: #9aa7c7;
  --border: #2b3a63;

  --brand: #f4c534;       /* tile gold */
  --brand-deep: #d9a916;
  --accent: #5b8cff;      /* board blue */
  --accent-2: #36d39a;    /* green */

  --tw: #c0392b;          /* triple word - dark red */
  --dw: #e88aa0;          /* double word - pink */
  --tl: #2f57c4;          /* triple letter - dark blue */
  --dl: #6fa8dc;          /* double letter - light blue */

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --maxw: 1140px;
  --font: "Vazirmatn", system-ui, "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

a { color: inherit; text-decoration: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #2a200a;
  box-shadow: 0 10px 28px rgba(244, 197, 52, .32);
}
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: #cfe0ff; }
.btn--sm { padding: 9px 18px; font-size: .92rem;
  background: var(--surface-2); }
.btn--sm:hover { background: var(--surface); }

/* ===== Navbar ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 20, 36, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 70px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__tile {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #2a200a;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.brand__name { font-size: 1.3rem; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { color: var(--muted); font-weight: 600; font-size: .98rem; }
.nav__links a:hover { color: var(--text); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 70px 0 90px;
  background:
    radial-gradient(900px 480px at 85% -8%, rgba(91,140,255,.20), transparent 60%),
    radial-gradient(700px 420px at 5% 20%, rgba(244,197,52,.12), transparent 55%);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 56px;
}
.badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--brand);
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.5px;
}
.hero__title-sub {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 700;
  color: var(--accent);
}
.hero__lead {
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 46ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats {
  list-style: none;
  display: flex;
  gap: 36px;
  margin-top: 38px;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 1.7rem; font-weight: 900; color: var(--brand); }
.hero__stats span { color: var(--muted); font-size: .9rem; }

/* Hero art: decorative board + rack */
.hero__art { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 12px;
  background: #0a1020;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(-3deg);
}
.cell {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #15203a;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.cell--tw { background: var(--tw); color: #fff; }
.cell--dw { background: var(--dw); color: #4a1020; }
.cell--tl { background: var(--tl); color: #fff; }
.cell--dl { background: var(--dl); color: #0d2540; }
.cell--star {
  background: var(--dw);
  color: #4a1020;
  font-size: 1.4rem;
  padding-top: 4px;
}
.lbl { font-size: .6rem; line-height: 1; font-weight: 800; }
.tile {
  position: relative;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #2a200a;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.tile sub {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-size: .6rem;
  font-weight: 800;
}
.tile--center { outline: 3px solid #fff; outline-offset: -3px; }

.rack {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #6b4f25, #4a3719);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.rack__tile {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(150deg, #fbe7a6, var(--brand));
  color: #2a200a;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18);
}
.rack__tile sub { position: absolute; bottom: 3px; left: 5px; font-size: .55rem; }
.rack__tile--blank { color: var(--brand-deep); font-size: 1.1rem; padding-top: 2px }

/* ===== Generic section ===== */
.section { padding: 84px 0; }
.section--alt { background: var(--bg-alt); }
.section__head { text-align: center; max-width: 620px; margin: 0 auto 52px; }
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; }
.section__head p { margin-top: 12px; color: var(--muted); font-size: 1.08rem; }

/* ===== Grids & cards ===== */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .18s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 1.6rem;
  margin-bottom: 16px;
}
.card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--muted); }
.card--mode { border-top: 3px solid var(--brand); }

/* ===== Steps ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 54px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
}
.step__num {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--brand), var(--brand-deep));
  color: #2a200a;
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.18rem; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* ===== Rules extra ===== */
.rules-extra {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.rules-extra__col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.rules-extra__col h3 { font-size: 1.25rem; margin-bottom: 18px; }
.ticklist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ticklist li { padding-right: 30px; position: relative; color: var(--muted); }
.ticklist li::before {
  content: "✓";
  position: absolute;
  right: 0;
  color: var(--accent-2);
  font-weight: 900;
}
.ticklist strong { color: var(--text); }

.legend { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.legend li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.chip {
  display: inline-grid;
  place-items: center;
  min-width: 74px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
}
.chip--tw { background: var(--tw); }
.chip--dw { background: var(--dw); color: #4a1020; }
.chip--tl { background: var(--tl); }
.chip--dl { background: var(--dl); color: #0d2540; }

/* ===== Tile wall ===== */
.tilewall {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 12px;
}
.twtile {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(150deg, #fbe7a6, var(--brand));
  color: #2a200a;
  font-size: 1.7rem;
  font-weight: 900;
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.18);
  transition: transform .15s ease;
}
.twtile:hover { transform: translateY(-4px) rotate(-3deg); }
.twtile span {
  position: absolute;
  bottom: 6px;
  left: 9px;
  font-size: .72rem;
  font-weight: 800;
  opacity: .85;
}
.tilewall__note { text-align: center; color: var(--muted); margin-top: 22px; font-size: .92rem; }

/* ===== CTA ===== */
.cta {
  padding: 90px 0;
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(244,197,52,.16), transparent 60%),
    var(--bg-alt);
}
.cta__inner { text-align: center; max-width: 640px; margin-inline: auto; }
.cta h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 900; }
.cta p { margin: 16px 0 30px; color: var(--muted); font-size: 1.1rem; }
.cta .hero__actions { justify-content: center; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand strong { display: block; font-size: 1.05rem; }
.footer__brand span { color: var(--muted); font-size: .85rem; }
.footer__links { display: flex; gap: 22px; }
.footer__links a { color: var(--muted); font-size: .95rem; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--muted); font-size: .88rem; width: 100%; text-align: center; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px; }

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { order: -1; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .tilewall { grid-template-columns: repeat(7, 1fr); }
}
@media (max-width: 680px) {
  .nav__links { display: none; }
  .grid--3, .steps, .rules-extra { grid-template-columns: 1fr; }
  .tilewall { grid-template-columns: repeat(5, 1fr); }
  .hero__stats { gap: 24px; }
  .cell { width: 44px; height: 44px; }
}
@media (max-width: 420px) {
  .tilewall { grid-template-columns: repeat(4, 1fr); }
  .cell { width: 38px; height: 38px; }
}
