:root {
  --ink: #0a0a0a;
  --ink-2: #1f1f1f;
  --paper: #ffffff;
  --mist: #f2f2f2;
  --line: #e5e5e5;
  --muted: #8a8a8a;
  --gain: #3f8f5f;
  --loss: #b94a48;
  --serif: "Instrument Serif", "Noto Naskh Arabic", Georgia, serif;
  --sans: "Manrope", "Noto Naskh Arabic", "Noto Sans Tamil", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
html[lang="ar"] { --serif: "Noto Naskh Arabic", serif; --sans: "Noto Naskh Arabic", system-ui, sans-serif; }
html[lang="ta"] { --serif: "Noto Sans Tamil", serif; --sans: "Noto Sans Tamil", system-ui, sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); color: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
html[lang="ar"] em, html[lang="ta"] em { font-style: normal; color: #cfcfcf; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(1%,3%)} }
body::after { /* vinheta */
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.75) 100%);
}

/* ---------- barra superior ---------- */
.nav {
  position: fixed; inset: 16px 16px auto; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 18px; border-radius: 999px;
  background: rgba(16,16,16,.55); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-size: 12px; letter-spacing: .22em; font-weight: 700; }
.brand small { font-size: 8.5px; letter-spacing: .5em; color: var(--muted); margin-top: 4px; }
.links { display: flex; gap: 28px; font-size: 13.5px; color: #bdbdbd; }
.links a:hover { color: var(--paper); }
.actions { display: flex; align-items: center; gap: 8px; }
.lang select {
  appearance: none; background: transparent; color: #bdbdbd; border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  padding: 8px 12px; font: 600 12px var(--sans); letter-spacing: .08em; cursor: pointer;
}
.lang select option { color: #000; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 10px 18px; font-size: 13.5px; font-weight: 600; transition: transform .4s var(--ease), background .3s, color .3s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn.solid { background: var(--paper); color: var(--ink); }
.btn.solid:hover { background: #e9e9e9; }
.btn.ghost { border: 1px solid rgba(255,255,255,.18); color: var(--paper); }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.lg { padding: 15px 26px; font-size: 15px; }

/* ---------- história ---------- */
.story { position: relative; z-index: 2; height: 560vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.layer { position: absolute; will-change: opacity, transform; }

.hero { inset-inline-start: clamp(20px, 6vw, 96px); top: 50%; transform: translateY(-46%); max-width: min(620px, 52vw); }
.eyebrow { font-size: 11.5px; letter-spacing: .32em; text-transform: uppercase; color: #9a9a9a; margin-bottom: 26px; }
.hero .eyebrow.under { margin: 22px 0 0; font-family: "Martian Mono", var(--sans); font-weight: 300; font-size: 11px; letter-spacing: .14em; }
h1 { font-size: clamp(48px, 7.4vw, 112px); line-height: .95; font-weight: 300; letter-spacing: -.035em; }
h1 em { letter-spacing: -.01em; }
.lead { margin-top: 26px; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.6; color: #b5b5b5; max-width: 480px; font-weight: 300; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.strip { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 46px; font-size: 12px; color: #8d8d8d; letter-spacing: .06em; }
.strip li { display: flex; align-items: center; gap: 22px; }
.strip li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #555; margin-inline-end: 0; }

.chapter { inset-inline-start: clamp(20px, 6vw, 96px); bottom: clamp(48px, 12vh, 120px); max-width: 560px; opacity: 0; }
.chapter .num { display: block; font-size: 11px; letter-spacing: .3em; color: #7a7a7a; margin-bottom: 18px; }
.chapter h2 { font-size: clamp(38px, 5.2vw, 78px); line-height: 1; font-weight: 300; letter-spacing: -.03em; }
.chapter p { margin-top: 18px; color: #a9a9a9; font-size: 16px; line-height: 1.6; font-weight: 300; max-width: 420px; }
.c3 { top: clamp(84px, 13vh, 130px); bottom: auto; inset-inline: 0; margin: 0 auto; text-align: center; max-width: none; }
.c3 .num { margin-bottom: 12px; }
.c3 h2 { font-size: clamp(30px, 3.6vw, 54px); }

/* ---------- notebook ---------- */
.device.laptop {
  position: absolute; left: 50%; top: calc(50% + 64px); width: min(980px, 74vw, calc((100svh - 290px) * 1.5)); transform: translate(-50%, -50%);
  opacity: 0; pointer-events: none;
}
.lid { position: relative; padding: 1.4% 1.4% 2.2%; border-radius: 22px 22px 6px 6px; background: linear-gradient(#2a2a2a, #161616); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 60px 120px -30px rgba(0,0,0,.9); }
.screen { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #ececec; clip-path: inset(0 0 100% 0 round 10px); }
.base { height: 14px; margin: 0 -6%; border-radius: 0 0 18px 18px; background: linear-gradient(#d9d9d9, #8f8f8f 60%, #5e5e5e); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.base::before { content: ""; display: block; width: 16%; height: 5px; margin: 0 auto; border-radius: 0 0 8px 8px; background: #7a7a7a; }
.disclaimer { margin-top: 18px; text-align: center; font-size: 11px; letter-spacing: .14em; color: #6d6d6d; text-transform: uppercase; }

/* celular ao lado do notebook (tamanhos em % do notebook, valem em qualquer tela) */
.device.laptop { container-type: inline-size; }
.phone { position: absolute; right: -5%; bottom: 3%; width: 23%; padding: 1.1%; border-radius: 3.4cqw; background: linear-gradient(#2a2a2a, #121212);
  box-shadow: 0 0 0 1px rgba(255,255,255,.1) inset, 0 40px 80px -20px rgba(0,0,0,.95); opacity: 0; translate: 0 8%; transition: opacity .9s var(--ease) .5s, translate 1.1s var(--ease) .5s; }
.phone::before { content: ""; position: absolute; z-index: 2; top: 2.6%; left: 50%; width: 30%; height: 1.5%; transform: translateX(-50%); border-radius: 999px; background: #050505; }
.show .phone { opacity: 1; translate: 0 0; }
.pscreen { position: relative; aspect-ratio: 9 / 19; border-radius: 2.6cqw; overflow: hidden; background: #ececec; }
.phone .app { grid-template-columns: 1fr; padding: 14% 6% 6%; font-size: 1.05cqw; }
.phone .main { gap: .7em; }
.phone .top { font-size: 1.35em; }
.phone .kpi.dark b { font-size: 2em; }
.phone .kpis { grid-template-columns: 1fr 1fr; gap: .6em; }
.phone .kpi b { font-size: 1.4em; }
.phone .card.eq svg { height: 6em; flex: none; }
.phone .card.bars { height: 7em; }
.phone .row { grid-template-columns: 1fr auto; }

/* mini sistema (imita o app; texto real e traduzível) */
.app { position: absolute; inset: 0; display: grid; grid-template-columns: 17% 1fr; gap: 1.6%; padding: 1.6%; color: var(--ink); font-size: clamp(7px, .82vw, 12px); background: linear-gradient(160deg, #f6f6f6, #e3e3e3); }
.side { background: var(--paper); border-radius: 1.2em; padding: 1.2em .9em; display: flex; flex-direction: column; gap: .35em; }
.side-brand { display: flex; align-items: center; gap: .5em; font-size: .8em; letter-spacing: .14em; margin-bottom: 1em; }
.side-brand .dot { width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--ink); }
.side i { font-style: normal; padding: .55em .8em; border-radius: 999px; color: #444; }
.side i.on { background: var(--ink); color: var(--paper); }
.main { display: flex; flex-direction: column; gap: .9em; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; font-size: 1.5em; }
.top b { font-weight: 600; letter-spacing: -.02em; }
.pill { font-size: .55em; background: var(--paper); border-radius: 999px; padding: .5em 1em; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8em; }
.kpi { background: var(--paper); border-radius: 1.2em; padding: .9em 1em; display: flex; flex-direction: column; gap: .3em; }
.kpi small { color: var(--muted); font-size: .78em; }
.kpi b { font-size: 1.7em; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi.dark { background: var(--ink); color: var(--paper); }
.kpi.dark b { color: #7fd1a0; }
.charts { display: grid; grid-template-columns: 1.6fr 1fr; gap: .8em; flex: 1; min-height: 0; }
.card { background: var(--paper); border-radius: 1.2em; padding: .9em 1em; display: flex; flex-direction: column; gap: .6em; min-height: 0; }
.card small { color: var(--muted); font-size: .78em; }
.card svg { width: 100%; flex: 1; min-height: 0; }
.eq .line { stroke-dasharray: 600; stroke-dashoffset: 600; }
.eq .area { opacity: 0; }
.bars .b { flex: 1; display: flex; align-items: flex-end; gap: 6%; }
.bars i { flex: 1; height: 0; background: var(--gain); border-radius: .3em .3em .1em .1em; }
.bars i.l { background: var(--loss); }
.rows { background: var(--paper); border-radius: 1.2em; padding: .5em 1em; }
.row { display: grid; grid-template-columns: 1.2fr 1fr 1fr .8fr; padding: .45em 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row b { text-align: end; font-variant-numeric: tabular-nums; }
.g { color: var(--gain); } .r { color: var(--loss); }

/* estados animados (quando o notebook aparece) */
.show .eq .line { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease) .3s; }
.show .eq .area { opacity: 1; transition: opacity 1.4s ease 1.2s; }
.show .bars i { height: var(--h); transition: height 1.2s var(--ease); }
.show .bars i:nth-child(2n) { transition-delay: .08s; } .show .bars i:nth-child(3n) { transition-delay: .16s; }

.progress { position: absolute; inset-inline-end: 22px; top: 50%; width: 2px; height: 90px; transform: translateY(-50%); background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
.progress i { display: block; width: 100%; height: 0; background: var(--paper); }

/* ---------- depois da história ---------- */
.next { position: relative; z-index: 2; min-height: 70vh; display: grid; place-content: center; text-align: center; padding: 80px 20px; background: linear-gradient(transparent, var(--ink) 30%); }
.next h2 { font-size: clamp(34px, 4.6vw, 68px); font-weight: 300; letter-spacing: -.03em; max-width: 900px; line-height: 1.05; }
.foot { position: relative; z-index: 2; padding: 40px clamp(20px, 6vw, 96px) 50px; border-top: 1px solid rgba(255,255,255,.08); background: var(--ink); font-size: 12.5px; color: #9a9a9a; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot .muted { color: #5f5f5f; }

/* ---------- celular e tablet ---------- */
@media (max-width: 900px) {
  .links { display: none; }
  .hero { inset-inline: 20px; max-width: none; top: auto; bottom: max(3vh, 16px); transform: none; }
  .lead { max-width: none; }
  .strip { margin-top: 30px; }
  .device.laptop { width: 84vw; top: 54%; margin-left: -4vw; }
  .phone { width: 28%; right: -9%; }
  .chapter { inset-inline: 20px; }
}
@media (max-width: 560px) {
  .nav { inset: 10px 10px auto; padding: 8px 8px 8px 14px; }
  .brand span { display: none; } /* só o touro, para caber Entrar e Assinar */
  .actions { gap: 6px; }
  .actions .btn { padding: 8px 12px; font-size: 12.5px; }
  .lang select { padding: 7px 9px; }
  h1 { font-size: 44px; }
  .lead { margin-top: 16px; font-size: 15px; line-height: 1.5; }
  .ctas { margin-top: 22px; }
  .eyebrow { margin-bottom: 18px; letter-spacing: .24em; }
  .hero .eyebrow.under { margin: 16px 0 0; }
  .ctas .btn { flex: 1; }
  .strip { gap: 8px 16px; }
  .strip li { gap: 16px; }
  .progress { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .show .eq .line, .show .eq .area, .show .bars i { transition: none; }
}
