/* Kekoli — site styles. Warm clay paper, deep teal ink, coral + teal accents. */
:root {
  --paper: #fcf7f1;
  --paper-2: #f6ede2;
  --card: #fffdf9;
  --sand: #efe2d2;
  --ink: #0f4f4a;
  --ink-2: #355f5a;
  --text: #2d3b39;
  --muted: #5a6866;
  --coral: #d9643a;
  --coral-ink: #a8431d;
  --coral-soft: #fbe3d6;
  --teal: #2f8f84;
  --teal-soft: #dcefea;
  --sage: #e7eedf;
  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 10px 24px -12px rgba(76,52,30,.28), 0 2px 6px rgba(76,52,30,.08);
  --shadow-lg: 0 24px 50px -22px rgba(60,40,22,.45), 0 4px 12px rgba(60,40,22,.1);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, .brand, .btn, .eyebrow, summary, .step-num { font-family: var(--round); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--coral-ink); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 10px; }
.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }

/* Header (sticky, translucent) */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(252,247,241,.86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(239,226,210,.8); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.3rem; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--shadow); }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .93rem; padding: 7px 11px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--sand); color: var(--ink); }
.nav .lang { border: 1.5px solid var(--sand); background: var(--card); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } .brand { font-size: 1.15rem; } .brand img { width: 34px; height: 34px; } .nav a { padding: 6px 9px; } }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; background: linear-gradient(90deg, var(--coral), var(--teal)); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
[id] { scroll-margin-top: 84px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; padding: 14px 22px; border-radius: 999px; text-decoration: none; border: 0; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 0 #0a3633, var(--shadow); }
.btn-primary:hover { color: #fff; background: #13615b; }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.store-soon { display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 20px 10px 16px; box-shadow: 0 6px 0 #0a3633, var(--shadow); cursor: default; }
.store-soon svg { width: 26px; height: 26px; fill: #fff; flex: none; }
.store-soon span { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--round); }
.store-soon small { font-size: .75rem; opacity: .85; font-weight: 600; }
.store-soon strong { font-size: 1.15rem; font-weight: 800; }

/* Hero */
.hero { display: grid; gap: 36px; align-items: center; padding: 24px 0 56px; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.15fr .85fr; padding: 40px 0 80px; } }
.eyebrow { display: inline-block; color: var(--coral-ink); background: var(--coral-soft); font-weight: 700; font-size: .9rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 26px 0 18px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li { background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow); }

/* Pure-CSS phone mock (9:19.5 screen) */
.phone-stage { position: relative; display: grid; place-items: center; padding: 10px 0; }
.phone-stage::before { content: ""; position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--coral-soft), transparent 62%), radial-gradient(circle at 70% 70%, var(--teal-soft), transparent 60%); }
.phone { position: relative; width: min(300px, 74vw); padding: 12px; border-radius: 52px; background: linear-gradient(145deg, #2a3d3b, #0d2422); box-shadow: var(--shadow-lg), inset 0 0 0 2px #46605d; }
.phone::after { content: ""; position: absolute; right: -3px; top: 26%; width: 4px; height: 64px; border-radius: 0 4px 4px 0; background: #22302e; }
.phone-screen { aspect-ratio: 9 / 19.5; width: 100%; border-radius: 41px; overflow: hidden; background: var(--paper); }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }

/* Sections */
.section { padding: 56px 0; }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.band { background: var(--paper-2); border-radius: 40px; padding: 48px 20px; margin: 0 -4px; }
@media (min-width: 720px) { .band { padding: 64px 48px; margin: 0; } }

.what { display: grid; gap: 24px; align-items: center; }
@media (min-width: 820px) { .what { grid-template-columns: 1.3fr .7fr; } }
.what-text p { font-size: 1.12rem; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.figure-card { padding: 14px; margin: 0; }
.figure-card img { border-radius: 20px; width: 100%; }
.figure-card figcaption { font-size: .88rem; color: var(--muted); padding: 10px 6px 2px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { padding: 26px 24px; }
.step-num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: var(--coral); color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: 14px; box-shadow: 0 4px 0 var(--coral-ink); }
.steps li:nth-child(2) .step-num { background: var(--teal); box-shadow: 0 4px 0 #1f6a61; }
.steps li:nth-child(3) .step-num { background: var(--ink); box-shadow: 0 4px 0 #0a3633; }
.steps p { color: var(--muted); margin: 0; }

/* Games grid */
.games { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 620px) { .games { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .games { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.game { padding: 12px 12px 16px; display: flex; flex-direction: column; transition: transform .2s ease; }
.game:hover { transform: translateY(-3px); }
.game img { width: 100%; aspect-ratio: 1; background: var(--paper-2); border-radius: 20px; margin-bottom: 10px; }
.game h3 { font-size: 1.05rem; margin: 0 4px 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.game p { font-size: .9rem; line-height: 1.45; color: var(--muted); margin: 0 4px; }
.tag { font-size: .7rem; font-weight: 700; color: var(--ink); background: var(--teal-soft); border-radius: 999px; padding: 2px 8px; }

/* Why */
.why { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .why { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .why { grid-template-columns: repeat(4, 1fr); } }
.why li { list-style: none; padding: 24px; }
.why ul, ul.why { padding: 0; margin: 0; }
.why-icon { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 12px; background: var(--coral-soft); }
.why li:nth-child(even) .why-icon { background: var(--teal-soft); }
.why p { color: var(--muted); margin: 0; font-size: .97rem; }
.split { display: grid; gap: 28px; align-items: center; margin-top: 32px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq details { background: var(--card); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: 1.08rem; padding: 16px 30px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--coral); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text); margin: 0 0 16px; }

/* Prose pages */
.prose { max-width: 760px; padding-bottom: 40px; }
.prose h2 { font-size: clamp(1.35rem, 3.4vw, 1.75rem); margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.page-head { padding: 28px 0 8px; max-width: 760px; }
.updated { color: var(--muted); font-size: .95rem; }
.summary-card { padding: 22px 24px; margin: 18px 0 8px; border-left: 6px solid var(--teal); }
.summary-card p:last-child, .summary-card ul:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--card); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); font-size: .97rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--sand); vertical-align: top; }
th { color: var(--ink); font-family: var(--round); width: 38%; background: #fbf3ea; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
.downloads { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.downloads li { padding: 10px; font-size: .88rem; margin: 0; }
.downloads img { border-radius: 12px; margin-bottom: 8px; width: 100%; background: var(--paper-2); }
.downloads a { font-weight: 600; word-break: break-word; }
.contact-card { padding: 26px; display: grid; gap: 6px; }
.email { font-family: var(--round); font-weight: 800; font-size: 1.3rem; color: var(--ink); }

/* Footer */
.site-footer { margin-top: 40px; padding: 36px 0 44px; border-top: 2px dashed var(--sand); color: var(--muted); font-size: .95rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 18px 32px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--ink-2); font-weight: 600; }
.site-footer p { margin: 0 0 6px; }

/* 404 */
.notfound { text-align: center; padding: 60px 0 40px; }
.notfound img { margin: 0 auto 20px; border-radius: 28px; box-shadow: var(--shadow-lg); }
.notfound .hero-actions { justify-content: center; }

/* ---------- Motion & showcase ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(.6em); } to { opacity: 1; transform: none; } }
@keyframes drift { 0% { transform: translate(0,0) rotate(var(--r,0deg)); } 50% { transform: translate(var(--dx,8px), var(--dy,-14px)) rotate(calc(var(--r,0deg) + 6deg)); } 100% { transform: translate(0,0) rotate(var(--r,0deg)); } }
@keyframes marquee { to { transform: translateX(-50%); } }
.hero h1 .w { display: inline-block; animation: rise .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 90ms + 80ms); }
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.floaters img { position: absolute; width: clamp(54px, 12vw, 84px); height: auto; filter: drop-shadow(0 10px 12px rgba(76,52,30,.22)); animation: drift var(--t,8s) ease-in-out infinite; animation-delay: var(--d,0s); }
.phone { z-index: 1; }
.phone-screen video, .phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--paper); }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 45ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Counters */
.stats { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { padding: 20px 18px; text-align: center; }
.stats strong { display: block; font-family: var(--round); font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.stats li:nth-child(odd) strong { color: var(--coral-ink); }
.stats span { color: var(--muted); font-weight: 600; font-size: .95rem; }

/* Marquee */
.marquee { overflow: hidden; padding: 18px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0 8px; }
.marquee li { flex: none; width: 128px; text-align: center; font-family: var(--round); font-weight: 700; color: var(--ink); font-size: .9rem; }
.marquee img { width: 128px; height: 128px; background: var(--card); border-radius: 26px; box-shadow: var(--shadow); padding: 8px; margin-bottom: 6px; }

/* Game cards: lift + tilt */
.game { transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, opacity .6s ease; }
.game:hover { transform: translateY(-6px) rotate(-1.2deg); box-shadow: var(--shadow-lg); }
.games li:nth-child(even).game:hover { transform: translateY(-6px) rotate(1.2deg); }
.game img { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.game:hover img { transform: scale(1.04); }

/* Steps line */
.steps { position: relative; }
@media (min-width: 760px) {
  .steps::before { content: ""; position: absolute; left: 12%; right: 12%; top: 49px; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--coral) 0 14px, transparent 14px 24px); transform-origin: 0 50%; transform: scaleX(1); transition: transform 1.2s ease .2s; z-index: 0; }
  .js .steps.reveal::before { transform: scaleX(0); }
  .js .steps.reveal.in::before { transform: scaleX(1); }
  .steps li { position: relative; z-index: 1; }
}
.js .steps.reveal { opacity: 1; transform: none; }
.js .steps.reveal li { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.js .steps.reveal.in li { opacity: 1; transform: none; }
.js .steps.reveal.in li:nth-child(2) { transition-delay: .25s; }
.js .steps.reveal.in li:nth-child(3) { transition-delay: .5s; }

/* Video clips */
.clips { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .clips { grid-template-columns: repeat(4, 1fr); } }
.clips li { text-align: center; }
.clips .phone { width: 100%; max-width: 220px; margin: 0 auto 12px; padding: 8px; border-radius: 36px; }
.clips .phone-screen { border-radius: 29px; }
.clips h3 { margin: 0 0 2px; font-size: 1.05rem; }
.clips p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Screenshot gallery */
.gallery { list-style: none; margin: 30px -16px 0; padding: 6px 16px 18px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery li { flex: none; width: min(220px, 62vw); scroll-snap-align: start; }
.gallery img { width: 100%; border-radius: 26px; box-shadow: var(--shadow); background: var(--paper-2); }
.gallery p { font-size: .88rem; color: var(--muted); margin: 8px 4px 0; text-align: center; }

/* Together vs head-to-head */
.versus { display: grid; gap: 18px; }
@media (min-width: 820px) { .versus { grid-template-columns: 1fr 1fr; } }
.versus > div { padding: 26px; }
.versus .co { background: linear-gradient(160deg, var(--teal-soft), var(--card) 60%); }
.versus .duel { background: linear-gradient(160deg, var(--coral-soft), var(--card) 60%); }
.versus img { width: 100%; max-width: 280px; border-radius: 20px; margin: 4px 0 14px; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; }
.pills li { background: var(--card); border-radius: 999px; padding: 4px 12px; font-size: .86rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow); }

/* Comparison */
.compare th, .compare td { width: auto; }
.compare thead th { background: var(--ink); color: #fff; }
.compare thead th:nth-child(2) { background: var(--teal); }
.compare td.yes { color: var(--ink); font-weight: 700; }
.compare td.yes::before { content: "✓ "; color: var(--teal); }
.note { color: var(--muted); font-size: .88rem; margin-top: 10px; }

/* CTA band */
.cta { text-align: center; background: radial-gradient(circle at 20% 20%, var(--coral-soft), transparent 55%), radial-gradient(circle at 85% 80%, var(--teal-soft), transparent 55%), var(--card); border-radius: 40px; padding: 56px 20px; box-shadow: var(--shadow); }
.cta img { margin: 0 auto 16px; border-radius: 26px; box-shadow: var(--shadow-lg); }
.cta .hero-actions { justify-content: center; }

/* Back to top */
.to-top { position: fixed; right: 16px; bottom: 18px; z-index: 25; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; text-decoration: none; font-size: 1.3rem; font-weight: 800; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.to-top.show, .to-top:focus-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: #fff; background: #13615b; }
html:not(.js) .to-top { opacity: 1; transform: none; pointer-events: auto; position: static; margin: 0 auto 20px; }

@media (prefers-reduced-motion: reduce) {
  .hero h1 .w, .floaters img, .marquee-track { animation: none !important; }
  .marquee { overflow-x: auto; }
  .js .reveal, .js .steps.reveal li { opacity: 1 !important; transform: none !important; }
  .game:hover, .game:hover img { transform: none; }
}

/* Print (privacy and other text pages) */
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer nav, .progress, .to-top, .skip, .store-soon, .hero-actions, video, .floaters { display: none !important; }
  .card, table, .faq details { box-shadow: none; border: 1px solid #ccc; }
  .band, .cta { background: none; padding: 0; }
  a { color: #000; }
  .prose a[href^="http"]::after, .prose a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  h1, h2, h3 { color: #000; break-after: avoid; }
  .faq details { break-inside: avoid; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
