/* Fratchies website. Warm and calm: the app's cream (or night plum in dark mode), plum ink and
   one accent, the coral-to-magenta glow of the app's buttons. Anton for headlines, DM Sans for
   everything else. Buttons are pills, panels 28px. */

@font-face { font-family: 'Anton'; src: url('/fonts/Anton_400Regular.woff2') format('woff2'), url('/fonts/Anton_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans_400Regular.woff2') format('woff2'), url('/fonts/DMSans_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans_500Medium.woff2') format('woff2'), url('/fonts/DMSans_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans_700Bold.woff2') format('woff2'), url('/fonts/DMSans_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #FFF7F2;
  --surface: #FFFFFF;
  --tint: #FFEDEF;
  --ink: #2B0F35;
  --muted: #6B4F76;
  --line: rgba(43, 15, 53, 0.1);
  --nav: rgba(255, 247, 242, 0.82);
  --accent: #E0408A;
  --cta: linear-gradient(120deg, #E84C6A 0%, #E0408A 55%, #B83AAE 100%);
  --night: linear-gradient(150deg, #24092E 0%, #4A1652 60%, #7A2364 100%);
  --shadow: 0 24px 60px rgba(74, 22, 82, 0.12);
  --display: 'Anton', 'Impact', 'Arial Narrow Bold', sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
  --radius: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1A0B21;
    --surface: #26112F;
    --tint: #2F1539;
    --ink: #FFF2EC;
    --muted: #CDB4D4;
    --line: rgba(255, 242, 236, 0.12);
    --nav: rgba(26, 11, 33, 0.8);
    --accent: #FF7FB0;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-weight: 500; font-size: 17px; line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 999px; z-index: 30; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- type ---------- */
.hero-title, .title, .tile h3, .facts b { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.3px; }
.hero-title { font-size: clamp(46px, 5.4vw, 80px); line-height: 0.95; text-wrap: balance; }
.title { font-size: clamp(36px, 4.8vw, 64px); line-height: 0.98; }
.title-center { text-align: center; margin: 0 auto; }
.title-light { color: #FFF2EC; }
.hero-lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); max-width: 28em; }
.sub { font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); max-width: 32em; margin-top: 16px; }
.sub-center { text-align: center; margin-left: auto; margin-right: auto; }
.sub-light { color: rgba(255, 242, 236, 0.86); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border-radius: 999px; font-weight: 700; text-decoration: none; color: #FFFFFF; background: var(--cta); box-shadow: 0 10px 24px rgba(224, 64, 138, 0.28); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(224, 64, 138, 0.36); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-sm { padding: 10px 18px; font-size: 15px; }
.btn-lg { padding: 16px 28px; font-size: 18px; }
.btn-quiet { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-light { color: #4A1652; background: #FFF7F2; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2); }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 242, 236, 0.5); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #FFF2EC; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.link { font-weight: 700; font-size: 15px; text-decoration: none; padding: 10px 6px; }
.link:hover { color: var(--accent); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; transition: background 0.3s, box-shadow 0.3s; }
.nav.scrolled { background: var(--nav); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 24px; text-transform: uppercase; letter-spacing: 0.4px; text-decoration: none; }
.wordmark img { border-radius: 8px; }
.wordmark-sm { font-size: 19px; gap: 8px; }
.nav-cta { display: flex; align-items: center; gap: 8px; }

/* ---------- hero ---------- */
.hero { padding: clamp(16px, 4vw, 48px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); grid-template-areas: 'title visual' 'copy visual'; column-gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-title { grid-area: title; align-self: end; }
.hero-copy { grid-area: copy; align-self: start; margin-top: 22px; }
.hero-visual { grid-area: visual; display: flex; flex-direction: column; align-items: center; }
.stage { position: relative; width: min(100%, 460px); aspect-ratio: 900 / 1109; }
.stage::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: 4%; height: 62%; border-radius: 50%; background: radial-gradient(closest-side, rgba(242, 80, 143, 0.22), rgba(255, 184, 107, 0.12) 55%, transparent); filter: blur(10px); }
.stage-still, .stage-live { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.6s var(--ease); }
/* Same scheme as the app page inside, or the browser paints the frame opaque in dark mode. */
.stage-live { border: 0; background: transparent; opacity: 0; color-scheme: light; }
.stage.live .stage-live { opacity: 1; }
.stage.live .stage-still { opacity: 0; }
.stage-hint { margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center; min-height: 1.6em; }

/* ---------- how it works ---------- */
.how { padding: clamp(56px, 8vw, 112px) 0; background: var(--tint); }
.how-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.phone { justify-self: center; width: min(100%, 320px); border-radius: 44px; padding: 10px; background: var(--surface); box-shadow: var(--shadow); }
.phone img { border-radius: 34px; }
.steps { margin-top: 36px; display: grid; gap: 26px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; counter-increment: step; }
.steps li::before { content: counter(step); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 20px; color: #FFFFFF; background: var(--cta); }
.steps b { font-size: 21px; font-weight: 700; line-height: 1.3; }
.steps span { color: var(--muted); }

/* ---------- grow ---------- */
.grow { padding: clamp(64px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.grow-row { margin: clamp(32px, 5vw, 56px) auto 0; max-width: 1000px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(4px, 2vw, 24px); align-items: end; }
.grow-row li { display: flex; flex-direction: column; align-items: center; }
.grow-row span { margin-top: 4px; font-weight: 700; font-size: 15px; color: var(--muted); }

/* ---------- coats and the mystery egg ---------- */
.pick { padding: clamp(48px, 7vw, 96px) 0; }
.bento { margin-top: clamp(28px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.tile { border-radius: var(--radius); overflow: hidden; }
.tile-mystery { position: relative; display: flex; flex-direction: column; justify-content: flex-end; background: var(--night); color: #FFF2EC; padding: 0 28px 28px; isolation: isolate; }
.tile-mystery::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 45% at 50% 38%, rgba(242, 194, 48, 0.35), transparent 70%); }
.tile-mystery img { width: min(80%, 340px); margin: 8px auto 0; }
.tile h3 { font-size: 30px; line-height: 1; color: #F2C230; }
.tile-copy p { margin-top: 8px; color: rgba(255, 242, 236, 0.86); max-width: 24em; }
.tile-coats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; padding: 24px 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); align-content: center; }
.tile-coats li { display: flex; flex-direction: column; align-items: center; }
.tile-coats span { font-size: 14px; font-weight: 700; color: var(--muted); margin-top: -2px; }

/* ---------- facts ---------- */
.facts { padding: clamp(24px, 4vw, 48px) 0; }
.facts-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts-row > div { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 16px; }
.facts-row > div + div { border-left: 1px solid var(--line); }
.facts b { font-size: clamp(28px, 3vw, 38px); line-height: 1.1; }
.facts span { color: var(--muted); margin-top: 4px; }

/* ---------- final ---------- */
.final { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 8vw, 96px); }
.final-panel { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(16px, 4vw, 56px); padding: clamp(28px, 4vw, 56px); border-radius: var(--radius); background: var(--night); overflow: hidden; }
.final-creature { width: min(100%, 320px); justify-self: center; }

/* ---------- footer ---------- */
.footer { padding: 28px 0 40px; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; font-size: 15px; color: var(--muted); }
.footer .wordmark { color: var(--ink); }
.footer-links { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------- scroll reveal (only with JS and motion allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .steps li:nth-child(2), .js .grow-row li:nth-child(2), .js .facts-row > div:nth-child(2) { transition-delay: 0.1s; }
  .js .steps li:nth-child(3), .js .grow-row li:nth-child(3), .js .facts-row > div:nth-child(3) { transition-delay: 0.2s; }
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: 'title' 'visual' 'copy'; text-align: center; justify-items: center; }
  .hero-title { align-self: auto; }
  .stage { width: min(64vw, 300px); margin-top: 8px; }
  .hero-copy { margin-top: 12px; }
  .hero-lead { margin: 0 auto; }
  .hero .cta-row { justify-content: center; margin-top: 22px; }
  .how-grid { grid-template-columns: 1fr; }
  .how-copy { order: -1; }
  .phone { width: min(76vw, 300px); }
  .bento { grid-template-columns: 1fr; }
  .tile-mystery { padding-top: 8px; }
  .facts-row { grid-template-columns: 1fr; gap: 4px; }
  .facts-row > div + div { border-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .final-panel { grid-template-columns: 1fr; text-align: center; }
  .final-creature { width: min(56vw, 240px); }
  .final .cta-row { justify-content: center; }
}
@media (max-width: 520px) {
  .link { display: none; }
  .hero-title { font-size: clamp(40px, 12.5vw, 56px); }
  .btn-lg { padding: 15px 22px; font-size: 17px; }
  .cta-row { gap: 10px; }
  .tile-coats { padding: 18px 10px; gap: 2px 4px; }
  .tile-coats span { font-size: 12px; }
  .footer-row { justify-content: center; text-align: center; }
}
