/* Lumo English v2 · main.css — tokens, base, controles fixos, cursor, loader, modos. */
@property --r { syntax: "<length>"; inherits: false; initial-value: 0px; }

:root {
  /* Marca (fixas) */
  --ink: #1B2340; --sun: #FFC83D; --sun-deep: #E8A400; --belly: #FFE59A;
  --mint: #12A892; --glow: #3DE0C4; --coral: #F25F4C; --cream: #FFFCF3;
  /* Texto sobre a tinta (cenas 1–3) */
  --t1: #FFFCF3; --t2: rgba(255, 252, 243, .84); --t3: rgba(255, 252, 243, .7); --t-dim: rgba(255, 252, 243, .45);
  --plate: rgba(27, 35, 64, .82); --plate-line: rgba(255, 252, 243, .1);
  /* Zona clara (cenas 4–5), tema claro */
  --paper: #FFFCF3; --surface: #FFFFFF; --text: #1B2340; --muted: #59617F; --line: #ECE5D2;
  --mint-text: #0B7A6A; --coral-text: #C2412F; --focus-light: #1B2340;
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Lexend", "Segoe UI", system-ui, -apple-system, sans-serif;
  --on-out: cubic-bezier(.16, 1, .3, 1); --on-pop: cubic-bezier(.34, 1.56, .64, 1);
  --on-spring: cubic-bezier(.5, 1.6, .5, 1); --on-soft: cubic-bezier(.37, 0, .63, 1);
  --radius: 24px; --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
/* Tema escuro do visitante: só muda a zona clara (tokens da v1) */
:root[data-theme="dark"] { --paper: #0F1526; --surface: #172038; --text: #EEF1FA; --muted: rgba(238, 241, 250, .76); --line: rgba(238, 241, 250, .14); --mint-text: #3DD6BE; --coral-text: #FF8574; --focus-light: #3DE0C4; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0F1526; --surface: #172038; --text: #EEF1FA; --muted: rgba(238, 241, 250, .76); --line: rgba(238, 241, 250, .14); --mint-text: #3DD6BE; --coral-text: #FF8574; --focus-light: #3DE0C4; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--ink); color: var(--t1);
  font-family: var(--font-body); font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.6;
  overflow-x: hidden; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--glow); text-underline-offset: .18em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
.light-zone :focus-visible { outline-color: var(--focus-light); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
[hidden] { display: none !important; }

/* Tipografia (Fredoka títulos, Lexend texto) */
.h-hero, .h2, .h3, .h4, .h5 { font-family: var(--font-display); font-weight: 600; margin: 0 0 .4em; text-wrap: balance; }
.h-hero { font-size: clamp(3rem, min(1.2rem + 7.4vw, 12.5vh), 8rem); line-height: .94; letter-spacing: -.02em; }
.h2 { font-size: clamp(2.1rem, 1rem + 4.2vw, 4.6rem); line-height: 1.02; letter-spacing: -.015em; }
.h3 { font-size: clamp(1.375rem, 1rem + 1.6vw, 2rem); line-height: 1.15; font-weight: 500; }
.h4 { font-size: clamp(1.2rem, 1rem + .8vw, 1.5rem); line-height: 1.2; font-weight: 500; }
.h5 { font-size: 1rem; font-weight: 600; letter-spacing: .02em; }
.lead { font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem); line-height: 1.55; max-width: 60ch; color: var(--t2); margin: 0 0 1em; }
p { margin: 0 0 .9em; max-width: 60ch; }
.small { font-size: .9rem; line-height: 1.5; }
.muted { color: var(--t3); }
.eyebrow { font-weight: 500; font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sun); margin: 0 0 .9em; }
.num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.fill { background: rgba(255, 200, 61, .22); border-radius: 6px; padding: 0 .3em; font-weight: 500; }

/* Botões */
.btn {
  --lift: 0px; display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: .7em 1.4em; border-radius: 999px; border: 0; text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.1; position: relative; overflow: hidden;
  transition: transform .14s var(--on-out), box-shadow .14s, background-color .14s, color .14s, border-color .14s;
}
.btn svg { width: 1.2em; height: 1.2em; }
.btn-sm { min-height: 44px; padding: .5em 1.1em; font-size: .98rem; }
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 #0E1428; }
.btn-sun:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #0E1428; }
.btn-sun:active, .btn.is-press { transform: translateY(3px); box-shadow: 0 1px 0 #0E1428; transition-duration: .09s; }
.btn-sun::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-110%); }
@media (pointer: fine) { .btn-sun:hover::after { transform: translateX(110%); transition: transform .5s var(--on-out); } }
.btn-ghost { background: transparent; color: var(--t1); border: 1.5px solid rgba(255, 252, 243, .45); }
.btn-ghost:hover { border-color: var(--glow); color: var(--glow); }
.btn-ink { background: var(--text); color: var(--paper); }
.btn-ink:hover { transform: translateY(-2px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; border: 1.5px solid rgba(255, 252, 243, .3); background: rgba(27, 35, 64, .6); color: var(--t1); padding: 0 .6em; gap: .4em; }
.btn-icon svg { width: 20px; height: 20px; }
[data-magnetic] { will-change: transform; }

/* Pular conteúdo */
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10001; background: var(--sun); color: var(--ink); padding: .7em 1.1em; border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* Cabeçalho */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(27, 35, 64, .92), rgba(27, 35, 64, .72)); border-bottom: 1px solid var(--plate-line);
}
@media (pointer: fine) and (min-width: 900px) { .site-header { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); } }
.logo { display: inline-flex; align-items: center; color: var(--t1); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; }
.logo svg, .logo-foot svg { width: 124px; height: 40px; display: block; }
.logo-word { margin-left: 1px; }
.header-selo { margin: 0; font-size: .78rem; color: var(--t3); border: 1px solid var(--plate-line); padding: .3em .8em; border-radius: 999px; white-space: nowrap; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--t2); text-decoration: none; padding: .5em .7em; border-radius: 999px; font-size: .95rem; display: inline-block; min-height: 44px; line-height: 2; }
.nav a:not(.btn):hover { color: var(--sun); }
.nav-theme-txt { font-size: .85rem; }
.menu-btn { display: none; margin-left: auto; }
@media (max-width: 1180px) { .header-selo { display: none; } }
@media (max-width: 920px) {
  .menu-btn { display: inline-grid; }
  .nav { position: fixed; inset: 64px 12px auto 12px; margin: 0; background: var(--ink); border: 1px solid var(--plate-line); border-radius: 20px; padding: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav a:not(.btn), .nav .btn, .nav .btn-icon { width: 100%; justify-content: flex-start; }
  .nav .btn-icon { display: flex; border-radius: 12px; }
}

/* Dock: som e movimento, sempre visíveis */
.dock { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.dock-btn { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: 0 1em; border-radius: 999px; border: 1.5px solid rgba(255, 252, 243, .3); background: rgba(27, 35, 64, .9); color: var(--t1); font-size: .85rem; font-weight: 500; }
.dock-btn:hover { border-color: var(--glow); }
.dock-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 252, 243, .35); transition: background .2s, box-shadow .2s; }
.dock-btn[aria-pressed="true"] .dock-dot { background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.sound-tip { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right)); top: 80px; margin: 0; background: var(--cream); color: var(--ink); padding: .5em .9em; border-radius: 12px; font-size: .85rem; max-width: 260px; }
@media (max-width: 520px) { .dock { left: 16px; right: 16px; justify-content: center; } .dock-btn { flex: 1 1 0; justify-content: center; padding: 0 .6em; font-size: .8rem; } }

/* Indicador de cena 01–06 */
.scene-ind { position: fixed; z-index: 40; left: max(var(--gutter), env(safe-area-inset-left)); bottom: 20px; display: flex; align-items: baseline; gap: .5em; font-family: var(--font-display); color: #E6E9F5; pointer-events: none; background: rgba(27, 35, 64, .78); padding: .3em .9em; border-radius: 999px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.scene-ind-num { font-size: 1.6rem; color: var(--sun); font-variant-numeric: tabular-nums; }
.scene-ind-name { font-family: var(--font-body); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.scene-ind-bar { width: 64px; height: 2px; background: rgba(255, 252, 243, .2); align-self: center; }
.scene-ind-bar span { display: block; height: 100%; width: 0; background: var(--glow); }
@media (max-width: 760px) { .scene-ind { display: none; } }
html.past-3d .scene-ind { opacity: 0; transition: opacity .3s; }

/* Aviso, toast */
.toast { position: fixed; z-index: 70; left: 50%; top: 84px; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; background: var(--cream); color: var(--ink); padding: .7em 1.1em; border-radius: 14px; font-size: .92rem; max-width: calc(100vw - 32px); transition: opacity .3s, transform .3s var(--on-out); box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.notice2d { position: fixed; z-index: 65; left: 16px; right: 16px; top: 76px; margin: 0 auto; max-width: 720px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--cream); color: var(--ink); border-radius: 18px; padding: 12px 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.notice2d p { margin: 0; flex: 1 1 260px; font-size: .92rem; }
.notice2d .btn-ghost { color: var(--ink); border-color: var(--ink); }
.notice2d .btn-icon { background: transparent; color: var(--ink); border-color: rgba(27, 35, 64, .3); }

/* Canvas 3D */
.scene-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0; transition: opacity .5s; pointer-events: none; }
html.mode-3d .scene-canvas.ready { opacity: 1; }
html.past-3d .scene-canvas { opacity: 0; transition-duration: .4s; }
main, .site-footer { position: relative; z-index: 1; }

/* Placa de leitura sobre o canvas (contraste garantido) */
.plate { background: var(--plate); border: 1px solid var(--plate-line); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); max-width: 640px; }
.plate-wide { max-width: 860px; }
@media (pointer: fine) and (min-width: 900px) { .plate { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } }
@media (pointer: coarse), (max-width: 899px) { .plate { background: rgba(27, 35, 64, .9); } }

/* Cursor-faísca (só pointer: fine; não esconde o cursor do sistema) */
.cursor { position: fixed; inset: 0; z-index: 9000; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--sun); box-shadow: 0 0 12px rgba(255, 200, 61, .7); }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid rgba(255, 200, 61, .55); display: grid; place-items: center; transition: width .24s var(--on-pop), height .24s var(--on-pop), margin .24s var(--on-pop), border-color .2s, background-color .2s, opacity .2s; }
.cursor.is-hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--glow); background: rgba(61, 224, 196, .08); }
.cursor-label { font-family: var(--font-display); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--glow); opacity: 0; transition: opacity .15s; white-space: nowrap; text-shadow: 0 1px 4px rgba(27, 35, 64, .9); }
.cursor.is-hover .cursor-label { opacity: 1; }
.cursor.is-field { opacity: 0; }
.cursor.is-light .cursor-ring { border-color: rgba(27, 35, 64, .5); }
.cursor.is-light.is-hover .cursor-ring { border-color: var(--mint); }
.cursor.is-light .cursor-label { color: var(--ink); text-shadow: none; }
.cursor-pulse { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid var(--glow); animation: pulse .5s var(--on-out) forwards; }
@keyframes pulse { to { transform: scale(3.2); opacity: 0; } }

/* Loader: antena enchendo */
.loader { position: fixed; inset: 0; z-index: 10000; background: var(--ink); display: grid; place-items: center; opacity: 0; animation: loaderIn .25s .4s forwards; --r: 0px;
  -webkit-mask: radial-gradient(circle at 50% 42%, transparent var(--r), #000 calc(var(--r) + 1px)); mask: radial-gradient(circle at 50% 42%, transparent var(--r), #000 calc(var(--r) + 1px)); }
html.no-js .loader { display: none; }
@keyframes loaderIn { to { opacity: 1; } }
.loader.is-out { animation: none; opacity: 1; transition: --r .7s var(--on-out), opacity .7s; --r: 150vmax; }
.loader.is-gone { display: none; }
.loader-inner { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 16px; }
.loader-bulb { width: 96px; height: 96px; }
.loader.is-full .loader-bulb { filter: drop-shadow(0 0 18px rgba(61, 224, 196, .8)); transition: filter .3s; }
.loader-num { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.5rem, 2rem + 2vw, 4rem); line-height: 1; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.loader-phrase { color: var(--t3); margin: 0; }
.loader-slow { margin-top: 12px; display: grid; justify-items: center; }

/* Movimento calmo: sem animações nem transições longas */
html.calm *, html.calm *::before, html.calm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
html.calm .loader { animation: none; opacity: 1; }

/* Adaptações (valem para a página inteira) */
html.a-big { font-size: 118%; }
html.a-big .btn, html.a-big .switch { min-height: 56px; }
html.a-spaced body { letter-spacing: .06em; word-spacing: .16em; }
html.a-spaced p, html.a-spaced li, html.a-spaced label { line-height: 1.8; }
html.a-spaced .preview { letter-spacing: .12em; word-spacing: .16em; }
html.a-spaced .eyebrow { text-transform: none; }
html.a-focus .scene-ind, html.a-focus .preview-deco, html.a-focus .scroll-hint, html.a-focus .hero-proof, html.a-focus .island2d .w2d:not(.lit) { display: none !important; }
html.a-focus .cursor { display: none; }
