/* ------------------------------
   TOKENS
   Fonki blues from FonkiKit/FonkiPainter.swift (FonkiStyle), the yellow from
   the app icon, the accent palette from Fonki/util/Theme.swift, Karla like the app.
--------------------------------*/
@font-face {
  font-family: "Karla";
  src: url("/fonts/Karla-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --canvas: #fffdf6;
  --card: #ffffff;
  --ink: #1d1a33;
  --muted: #5c5873;
  --line: #ece8dc;

  --fonki: #2ea1eb;       /* skin */
  --fonki-deep: #0070c7;  /* snout */
  --fonki-dark: #0a5ca3;  /* mouth / brow */
  --fonki-light: #94d6fa; /* belly */
  --sun: #ffd84d;         /* app icon background */
  --sun-deep: #f4b41a;

  --coral: #ff985b;
  --cyan: #4cc3d9;
  --green: #9ccc65;
  --purple: #9575cd;
  --pink: #fd9598;

  --radius-card: 24px;
  --radius-control: 16px;
  --shadow-card: 0 6px 18px rgba(29, 26, 51, 0.08);
  --shadow-pop: 0 18px 50px rgba(0, 112, 199, 0.18);

  --font: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --page-max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 9vw, 120px);
}

/* ------------------------------
   GLOBAL
--------------------------------*/
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
p, figure, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--fonki-deep); }
:focus-visible { outline: 3px solid var(--fonki-deep); outline-offset: 3px; }
[id] { scroll-margin-top: 88px; }

.container { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fonki-deep);
  margin-bottom: 14px;
}
.section-title { font-size: clamp(30px, 4.2vw, 48px); }
.section-lead { color: var(--muted); font-size: clamp(17px, 1.4vw, 20px); max-width: 60ch; }
.split-head { display: grid; gap: 20px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
@media (min-width: 900px) { .split-head { grid-template-columns: 1.1fr 1fr; } .split-head .section-lead { padding-bottom: 6px; } }

.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 0;
  background: var(--fonki-deep); color: #fff; font: inherit; font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 0 var(--fonki-dark);
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--fonki-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--fonki-dark); }
.btn-small { padding: 10px 18px; font-size: 16px; box-shadow: 0 4px 0 var(--fonki-dark); }

/* ------------------------------
   HEADER
--------------------------------*/
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 253, 246, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { position: relative; display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-head { width: 42px; height: auto; }
.logo-word { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.nav-menu { display: flex; flex: 1; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { display: block; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav-links a:hover { background: #fff1bf; }
.nav-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.nav-toggle { display: none; }

.lang-menu { position: relative; }
.lang-button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
  font: 800 13px/1 var(--font); letter-spacing: .04em; cursor: pointer;
}
.lang-button:hover { background: #fff1bf; }
.lang-button svg { width: 16px; height: 16px; }
.lang-button .lang-chevron { width: 12px; height: 12px; transition: transform .15s ease; }
.lang-button[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }
.lang-list {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 30;
  display: grid; min-width: 200px; padding: 6px; border-radius: var(--radius-control);
  background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 12px 32px -8px rgba(29, 26, 51, 0.25);
}
.lang-list[hidden] { display: none; }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; }
.lang-list a:hover, .lang-list a[aria-current="true"] { background: #fff1bf; }
.lang-code { color: var(--muted); font-size: 12px; font-weight: 700; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; min-height: 42px; margin-left: auto; padding: 0 16px;
    border: 0; border-radius: 999px; background: #fff1bf; color: var(--ink); font: 700 16px/1 var(--font); cursor: pointer;
  }
  .nav-menu {
    display: none; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: stretch; gap: 16px;
    padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line); background: var(--canvas);
  }
  .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 20px; }
  .nav-links a:hover { background: none; }
  .nav-end { justify-content: space-between; margin-left: 0; }
  .lang-list { right: auto; left: 0; }
}

/* ------------------------------
   HERO
--------------------------------*/
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff6cf 0%, var(--canvas) 100%); }
.hero-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 0 9px, transparent 10px);
  background-size: 92px 92px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero-inner > * { min-width: 0; }
.hero-inner { position: relative; display: grid; gap: 40px; padding-block: clamp(40px, 7vw, 96px) clamp(40px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 0.9fr 1.25fr; gap: 48px; } }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap; background: var(--chip-bg); color: var(--chip-ink); }
.chip svg { width: 16px; height: 16px; flex: none; }
.chip b { font-weight: 700; }
.c-age { --chip-bg: #FFE7A3; --chip-ink: #6B4A00; }
.c-games { --chip-bg: #E3EEFF; --chip-ink: #0B4AA0; }
.c-lang { --chip-bg: #F1E4FF; --chip-ink: #5B2A99; }
.c-ads { --chip-bg: #DDF5E4; --chip-ink: #17693A; }
@media (max-width: 520px) { .chip { white-space: normal; } }
.hero-title { font-size: clamp(36px, 5.4vw, 64px); }
.hero-lead { margin-top: 20px; font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); max-width: 54ch; }
.hero-actions { margin-top: 28px; }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 14px;
  background: var(--ink); color: #fff; text-decoration: none; line-height: 1.1;
}
.store-badge svg { width: 26px; height: 26px; }
.store-badge span { display: flex; flex-direction: column; font-weight: 800; font-size: 18px; }
.store-badge small { font-size: 11px; font-weight: 600; opacity: .8; letter-spacing: .02em; }
.store-badge.is-soon { background: #2b2841; cursor: default; }

.hero-stage { padding-top: 12px; }
.device { border-radius: 26px; background: #14122a; padding: 10px; box-shadow: var(--shadow-pop); }
.device img, .device video { display: block; border-radius: 18px; width: 100%; height: auto; background: #14122a; }

/* ------------------------------
   MEET
--------------------------------*/
.meet { padding-block: clamp(48px, 6vw, 80px) 0; }
.meet-inner > *, .grown-inner > *, .faq-inner > *, .cta-inner > * { min-width: 0; }
.meet-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .meet-inner { grid-template-columns: 0.8fr 1.2fr; gap: 64px; } }
.meet-art { display: flex; align-items: flex-end; justify-content: center; gap: clamp(24px, 4vw, 48px); max-width: 420px; margin-inline: auto; padding: 56px 40px 34px; position: relative; isolation: isolate; }
.meet-art::before { content: ""; position: absolute; inset: 0 0 12px; z-index: -1; border-radius: 40% 60% 55% 45% / 55% 45% 55% 45%; background: #dff4ea radial-gradient(rgba(255,255,255,.75) 0 6px, transparent 7px); background-size: 56px 56px; }
.meet-figure { position: relative; display: grid; justify-items: center; gap: 10px; margin: 0; }
.meet-figure img { height: auto; filter: drop-shadow(0 12px 14px rgba(20, 80, 60, .18)); }
.meet-figure:first-child img { width: clamp(110px, 15vw, 150px); }
.meet-figure-zipchik img { width: clamp(64px, 9vw, 86px); }
.meet-figure figcaption { font-weight: 800; font-size: 15px; background: #fff; padding: 4px 12px; border-radius: 999px; }
.check-list { margin-top: 24px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 36px; font-weight: 600; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.check-list.light li::before { background: var(--sun); color: var(--ink); }

/* ------------------------------
   HOUSE
--------------------------------*/
.house { padding-block: var(--section-y); }
.room-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.room-card { background: var(--tint, #fff); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .2s ease; }
.room-card:hover { transform: translateY(-4px); }
.room-card img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.room-body { padding: 20px 22px 24px; }
.room-body h3 { font-size: 22px; margin-bottom: 8px; }
.room-body p { color: var(--muted); font-size: 16px; }
.room-more { margin-top: 28px; color: var(--muted); max-width: 80ch; }

/* ------------------------------
   GAMES
--------------------------------*/
.games { padding-block: var(--section-y); background: #fff; border-block: 1px solid var(--line); }
.game-groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.game-group { border: 2px solid color-mix(in srgb, var(--g) 35%, #fff); border-radius: 20px; padding: 18px 18px 16px; background: color-mix(in srgb, var(--g) 7%, #fff); }
.game-group h3 { font-size: 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.game-group h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--g); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 15px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.game-shots { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.game-shots li { display: grid; gap: 12px; }
.game-shots img { width: 100%; border-radius: 18px; box-shadow: var(--shadow-card); aspect-ratio: 2 / 1; object-fit: cover; }
.game-shots figcaption { font-size: 16px; color: var(--muted); }
.game-shots strong { display: block; color: var(--ink); font-size: 18px; }

/* ------------------------------
   AGES
--------------------------------*/
.ages { padding-block: var(--section-y); }
.age-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.age-card { background: var(--tint); border-radius: var(--radius-card); padding: 26px 26px 30px; }
.age-badge { display: inline-block; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; background: #fff; padding: 6px 16px; border-radius: 999px; margin-bottom: 18px; }
.age-card h3 { font-size: 22px; margin-bottom: 10px; }
.age-card p { color: var(--muted); font-size: 16px; }

/* ------------------------------
   GROWN-UPS
--------------------------------*/
.grown { padding-block: var(--section-y); background: var(--fonki-deep); color: #fff; }
.grown .eyebrow { color: var(--sun); }
.grown .section-lead { color: rgba(255,255,255,.8); }
.grown-inner { display: grid; gap: 40px; }
@media (min-width: 960px) { .grown-inner { grid-template-columns: 0.9fr 1.4fr; gap: 64px; } }
.grown-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grown-grid li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 20px; }
.grown-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--g); font-size: 22px; margin-bottom: 14px; }
.grown-grid h3 { font-size: 18px; margin-bottom: 6px; }
.grown-grid p { font-size: 15px; color: rgba(255,255,255,.82); }

/* ------------------------------
   PLUS
--------------------------------*/
.plus { padding-block: var(--section-y); }
.plus-card { background: var(--sun); border-radius: 32px; padding: clamp(28px, 4vw, 56px); display: grid; gap: 32px; position: relative; overflow: hidden; }
.plus-card > * { position: relative; }
.plus-card::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.35); }
@media (min-width: 960px) { .plus-card { grid-template-columns: 1.1fr 1fr; align-items: center; } .plan-fine { grid-column: 1 / -1; } }
.plus-eyebrow { display: flex; gap: 6px; margin-bottom: 18px; }
.pill { background: #fff; color: var(--ink); padding: 4px 12px; border-radius: 999px; letter-spacing: .04em; }
.pill-plus { background: var(--fonki-deep); color: #fff; }
.plus .section-lead { color: #3d3410; }
.plans { display: grid; gap: 12px; position: relative; }
.plan { background: #fff; border-radius: 20px; padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 16px; position: relative; }
.plan-name { font-weight: 800; font-size: 18px; }
.plan-price { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.plan-price small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.plan-note { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.plan-best { outline: 3px solid var(--fonki-deep); }
.plan-flag { position: absolute; top: -12px; left: 18px; background: var(--fonki-deep); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.plan-fine { font-size: 14px; color: #5a4d16; max-width: 70ch; }

/* ------------------------------
   FAQ
--------------------------------*/
.faq { padding-block: 0 var(--section-y); }
.faq-inner { display: grid; gap: 28px; }
@media (min-width: 900px) { .faq-inner { grid-template-columns: 0.8fr 1.4fr; gap: 64px; } }
.faq-list { display: grid; gap: 10px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 4px 22px; }
.faq-list summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--fonki-deep); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { color: var(--muted); padding-bottom: 18px; font-size: 16px; }

/* ------------------------------
   CTA + FOOTER
--------------------------------*/
.cta { padding-block: 0 var(--section-y); }
.cta-inner { display: grid; gap: 24px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 32px; padding: clamp(24px, 4vw, 48px); }
@media (min-width: 760px) { .cta-inner { grid-template-columns: 180px 1fr; gap: 40px; } }
.cta-fonki { width: 170px; height: auto; margin-inline: auto; }
.notify { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 480px; }
.notify input { flex: 1 1 220px; font: inherit; padding: 12px 18px; border-radius: 999px; border: 2px solid var(--line); background: var(--canvas); }
.notify input:focus { border-color: var(--fonki); outline: none; }

.site-footer { border-top: 1px solid var(--line); padding-block: 40px; background: #fff; }
.footer-inner { display: grid; gap: 20px; align-items: center; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1fr auto; gap: 24px 40px; } .footer-base { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 20px; } }
.footer-brand p { margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 40ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; font-weight: 700; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--fonki-deep); }
.footer-copy { color: var(--muted); font-size: 14px; }
.footer-base { display: grid; gap: 10px; }
.footer-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; font-weight: 700; }
.footer-langs a { color: var(--muted); text-decoration: none; }
.footer-langs a:hover, .footer-langs a[aria-current="true"] { color: var(--fonki-deep); }

/* ------------------------------
   LEGAL + 404
--------------------------------*/
.page-title { font-size: clamp(32px, 4.6vw, 52px); }
.legal { padding-block: clamp(40px, 6vw, 80px) var(--section-y); }
.legal-inner { max-width: 760px; }
.legal-head { margin-bottom: 40px; }
.legal-head .page-title { margin-bottom: 10px; }
.legal-updated { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.legal-section { padding: 22px 0; border-top: 1px solid var(--line); }
.legal-section h2 { font-size: 22px; margin-bottom: 10px; }
.legal-section p + p { margin-top: 10px; }
.legal-section h3 { font-size: 17px; margin: 22px 0 8px; }
.legal-section a:not(.btn) { color: var(--fonki-deep); }
.legal-section .btn { margin-top: 6px; }
.steps, .bullets { margin: 0; padding-left: 26px; }
.steps li, .bullets li { margin: 6px 0; }
.bullets { list-style: disc; }
.note { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: #fff3c4; font-size: 16px; }
.not-found { padding-block: var(--section-y); }
.not-found-inner { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .not-found-inner { grid-template-columns: 200px 1fr; gap: 48px; } }
.not-found-fonki { width: 180px; height: auto; }
.not-found-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn-quiet { background: #fff; color: var(--ink); box-shadow: 0 6px 0 var(--line); }
.btn-quiet:hover { box-shadow: 0 8px 0 var(--line); }
.btn-quiet:active { box-shadow: 0 3px 0 var(--line); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .room-card, .btn { transition: none; }
}
