@font-face {
  font-family: "Baloo 2";
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/baloo2-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Baloo 2";
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/baloo2-latin-ext-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0c0e21;
  --stage: #1e2456;
  --ink: #fff;
  --ink-soft: #c9d0f5;
  --ink-label: #a6afdd;
  --ink-muted: #8b95cc;
  --ink-clue: #dfe4ff;
  --purple: #6a48f0;
  --purple-bright: #7c5cff;
  --purple-light: #a48bff;
  --purple-shadow: #4f34c0;
  --clue: #ffd23f;
  --line: rgba(255, 255, 255, .12);
  --tile-correct: linear-gradient(180deg, #3ff5b0, #1fb87c);
  --tile-misplaced: linear-gradient(180deg, #ffd46a, #e8a41c);
  --tile-wrong: #3a4276;
  --tile-blank: #2d3468;
  --display: "Baloo 2", ui-rounded, system-ui, sans-serif;
  --ui: Nunito, ui-rounded, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-family: var(--ui); color: var(--ink); overflow-x: hidden; }
a { color: var(--purple-light); text-decoration: none; }
a:hover { color: #fff; }
a:focus-visible { outline: 3px solid var(--purple-light); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }

@keyframes pop { 0% { transform: scale(.7) } 62% { transform: scale(1.09) } 100% { transform: scale(1) } }
@keyframes rise { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: translateY(0) } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 18px rgba(124, 92, 255, .35) } 50% { box-shadow: 0 0 34px rgba(124, 92, 255, .6) } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-60px) rotate(-8deg) scale(.6) } 60% { opacity: 1; transform: translateY(8px) rotate(3deg) scale(1.06) } 100% { opacity: 1; transform: none } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: none } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)) } 50% { transform: translateY(-22px) rotate(calc(var(--r, 0deg) + 6deg)) } }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }
@keyframes wobble { 0%, 100% { transform: rotate(-3deg) } 50% { transform: rotate(3deg) } }
@keyframes blink { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

.page { min-height: 100vh; background: radial-gradient(120% 60% at 50% 0%, var(--stage) 0%, var(--bg) 70%); overflow: hidden; position: relative; }
.wrap { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* Tiles */
.tile { display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; line-height: 1; color: #fff; background: var(--tile-blank); flex: none; }
.t-correct { background: var(--tile-correct); color: #08210f; }
.t-misplaced { background: var(--tile-misplaced); color: #2b1c00; }
.t-wrong { background: var(--tile-wrong); color: #cdd4f5; }
.t-purple { background: var(--purple); color: #fff; }

/* Floating background letters */
.floaters { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.floaters span { position: absolute; border-radius: 22%; opacity: .1; animation: float ease-in-out infinite; }

/* Nav */
.nav { position: relative; z-index: 2; max-width: 1160px; margin: 0 auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand-tiles { display: flex; gap: 3px; }
.brand-tiles .tile { width: 26px; height: 30px; border-radius: 7px; font-size: 20px; }
.brand-tiles .t-purple { font-size: 22px; box-shadow: 0 0 14px rgba(124, 92, 255, .5); }
.brand-word { font: 800 20px var(--display); letter-spacing: .04em; }
.nav-links { display: flex; align-items: center; gap: 26px; font: 800 15px var(--ui); }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: #fff; }
.nav-links .pill { padding: 11px 18px; border-radius: 999px; background: var(--purple-bright); color: #fff; box-shadow: 0 4px 0 var(--purple-shadow); transition: transform .12s; }
.nav-links .pill:hover { transform: translateY(-2px); }
.nav-links .pill:active { transform: translateY(2px); box-shadow: 0 0 0 var(--purple-shadow); }

/* Hero */
.hero { padding-top: 60px; padding-bottom: 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 26px; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; font-weight: inherit; }
.logo-tiles { display: flex; gap: 8px; }
.logo-tiles .tile { width: 84px; height: 96px; border-radius: 20px; font-size: 66px; animation: drop .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.logo-tiles .t-correct { box-shadow: 0 0 30px rgba(46, 230, 160, .45); }
.logo-tiles .t-purple { font-size: 74px; animation: drop .7s cubic-bezier(.2, .9, .3, 1.2) both, glow 3s ease-in-out 1.2s infinite; }
.logo-word { width: 452px; max-width: 92vw; display: flex; justify-content: space-between; font: 800 clamp(56px, 14vw, 92px)/.95 var(--display); color: #fff; text-shadow: 0 0 28px rgba(124, 92, 255, .55); animation: fadeUp .8s ease .7s both; }
.lede { max-width: 560px; font: 700 clamp(18px, 2.4vw, 23px)/1.4 var(--ui); color: var(--ink-soft); text-wrap: balance; animation: fadeUp .8s ease .9s both; }
.ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; animation: fadeUp .8s ease 1.05s both; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 18px 30px; border-radius: 18px; font: 800 22px var(--display); transition: transform .12s, background .2s; }
/* Official Apple badge: shown unmodified; only the link around it moves on hover. */
.store-badge { display: inline-block; line-height: 0; border-radius: 12px; transition: transform .2s ease; }
.store-badge img { display: block; height: 60px; width: auto; }
.store-badge:hover { transform: translateY(-3px); }
.store-badge:focus-visible { outline: 3px solid var(--purple-bright); outline-offset: 4px; }
.btn-ghost { padding: 18px 26px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); color: #fff; }
.btn-ghost:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .12); }
/* In the hero, match the App Store badge's fixed 180x60 footprint (the badge itself can't be resized). */
.ctas .btn-ghost { box-sizing: border-box; width: 180px; height: 60px; padding: 0 16px; justify-content: center; white-space: nowrap; border-radius: 12px; }
.fineprint { font: 700 14px var(--ui); color: var(--ink-muted); animation: fadeUp .8s ease 1.2s both; }

/* Sections */
.eyebrow { font: 800 12px var(--ui); letter-spacing: .14em; color: var(--ink-label); text-transform: uppercase; }
.h2 { font: 800 clamp(38px, 5vw, 60px)/1.02 var(--display); text-wrap: balance; }
.reveal { transition: opacity .7s ease, transform .7s ease; }
.js .reveal:not(.shown) { opacity: 0; transform: translateY(30px); }

/* Demo */
.play { padding-top: 50px; padding-bottom: 90px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 48px; align-items: center; }
.play-copy { display: flex; flex-direction: column; gap: 18px; }
.play-copy p { font: 700 18px/1.5 var(--ui); color: var(--ink-label); text-wrap: pretty; max-width: 460px; }
.legend { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 12px; font: 700 16px var(--ui); color: var(--ink-clue); }
.legend .tile { width: 38px; height: 38px; border-radius: 10px; font-size: 22px; }
.demo-wrap { display: flex; justify-content: center; transition-delay: .15s; }
.demo { width: 100%; max-width: 440px; border-radius: 30px; padding: 24px; background: radial-gradient(120% 70% at 50% 0%, var(--stage) 0%, var(--bg) 72%); border: 1px solid var(--line); box-shadow: 0 40px 90px rgba(0, 0, 0, .55); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.demo-head { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat:last-child { align-items: flex-end; }
.stat-label { font: 800 11px var(--ui); letter-spacing: .14em; color: var(--ink-label); }
.stat-value { font: 800 20px/1.15 var(--display); color: var(--purple-light); }
.stat:last-child .stat-value { color: var(--clue); }
.clue { width: 100%; padding: 12px 14px; border-radius: 16px; background: rgba(255, 210, 63, .12); border: 1px solid rgba(255, 210, 63, .4); text-align: center; font: 700 14.5px/1.4 var(--ui); color: var(--ink-clue); }
.demo-status { height: 36px; display: flex; align-items: center; }
.live { font: 700 13px var(--ui); color: var(--ink-muted); animation: blink 1.6s ease-in-out infinite; }
.won { display: flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 999px; background: #2ee6a0; animation: rise .3s ease both; }
.won b { font: 800 16px var(--display); color: var(--bg); }
.won span { font: 700 13px var(--ui); color: rgba(12, 14, 33, .72); }
.won i { width: 9px; height: 9px; border-radius: 999px; background: var(--bg); opacity: .5; }
.grid { display: grid; grid-template-columns: repeat(5, auto); gap: 9px; }
.cell { width: 60px; height: 60px; border-radius: 12px; font-size: 30px; background: rgba(255, 255, 255, .05); border: 2px solid rgba(255, 255, 255, .14); }
.cell.typed { background: rgba(124, 92, 255, .16); border-color: var(--purple-bright); box-shadow: 0 0 16px rgba(124, 92, 255, .3); animation: pop .18s ease both; }
.cell.t-correct, .cell.t-misplaced, .cell.t-wrong { border-color: transparent; animation: pop .3s ease both; }
.cell.t-correct { background: var(--tile-correct); box-shadow: 0 0 22px rgba(46, 230, 160, .45); }
.cell.t-misplaced { background: var(--tile-misplaced); box-shadow: 0 0 20px rgba(255, 210, 63, .32); }
.cell.t-wrong { background: var(--tile-wrong); }

/* Features */
.features { padding-top: 20px; padding-bottom: 90px; display: flex; flex-direction: column; gap: 36px; }
.features-head { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.card { padding: 28px; border-radius: 26px; background: #181c3d; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; transition: opacity .7s ease, transform .7s ease, background .25s; }
.card:hover { background: #1e2350; }
.card .tile { width: 64px; height: 72px; border-radius: 16px; font-size: 46px; animation: wobble 4s ease-in-out infinite; }
.card .t-purple { box-shadow: 0 0 24px rgba(124, 92, 255, .5); }
.card .t-correct { box-shadow: 0 0 24px rgba(46, 230, 160, .4); }
.card .t-misplaced { box-shadow: 0 0 24px rgba(255, 210, 63, .35); }
.card h3 { font: 800 26px/1.1 var(--display); text-wrap: balance; }
.card p { font: 700 15.5px/1.5 var(--ui); color: var(--ink-label); text-wrap: pretty; }
.card:nth-child(2), .card:nth-child(2) .tile { transition-delay: .1s; animation-delay: .1s; }
.card:nth-child(3), .card:nth-child(3) .tile { transition-delay: .2s; animation-delay: .2s; }
.card:nth-child(4), .card:nth-child(4) .tile { transition-delay: .3s; animation-delay: .3s; }

/* Categories marquee */
.cats { position: relative; z-index: 1; padding: 0 0 90px; display: flex; flex-direction: column; gap: 22px; overflow: hidden; }
.cats .eyebrow { text-align: center; }
.marquee { display: flex; width: max-content; gap: 14px; margin: 0; padding: 0; list-style: none; animation: marquee 32s linear infinite; }
.marquee li { padding: 14px 24px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); font: 800 22px var(--display); white-space: nowrap; }
.marquee li:nth-child(4n+1) { color: #2ee6a0; }
.marquee li:nth-child(4n+2) { color: var(--clue); }
.marquee li:nth-child(4n+3) { color: var(--purple-light); }
.marquee li:nth-child(4n) { color: #fff; }

/* Final CTA */
.final { padding-bottom: 100px; }
.final-card { border-radius: 36px; padding: clamp(40px, 6vw, 72px) 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; background: radial-gradient(90% 100% at 50% 0%, #2a3170 0%, #141736 75%); border: 1px solid var(--line); }
.ready { display: flex; gap: 8px; }
.ready .tile { width: 56px; height: 64px; border-radius: 14px; font-size: 44px; animation: float 3.4s ease-in-out infinite; }
.ready .t-purple { box-shadow: 0 0 20px rgba(124, 92, 255, .5); }
.ready .tile:nth-child(2) { animation-delay: .3s; }
.ready .tile:nth-child(3) { animation-delay: .6s; }
.ready .tile:nth-child(4) { animation-delay: .9s; }
.ready .tile:nth-child(5) { animation-delay: 1.2s; }
.final-card .h2 { font-size: clamp(38px, 5vw, 64px); }
.final-card p { max-width: 480px; font: 700 18px/1.5 var(--ui); color: var(--ink-soft); text-wrap: balance; }

/* Footer */
.footer { position: relative; z-index: 1; border-top: 1px solid rgba(255, 255, 255, .1); padding: 28px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; font: 700 14px var(--ui); color: var(--ink-muted); }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: #fff; }
.footer .legal { flex-basis: 100%; margin: 0; text-align: center; font: 600 12px var(--ui); opacity: .75; }

@media (max-width: 560px) {
  .wrap, .nav { padding-left: 16px; padding-right: 16px; }
  .nav { justify-content: center; }
  .nav-links { gap: 12px 18px; flex-wrap: wrap; justify-content: center; }
  .hero { padding-top: 32px; }
  .logo-tiles { gap: 6px; }
  .logo-tiles .tile { width: 56px; height: 64px; border-radius: 14px; font-size: 44px; }
  .logo-tiles .t-purple { font-size: 50px; }
  .logo-word { width: 300px; }
  .btn { font-size: 19px; padding: 15px 22px; }
  .demo { padding: 18px 14px; }
  .cell { width: 50px; height: 50px; font-size: 26px; }
  .grid { gap: 7px; }
  .ready .tile { width: 44px; height: 52px; font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding: 0 16px; }
  .marquee li[aria-hidden] { display: none; }
}

/* Text for screen readers and search engines; visually hidden. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Logo letters are drawn by CSS so the h1 text is exactly "Word Mystery" for search engines. */
.logo [data-l]::before { content: attr(data-l); }

/* FAQ */
.faq { padding-bottom: 90px; display: flex; flex-direction: column; gap: 36px; }
.faq-list { width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq details { border-radius: 22px; background: #181c3d; border: 1px solid var(--line); transition: opacity .7s ease, transform .7s ease, background .25s; }
.faq details:hover, .faq details[open] { background: #1e2350; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-radius: 22px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--purple); font: 800 26px/1 var(--display); color: #fff; }
.faq details[open] summary::after { content: "−"; }
.faq summary:focus-visible { outline: 3px solid var(--purple-light); outline-offset: 3px; }
.faq h3 { font: 800 clamp(20px, 2.4vw, 24px)/1.2 var(--display); }
.faq details p, .faq details ul { padding: 0 24px 22px; font: 700 16.5px/1.6 var(--ui); color: var(--ink-label); text-wrap: pretty; }
.faq details ul { margin: 0; padding-left: 46px; display: flex; flex-direction: column; gap: 6px; }
.faq details strong, .faq details em { color: var(--ink-clue); }

/* Battles */
.battle-shot { width: 100%; max-width: 440px; height: auto; border-radius: 30px; border: 10px solid #05060f; box-shadow: 0 0 0 2px #2a3170, 0 40px 90px rgba(0, 0, 0, .55); }
.battles .legend .tile { font-size: 18px; }
@media (max-width: 760px) { .battles .play-copy { order: -1; } }
