/* Word Guess landing: the icon's midnight navy with green and yellow letter tiles. */
:root {
  --bg: #16172B; --bg2: #1E2040; --ink: #F3F4FA; --dim: rgba(243,244,250,.68); --line: rgba(255,255,255,.1);
  --green: #3DB85C; --yellow: #E0B92E; --gray: #4A4D63; --tile: #262946;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: "Inter", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1); --pop: cubic-bezier(.34,1.56,.64,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: radial-gradient(ellipse at 80% 0%, rgba(61,184,92,.14), transparent 50%), radial-gradient(ellipse at 0% 60%, rgba(224,185,46,.08), transparent 45%); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.kicker { font: 700 13.5px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--green); margin: 0 0 14px; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.03em; }
h2 { font-size: clamp(34px, 5vw, 58px); line-height: 1.05; font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
.lede { color: var(--dim); font-size: clamp(17px, 1.5vw, 19px); max-width: 32em; margin: 22px 0 0; }
section { position: relative; padding: clamp(80px, 11vw, 130px) max(20px, 6vw); }

[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px max(20px, 4vw); transition: background .3s, box-shadow .3s; }
.bar.solid { background: rgba(22,23,43,.85); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px var(--display); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.bar nav a { text-decoration: none; color: var(--dim); }
.bar nav a:hover { color: var(--ink); }
.cta { text-decoration: none; font-weight: 600; font-size: 15px; padding: 9px 18px; border-radius: 999px; background: var(--green); color: #0B1A10; white-space: nowrap; }
@media (max-width: 820px) { .bar nav { display: none; } .cta { margin-left: auto; } }

.store { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: #000; text-decoration: none; padding: 11px 22px 11px 18px; border-radius: 14px; transition: transform .25s var(--pop); }
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; fill: currentColor; }
.store span { display: flex; flex-direction: column; font: 600 20px/1.05 var(--body); }
.store small { font-size: 11px; font-weight: 500; }
.ghost { color: var(--ink); text-decoration: none; font-weight: 600; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line); }
.ghost:hover { border-color: var(--green); }
.note { color: var(--dim); font-size: 14px; }

/* hero */
.hero { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; padding-top: 120px; }
.hero h1 { font-size: clamp(46px, 6.6vw, 92px); line-height: .98; font-weight: 800; letter-spacing: -.04em; }
.hl { color: var(--green); }
.actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.demo { position: relative; justify-self: center; padding: 26px; border-radius: 28px; background: var(--bg2); border: 1px solid var(--line); box-shadow: 0 40px 90px rgba(0,0,0,.45); transform: rotate(2deg); }
.win { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%) translateY(10px) scale(.9); background: #fff; color: #111; font: 800 16px var(--body); padding: 10px 18px; border-radius: 999px; box-shadow: 0 14px 30px rgba(0,0,0,.4); opacity: 0; transition: opacity .3s, transform .45s var(--pop); white-space: nowrap; }
.win.on { opacity: 1; transform: translateX(-50%) scale(1); }

/* board + tiles */
.board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 7px; }
.board .r { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.cell { width: var(--s, 58px); height: var(--s, 58px); display: grid; place-items: center; font: 800 calc(var(--s, 58px) * .5)/1 var(--body); text-transform: uppercase; border: 2px solid #3A3D5C; border-radius: 8px; background: transparent; color: var(--ink); perspective: 400px; }
.board.small .cell { --s: clamp(44px, 5.4vw, 62px); }
.cell.filled { border-color: #6B6F95; animation: pop .12s ease-out; }
.cell.g, .t.g { background: var(--green); border-color: var(--green); color: #fff; }
.cell.y, .t.y { background: var(--yellow); border-color: var(--yellow); color: #fff; }
.cell.x, .t.x { background: var(--gray); border-color: var(--gray); color: #fff; }
.cell.flip { animation: flip .5s ease-in-out both; }
.r.shake { animation: shake .4s; }
.r.bounce .cell { animation: bounce .5s var(--pop) both; }
.r.bounce .cell:nth-child(2) { animation-delay: .08s; } .r.bounce .cell:nth-child(3) { animation-delay: .16s; } .r.bounce .cell:nth-child(4) { animation-delay: .24s; } .r.bounce .cell:nth-child(5) { animation-delay: .32s; }
@keyframes pop { 50% { transform: scale(1.08); } }
@keyframes flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes bounce { 40% { transform: translateY(-12px); } 100% { transform: none; } }

/* play */
.play { text-align: center; }
.play-head .lede { margin-left: auto; margin-right: auto; }
.game { display: flex; flex-direction: column; align-items: center; margin-top: 40px; }
.game .cell { --s: clamp(50px, 14vw, 62px); }
.msg { min-height: 28px; margin: 14px 0 8px; font-weight: 600; }
.kb { display: grid; gap: 7px; width: min(500px, 100%); }
.kb .kr { display: flex; justify-content: center; gap: 6px; }
.key { flex: 1; max-width: 44px; height: 54px; border: 0; border-radius: 7px; background: #3A3D5C; color: var(--ink); font: 700 15px var(--body); cursor: pointer; text-transform: uppercase; transition: background .3s, transform .1s; }
.key:active { transform: scale(.94); }
.key.wide { max-width: 68px; flex: 1.5; font-size: 12px; }
.key.g { background: var(--green); } .key.y { background: var(--yellow); } .key.x { background: #26283F; color: #8A8DA8; }
.again { margin-top: 18px; font: 700 16px var(--body); padding: 12px 22px; border-radius: 14px; border: 0; background: var(--green); color: #0B1A10; cursor: pointer; }
@media (max-width: 420px) { .key { height: 48px; font-size: 13px; } .kb .kr { gap: 4px; } }

/* how */
.how { text-align: center; }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1080px; margin: 50px auto 0; }
.rule { padding: 24px; border-radius: 22px; background: var(--bg2); border: 1px solid var(--line); }
.rule .row { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.t { width: 44px; height: 44px; display: grid; place-items: center; font: 800 21px var(--body); border: 2px solid #3A3D5C; border-radius: 7px; }
.rule p { color: var(--dim); margin: 0; font-size: 15.5px; }
.rule strong { color: var(--ink); }
@media (max-width: 860px) { .rules { grid-template-columns: 1fr; } }

/* features */
.features h2 { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1120px; margin: 50px auto 0; }
.grid article { padding: 26px; border-radius: 22px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.grid article:nth-child(3n+2) { transition-delay: .08s; } .grid article:nth-child(3n) { transition-delay: .16s; }
.ico { font-size: 28px; margin-bottom: 12px; }
.grid p { color: var(--dim); font-size: 15.5px; margin: 8px 0 0; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* screens */
.screens { text-align: center; }
.phones { display: flex; justify-content: center; gap: clamp(16px, 3vw, 34px); margin-top: 50px; flex-wrap: wrap; }
.phones figure { margin: 0; width: min(260px, 80vw); }
.phones figure:nth-child(2) { transform: translateY(-24px); transition-delay: .1s; } .phones figure:nth-child(3) { transition-delay: .2s; }
.phones figure:nth-child(2).in { transform: translateY(-24px); }
.phone { border-radius: 38px; padding: 8px; background: #0B0C18; box-shadow: 0 0 0 1.5px rgba(255,255,255,.14) inset, 0 30px 70px rgba(0,0,0,.5); overflow: hidden; }
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 600/1039; object-fit: cover; object-position: top; }
figcaption { margin-top: 14px; color: var(--dim); font-size: 15px; }

.faq h2 { text-align: center; }
.qa { max-width: 820px; margin: 50px auto 0; }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: 700 20px var(--display); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; font: 400 30px/1 var(--body); color: var(--green); transition: transform .3s var(--pop); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa p { color: var(--dim); margin: -6px 0 22px; }

.end { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; background: radial-gradient(ellipse at 50% 100%, rgba(61,184,92,.18), transparent 60%); }
.end img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 26px max(20px, 4vw) 36px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; }
.foot nav { display: flex; gap: 20px; }
.foot small { width: 100%; opacity: .75; }

@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: 110px; min-height: auto; } .demo { margin-top: 10px; } }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } .cell.flip, .r.shake, .r.bounce .cell, .cell.filled { animation: none; } html { scroll-behavior: auto; } }
