/* Block Link home — lavender field, navy tiles, one orange stroke. */
:root {
  --lav-0: #f3f1fc;
  --lav-1: #e9e6f8;
  --lav-2: #d4cfef;
  --lav-3: #b9b2e4;
  --navy: #1d2650;
  --navy-2: #232e5e;
  --navy-deep: #151b3d;
  --ink: #181c3a;
  --muted: #565273;
  --orange: #ff6b1a;
  --orange-2: #ff8a3d;
  --hairline: rgba(29, 38, 80, 0.14);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Microsoft YaHei",
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--lav-1);
  line-height: 1.7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 1rem;
  color: #fff;
  background: var(--navy);
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(233, 230, 248, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.nav.scrolled {
  background: rgba(233, 230, 248, 0.98);
  border-bottom-color: var(--hairline);
}

.nav-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand svg {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(29, 38, 80, 0.07);
}

.nav-cta {
  padding: 10px 20px;
  border-radius: 999px;
  color: #fff !important;
  background: var(--navy);
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: var(--orange);
}

/* Fixed nav must never cover jump targets. */
.section[id],
.hero[id],
[id="play"] {
  scroll-margin-top: 76px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(163deg, #efedfb 0%, #dcd7f3 52%, #c8c1ea 100%);
}

.hero-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: 120px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.hero h1 .accent {
  color: var(--orange);
}

.hero-sub {
  margin: 24px 0 0;
  max-width: 30em;
  font-size: clamp(16px, 1.6vw, 18.5px);
  line-height: 1.85;
  color: var(--muted);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange-2), var(--orange) 60%, #f0550a);
  box-shadow: 0 10px 26px -8px rgba(255, 107, 26, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 14px 32px -8px rgba(255, 107, 26, 0.65);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--hairline);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.85);
}

.hero-note {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

.hero-board-wrap {
  position: relative;
  justify-self: center;
  width: min(100%, 520px);
}

.hero-board {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 34px 60px rgba(29, 38, 80, 0.28));
}

.hero-caption {
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translate(-50%, 100%);
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(72px, 9vw, 128px) 0;
}

.section-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.section-head {
  max-width: 620px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--orange);
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-desc {
  margin: 16px 0 0;
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.85;
}

/* ---------- Features ---------- */
.features {
  background: #fff;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  overflow: hidden;
}

.feature {
  background: #fff;
  padding: 30px 26px 34px;
  transition: background 0.2s ease;
}

.feature:hover {
  background: var(--lav-0);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--lav-1);
  color: var(--navy);
  margin-bottom: 18px;
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.feature p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- Modes ---------- */
.modes {
  background: var(--lav-1);
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.mode-card {
  background: #fff;
  border-radius: 22px;
  padding: 26px 26px 30px;
  box-shadow: 0 18px 44px -22px rgba(29, 38, 80, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 54px -22px rgba(29, 38, 80, 0.32);
}

.mode-board {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: var(--lav-0);
  margin-bottom: 20px;
}

.mode-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.mode-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- Play ---------- */
.play {
  position: relative;
  overflow: hidden;
  color: #eceaff;
  background:
    radial-gradient(900px 480px at 12% -12%, rgba(255, 138, 61, 0.14), transparent 55%),
    linear-gradient(165deg, var(--navy-deep), var(--navy) 70%);
}

.play .section-kicker {
  color: var(--orange-2);
}

.play .section-title {
  color: #fff;
}

.play .section-desc {
  color: rgba(236, 234, 255, 0.66);
}

.play-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.play-board-wrap {
  justify-self: center;
  width: min(100%, 460px);
}

.play-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}

.play-board svg.tiles,
.play-board svg.trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.play-board svg.trail {
  filter: drop-shadow(0 0 10px rgba(255, 107, 26, 0.55));
}

.play-status {
  min-height: 2em;
  margin: 20px 0 0;
  font-size: 16.5px;
  font-weight: 600;
  text-align: center;
  color: rgba(236, 234, 255, 0.82);
  transition: color 0.2s ease;
}

.play-status.win {
  color: var(--orange-2);
}

.play-actions {
  margin-top: 14px;
  text-align: center;
}

.btn-restart {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(236, 234, 255, 0.28);
  border-radius: 999px;
  color: #eceaff;
  background: transparent;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-restart:hover {
  background: rgba(236, 234, 255, 0.1);
  border-color: rgba(236, 234, 255, 0.5);
}

.play-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
}

.play-points li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}

.play-points .num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 107, 26, 0.14);
  color: var(--orange-2);
  font-size: 14px;
  font-weight: 700;
}

.play-points h3 {
  margin: 4px 0 4px;
  font-size: 16.5px;
  font-weight: 700;
  color: #fff;
}

.play-points p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(236, 234, 255, 0.6);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-deep);
  color: rgba(236, 234, 255, 0.6);
  border-top: 1px solid rgba(236, 234, 255, 0.08);
}

.footer-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  padding: 44px 0 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 15.5px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 14px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 10px;
  color: rgba(236, 234, 255, 0.72);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.footer-legal {
  width: 100%;
  margin: 6px 0 0;
  font-size: 12.5px;
  color: rgba(236, 234, 255, 0.38);
}

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mode-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .play-grid {
    grid-template-columns: 1fr;
  }

  .play-board-wrap {
    order: -1;
  }
}

@media (max-width: 720px) {
  .nav-links {
    gap: 18px;
    font-size: 13.5px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero-caption {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 60px;
    padding: 116px 0 92px;
    min-height: auto;
  }

  .hero-copy {
    max-width: 560px;
  }

  .hero-board-wrap {
    width: min(100%, 440px);
  }
}

@media (max-width: 720px) {
  .hero-board-wrap {
    width: min(100%, 400px);
  }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-ctas .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
