/* ============================================================
   GANLISH — design system + components
   ============================================================ */

/* ============ TOKENS ============ */
:root {
  --ink-900: #0e1628;
  --ink-800: #131f38;
  --ink-700: #1b2b4d;
  --ink-600: #263a63;
  --ink: #16203a;

  --gold: #f5b60c;
  --gold-deep: #e0870a;
  --gold-soft: #ffd25e;

  --sky: #3e9be0;
  --sky-bright: #5fb0ec;
  --sky-soft: #dceefb;

  --paper: #f4f8fd;
  --paper-2: #e9f1fa;

  --text-dark: #16203a;
  --muted-dark: #5a6b88;
  --text-light: #e9eef8;
  --muted-light: #93a4c4;

  --line-dark: rgba(255, 255, 255, 0.09);
  --line-light: #d6e3f2;

  /* playful accents (book + content variety) */
  --c-coral: #ff6b6b;
  --c-mint: #34d3a6;
  --c-violet: #9b7bff;
  --c-amber: #ffb020;
  --c-rose: #ff7eb6;
  --c-teal: #2fc6c0;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  --maxw: 1120px;
  --radius: 18px;
}

/* ============ BASE ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--ink-900);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: var(--gold); color: var(--ink-900); }

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

.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--sky-bright);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--sky); display: inline-block; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.04; letter-spacing: -0.015em; }
.accent-gold { color: var(--gold); }
.accent-sky { color: var(--sky-bright); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 0.98rem;
  padding: 14px 26px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--gold); color: var(--ink-900); box-shadow: 0 8px 22px -8px rgba(245, 182, 12, 0.7); }
.btn-primary:hover { transform: translateY(-2px); background: var(--gold-soft); box-shadow: 0 14px 30px -10px rgba(245, 182, 12, 0.8); }
.btn-ghost { background: transparent; color: var(--text-light); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--sky); color: #fff; transform: translateY(-2px); }
.btn-ghost.on-light { color: var(--text-dark); border-color: var(--line-light); }
.btn-ghost.on-light:hover { border-color: var(--sky); color: var(--ink); }

a:focus-visible, button:focus-visible, .btn:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 3px; border-radius: 12px; }

/* ============ NAV (persistent shell) ============ */
header.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(14, 22, 40, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 38px; height: 38px; }
.brand b { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand b span { color: var(--gold); }
.nav-main { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a.link { font-size: 0.9rem; color: var(--muted-light); transition: color .18s; position: relative; padding: 4px 0; }
.nav-links a.link:hover { color: #fff; }
.nav-links a.link.active { color: #fff; }
.nav-links a.link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold); border-radius: 2px; }
.nav-cta { padding: 10px 20px; font-size: 0.9rem; }
.nav-auth { display: flex; align-items: center; gap: 16px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); border-radius: 10px; padding: 8px; cursor: pointer; color: var(--text-light); }
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 860px) {
  .nav-main { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(14,22,40,0.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-dark);
    padding: 8px 24px 18px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
  .nav-main.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a.link { padding: 13px 0; border-bottom: 1px solid var(--line-dark); }
  .nav-links a.link.active::after { display: none; }
  .nav-auth { padding-top: 12px; }
  .nav-toggle { display: block; }
}

/* ============ ROUTER VIEW ============ */
#view { min-height: 60vh; animation: viewIn .34s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ SECTIONS ============ */
section { position: relative; }
.pad { padding: clamp(56px, 9vw, 110px) 0; }
.pad-sm { padding: clamp(40px, 6vw, 72px) 0; }
.light { background: var(--paper); color: var(--text-dark); }
.light .eyebrow { color: var(--sky); }
.light .eyebrow::before { background: var(--sky); }

.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 16px 0 14px; }
.sec-head p { color: var(--muted-light); font-size: 1.05rem; }
.light .sec-head p { color: var(--muted-dark); }

/* ============ HERO + MASCOT ============ */
.hero { overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 20%, #000 25%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 70% 20%, #000 25%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; z-index: 0; width: 620px; height: 620px;
  right: -60px; top: -40px; pointer-events: none;
  background: radial-gradient(circle, rgba(245,182,12,0.22) 0%, rgba(245,182,12,0.06) 40%, transparent 70%);
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
  padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 84px);
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem); margin: 22px 0 20px; }
.hero-title .u { position: relative; white-space: nowrap; }
.hero-title .u::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.16em; background: var(--gold); border-radius: 3px; z-index: -1; opacity: 0.85; }
.hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: var(--muted-light); max-width: 46ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stage { position: relative; display: grid; place-items: center; min-height: 360px; perspective: 1000px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bobY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.022); } }
@keyframes glint { 0%,64%,100% { opacity: 0; transform: translateX(-140%) rotate(18deg); } 74% { opacity: .7; } 84% { opacity: 0; transform: translateX(140%) rotate(18deg); } }
.stage .orb { position: relative; z-index: 3; width: min(96%, 420px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 42px 82px -24px rgba(0,0,0,0.72); animation: bobY 6s ease-in-out infinite; isolation: isolate; }
.stage .orb-disc { position: absolute; inset: 0; z-index: 1; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 22%, rgba(255,255,255,0.14), rgba(255,255,255,0.03) 40%, rgba(95,176,236,0.06) 63%, rgba(14,22,40,0.55) 100%), var(--ink-800);
  border: 1px solid rgba(255,255,255,0.13); box-shadow: inset 0 3px 16px rgba(255,255,255,0.16), inset 0 -24px 48px rgba(14,22,40,0.55); }
.stage .orb-tilt { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  transform: perspective(760px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(var(--tx, 0px), var(--ty, 0px), 0);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
.stage .mascot-img { width: 86%; display: block; filter: drop-shadow(0 16px 26px rgba(0,0,0,0.5)); animation: breathe 5s ease-in-out infinite; }
.stage .lens-glint { position: absolute; z-index: 3; top: 30%; left: 13%; width: 24%; height: 24%; border-radius: 50%; overflow: hidden; pointer-events: none; opacity: 0.9; }
.stage .lens-glint::before { content: ""; position: absolute; inset: -30%; border-radius: 50%; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.75) 50%, transparent 58%); mix-blend-mode: screen; opacity: 0; animation: glint 7s ease-in-out infinite; }
.stage .orb-glass { position: absolute; inset: 0; z-index: 4; border-radius: 50%; pointer-events: none; background: radial-gradient(130% 90% at 30% 16%, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%); }
.stage .orb-glass::before { content: ""; position: absolute; top: 8%; left: 14%; width: 40%; height: 28%; border-radius: 50%; background: radial-gradient(circle at 42% 40%, rgba(255,255,255,0.5), rgba(255,255,255,0) 70%); filter: blur(2px); }
.stage .orb::after { content: ""; position: absolute; inset: -3px; z-index: 5; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(245,182,12,0.6) 45deg, transparent 130deg, transparent 210deg, rgba(95,176,236,0.55) 265deg, transparent 340deg);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); animation: spin 12s linear infinite; }
.stage .orb:hover .mascot-img { animation-play-state: paused; }

/* ============ CONTENT CARDS (home + section pages) ============ */
.content-band { padding: clamp(30px, 5vw, 56px) 0; }
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.band-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.band-head .more { font-family: var(--body); font-weight: 600; font-size: 0.9rem; color: var(--sky-bright); display: inline-flex; align-items: center; gap: 6px; }
.band-head .more:hover { color: #fff; }
.band-head .more svg { width: 16px; height: 16px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card-grid.two { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* generic learn card (idiom / phrasal / colloquial / word) */
.lcard {
  background: var(--ink-800); border: 1px solid var(--line-dark); border-radius: var(--radius);
  padding: 22px 22px 20px; position: relative; overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.lcard:hover { transform: translateY(-5px); box-shadow: 0 24px 44px -26px rgba(0,0,0,0.6); border-color: var(--accent, var(--gold)); }
.lcard::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent, var(--gold)); opacity: .9; }
.lcard .kind { font-family: var(--mono); font-size: 0.66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent, var(--gold)); }
.lcard .term { font-family: var(--display); font-weight: 800; font-size: 1.45rem; margin: 8px 0 4px; color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lcard .phon { font-family: var(--mono); font-size: 0.82rem; color: var(--muted-light); }
.lcard .mean { color: var(--text-light); font-size: 0.98rem; margin-top: 6px; }
.lcard .mean b { color: var(--gold-soft); }
.lcard .ex { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-dark); font-size: 0.92rem; color: var(--muted-light); }
.lcard .ex .en { color: var(--sky-bright); }
.speak { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-dark); background: rgba(255,255,255,0.03); color: var(--muted-light); cursor: pointer; display: grid; place-items: center; transition: all .18s; }
.speak:hover { color: var(--ink-900); background: var(--gold); border-color: var(--gold); }
.speak svg { width: 15px; height: 15px; }

/* word of the day — featured */
.wod {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line-dark); background: linear-gradient(135deg, var(--ink-800), var(--ink-700));
  position: relative;
}
.wod-main { padding: clamp(28px, 4vw, 44px); position: relative; z-index: 2; }
.wod-main .kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.wod-word { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 6vw, 4rem); margin: 10px 0 4px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wod-phon { font-family: var(--mono); color: var(--muted-light); font-size: 1rem; margin-bottom: 14px; }
.wod-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tagchip { font-family: var(--mono); font-size: 0.66rem; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,0.06); color: var(--sky-bright); }
.wod-mean { font-size: 1.1rem; color: var(--text-light); margin-bottom: 14px; }
.wod-mean b { color: var(--gold-soft); }
.wod-ex { font-size: 0.98rem; color: var(--muted-light); border-left: 3px solid var(--gold); padding-left: 14px; }
.wod-ex .en { color: var(--sky-bright); display: block; margin-bottom: 3px; }
.wod-side { position: relative; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 60% 30%, rgba(245,182,12,0.18), transparent 60%); }
.wod-side img { width: min(78%, 240px); filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5)); animation: bobY 6s ease-in-out infinite; }
@media (max-width: 760px) { .wod { grid-template-columns: 1fr; } .wod-side { display: none; } }

/* ============ SECTION PAGE HERO ============ */
.page-hero { padding: clamp(44px, 7vw, 84px) 0 clamp(24px, 4vw, 40px); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; z-index: 0; width: 500px; height: 500px; right: -120px; top: -140px; pointer-events: none; background: radial-gradient(circle, var(--accent, rgba(245,182,12,0.18)) 0%, transparent 66%); opacity: .5; }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 14px 0 12px; }
.page-hero p { color: var(--muted-light); font-size: 1.08rem; max-width: 54ch; }

/* ============ EVIDENCE / IDIOM GAME (oyunlar) ============ */
.evi-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: center; }
.evi-copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin: 16px 0 16px; }
.evi-copy p { color: var(--muted-light); margin-bottom: 22px; }
.evi-hint { font-family: var(--mono); font-size: 0.78rem; color: var(--gold-soft); display: inline-flex; align-items: center; gap: 9px; }
.evi-hint svg { width: 18px; height: 18px; }
.evidence { position: relative; background: linear-gradient(180deg, var(--ink-800), var(--ink-700)); border: 1px solid var(--line-dark); border-radius: 16px; padding: 30px 30px 34px; overflow: hidden; cursor: crosshair; box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8); }
.evidence::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(255,255,255,0.03) 27px 28px); pointer-events: none; }
.evi-file { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; position: relative; z-index: 2; }
.evi-no { font-family: var(--mono); font-size: 0.74rem; color: var(--sky-bright); letter-spacing: 0.16em; }
.stamp { font-family: var(--mono); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--gold); border: 1.5px solid var(--gold); border-radius: 6px; padding: 4px 9px; transform: rotate(-6deg); opacity: 0.9; }
.stamp.solved { color: #57d99a; border-color: #57d99a; }
.lens-area { position: relative; padding: 22px 0 8px; z-index: 2; user-select: none; }
.idiom-layer { position: relative; font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 4.4vw, 2.7rem); line-height: 1.1; letter-spacing: -0.01em; }
.idiom-coded { color: var(--sky-bright); filter: blur(5px); opacity: 0.4; }
.idiom-clear { position: absolute; inset: 0; color: var(--gold); clip-path: circle(0px at 50% 50%); transition: clip-path .08s linear; text-shadow: 0 0 24px rgba(245, 182, 12, 0.35); }
.lens-ring { position: absolute; width: 132px; height: 132px; border-radius: 50%; border: 3px solid rgba(245, 182, 12, 0.85); pointer-events: none; box-shadow: 0 0 0 2px rgba(14,22,40,0.6), inset 0 0 30px rgba(245,182,12,0.12), 0 10px 30px -6px rgba(0,0,0,0.6); opacity: 0; transition: opacity .2s ease; transform: translate(-50%, -50%); left: 50%; top: 50%; z-index: 5; }
.lens-ring::after { content: ""; position: absolute; width: 3px; height: 34px; background: rgba(245,182,12,0.85); border-radius: 3px; bottom: -30px; right: -6px; transform: rotate(-40deg); transform-origin: top; }
.evidence.active .lens-ring { opacity: 1; }
.evi-solution { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line-dark); position: relative; z-index: 2; min-height: 58px; opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.evidence.examined .evi-solution { opacity: 1; transform: none; }
.evi-solution .lbl { font-family: var(--mono); font-size: 0.72rem; color: #57d99a; letter-spacing: 0.14em; }
.evi-solution .tr { font-size: 1.12rem; color: var(--text-light); margin-top: 5px; font-weight: 500; }
.evi-solution .tr b { color: var(--gold-soft); }
.evi-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; position: relative; z-index: 2; }
.evi-count { font-family: var(--mono); font-size: 0.74rem; color: var(--muted-light); }
.next-btn { font-family: var(--body); font-weight: 600; font-size: 0.88rem; color: var(--ink-900); background: var(--sky-bright); border: none; border-radius: 10px; padding: 10px 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: transform .18s ease, background .18s ease; }
.next-btn:hover { transform: translateX(3px); background: var(--sky); }
.next-btn svg { width: 16px; height: 16px; }

/* ============ BOOK (sıfırdan öğren — interactive colorful) ============ */
.book-wrap { display: grid; place-items: center; }
.book {
  --page-bg: #fff;
  width: min(100%, 860px); aspect-ratio: 16 / 10.5; max-height: 78vh;
  position: relative; border-radius: 16px;
  background: linear-gradient(135deg, var(--c-violet), var(--sky));
  padding: 14px; box-shadow: 0 50px 90px -40px rgba(0,0,0,0.7);
}
.book-inner { position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background: var(--page-bg); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
.book-page { position: absolute; inset: 0; padding: clamp(24px, 4vw, 46px); display: flex; flex-direction: column; color: #1f2740; overflow-y: auto;
  opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity .45s ease, transform .45s cubic-bezier(0.16,1,0.3,1); }
.book-page.active { opacity: 1; transform: none; pointer-events: auto; }
.book-page.cover { align-items: center; justify-content: center; text-align: center; color: #fff;
  background: radial-gradient(circle at 30% 20%, var(--c-amber), transparent 55%), linear-gradient(140deg, var(--c-coral), var(--c-violet)); }
.book-page.cover h2 { color: #fff; font-size: clamp(2rem, 6vw, 3.4rem); }
.book-page.cover p { color: rgba(255,255,255,0.9); margin: 12px 0 24px; max-width: 40ch; }
.book-page .p-kicker { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--c-violet); }
.book-page h3 { color: #1f2740; font-size: clamp(1.5rem, 3.6vw, 2.2rem); margin: 8px 0 6px; }
.book-page .lead { color: #55617d; font-size: 1.02rem; margin-bottom: 18px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.letter-chip { font-family: var(--display); font-weight: 800; font-size: 1.4rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; color: #fff; cursor: pointer; transition: transform .16s ease; box-shadow: 0 8px 18px -8px rgba(0,0,0,0.4); }
.letter-chip:hover { transform: translateY(-4px) scale(1.04); }
.wordline { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: #f4f6fc; margin-bottom: 10px; }
.wordline .emoji { font-size: 1.8rem; }
.wordline .w { font-weight: 700; color: #1f2740; }
.wordline .m { color: #6b7590; font-size: 0.92rem; }
.wordline .speak { border-color: #e0e6f2; color: #6b7590; }
.wordline .speak:hover { background: var(--c-violet); border-color: var(--c-violet); color: #fff; }
.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.book-btn { border: none; cursor: pointer; font-family: var(--body); font-weight: 700; font-size: 0.9rem; padding: 11px 20px; border-radius: 11px; display: inline-flex; align-items: center; gap: 8px; transition: transform .16s ease, opacity .16s; }
.book-btn svg { width: 16px; height: 16px; }
.book-btn.prev { background: #eef1f8; color: #55617d; }
.book-btn.next { background: var(--c-violet); color: #fff; }
.book-btn:hover { transform: translateY(-2px); }
.book-btn:disabled { opacity: .4; cursor: default; transform: none; }
.book-dots { display: flex; gap: 7px; }
.book-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d3d9e8; transition: all .2s; }
.book-dots i.on { background: var(--c-violet); width: 22px; border-radius: 5px; }
.book-cta { background: #fff; color: var(--c-coral); font-weight: 800; padding: 13px 26px; border-radius: 12px; cursor: pointer; border: none; font-size: 1rem; }
@media (max-width: 640px) { .book { aspect-ratio: 3 / 4.4; max-height: none; } }

/* ============ CTA + FOOTER ============ */
.cta { text-align: center; }
.cta .box { background: linear-gradient(135deg, var(--ink-800), var(--ink-700)); border: 1px solid var(--line-dark); border-radius: 26px; padding: clamp(44px, 6vw, 76px) 28px; position: relative; overflow: hidden; }
.cta .box::before { content: ""; position: absolute; width: 360px; height: 360px; left: 50%; top: -180px; transform: translateX(-50%); background: radial-gradient(circle, rgba(245,182,12,0.22), transparent 68%); pointer-events: none; }
.cta h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); position: relative; margin-bottom: 16px; }
.cta p { color: var(--muted-light); max-width: 48ch; margin: 0 auto 30px; position: relative; }
.cta .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

footer.foot { background: var(--ink-900); border-top: 1px solid var(--line-dark); padding: 42px 0; margin-top: 40px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot .brand img { width: 34px; height: 34px; }
.foot .brand b { font-size: 1.1rem; }
.foot .meta { font-size: 0.85rem; color: var(--muted-light); }
.foot .meta a { color: var(--sky-bright); }
.foot .meta a:hover { text-decoration: underline; }

/* ============ AUTH ============ */
.auth-open { cursor: pointer; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--ink-900); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 0.95rem; flex-shrink: 0; }
.user-chip .uname { font-size: 0.9rem; color: var(--text-light); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .logout { font-family: var(--mono); font-size: 0.72rem; color: var(--muted-light); cursor: pointer; border: 1px solid var(--line-dark); border-radius: 8px; padding: 6px 11px; transition: all .18s; background: transparent; }
.user-chip .logout:hover { color: #fff; border-color: var(--sky); }
.auth-overlay { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px; background: rgba(6, 11, 22, 0.74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.auth-overlay.open { display: grid; }
.auth-card { width: 100%; max-width: 410px; background: linear-gradient(180deg, var(--ink-800), var(--ink-700)); border: 1px solid var(--line-dark); border-radius: 20px; padding: 34px 30px 28px; position: relative; box-shadow: 0 40px 90px -30px rgba(0,0,0,0.85); animation: authIn .35s cubic-bezier(0.16,1,0.3,1); }
@keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.auth-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--muted-light); cursor: pointer; font-size: 1.5rem; line-height: 1; padding: 4px; }
.auth-close:hover { color: #fff; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.auth-brand img { width: 36px; height: 36px; }
.auth-brand b { font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.auth-brand b span { color: var(--gold); }
.auth-card h3 { font-family: var(--display); font-size: 1.5rem; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted-light); font-size: 0.9rem; margin-bottom: 18px; }
.auth-field { margin-bottom: 13px; }
.auth-field label { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); margin-bottom: 6px; }
.auth-field input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--line-dark); border-radius: 10px; padding: 12px 14px; color: var(--text-light); font-family: var(--body); font-size: 0.95rem; transition: border-color .18s; }
.auth-field input:focus { outline: none; border-color: var(--gold); }
.auth-field input::placeholder { color: #5f6f8c; }
.auth-submit { width: 100%; margin-top: 6px; justify-content: center; }
.auth-error { color: #ff8a8a; font-size: 0.85rem; min-height: 20px; margin: 9px 0 2px; }
.auth-switch { text-align: center; font-size: 0.88rem; color: var(--muted-light); margin-top: 14px; }
.auth-switch button { background: none; border: none; color: var(--gold); cursor: pointer; font-weight: 600; font-family: var(--body); font-size: 0.88rem; }
.auth-name-row { display: none; }
.auth-card.mode-signup .auth-name-row { display: block; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--muted-light); font-size: 0.78rem; font-family: var(--mono); letter-spacing: .08em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-dark); }
.auth-google { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f2430; border: none; border-radius: 12px; padding: 12px 14px; font-family: var(--body); font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: opacity .18s ease, transform .18s ease; }
.auth-google:hover { transform: translateY(-1px); opacity: 0.93; }
.auth-google:disabled { opacity: 0.6; cursor: default; }
.auth-google svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============ MEMBER PANEL (dashboard) ============ */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; margin-bottom: 40px; }
.stat { background: var(--ink-800); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 22px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--accent, var(--gold)); }
.stat .slab { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); }
.stat .num { font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: #fff; margin-top: 6px; display: flex; align-items: baseline; gap: 8px; }
.stat .num small { font-size: 0.95rem; color: var(--muted-light); font-family: var(--body); font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.quick { display: flex; align-items: center; gap: 14px; background: var(--ink-800); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 18px 20px; transition: transform .2s, border-color .2s; }
.quick:hover { transform: translateY(-4px); border-color: var(--gold); }
.quick .qi { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: rgba(255,255,255,0.05); flex-shrink: 0; }
.quick .qt b { color: #fff; display: block; }
.quick .qt span { color: var(--muted-light); font-size: 0.85rem; }
.gated { text-align: center; padding: 30px 0 10px; }
.gated p { color: var(--muted-light); margin: 10px auto 0; max-width: 40ch; }
.gated .btn { margin-top: 18px; }
.user-chip-link { display: inline-flex; align-items: center; gap: 10px; }
.user-chip-link:hover .uname { color: var(--gold-soft); }

/* ============ TICKER (shared) ============ */
.ticker { border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); background: rgba(255,255,255,0.015); position: relative; z-index: 2; }
.ticker-track { display: flex; gap: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-row { display: flex; flex-shrink: 0; align-items: center; padding: 15px 0; animation: marq 34s linear infinite; }
.ticker-row span { font-family: var(--mono); font-size: 0.82rem; color: var(--muted-light); padding: 0 26px; letter-spacing: 0.04em; }
.ticker-row span i { color: var(--sky-bright); font-style: normal; }
.ticker-row .dot { color: var(--gold); }
@keyframes marq { to { transform: translateX(-100%); } }

/* ============ REVEAL ANIM ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(0.16, 1, 0.3, 1), transform .6s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 10px; }
  .stage { order: -1; min-height: 300px; margin-bottom: 8px; }
  .evi-wrap { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 520px) {
  .brand b { font-size: 1.1rem; }
  .foot-inner { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  #view { animation: none; }
}
