/* Flyword site: shared tokens, header, footer, buttons and cards. */
:root {
  --cream: #fdf7e9;
  --cream-card: #fdf3e2;
  --cream-raised: #fffdf8;
  --navy: #1b1f3b;
  --ink: #1c1c1e;
  --body: #4a4a52;
  --muted: #5f5f66;
  --teal: #069494;
  --teal-ink: #05706f;
  --yellow: #ffce1b;
  --pale-yellow: #ffeba3;
  --mint: #dff3ee;
  --pink: #fbd3d4;
  --warm: #be5103;
  --success: #1a9c53;
  --danger: #e11d48;
  --rule: #d6cdb8;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Quicksand', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--teal-ink); }
a:hover { color: #034f4e; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #155fcc; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.site-header { width: 100%; max-width: 1200px; margin: 0 auto; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand img { width: 44px; height: 44px; border-radius: 12px; border: 2.5px solid var(--navy); object-fit: cover; }
.brand span { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; font-size: 16px; font-weight: 700; }
.site-nav a:not(.store-pill) { color: var(--navy); text-decoration: none; padding: 10px 0; }
.site-nav a:not(.store-pill):hover { text-decoration: underline; text-underline-offset: 4px; }

/* App Store buttons */
.store-pill, .store-badge { display: inline-flex; align-items: center; background: #111114; color: #fff; text-decoration: none; border: 2px solid var(--navy); }
.store-pill:hover, .store-badge:hover { color: #fff; background: #000; }
.store-pill { gap: 8px; min-height: 44px; padding: 6px 16px 6px 13px; border-radius: 12px; font-size: 15px; font-weight: 700; }
.store-pill svg { width: 20px; height: 20px; }
.store-badge { gap: 12px; min-height: 64px; padding: 8px 26px 8px 20px; border-radius: 16px; border-width: 2.5px; }
.store-badge svg { width: 30px; height: 30px; flex: none; }
.store-badge .lines { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-badge .small { font-size: 13px; font-weight: 600; }
.store-badge .big { font-size: 25px; font-weight: 700; letter-spacing: -0.01em; }
.store-badge.compact { gap: 10px; min-height: 52px; padding: 6px 20px 6px 16px; border-radius: 14px; box-shadow: none; }
.store-badge.compact svg { width: 24px; height: 24px; }
.store-badge.compact .small { font-size: 11px; }
.store-badge.compact .big { font-size: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 14px; border: 2.5px solid var(--navy); font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--teal-ink); color: #fff; box-shadow: 3px 3px 0 var(--navy); }
.btn-primary:hover { background: #045f5e; color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); }
.btn-secondary:hover { color: var(--navy); background: var(--cream-raised); }
.btn-lg { min-height: 56px; padding: 0 30px; border-radius: 16px; font-size: 18px; box-shadow: 4px 4px 0 var(--navy); }
.btn-block { display: flex; width: 100%; min-height: 56px; border-radius: 16px; font-size: 18px; box-shadow: 4px 4px 0 var(--navy); }

/* Shared bits */
.avatar { border-radius: 50%; border: 3px solid var(--navy); object-fit: cover; background: var(--cream); }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 2px solid var(--navy); background: #fff; font-size: 14px; font-weight: 700; color: var(--ink); }
.chip.easy { background: var(--mint); }
.chip.hard { background: var(--pale-yellow); }
.chip.insane { background: var(--pink); }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-ink); }
.card { background: #fff; border: 3px solid var(--navy); border-radius: 28px; box-shadow: 6px 6px 0 var(--navy); }
.slot { width: 34px; min-height: 40px; display: flex; align-items: flex-end; justify-content: center; border-bottom: 3.5px solid var(--navy); font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--navy); }
.score-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--teal-ink); color: #fff; border: 2px solid var(--navy); font-size: 16px; font-weight: 700; }

/* Footer */
.site-footer { width: 100%; border-top: 3px solid var(--navy); background: transparent; }
.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 32px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .owner { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: var(--body); }
.site-footer .owner img { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--navy); object-fit: cover; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; font-weight: 700; }
.site-footer nav a { padding: 10px 0; }

/* Motion */
@keyframes fw-bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-6px) rotate(var(--r, 0deg)); } }
@keyframes fw-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fw-shake { 0% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } 100% { transform: translateX(0); } }
.bob { transform: rotate(var(--r, 0deg)); }
@media (prefers-reduced-motion: no-preference) {
  .bob { animation: fw-bob 3.2s ease-in-out infinite; }
  .pop { animation: fw-pop 380ms ease-out both; }
  .shake { animation: fw-shake 260ms linear; }
}

/* Guess boxes (home trial and match teaser) */
.guess-wrap { position: relative; max-width: 100%; margin: 0 auto; }
.guess-boxes { display: flex; justify-content: center; gap: 7px; }
.guess-box { flex: 1 1 0; min-width: 0; max-width: 52px; aspect-ratio: 1 / 1.1; display: grid; place-items: center; border: 2.5px solid #c8c8cc; border-radius: 12px; background: #fff; font-size: clamp(18px, 5.5vw, 24px); font-weight: 700; color: var(--ink); }
.guess-box.active { border-color: var(--teal); }
.guess-wrap:focus-within .guess-box.active { box-shadow: 0 0 0 2px var(--teal); }
.guess-wrap:focus-within .guess-box.active:empty::after { content: ''; width: 2px; height: 20px; border-radius: 1px; background: var(--teal); }
@media (prefers-reduced-motion: no-preference) { .guess-wrap:focus-within .guess-box.active:empty::after { animation: caret-blink 1s steps(2, start) infinite; } }
@keyframes caret-blink { 50% { opacity: 0; } }
.guess-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: text; font-size: 16px; }
.guess-input:focus-visible { outline: none; }

/* Timer ring */
.timer { position: relative; width: 52px; height: 52px; display: grid; place-items: center; flex: none; }
.timer svg { position: absolute; inset: 0; width: 52px; height: 52px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 6; }
.timer .track { stroke: #e5e5ea; }
.timer .arc { stroke: #3b82f6; stroke-linecap: round; stroke-dasharray: 182.21; stroke-dashoffset: 0; }
.timer .face { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; background: #e8e8ed; color: var(--ink); }
.timer[data-state="warning"] .face { background: var(--yellow); }
.timer[data-state="danger"] .face { background: var(--danger); color: #fff; }
.clue { padding: 16px 18px; border: 2px solid var(--navy); border-radius: 16px; background: var(--pale-yellow); font-size: 19px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; min-height: 44px; }
[hidden] { display: none !important; }

/* Legal pages */
.legal { max-width: 1100px; margin: 0 auto; padding: 24px 24px 96px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.legal aside { flex: 1 1 240px; max-width: 300px; display: flex; flex-direction: column; gap: 20px; }
.legal aside > img { width: 120px; height: 120px; }
.toc { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; background: #fff; border: 2.5px solid var(--navy); border-radius: 20px; font-size: 15px; font-weight: 600; }
.toc .label { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }
.toc a { padding: 6px 0; }
.legal article { flex: 999 1 560px; min-width: 0; background: #fff; border: 3px solid var(--navy); border-radius: 30px; box-shadow: 8px 8px 0 var(--navy); padding: clamp(28px, 4vw, 56px); font-size: 17px; line-height: 1.7; color: #2c2c30; }
.legal h1 { margin: 0 0 8px; font-size: clamp(36px, 4vw, 48px); line-height: 1.1; font-weight: 700; color: var(--navy); }
.legal .updated { margin: 0 0 28px; font-size: 15px; font-weight: 700; color: var(--muted); }
.legal h2 { margin: 36px 0 10px; font-size: 24px; font-weight: 700; color: var(--navy); scroll-margin-top: 16px; }
.legal p { margin: 0 0 16px; }
.legal ul { margin: 0 0 16px; padding-left: 24px; }
.legal article a { overflow-wrap: anywhere; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 0 0 28px; }
.glance div { padding: 18px; border: 2.5px solid var(--navy); border-radius: 18px; }
.glance .title { margin: 0 0 4px; font-size: 17px; font-weight: 700; color: var(--navy); }
.glance .text { margin: 0; font-size: 15px; line-height: 1.5; }
.glance .mint { background: var(--mint); }
.glance .pale { background: var(--pale-yellow); }
.glance .pink { background: var(--pink); }

/* Phones: keep the logo and Download on one row; the section links live further down the page. */
@media (max-width: 600px) {
  .site-header { flex-wrap: nowrap; padding: 16px; }
  .brand img { width: 40px; height: 40px; }
  .brand span { font-size: 23px; }
  .site-nav { flex-wrap: nowrap; }
  .site-nav a:not(.store-pill) { display: none; }
}
@media (max-width: 600px) {
  .site-footer .inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .site-footer nav { flex-direction: column; gap: 0; }
  .site-footer nav a { padding: 8px 0; }
}
