@font-face {
  font-family: "Montserrat";
  src: url("assets/Montserrat-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy: #0c222f;
  --navy-raised: #16313f;
  --amber: #fdb709;
  --amber-pressed: #dda000;
  --cream: #f5f4f0;
  --tile: #e9e8e3;
  --white: #fefdfe;
  --slate: #4e5b65;
  --muted: #a9b5bc;
  --success: #2d7d5b;
  --radius: 1.4rem;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--navy);
  background: var(--cream);
  font: 400 1rem/1.65 "Inter", system-ui, sans-serif;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img { display: block; max-width: 100%; }

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 20;
  padding: .7rem 1rem;
  border-radius: .5rem;
  background: var(--white);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
  padding: 1.35rem 0;
  color: var(--white);
}
.brand img, footer img { width: 10.7rem; height: auto; }
.site-header nav { display: flex; align-items: center; gap: 1.6rem; }
.site-header nav a {
  font-family: "Montserrat", sans-serif;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.nav-cta {
  padding: .65rem 1rem;
  border: 1px solid rgba(254, 253, 254, .35);
  border-radius: 999px;
}
.site-header a:hover, .site-header a:focus-visible { color: var(--amber); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7.5rem);
  min-height: 760px;
  padding: 9rem max(1.5rem, calc((100vw - var(--max-width)) / 2)) 5.5rem;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 72% 20%, rgba(253,183,9,.13), transparent 26rem),
    var(--navy);
}
.hero-copy { max-width: 680px; }
.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--amber);
  font-family: "Montserrat", sans-serif;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.eyebrow span { margin: 0 .65rem; color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Montserrat", sans-serif; line-height: 1.08; }
h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(3.4rem, 7vw, 6.6rem);
  letter-spacing: -.065em;
}
h1 span { color: var(--amber); }
.hero-intro { max-width: 37rem; color: #d6dde0; font-size: clamp(1.05rem, 1.7vw, 1.28rem); }
.text-link {
  display: inline-flex;
  gap: .65rem;
  align-items: center;
  margin-top: .8rem;
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  text-decoration-thickness: .12em;
  text-underline-offset: .35em;
}

.game-demo {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  padding: 1.8rem;
  border: 1px solid rgba(169,181,188,.25);
  border-radius: 2.1rem;
  background: linear-gradient(145deg, rgba(22,49,63,.97), rgba(7,27,38,.98));
  box-shadow: 0 2.8rem 7rem rgba(0,0,0,.35);
}
.game-demo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1.1rem 2.5rem;
  border-radius: 2.8rem;
  background: rgba(253,183,9,.08);
  transform: rotate(4deg);
}
.demo-topline { display: flex; justify-content: space-between; align-items: start; }
.demo-label { margin-bottom: .25rem; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .13em; }
.demo-topline h2 { margin: 0; font-size: 1.45rem; }
.counter { color: var(--muted); font-size: .9rem; }
.counter span { color: var(--amber); font-weight: 800; }

.mini-board {
  display: grid;
  grid-template-columns: repeat(5, 2.55rem);
  grid-template-rows: repeat(4, 2.55rem);
  justify-content: center;
  margin: 1.4rem 0 1.2rem;
}
.tile {
  display: grid;
  place-items: center;
  margin: 1px;
  border-radius: .38rem;
  color: transparent;
  background: rgba(245,244,240,.12);
  font-family: "Montserrat", sans-serif;
  font-weight: 750;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}
.tile.revealed { color: var(--navy); background: var(--white); transform: scale(.96); }
.tile-c { grid-area: 2 / 1; }
.tile-r { grid-area: 2 / 2; }
.tile-i { grid-area: 2 / 3; }
.tile-s { grid-area: 2 / 4; }
.tile-p { grid-area: 2 / 5; }
.tile-a { grid-area: 1 / 2; }
.tile-i2 { grid-area: 3 / 2; }
.tile-r2 { grid-area: 4 / 2; }

.word-readout {
  display: flex;
  justify-content: space-between;
  min-height: 2.2rem;
  margin-bottom: .7rem;
  color: var(--amber);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
}
.word-readout button {
  border: 0;
  color: var(--muted);
  background: none;
  cursor: pointer;
}
.word-readout button:hover, .word-readout button:focus-visible { color: var(--white); }

.letter-wheel {
  position: relative;
  width: min(100%, 18rem);
  aspect-ratio: 1;
  margin: 0 auto;
}
.wheel-ring {
  position: absolute;
  inset: 17%;
  border: 1px solid rgba(169,181,188,.34);
  border-radius: 50%;
}
.letter {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 2px solid var(--amber);
  border-radius: 50%;
  color: var(--white);
  background: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 100ms ease, background 100ms ease, color 100ms ease;
}
.letter:hover, .letter:focus-visible { transform: scale(1.07); }
.letter.selected { color: var(--navy); background: var(--amber); }
.letter-c { left: 50%; top: 0; transform: translateX(-50%); }
.letter-c:hover, .letter-c:focus-visible { transform: translateX(-50%) scale(1.07); }
.letter-r { top: 29%; right: 0; }
.letter-i { right: 17%; bottom: 0; }
.letter-s { left: 17%; bottom: 0; }
.letter-p { top: 29%; left: 0; }
.demo-hint { margin: .4rem 0 0; color: var(--muted); text-align: center; font-size: .8rem; }

.how {
  padding: clamp(5rem, 10vw, 8.5rem) max(1.5rem, calc((100vw - var(--max-width)) / 2));
}
.section-heading { display: grid; grid-template-columns: .6fr 1.4fr; gap: 2rem; align-items: start; margin-bottom: 4rem; }
.section-heading h2, .promise h2, .download h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.6vw, 4.5rem);
  letter-spacing: -.05em;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; padding: 0; list-style: none; background: #cdd1d0; border: 1px solid #cdd1d0; }
.steps li { position: relative; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--cream); }
.step-number { display: block; margin-bottom: 3rem; color: var(--slate); font-family: "Montserrat", sans-serif; font-size: .8rem; font-weight: 700; }
.steps h3 { margin: 2rem 0 .8rem; font-size: 1.35rem; }
.steps p { margin: 0; color: var(--slate); }
.step-visual { display: flex; align-items: center; min-height: 5.2rem; }
.trace-visual span, .board-visual span {
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  color: var(--white);
  background: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-weight: 750;
}
.trace-visual i { width: 1.5rem; height: 3px; background: var(--amber); }
.board-visual { flex-wrap: wrap; max-width: 10rem; }
.board-visual span { width: 3rem; height: 3rem; border: 1px solid var(--cream); border-radius: .35rem; }
.next-visual { gap: 1.4rem; color: var(--navy); font-family: "Montserrat", sans-serif; font-weight: 750; }
.next-visual span { padding: .85rem 1.5rem; border-radius: 999px; background: var(--amber); }
.next-visual b { font-size: 2.4rem; }

.promise {
  display: grid;
  grid-template-columns: .45fr 1.25fr .75fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(4rem, 8vw, 7rem) max(1.5rem, calc((100vw - var(--max-width)) / 2));
  color: var(--white);
  background: var(--navy);
}
.promise > p { margin: 2.3rem 0 0; color: #cbd4d8; }
.promise-logo {
  width: clamp(9rem, 16vw, 13.75rem);
  height: auto;
  justify-self: start;
}

.download {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
  padding: clamp(5rem, 10vw, 8rem) max(1.5rem, calc((100vw - var(--max-width)) / 2));
  background: var(--amber);
}
.download .eyebrow { color: var(--navy); }
.download p:last-child { margin: 1.2rem 0 0; }
.store-links { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }
.store-button {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 13.5rem;
  padding: .75rem 1.15rem;
  border-radius: .85rem;
  color: var(--white);
  background: var(--navy);
  font-family: "Montserrat", sans-serif;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.05;
  text-decoration: none;
  transition: transform 120ms ease, background 120ms ease;
}
.store-button:hover, .store-button:focus-visible { transform: translateY(-2px); background: var(--navy-raised); }
.store-button small { display: block; margin-bottom: .25rem; color: var(--muted); font: 500 .68rem/1 "Inter", sans-serif; }
.store-icon { width: 1.7rem; color: var(--white); font-size: 1.55rem; text-align: center; }
.store-icon.play { font-size: 1.25rem; }

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem max(1.5rem, calc((100vw - var(--max-width)) / 2));
  color: var(--muted);
  background: #071b26;
  font-size: .85rem;
}
footer p { margin: 0; }
footer p:last-child { text-align: right; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 9rem; }
  .game-demo { margin: 0 auto; }
  .section-heading, .promise { grid-template-columns: 1fr; }
  .promise-logo { width: 8.5rem; margin-bottom: -.5rem; }
  .promise > p { max-width: 36rem; margin-top: 0; }
  .download { align-items: start; flex-direction: column; }
  .store-links { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .site-header { width: calc(100% - 2rem); }
  .brand img { width: 8.7rem; }
  .site-header nav > a:first-child { display: none; }
  .hero { min-height: auto; padding-inline: 1rem; }
  .game-demo { padding: 1.3rem; border-radius: 1.5rem; }
  .letter { width: 3.55rem; height: 3.55rem; }
  .section-heading { margin-bottom: 2.5rem; }
  .steps { grid-template-columns: 1fr; }
  .step-number { margin-bottom: 1.5rem; }
  .download { padding-inline: 1.5rem; }
  .store-links, .store-button { width: 100%; }
  footer { grid-template-columns: 1fr; }
  footer p:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
