/* ============================================================
   Lidoku - landing styles
   Built with the design-taste-frontend (high-agency) skill.
   Dials: DESIGN_VARIANCE 8 · MOTION_INTENSITY 6 · VISUAL_DENSITY 4
   Theme lock: dark (app is dark-only). One accent: emerald green (matches
   the app's primary "Online Oyna" action). Red is used only for sabotage.
   Legal pages (privacy/terms/support) share this file: the .doc, header,
   footer, brand and .wrap rules below must stay intact.
   ============================================================ */

/* ---- Fonts (self-hosted, variable) ---- */
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/outfit-latinext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ---- */
:root {
  --bg: #0b0f1a;
  --surface: #121a2b;
  --surface-2: #0f1626;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f6fc;
  --dim: #9aa7bd;
  --accent: #2fbe6e;
  --accent-hi: #4bd98a;
  --red: #e5484d;
  --green: #3ecf7f;
  --ink: #06170d;
  --r-btn: 12px;
  --r-card: 20px;
  --tile: 12px;
  --maxw: 1200px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }

.skip {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--accent); color: var(--ink); padding: 10px 18px;
  border-radius: 10px; font-weight: 700; z-index: 100; transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: var(--r-btn);
  font-family: var(--font); font-weight: 700; font-size: 15px; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.16s var(--ease), background-color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { height: 42px; font-size: 14px; padding: 0 18px; }
.btn-lg { height: 54px; font-size: 16px; padding: 0 26px; }

/* ---- Header (shared with legal pages) ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 68px; display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font-weight: 800; font-size: 18px;
}
.brand .brand-logo {
  height: 32px; width: auto; object-fit: contain; border-radius: 8px;
  filter: invert(1) hue-rotate(180deg) contrast(1.2);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--dim); font-size: 15px; font-weight: 500; transition: color 0.16s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn-primary { color: var(--ink); }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* ---- Kicker (small section label) ---- */
.kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.kicker-red { color: var(--red); }

/* ---- Device frame (shared) ---- */
.device {
  background: #05080f; border: 1px solid var(--line-strong);
  border-radius: 44px; padding: 10px;
  box-shadow: 0 42px 90px -38px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.device .screen {
  position: relative; overflow: hidden; border-radius: 35px;
  aspect-ratio: 820 / 1667; background: var(--surface-2);
}
.device .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.device-duel .screen, .device-back .screen { aspect-ratio: 820 / 1294; }
.device-chaos .screen { aspect-ratio: 820 / 1474; }

/* ---- Hero (asymmetric, device cluster) ---- */
.hero { position: relative; padding: 64px 0 84px; overflow: hidden; }
.hero-blob {
  position: absolute; top: -18%; right: -8%; width: 62%; height: 120%; z-index: 0; pointer-events: none;
  background: radial-gradient(48% 42% at 62% 34%, rgba(47, 190, 110, 0.30), transparent 66%),
              radial-gradient(40% 34% at 78% 66%, rgba(47, 190, 110, 0.12), transparent 70%);
  filter: blur(16px);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px;
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--dim);
}
.live-text { font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 0 rgba(62, 207, 127, 0.5); }
.hero h1 {
  font-size: clamp(42px, 6vw, 74px); line-height: 0.98; font-weight: 800; letter-spacing: -0.04em;
}
.hero .lead { margin-top: 22px; max-width: 40ch; font-size: clamp(16px, 1.5vw, 19px); color: var(--dim); }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats dt { font-size: 15px; font-weight: 700; color: var(--text); }
.hero-stats dd { font-size: 13px; color: var(--dim); margin-top: 2px; }

.hero-visual { display: flex; justify-content: center; }
.cluster { position: relative; width: 300px; max-width: 84%; perspective: 1400px; }
.cluster .device { transform-style: preserve-3d; }
.device-front { position: relative; z-index: 2; transform: rotateY(-11deg) rotateX(3deg) rotateZ(1deg); }
.device-back {
  position: absolute; top: 8%; left: 40%; width: 78%; z-index: 1; opacity: 0.85;
  transform: rotateY(-11deg) rotateX(3deg) rotateZ(4deg);
}

/* ---- Marquee ---- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 16px 0; overflow: hidden; background: var(--surface-2);
}
.marquee-track { display: flex; align-items: center; gap: 22px; width: max-content; white-space: nowrap; }
.marquee-track span { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.marquee-track .sep { color: var(--accent); font-weight: 400; }

/* ---- Zig-zag sections ---- */
.zig { padding: 84px 0; }
.zig-grid { display: grid; grid-template-columns: 1fr 0.9fr; gap: 56px; align-items: center; }
.zig-alt .zig-visual { order: -1; }
.zig-copy h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; }
.zig-copy p { margin-top: 18px; color: var(--dim); font-size: 17px; max-width: 46ch; }
.zig-visual { display: flex; justify-content: center; }
.device-tilt { width: 288px; max-width: 80%; transform: rotateY(9deg) rotateX(3deg); }
.zig-visual { perspective: 1400px; }
.device-tilt-left { transform: rotateY(-9deg) rotateX(3deg); }

/* versus bars (duello) */
.versus { margin-top: 30px; display: grid; gap: 14px; max-width: 380px; }
.vs-row { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 12px; }
.vs-name { font-size: 13px; font-weight: 700; color: var(--dim); }
.vs-elo { font-family: var(--mono); font-size: 14px; font-weight: 600; text-align: right; }
.vs-bar { height: 10px; border-radius: 999px; background: var(--surface); overflow: hidden; border: 1px solid var(--line); }
.vs-bar i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1.1s var(--ease); }
.vs-you .vs-bar i { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.vs-you .vs-elo { color: #60a5fa; }
.vs-rival .vs-bar i { background: linear-gradient(90deg, #ef4444, #f87171); }
.vs-rival .vs-elo { color: #f87171; }
.reveal.in .vs-bar i { width: var(--to); }

/* feature list (kaos) */
.feat-list { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.feat-list li { color: var(--dim); font-size: 15.5px; padding-left: 2px; }
.fx { font-weight: 700; color: var(--text); }
.fx-red { color: var(--red); }
.fx-green { color: var(--green); }

/* ---- Section frame ---- */
.section { padding: 84px 0; }
.section-head { max-width: 40ch; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; }
.section-head p { margin-top: 14px; color: var(--dim); font-size: 17px; }

/* ---- Bento 2.0 (live motion-engine grid) ---- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 22px 44px -30px rgba(0, 0, 0, 0.7);
}
.tile-board { grid-column: span 3; grid-row: span 2; }
.tile-streak { grid-column: span 3; }
.tile-xp { grid-column: span 3; }
.tile-themes { grid-column: span 4; }
.tile-hint { grid-column: span 2; }
.tile-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tile-k { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.tile-k.dim { color: var(--dim); font-weight: 500; }
.tile-cap { margin-top: auto; padding-top: 16px; color: var(--dim); font-size: 13.5px; }
.badge-live {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--green);
}

/* live leaderboard */
.board { list-style: none; display: grid; gap: 8px; }
.board li {
  display: grid; grid-template-columns: 18px 30px 1fr auto; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  will-change: transform;
}
.board li:first-child { border-color: rgba(47, 190, 110, 0.4); background: rgba(47, 190, 110, 0.09); }
.board .rank { font-family: var(--mono); font-size: 12px; color: var(--dim); text-align: center; }
.board .av {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: var(--ink); background: linear-gradient(135deg, var(--accent-hi), var(--accent));
}
.board li:not(:first-child) .av { color: var(--text); background: #263149; }
.board .nm { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .el { font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--accent-hi); }
.board li:not(:first-child) .el { color: var(--dim); }

/* streak */
.tile-streak { align-items: flex-start; }
.streak-flame { color: var(--accent); }
.streak-flame svg { width: 46px; height: 46px; }
.streak-num { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.streak-num .count { font-size: clamp(40px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.streak-unit { font-size: 16px; color: var(--dim); font-weight: 600; }

/* xp */
.xp-track { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.xp-fill { display: block; height: 100%; width: 72%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); }

/* themes carousel */
.tile-themes { }
.theme-stream { overflow: hidden; margin: 0 -22px; padding: 0 22px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.theme-track { display: flex; gap: 12px; width: max-content; }
.sw {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 12px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.sw::before {
  content: ""; width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--a), var(--b)); flex: none;
}

/* hint typewriter */
.tile-hint .hint-line { font-family: var(--mono); font-size: 14.5px; color: var(--text); min-height: 3.2em; line-height: 1.5; }
.caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -2px; margin-left: 2px; background: var(--accent); }

/* ---- SSS / FAQ ---- */
.faq { padding-top: 40px; }
.faq-list { display: grid; gap: 12px; max-width: 760px; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--surface-2); overflow: hidden;
  transition: border-color 0.18s var(--ease);
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  font-weight: 700; font-size: 17px; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-weight: 400; font-size: 24px; line-height: 1;
  color: var(--accent); transition: transform 0.2s var(--ease); flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 22px; margin: 0; color: var(--dim); font-size: 16px; line-height: 1.6; max-width: 62ch; }

/* ---- Language suggestion banner ---- */
.lang-banner { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px; }
.lang-banner[hidden] { display: none; }
.lang-banner-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; gap: 14px;
}
.lang-banner span { color: var(--dim); }
.lang-banner-go { color: var(--accent); font-weight: 600; white-space: nowrap; }
.lang-banner-go:hover { color: var(--accent-hi); }
.lang-banner-x {
  margin-left: auto; background: transparent; border: 0; color: var(--dim);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 4px;
}
.lang-banner-x:hover { color: var(--text); }

/* ---- CTA ---- */
.cta { padding: 40px 0 90px; }
.cta-inner {
  position: relative; overflow: hidden;
  background: radial-gradient(80% 130% at 0% 0%, rgba(47, 190, 110, 0.16), transparent 52%), var(--surface);
  border: 1px solid var(--line); border-radius: 28px; padding: 56px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
}
.cta-copy h2 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }
.cta-copy p { margin: 16px 0 28px; color: var(--dim); font-size: 17px; max-width: 40ch; }
.cta-phone { display: flex; justify-content: center; perspective: 1400px; }
.cta-phone .device { width: 210px; }

/* ---- Footer (shared with legal pages) ---- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; color: var(--dim); font-size: 14px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--dim); transition: color 0.16s var(--ease); }
.footer-links a:hover { color: var(--text); }

/* ---- Legal / doc pages (shared) ---- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.doc .updated { color: var(--dim); font-size: 14px; margin-bottom: 34px; }
.doc h2 { font-size: 21px; font-weight: 700; margin: 34px 0 10px; letter-spacing: -0.01em; }
.doc p, .doc li { color: #c4cede; margin-bottom: 12px; }
.doc a { color: var(--accent-hi); }
.doc a:hover { text-decoration: underline; }
.doc ul { padding-left: 22px; }
.doc .back { display: inline-block; margin-bottom: 30px; color: var(--dim); font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: 2; }
  .hero-blob { width: 90%; right: -20%; }
  .zig-grid { grid-template-columns: 1fr; gap: 40px; }
  .zig-alt .zig-visual { order: 0; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-board { grid-column: span 2; grid-row: auto; }
  .tile-streak, .tile-xp { grid-column: span 1; }
  .tile-themes { grid-column: span 2; }
  .tile-hint { grid-column: span 2; }
  .cta-inner { grid-template-columns: 1fr; }
  .cta-phone { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 40px 0 60px; }
  .zig, .section { padding: 60px 0; }
  .bento { grid-template-columns: 1fr; }
  .tile-board, .tile-streak, .tile-xp, .tile-themes, .tile-hint { grid-column: span 1; }
  .cta-inner { padding: 40px 26px; }
  .hero-stats { gap: 22px; }
}

/* ---- Motion (MOTION_INTENSITY 6) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
  .rise { opacity: 0; transform: translateY(22px); animation: rise 0.85s var(--ease) forwards; }
  .live-pill.rise { animation-delay: 0.04s; }
  h1.rise { animation-delay: 0.1s; }
  .lead.rise { animation-delay: 0.18s; }
  .hero-cta.rise { animation-delay: 0.26s; }
  .hero-stats.rise { animation-delay: 0.34s; }
  .hero-visual.rise { animation-delay: 0.16s; }
  @keyframes rise { to { opacity: 1; transform: none; } }

  .cluster { animation: floaty 8s ease-in-out infinite; }
  @keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

  .live-dot { animation: ping 2s ease-out infinite; }
  @keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(62,207,127,0.5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(62,207,127,0); } }

  .marquee-track { animation: scrollx 26s linear infinite; }
  @keyframes scrollx { to { transform: translateX(-50%); } }

  .theme-track { animation: scrollx 22s linear infinite; }

  .streak-flame { animation: flick 2.4s ease-in-out infinite; transform-origin: bottom center; }
  @keyframes flick { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.08) rotate(-2deg); opacity: 0.9; } }

  .xp-fill { animation: xpfill 3.4s var(--ease) infinite; }
  @keyframes xpfill { 0% { width: 8%; } 55%, 75% { width: 72%; } 100% { width: 8%; } }

  .caret { animation: blink 1s step-end infinite; }
  @keyframes blink { 50% { opacity: 0; } }
}

/* Language Switcher */
.lang-switch {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.lang-switch a {
  color: var(--txt-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.lang-switch a:hover {
  color: var(--txt);
}
.lang-switch a.active {
  color: var(--prim);
}
@media (max-width: 600px) {
  .lang-switch {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}
