/* KiCla Games — shared styles
   Per-game theming via --accent / --accent-2 set on <body data-game="..."> */

:root {
  --bg: #07080d;
  --bg-soft: #0e1018;
  --panel: #141724;
  --panel-2: #1b1f30;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f6fb;
  --muted: #a2a9bd;
  --accent: #7c93ff;
  --accent-2: #38e0d0;
  --radius: 20px;
  --shell: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.shell { width: min(var(--shell), 92vw); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 120px) 0; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-2);
  margin: 0 0 14px;
}
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 78px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 800; }
em { font-style: normal; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(var(--shell), 92vw); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.brand .kc { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #07080d; font-weight: 900; }
.nav-links { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-radius: 14px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  transition: transform .2s, border-color .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.app-store {
  background: #fff; color: #000; border: none;
}
.app-store:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.app-store .glyph { font-size: 26px; line-height: 0; }
.app-store .lbl { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.app-store .lbl small { font-size: 11px; opacity: .7; }
.app-store .lbl strong { font-size: 18px; font-weight: 700; }
.btn.compact { padding: 10px 16px; }
.btn.compact .lbl small { display: none; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.text-link:hover { color: var(--text); }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(60% 60% at 20% 10%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 70%),
    radial-gradient(50% 50% at 90% 20%, color-mix(in srgb, var(--accent-2) 26%, transparent), transparent 70%);
  filter: blur(10px); z-index: 0; pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 70px);
  align-items: center; padding: clamp(50px, 8vw, 96px) 0 clamp(60px, 9vw, 110px);
}
.hero-copy .lede { font-size: clamp(17px, 2vw, 21px); color: var(--muted); margin: 22px 0 30px; max-width: 30ch; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-note { margin-top: 26px; color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 25%, transparent); }
.hero-visual {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px rgba(0,0,0,.55);
  aspect-ratio: 4 / 5;
  background: var(--panel);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-visual.landscape { aspect-ratio: 16 / 10; }
.hero-visual.portrait { aspect-ratio: 1206 / 2280; max-width: 340px; margin-inline: auto; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { aspect-ratio: 16 / 11; max-height: 60vh; }
  .hero-visual.portrait { aspect-ratio: 1206 / 2280; max-height: 72vh; width: auto; }
}

/* ---------- FEATURES ---------- */
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head p.body { color: var(--muted); font-size: 18px; margin-top: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; transition: transform .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card .idx { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.card h3 { font-size: 22px; margin: 16px 0 10px; }
.card p { color: var(--muted); margin: 0; }

/* ---------- GALLERY (masonry, mixed aspect ratios) ---------- */
.gallery { column-count: 3; column-gap: 16px; }
.gallery figure {
  margin: 0 0 16px; break-inside: avoid; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.gallery img { width: 100%; height: auto; display: block; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.04); }
@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 520px) { .gallery { column-count: 1; } }

/* ---------- STATS ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; padding: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(120deg, var(--panel), var(--panel-2)); }
.stats div strong { display: block; font-size: clamp(38px, 6vw, 60px); font-weight: 800; background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats div span { color: var(--muted); font-size: 14px; }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- CTA ---------- */
.cta { text-align: center; position: relative; overflow: hidden; }
.cta::before { content:""; position:absolute; inset:0; background: radial-gradient(50% 120% at 50% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%); }
.cta .shell { position: relative; }
.cta h2 { margin-bottom: 30px; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer .shell { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { color: var(--muted); font-size: 14px; margin: 0; }
.footer .f-links { display: flex; gap: 24px; font-size: 14px; }
.footer .f-links a { color: var(--muted); }
.footer .f-links a:hover { color: var(--text); }

/* ---------- HUB (KiCla home) ---------- */
.hub-hero { text-align: center; padding: clamp(80px, 14vw, 170px) 0 clamp(40px, 7vw, 90px); position: relative; }
.hub-hero .lede { color: var(--muted); font-size: clamp(17px, 2.2vw, 22px); max-width: 60ch; margin: 26px auto 0; }
.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .game-grid { grid-template-columns: 1fr; } }
.game-card {
  display: block; border-radius: 24px; overflow: hidden; position: relative;
  border: 1px solid var(--line); background: var(--panel);
  transition: transform .3s, border-color .3s;
  min-height: 380px;
}
.game-card:hover { transform: translateY(-6px); }
.game-card .cover { position: absolute; inset: 0; }
.game-card .cover img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: transform .5s, opacity .3s; }
.game-card:hover .cover img { transform: scale(1.06); opacity: .7; }
.game-card .grad { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(7,8,13,.75) 62%, var(--bg) 100%); }
.game-card .body { position: absolute; inset: auto 0 0 0; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.game-card .gicon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.game-card h3 { font-size: 26px; }
.game-card p { color: var(--muted); margin: 0; font-size: 15px; }
.game-card .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin-top: 6px; color: var(--gaccent, var(--accent-2)); }

/* ---------- LEGAL / PRIVACY ---------- */
.legal { padding: clamp(50px, 8vw, 90px) 0; }
.legal .doc { width: min(760px, 92vw); margin-inline: auto; }
.legal h1 { font-size: clamp(30px, 5vw, 46px); margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-size: 24px; margin: 40px 0 12px; }
.legal h3 { font-size: 19px; margin: 28px 0 10px; }
.legal p, .legal li { color: #c9cede; }
.legal a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 8px 0; }
.legal .divider { height: 1px; background: var(--line); margin: 56px 0; border: 0; }
.legal .lang-tag { display: inline-block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; margin-bottom: 30px; }
.back-link:hover { color: var(--text); }

/* ============================================================
   MOTION LAYER — "street-ad" energy: Ken Burns, floats, reveals,
   pulsing CTAs, poster badges, marquee reels & tickers.
   ============================================================ */

/* ---- Scroll reveal — hidden state only applies once JS confirms it runs
   (html.reveal-ready), so a JS/observer failure never leaves content invisible. ---- */
.reveal-ready .reveal { opacity: 0; transform: translateY(30px); }
.reveal-ready .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .75s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms),
              transform .75s cubic-bezier(.2,.7,.2,1) var(--reveal-delay, 0ms);
}

/* ---- Keyframes ---- */
@keyframes kenburns { from { transform: scale(1.02) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(0,-2%,0); } }
@keyframes kenburns-x { from { transform: scale(1.05) translate3d(-1.5%,0,0); } to { transform: scale(1.12) translate3d(1.5%,-1%,0); } }
@keyframes floaty { 0%,100% { transform: translateY(0) rotateX(var(--tiltX,0deg)) rotateY(var(--tiltY,0deg)); } 50% { transform: translateY(-14px) rotateX(var(--tiltX,0deg)) rotateY(var(--tiltY,0deg)); } }
@keyframes heroGlow { from { transform: translate(-2%,-1%) scale(1); opacity: .8; } to { transform: translate(3%,2%) scale(1.15); opacity: 1; } }
@keyframes ctaPulse { 0%,100% { box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 50% { box-shadow: 0 14px 40px rgba(0,0,0,.4), 0 0 34px 4px color-mix(in srgb, var(--accent) 55%, transparent); } }
@keyframes rise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dotPulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@keyframes sheen { from { background-position: -140% 0; } to { background-position: 240% 0; } }

/* ---- Applied motion (only when user allows it) ---- */
@media (prefers-reduced-motion: no-preference) {
  .hero-visual img { animation: kenburns 18s ease-in-out infinite alternate; }
  .hero-visual { animation: floaty 8s ease-in-out infinite; transform-style: preserve-3d; transition: transform .3s ease; }
  .game-card .cover img { animation: kenburns-x 22s ease-in-out infinite alternate; }
  .gallery img { animation: kenburns 26s ease-in-out infinite alternate; }
  .gallery figure:hover img { animation-play-state: paused; }
  .hero::before { animation: heroGlow 11s ease-in-out infinite alternate; }
  .app-store { animation: ctaPulse 2.6s ease-in-out infinite; }
  .hero-copy .eyebrow { animation: rise .7s .05s both cubic-bezier(.2,.7,.2,1); }
  .hero-copy h1 { animation: rise .8s .12s both cubic-bezier(.2,.7,.2,1); }
  .hero-copy .lede { animation: rise .8s .24s both cubic-bezier(.2,.7,.2,1); }
  .hero-copy .hero-actions { animation: rise .8s .36s both cubic-bezier(.2,.7,.2,1); }
  .hero-note .dot { animation: dotPulse 1.8s ease-in-out infinite; }
}

/* ---- Poster "FREE" starburst badge ---- */
.free-badge {
  position: absolute; z-index: 3; width: 104px; height: 104px;
  display: grid; place-items: center; text-align: center;
  color: #07080d; font-weight: 900; line-height: 1; letter-spacing: .02em;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.5));
}
.free-badge span { position: relative; z-index: 2; font-size: 15px; text-transform: uppercase; transform: rotate(-8deg); }
.free-badge span b { display: block; font-size: 26px; }
.free-badge::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  clip-path: polygon(50% 0%, 61% 12%, 76% 6%, 78% 23%, 95% 25%, 88% 40%, 100% 50%, 88% 60%, 95% 75%, 78% 77%, 76% 94%, 61% 88%, 50% 100%, 39% 88%, 24% 94%, 22% 77%, 5% 75%, 12% 60%, 0% 50%, 12% 40%, 5% 25%, 22% 23%, 24% 6%, 39% 12%);
}
@media (prefers-reduced-motion: no-preference) { .free-badge::before { animation: spinSlow 14s linear infinite; } }
.hero-grid { position: relative; }
.hero-grid .free-badge { top: -6px; right: 2px; animation: floaty 6s ease-in-out infinite; }
@media (max-width: 860px) { .hero-grid .free-badge { top: -10px; right: 2px; width: 82px; height: 82px; } .free-badge span { font-size: 13px; } .free-badge span b { font-size: 20px; } }

/* ---- Marquee reel (moving billboard of screenshots) ---- */
.reel { position: relative; overflow: hidden; padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.reel .marquee-track { display: flex; gap: 18px; width: max-content; will-change: transform; }
@media (prefers-reduced-motion: no-preference) { .reel .marquee-track { animation: marquee 46s linear infinite; } .reel:hover .marquee-track { animation-play-state: paused; } }
.reel figure { margin: 0; flex: 0 0 auto; display: flex; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(0,0,0,.5); background: var(--panel); }
.reel img { display: block; height: 300px; width: auto; object-fit: cover; }
@media (max-width: 640px) { .reel img { height: 220px; } }

/* ---- Tagline ticker strip ---- */
.poster-strip { position: relative; overflow: hidden; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, var(--bg)), color-mix(in srgb, var(--accent-2) 18%, var(--bg))); }
.poster-strip .marquee-track { display: flex; gap: 0; width: max-content; will-change: transform; }
@media (prefers-reduced-motion: no-preference) { .poster-strip .marquee-track { animation: marquee 28s linear infinite; } }
.poster-strip span { display: inline-flex; align-items: center; gap: 22px; padding: 14px 0; padding-right: 22px;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: clamp(15px, 2vw, 20px); white-space: nowrap; }
.poster-strip span::after { content: "★"; color: var(--accent-2); }

/* ---- Shimmer sweep on hero visual frame ---- */
.hero-visual::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%);
  background-size: 220% 100%;
}
@media (prefers-reduced-motion: no-preference) { .hero-visual::after { animation: sheen 6.5s ease-in-out infinite; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
