/* =========================================================
   Ondex · site institucional
   Fundo #0a0a0a, destaque verde #c6ec6b, texto branco e cinza claro.
   Mobile first: o básico vale de 360px para cima; as telas maiores
   só acrescentam (min-width).
   ========================================================= */
@font-face {
  font-family: 'Albert Sans';
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('vendor/fonts/albert-sans-latin-wght-normal.woff2') format('woff2');
  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;
}

:root {
  --lime: #c6ec6b;
  --lime-glow: rgba(198, 236, 107, .45);
  --lime-soft: rgba(198, 236, 107, .12);
  --lime-0: rgba(198, 236, 107, 0);
  --night: #0a0a0a;
  --night-2: #131312;
  --soot: #0e100a;

  --bg: var(--night);
  --bg-2: var(--night-2);
  --ink: #f0eee8;
  --ink-2: #b0ada4;
  --ink-3: #8f8c84;           /* mínimo de contraste AA (≥4.5:1) sobre #0a0a0a */
  --line: rgba(240, 238, 232, .12);
  --line-2: rgba(240, 238, 232, .26);
  --btn-bg: var(--lime);
  --btn-ink: var(--soot);
  --shadow: rgba(0, 0, 0, .38);

  --f: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --t-hero: clamp(36px, 6vw, 88px);
  --t-display: clamp(38px, 6vw, 88px);
  --t-h2: clamp(34px, 4.6vw, 64px);
  --t-lead: clamp(17px, 1.3vw, 20px);

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; --s8: 64px;
  --pad-y: clamp(72px, 9.5vw, 148px);
  --gut: clamp(20px, 4vw, 64px);
  --maxw: 1360px;
  --hdr: 64px;
  --r3: 16px; --pill: 999px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); color: var(--ink); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--f); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--lime); color: var(--soot); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 2px; }
main:focus { outline: none; }
h1, h2, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }

/* rolagem suave (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html:not(.lenis) { scroll-behavior: smooth; } }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.section { position: relative; padding: var(--pad-y) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--s2); top: -100px; z-index: 300; padding: 14px 18px; border-radius: 6px; background: var(--lime); color: var(--soot); }
.skip:focus { top: var(--s2); }

/* grão de filme, fixo e estático */
.grain {
  position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- tipografia ---------- */
.h2 { font-size: var(--t-h2); font-weight: 300; line-height: 1.04; letter-spacing: -0.038em; text-wrap: balance; }
.display { font-size: var(--t-display); font-weight: 300; line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); letter-spacing: -0.01em; text-wrap: pretty; }
.hl { color: var(--lime); }

/* ---------- botões: texto que rola + disco que preenche ---------- */
.btn {
  --h: 56px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 16px;
  height: var(--h); padding: 0 7px 0 24px; border-radius: var(--pill);
  background: var(--btn-bg); color: var(--btn-ink);
  font: 500 15px/1 var(--f); letter-spacing: -0.005em; white-space: nowrap;
  transition: color .5s var(--ease), translate .7s var(--ease);
}
.btn::before {
  content: ''; position: absolute; z-index: -1; right: 7px; top: 50%;
  width: calc(var(--h) - 14px); aspect-ratio: 1; border-radius: 50%; background: var(--btn-ink);
  transform: translateY(-50%) scale(0); transition: transform .75s var(--ease);
}
.btn__t { position: relative; display: block; overflow: hidden; height: 1.25em; line-height: 1.25; }
.btn__t > span { display: block; transition: transform .6s var(--ease); }
.btn__i {
  display: grid; place-items: center; flex: none;
  width: calc(var(--h) - 14px); height: calc(var(--h) - 14px); border-radius: 50%;
  background: var(--btn-ink); color: var(--btn-bg); transition: background-color .5s var(--ease), color .5s var(--ease);
}
.btn__i svg { width: 15px; height: 15px; transition: transform .6s var(--ease); }
@media (hover: hover) {
  .btn:hover { color: var(--btn-bg); }
  .btn:hover::before { transform: translateY(-50%) scale(14); }
  .btn:hover .btn__t > span { transform: translateY(-100%); }
  .btn:hover .btn__i { background: var(--btn-bg); color: var(--btn-ink); }
  .btn:hover .btn__i svg { transform: rotate(-45deg); }
}
.btn:focus-visible { outline-offset: 3px; border-radius: var(--pill); }
.btn--sm { --h: 48px; gap: 12px; padding-left: 18px; font-size: 14px; }
.btn--sm .btn__i svg { width: 12px; height: 12px; }
.btn--lg { --h: 64px; gap: 20px; padding-left: 28px; font-size: 16px; }

/* link com sublinhado que desenha (alvo de toque de 48px) */
.ulink { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; }
.ulink::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 9px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .7s var(--ease);
}
@media (hover: hover) { .ulink:hover::after { transform: scaleX(1); transform-origin: left; } }
.ulink:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.ulink--on::after { transform: scaleX(1); transform-origin: left; }
.ulink svg { width: 14px; height: 14px; transition: transform .6s var(--ease); }
@media (hover: hover) { .ulink:hover svg { transform: translateX(4px); } }

/* =========================================================
   KIT DE MOVIMENTO (só age com JavaScript: html.js)
   ========================================================= */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.wi { display: inline-block; }
.js [data-split] .wi { transform: translate3d(0, 108%, 0); transition: transform 1.15s var(--ease); transition-delay: calc(var(--wi, 0) * 32ms); }
.js [data-split].is-in .wi { transform: none; }

.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 22px, 0);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 120ms + 120ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-d="1"] { --d: 1; }
[data-d="2"] { --d: 2; }

/* linhas finas que se desenham */
.hair { display: block; height: 1px; background: var(--line-2); margin-bottom: clamp(32px, 4vw, 56px); }
.js .draw { transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease-io); }
.js .draw.is-in { transform: scaleX(1); }

/* =========================================================
   CABEÇALHO
   ========================================================= */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80; height: var(--hdr);
  transition: background-color .5s var(--ease), box-shadow .5s var(--ease);
}
.hdr.is-solid { background: rgba(10, 10, 10, .86); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.hdr__in { max-width: var(--maxw); height: 100%; margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.hdr__brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; }
.hdr__brand .logo-iso { height: 28px; transition: transform .8s var(--ease); }
.hdr__brand .logo-word { height: 20px; }
.hdr__brand:hover .logo-iso, .hdr__brand:focus-visible .logo-iso { transform: rotate(360deg); }

/* =========================================================
   ABERTURA
   ========================================================= */
.hero { position: relative; overflow: hidden; min-height: 88vh; min-height: 88svh; display: flex; flex-direction: column; padding: calc(var(--hdr) + var(--s4)) 0 0; background: var(--bg); }
.hero__in { position: relative; z-index: 1; flex: 1; display: grid; align-content: center; gap: var(--s4); padding-block: var(--s2) var(--s6); }
.hero__art { display: grid; place-items: center; }
.hero__title { max-width: 11em; font-size: var(--t-hero); font-weight: 300; line-height: 1; letter-spacing: -0.045em; text-wrap: balance; }
.hero__sub { margin-top: var(--s4); max-width: 31em; }
.hero__go { margin-top: var(--s2); }

/* selo "Em construção" */
.live { display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--s3); font-size: 13px; font-weight: 500; letter-spacing: .01em; color: var(--ink-2); white-space: nowrap; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: live 2.6s var(--ease) infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 var(--lime-glow); } 80%, 100% { box-shadow: 0 0 0 9px var(--lime-0); } }

/* isotipo + anéis com pontos em órbita */
.orbit { --iso: 56vw; --size: calc(var(--iso) * 1.5); position: relative; width: var(--size); height: var(--size); display: grid; place-items: center; }
.orbit::before { content: ''; position: absolute; inset: 6%; background: radial-gradient(closest-side, var(--lime-soft), var(--lime-0)); pointer-events: none; }
.orbit__ring { position: absolute; inset: 0; animation: spin var(--t) linear infinite; }
.orbit__ring--1 { --k: .38; --t: 30s; }
.orbit__ring--2 { --k: .44; --t: 44s; animation-direction: reverse; }
.orbit__ring--3 { --k: .5; --t: 62s; }
.orbit__ring::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: calc(var(--size) * var(--k) * 2); aspect-ratio: 1;
  border-radius: 50%; border: 1px solid var(--line); transform: translate(-50%, -50%);
}
.orbit__it { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateX(calc(var(--size) * var(--k))); }
.orbit__ring--1 .orbit__it { --a: -60deg; }
.orbit__ring--2 .orbit__it:nth-child(1) { --a: 25deg; }
.orbit__ring--2 .orbit__it:nth-child(2) { --a: 205deg; }
.orbit__ring--3 .orbit__it { --a: 120deg; }
.orbit__dot { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px var(--lime-glow); }
.orbit__dot--sm { left: -3px; top: -3px; width: 6px; height: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* o isotipo inclina na direção do cursor (--tx/--ty via JS), gira com a rolagem (--rot) e dá uma volta completa (360°) no hover */
.hero__tilt { position: relative; transform: perspective(900px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); will-change: transform; }
.hero__mark { display: block; width: var(--iso); transform: rotate(var(--rot, 0deg)); rotate: 0deg; transition: rotate .8s var(--ease); will-change: transform; }
.hero__mark:hover { rotate: 360deg; }

/* faixa que rola sozinha (só CSS) */
.marquee { position: relative; z-index: 1; overflow: hidden; padding: clamp(14px, 2vw, 26px) 0; border-top: 1px solid var(--line); font-size: clamp(28px, 4.6vw, 68px); font-weight: 200; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink-2); white-space: nowrap; user-select: none; }
.marquee__track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__g { flex: none; padding-right: .3em; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (min-width: 1000px) {
  .hero__in { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 5vw, 96px); }
  .hero__art { grid-column: 2; grid-row: 1; }
  .hero__text { grid-column: 1; grid-row: 1; }
  .orbit { --iso: clamp(220px, 30vw, 420px); }
}

/* =========================================================
   COMO A GENTE TRABALHA + CELULAR 3D
   ========================================================= */
.sec-head { margin-bottom: clamp(32px, 5vw, 72px); }
.sec-head .h2 { max-width: 12em; }

.svc-layout { display: grid; gap: var(--s2); }
/* no celular o aparelho fica acima da lista, preso sob o cabeçalho */
.phone3d {
  position: sticky; top: var(--hdr); z-index: 2; display: flex; flex-direction: column; align-items: center;
  margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) var(--s1);
  background: linear-gradient(180deg, var(--bg) 88%, transparent);
}
.phone3d__stage {
  position: relative; width: 100%; max-width: 420px; height: clamp(230px, 40vh, 340px); height: clamp(230px, 40svh, 340px);
  background: radial-gradient(closest-side, var(--lime-soft), var(--lime-0) 74%);
}
.phone3d__stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.phone3d__cap { display: none; font-size: 13px; color: var(--ink-3); }
.phone3d.is-failed { display: none; }
html:not(.js) .phone3d { display: none; }

.svc__row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s2); padding: clamp(24px, 3vw, 40px) 0; }
.svc__row::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.svc__row:last-child::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.svc__n { padding-top: .7em; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; transition: color .6s var(--ease); }
.svc__name { display: block; font-size: clamp(28px, 3vw, 42px); font-weight: 300; line-height: 1.1; letter-spacing: -0.035em; transition: color .6s var(--ease); }
.svc__d { display: block; margin-top: var(--s1); max-width: 28em; font-size: 16px; color: var(--ink-2); transition: color .6s var(--ease); }
/* a etapa em foco acende; as outras esmaecem por cor (nunca por opacidade, para manter o contraste) */
.svc.has-active .svc__row .svc__name, .svc.has-active .svc__row .svc__d { color: var(--ink-3); }
.svc.has-active .svc__row.is-active .svc__name { color: var(--lime); }
.svc.has-active .svc__row.is-active .svc__d { color: var(--ink-2); }
.svc.has-active .svc__row.is-active .svc__n { color: var(--lime); }

@media (min-width: 1101px) {
  .svc-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: clamp(48px, 6vw, 112px); align-items: start; }
  .phone3d { order: 2; top: calc(var(--hdr) + var(--s2)); gap: var(--s2); margin: 0; padding: 0; background: none; }
  .phone3d__stage { max-width: none; height: min(640px, calc(100vh - var(--hdr) - 96px)); height: min(640px, calc(100svh - var(--hdr) - 96px)); }
  .phone3d__cap { display: block; }
}

/* =========================================================
   CONTATO
   ========================================================= */
.final { position: relative; padding: 0 0 clamp(40px, 6vw, 96px); }
.final__panel {
  position: relative; overflow: hidden; isolation: isolate; padding: clamp(32px, 6vw, 96px) clamp(22px, 5.5vw, 88px);
  border-radius: var(--r3); background: radial-gradient(90% 120% at 100% 100%, var(--lime-soft), var(--lime-0) 60%), var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.final__mark { position: absolute; z-index: -1; right: -32%; bottom: -26%; width: min(110%, 720px); opacity: .1; pointer-events: none; transform: rotate(var(--rot, 0deg)); will-change: transform; }
.final__lead { margin: var(--s3) 0 var(--s5); max-width: 28em; }
.final__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); }

/* =========================================================
   RODAPÉ
   ========================================================= */
.ftr { padding: var(--s4) 0 var(--s6); }
.ftr__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
.ftr__logo { height: 18px; }
.ftr p { font-size: 14px; color: var(--ink-3); }

@media (min-width: 900px) {
  :root { --hdr: 72px; }
  .final__mark { right: -8%; bottom: -34%; width: min(58%, 720px); }
}

/* =========================================================
   MOVIMENTO REDUZIDO: nada desliza, tudo vira esmaecimento
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .js [data-split] .wi { transform: none; transition: none; }
  .js [data-split] { opacity: 0; transition: opacity 1s var(--ease); }
  .js [data-split].is-in { opacity: 1; }
  .js [data-reveal] { transform: none; }
  .js .draw { transform: none; }
  .btn::before, .btn__t > span, .btn__i svg, .ulink svg { transition: none; }
  .hero__mark, .final__mark, .hero__tilt { will-change: auto; }
  .hero__mark:hover { rotate: 0deg; }
  .hdr__brand .logo-iso { transition: none; }
  .hdr__brand:hover .logo-iso, .hdr__brand:focus-visible .logo-iso { transform: none; }
  .live i, .orbit__ring, .marquee__track { animation: none; }
}
