/* ==========================================================
   Mattia Digital Studio
   Paleta e tipografia: manual de branding v1.0
   Dois temas: escuro (padrão da marca) e claro
   ========================================================== */

:root,
[data-theme="dark"] {
  --bg: #0B0F17;            /* grafite profundo */
  --surface: #161E2E;       /* cinza ardósia */
  --surface-2: #1C2638;
  --panel: rgba(22, 30, 46, .5);
  --text: #F8FAFC;          /* branco puro */
  --muted: #94A3B8;         /* cinza neutro */
  --faint: #64748B;
  --green: #10B981;         /* verde uptime */
  --green-ink: #10B981;     /* verde para texto */
  --green-soft: rgba(16, 185, 129, .14);
  --red: #F87171;
  --line: rgba(148, 163, 184, .14);
  --line-2: rgba(148, 163, 184, .26);
  --header: rgba(11, 15, 23, .76);
  --bezel: #05080E;
  --chrome: #111827;
  --shadow: 0 40px 80px -36px rgba(0, 0, 0, .85);
  --beam: rgba(16, 185, 129, .3);
  --glow: rgba(16, 185, 129, .22);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --surface-2: #EEF2F7;
  --panel: #FFFFFF;
  --text: #0B0F17;
  --muted: #4B5A70;
  --faint: #8A97AA;
  --green: #10B981;
  --green-ink: #047857;
  --green-soft: rgba(16, 185, 129, .14);
  --red: #DC2626;
  --line: rgba(11, 15, 23, .08);
  --line-2: rgba(11, 15, 23, .16);
  --header: rgba(246, 248, 251, .82);
  --bezel: #0B0F17;
  --chrome: #EEF2F7;
  --shadow: 0 34px 70px -38px rgba(15, 23, 42, .4);
  --beam: rgba(16, 185, 129, .2);
  --glow: rgba(16, 185, 129, .16);
  color-scheme: light;
}

:root {
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.theme-anim, .theme-anim *, .theme-anim *::before { transition: background-color .45s, border-color .45s, color .45s !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b { font-weight: 600; }
::selection { background: var(--green); color: #04120C; }

/* logos: uma versão por tema */
[data-theme="dark"] .on-light, [data-theme="light"] .on-dark { display: none !important; }

.muted { color: var(--muted); }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.slash { color: var(--green); font-style: normal; margin-left: .02em; display: inline-block; }
.eyebrow { font: 500 .78rem/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.eyebrow i, .case__num i { color: var(--green); font-style: normal; margin: 0 .3em; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--green); color: #04120C; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 6px; }

.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ---------- botões ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.5em; border-radius: 999px;
  background: var(--green); color: #04120C;
  font: 600 .98rem/1 var(--sans); text-decoration: none; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--ease), background .25s, box-shadow .25s, border-color .25s;
  box-shadow: 0 10px 30px -12px rgba(16,185,129,.7);
}
.btn svg { width: 1.2em; height: 1.2em; fill: currentColor; }
.btn:hover { background: #34D399; box-shadow: 0 14px 36px -12px rgba(16,185,129,.9); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn--ghost:hover { background: var(--green-soft); border-color: var(--green); box-shadow: none; }
.btn--sm { padding: .7em 1.15em; font-size: .9rem; }
.btn--lg { padding: 1.15em 2em; font-size: 1.08rem; }

/* ---------- topo ---------- */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.topbar.is-scrolled {
  background: var(--header);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-color: var(--line);
}
.topbar__in { display: flex; align-items: center; gap: 12px; height: 72px; }
.brand { margin-right: auto; }
.brand img { height: 24px; width: auto; }
.nav { display: flex; gap: 26px; margin-right: 12px; }
.nav a { text-decoration: none; color: var(--muted); font-size: .93rem; transition: color .2s; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.theme-btn, .menu-btn {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: transparent; border: 1px solid var(--line-2); color: var(--text);
  cursor: pointer; display: grid; place-items: center; position: relative;
  transition: border-color .25s, background .25s;
}
.theme-btn:hover, .menu-btn:hover { border-color: var(--green); background: var(--green-soft); }
.theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; grid-area: 1 / 1; transition: transform .5s var(--ease), opacity .3s; }
[data-theme="dark"] .theme-btn .i-moon, [data-theme="light"] .theme-btn .i-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }

.menu-btn { display: none; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 16px; }
.menu-btn span:last-child { top: 24px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu-mobile { padding: 8px var(--gutter) 24px; display: grid; gap: 4px; }
.menu-mobile[hidden] { display: none; }
.menu-mobile a:not(.btn) { padding: 12px 0; text-decoration: none; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
.menu-mobile .btn { margin-top: 16px; justify-content: center; }

@media (max-width: 960px) {
  .nav, .topbar__cta { display: none; }
  .menu-btn { display: grid; }
  .topbar { background: var(--header); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}

/* ---------- aparecer ao rolar ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms + .1s); }
.js [data-split].is-in .w > span { transform: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 136px 0 56px; overflow: hidden; isolation: isolate; }
.hero__grid {
  position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(520px circle at var(--gx, 72%) var(--gy, 35%), #000 0%, rgba(0,0,0,.25) 45%, transparent 75%);
  -webkit-mask-image: radial-gradient(520px circle at var(--gx, 72%) var(--gy, 35%), #000 0%, rgba(0,0,0,.25) 45%, transparent 75%);
}
.hero__beam {
  position: absolute; z-index: -1; top: -20%; right: 22%;
  width: 120px; height: 150%;
  background: linear-gradient(180deg, transparent, var(--beam), transparent);
  transform: skewX(-15deg); filter: blur(40px);
  animation: beam 8s ease-in-out infinite alternate;
}
@keyframes beam { from { opacity: .5; translate: 0 0; } to { opacity: 1; translate: -60px 0; } }

.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.kicker { display: inline-block; color: var(--green-ink); font-weight: 500; font-size: .92rem; line-height: 1.4; margin-bottom: 22px; padding: 6px 14px; border-radius: 16px; background: var(--green-soft); }
.hero__title { font-size: clamp(2.6rem, 6.2vw, 5.4rem); letter-spacing: -.045em; line-height: .98; max-width: 11ch; }
.hero__title em { font-style: normal; color: var(--muted); }
.hero__lead { margin-top: 26px; color: var(--muted); font-size: 1.15rem; max-width: 32em; }
.hero__ctas { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- demonstração no celular ---------- */
.demo { margin: 0; display: grid; grid-template-columns: auto auto; gap: 32px; align-items: center; justify-self: end; }
.demo__phone {
  width: 268px; padding: 10px; border-radius: 40px; background: var(--bezel);
  box-shadow: var(--shadow), 0 0 0 1px var(--line-2);
  transform: rotate(-3deg); transition: transform .8s var(--ease);
}
.demo:hover .demo__phone { transform: rotate(0); }
.demo__screen {
  position: relative; height: 520px; border-radius: 31px; overflow: hidden;
  background: #fff; color: #0B0F17; font-size: 13px; line-height: 1.4;
}
.scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s .6s; }
.demo__screen[data-scene="1"] .scene--search,
.demo__screen[data-scene="2"] .scene--site,
.demo__screen[data-scene="3"] .scene--chat { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* cena 1: busca */
.scene--search { padding: 40px 14px 14px; }
.srch { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 99px; background: #F1F3F6; border: 1px solid #E2E6EC; }
.srch svg { width: 16px; height: 16px; fill: none; stroke: #64748B; stroke-width: 2; stroke-linecap: round; flex: none; }
.srch span { white-space: nowrap; overflow: hidden; }
.srch__caret { width: 1.5px; height: 16px; background: #0B0F17; animation: blink 1s steps(1) infinite; flex: none; }
@keyframes blink { 50% { opacity: 0; } }
.results { margin-top: 16px; display: grid; gap: 10px; opacity: 0; transform: translateY(8px); transition: .5s var(--ease); }
.results.is-on { opacity: 1; transform: none; }
.res { position: relative; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid #EDF0F4; overflow: hidden; }
.res small { display: block; color: #047857; font-size: 10.5px; }
.res strong { display: block; color: #1A3FB8; font-size: 14px; font-weight: 600; margin: 2px 0 4px; letter-spacing: -.01em; }
.res p { color: #556377; font-size: 11.5px; }
.res:not(.res--hit) small, .res:not(.res--hit) strong, .res:not(.res--hit) p { height: 9px; border-radius: 4px; background: #EEF1F5; margin: 7px 0; }
.res:not(.res--hit) strong { width: 70%; height: 12px; }
.res:not(.res--hit) small { width: 40%; }
.res--hit { border-color: #D7E0EC; box-shadow: 0 10px 22px -14px rgba(15,23,42,.45); }

.tap { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(11,15,23,.2); transform: scale(0); opacity: 0; pointer-events: none; }
.tap.is-on { animation: tap .7s var(--ease); }
@keyframes tap { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

/* cena 2: o site */
.load { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2; }
.load span { display: block; height: 100%; background: #10B981; transform-origin: left; transform: scaleX(0); }
.scene--site.is-loading .load span { transition: transform .45s cubic-bezier(.3,.9,.3,1); transform: scaleX(1); }
.mini { opacity: 0; transition: opacity .35s .25s; }
.scene--site.is-ready .mini { opacity: 1; }
.mini__nav { display: flex; justify-content: space-between; align-items: center; padding: 38px 16px 12px; }
.mini__nav b { font-size: 13px; letter-spacing: -.01em; }
.mini__nav i { width: 18px; height: 10px; border-block: 2px solid #0B0F17; }
.mini__hero { margin: 4px 12px; padding: 22px 16px; border-radius: 18px; background: linear-gradient(150deg, var(--demo-a, #DCEFF7), var(--demo-b, #F3F7FA)); min-height: 240px; display: flex; flex-direction: column; transition: background .4s; }
.mini__hero small { text-transform: uppercase; letter-spacing: .14em; font-size: 9.5px; color: #3D4B5F; }
.mini__hero strong { margin-top: 8px; font-size: 25px; line-height: 1.05; letter-spacing: -.03em; font-weight: 650; }
.mini__btn { position: relative; overflow: hidden; margin-top: auto; align-self: flex-start; padding: 11px 15px; border-radius: 99px; background: #10B981; color: #04120C; font-weight: 600; font-size: 12px; }
.mini__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px; }
.mini__row i { height: 64px; border-radius: 12px; background: #EEF1F5; }
.badge { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: #0B0F17; color: #F8FAFC; font-size: 12px; font-weight: 500; white-space: nowrap; opacity: 0; transform: translateY(10px); transition: .5s var(--ease); }
.badge svg { width: 15px; height: 15px; fill: none; stroke: #10B981; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.scene--site.is-ready .badge { opacity: 1; transform: none; transition-delay: .4s; }

/* cena 3: conversa */
.scene--chat { background: #EFEAE2; display: flex; flex-direction: column; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 36px 14px 12px; background: #0F7A5C; color: #fff; }
.chat__head b { display: block; font-size: 13.5px; }
.chat__head small { font-size: 10.5px; opacity: .8; }
.chat__av { width: 34px; height: 34px; border-radius: 50%; background: #D6F5EA; color: #0F7A5C; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.chat__body { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 12.5px; opacity: 0; transform: translateY(8px) scale(.96); transition: .45s var(--ease); box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.bub.is-on { opacity: 1; transform: none; }
.bub--me { align-self: flex-end; background: #D9FDD3; border-bottom-right-radius: 4px; }
.bub--them, .bub--typing { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; }
.bub--typing { display: flex; gap: 4px; padding: 12px 14px; }
.bub--typing i { width: 6px; height: 6px; border-radius: 50%; background: #8696A0; animation: typing 1s infinite; }
.bub--typing i:nth-child(2) { animation-delay: .15s; }
.bub--typing i:nth-child(3) { animation-delay: .3s; }
.bub--typing.is-gone { display: none; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }

.demo__steps { display: grid; gap: 16px; max-width: 210px; }
.demo__steps li { display: flex; align-items: center; gap: 12px; color: var(--faint); font-weight: 500; font-size: .98rem; line-height: 1.3; transition: color .4s; }
.demo__steps b { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-size: .85rem; transition: background .4s, color .4s, border-color .4s; }
.demo__steps li.is-on { color: var(--text); }
.demo__steps li.is-on b { background: var(--green); border-color: var(--green); color: #04120C; }
.demo__note { grid-column: 1 / -1; font: 500 .7rem/1 var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .14em; padding-left: 8px; }

/* ---------- prova: métricas ao vivo ---------- */
.live { margin-top: 72px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.live__label { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.live__label b { color: var(--text); }
.live__grid { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.live__item { padding: 22px 24px; border-left: 1px solid var(--line); }
.live__item:first-child { border-left: 0; }
.live dt { color: var(--muted); font-size: .88rem; }
.live dd { margin: 6px 0 0; display: flex; align-items: baseline; gap: 6px; }
.live dd b { font-size: 2.2rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.live dd small { color: var(--muted); font-size: .9rem; }
.live__item p { margin-top: 8px; color: var(--faint); font-size: .82rem; }

@media (max-width: 1080px) {
  .hero__in { grid-template-columns: 1fr; gap: 56px; }
  .demo { justify-self: start; }
}
@media (max-width: 900px) {
  .hero { padding-top: 112px; }
  .live__grid { grid-template-columns: repeat(2, 1fr); }
  .live__item:nth-child(3) { border-left: 0; }
  .live__item:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .demo { grid-template-columns: 1fr; justify-items: center; gap: 22px; width: 100%; }
  .demo__phone { width: 244px; transform: none; }
  .demo__screen { height: 470px; }
  .demo__steps { max-width: none; width: 100%; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .demo__steps li { flex-direction: column; text-align: center; font-size: .8rem; gap: 8px; }
  .demo__note { text-align: center; padding: 0; }
  .live__item { padding: 18px 16px; }
  .live dd b { font-size: 1.8rem; }
  .live__label { padding: 14px 16px; font-size: .9rem; }
}

/* ---------- faixa ---------- */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; background: var(--panel); }
.ticker__track { display: flex; width: max-content; gap: 22px; align-items: center; animation: marquee 40s linear infinite; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font: 500 .78rem/1 var(--mono); }
.ticker__track i { color: var(--green); font-style: normal; font-size: 1.1rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- seções ---------- */
.section { padding: clamp(96px, 13vw, 150px) 0; }
.section--alt { background: linear-gradient(180deg, transparent, var(--panel) 8%, var(--panel) 92%, transparent); }
.sec-head { margin-bottom: clamp(44px, 6vw, 72px); max-width: 900px; }
.sec-head h2 { margin-top: 18px; font-size: clamp(2.1rem, 4.6vw, 3.7rem); }
.sec-lead { margin-top: 20px; color: var(--muted); font-size: 1.12rem; max-width: 36em; }

/* luz que segue o mouse */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: radial-gradient(380px circle at var(--sx, 50%) var(--sy, 0%), var(--green-soft), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.spot:hover::before { opacity: 1; }

/* ---------- pilares ---------- */
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pillar {
  padding: clamp(28px, 4vw, 44px); border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: border-color .3s;
}
[data-theme="light"] .pillar, [data-theme="light"] .fact, [data-theme="light"] .fit__col { box-shadow: 0 24px 50px -42px rgba(15,23,42,.45); }
.pillar:hover { border-color: var(--line-2); }
.pillar__tag { align-self: flex-start; color: var(--green-ink); font-weight: 500; font-size: .85rem; padding: 4px 12px; border-radius: 99px; background: var(--green-soft); }
.pillar h3 { margin-top: 16px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.pillar__lead { margin-top: 14px; color: var(--muted); }
.checks { margin-top: auto; display: grid; gap: 12px; padding-top: 28px; }
.checks li { position: relative; padding-left: 26px; }
.checks li::before { content: "/"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }

/* corrida de carregamento */
.race { margin-top: 30px; padding: 22px 24px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 16px; }
.race__title { font-size: .88rem; color: var(--muted); }
.race__row span { font-size: .9rem; }
.race__bar { margin-top: 8px; height: 10px; border-radius: 99px; background: var(--surface-2); position: relative; }
.race__bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); border-radius: inherit; }
.race__bar--slow i { background: var(--faint); }
.race__bar--fast i { background: var(--green); box-shadow: 0 0 18px rgba(16,185,129,.5); }
.race__bar b { position: absolute; right: 0; top: -24px; color: var(--green-ink); font-size: .82rem; opacity: 0; }
.race.is-in .race__bar--slow i { animation: slowload 6s steps(14, end) .3s infinite; }
.race.is-in .race__bar--fast i { animation: fastload 6s var(--ease) .3s infinite; }
.race.is-in .race__bar--fast b { animation: done 6s .3s infinite; }
@keyframes slowload { 0% { transform: scaleX(0); } 20% { transform: scaleX(.18); } 55% { transform: scaleX(.42); } 85%, 100% { transform: scaleX(.66); } }
@keyframes fastload { 0% { transform: scaleX(0); } 9%, 100% { transform: scaleX(1); } }
@keyframes done { 0%, 8% { opacity: 0; } 12%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* celular do pilar B: agenda */
.phone { margin: 30px auto 0; width: 270px; padding: 10px; border-radius: 34px; background: var(--bezel); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); }
.phone__screen { border-radius: 26px; background: #F8FAFC; color: #0B0F17; padding: 22px 14px 18px; }
.phone__head small { color: #047857; text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; font-weight: 600; }
.phone__head strong { display: block; font-size: 1.05rem; margin-top: 2px; letter-spacing: -.02em; }
.phone__list { margin-top: 14px; display: grid; gap: 8px; }
.phone__list li { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 12px; background: #fff; border: 1px solid #E7EBF0; font-size: .8rem; }
.phone__list em { font: normal .7rem/1 var(--mono); color: #64748B; }
.phone__list span { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone__list i { font-style: normal; font-size: .64rem; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: #F1F5F9; color: #94A3B8; white-space: nowrap; transition: background .35s, color .35s; }
.phone__list i::before { content: "aguardando"; }
.phone__list li.done i { background: #D1FAE5; color: #047857; }
.phone__list li.done i::before { content: "✓ confirmado"; }
.phone__prog { margin-top: 14px; height: 4px; border-radius: 9px; background: #E7EBF0; overflow: hidden; }
.phone__prog span { display: block; height: 100%; width: var(--p, 0%); background: #10B981; transition: width .5s var(--ease); }

@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- projetos (rolagem horizontal) ---------- */
.work { position: relative; padding-top: clamp(40px, 6vw, 80px); }
.work__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.work__track { display: flex; gap: clamp(40px, 6vw, 96px); padding: 0 var(--gutter) 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2)); will-change: transform; align-items: center; }
.work__intro { flex: 0 0 min(440px, 80vw); }
.work__intro h2 { margin-top: 18px; font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.work__intro h2 em { font-style: normal; color: var(--green-ink); }
.work__intro .muted { margin-top: 20px; font-size: 1.08rem; }
.work__hint { margin-top: 40px; color: var(--muted); font: 500 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.work__hint span { display: inline-block; color: var(--green); animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

.case { flex: 0 0 min(1040px, 86vw); display: grid; grid-template-columns: 1.55fr 1fr; gap: 44px; align-items: center; }
.case__media { position: relative; padding: 0 0 40px; }
.case__desk { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); transition: transform .8s var(--ease); }
.case__chrome { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--chrome); }
.case__chrome span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.case__chrome em { margin-left: 10px; font: normal .68rem/1.4 var(--mono); color: var(--muted); padding: 3px 12px; border-radius: 99px; background: var(--line); }
.case__mob { margin: 0; position: absolute; right: -6%; bottom: 0; width: 25%; border-radius: 22px; overflow: hidden; border: 5px solid var(--bezel); box-shadow: var(--shadow); transition: transform .8s var(--ease); }
.case:hover .case__desk { transform: translateY(-6px); }
.case:hover .case__mob { transform: translateY(-16px) rotate(-2deg); }
.case__num { font: 500 .78rem/1 var(--mono); color: var(--muted); }
.case__info h3 { margin-top: 14px; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.case__meta { margin-top: 8px; color: var(--accent); font-weight: 500; font-size: .92rem; }
.case__info > p:not(.case__num):not(.case__meta) { margin-top: 18px; color: var(--muted); }
.tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); font-size: .8rem; }
.case__actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.case__media .case__open {
  position: absolute; inset: 0 0 40px; z-index: 3; border: 0; padding: 0; cursor: pointer;
  background: transparent; display: grid; place-items: center; border-radius: 14px;
}
.case__open span {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 99px;
  background: rgba(11,15,23,.86); color: #F8FAFC; font: 600 .95rem/1 var(--sans);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .35s, transform .45s var(--ease);
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.6);
}
.case__open svg { width: 16px; height: 16px; fill: #10B981; }
.case__media:hover .case__open span { opacity: 1; transform: none; }
@media (hover: none) { .case__open span { opacity: 1; transform: none; } }
.case__link { display: inline-block; text-decoration: none; border-bottom: 1.5px solid var(--accent); padding-bottom: 3px; font-weight: 500; }
.case__link:hover { color: var(--accent); }

.work__progress { position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); right: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); bottom: 48px; height: 2px; border-radius: 2px; background: var(--line); }
.work__progress span { display: block; height: 100%; width: 100%; background: var(--green); transform-origin: left; transform: scaleX(var(--wp, 0)); }

/* sem JS, celular, ou movimento reduzido: lista vertical */
.work.is-static { height: auto !important; }
.work.is-static .work__pin { position: static; height: auto; overflow: visible; }
.work.is-static .work__track { flex-direction: column; align-items: stretch; transform: none !important; padding: 0 var(--gutter); gap: 88px; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; }
.work.is-static .work__intro, .work.is-static .case { flex: none; width: 100%; }
.work.is-static .work__hint, .work.is-static .work__progress { display: none; }
@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; gap: 28px; }
  .case__mob { right: -2%; width: 30%; border-width: 4px; border-radius: 16px; }
}

/* ---------- segurança ---------- */
.flow { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.flow__node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.flow__ico { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); transition: border-color .4s, box-shadow .4s, transform .4s var(--ease); }
.flow__ico svg { width: 28px; height: 28px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.flow__node.is-hit .flow__ico { border-color: var(--green); box-shadow: 0 0 0 6px var(--green-soft), 0 0 30px rgba(16,185,129,.3); transform: translateY(-3px); }
.flow__node strong { font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.flow__node small { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.flow__line { position: absolute; top: 36px; left: 10%; right: 10%; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.flow__line i { position: absolute; top: -4px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 16px 4px rgba(16,185,129,.5); animation: packet 5s linear infinite; }
@keyframes packet { 0% { left: 0; opacity: 0; } 4% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

.facts__title { margin-top: 96px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.facts { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.fact__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); margin-bottom: 16px; }
.fact__ico svg { width: 22px; height: 22px; fill: none; stroke: var(--green-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fact__k { font-weight: 600; font-size: 1.1rem; margin-bottom: 8px; letter-spacing: -.01em; }
.fact p:not(.fact__k) { color: var(--muted); }
.fact b { color: var(--text); font-weight: 500; }

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 26px; }
  .flow__node { display: grid; grid-template-columns: 64px 1fr; gap: 2px 18px; text-align: left; align-items: center; }
  .flow__ico { width: 64px; height: 64px; margin: 0; grid-row: span 2; }
  .flow__node strong { align-self: end; }
  .flow__node small { align-self: start; }
  .flow__line { top: 32px; bottom: 32px; left: 32px; right: auto; width: 1px; height: auto; background: repeating-linear-gradient(180deg, var(--line-2) 0 6px, transparent 6px 12px); }
  .flow__line i { left: -4px; animation-name: packetv; }
  .facts { grid-template-columns: 1fr; }
  .facts__title { margin-top: 72px; }
}
@keyframes packetv { 0% { top: 0; opacity: 0; } 4% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* ---------- como trabalho ---------- */
.truths { border-top: 1px solid var(--line); }
.truth { display: grid; grid-template-columns: 1fr 1.3fr auto 1.5fr; gap: 28px; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--line); }
.truth h3 { font-size: clamp(1.25rem, 2.1vw, 1.6rem); }
.truth__real { color: var(--muted); }
.truth__slash { font-size: 3.4rem; line-height: 1; color: var(--green); font-weight: 300; transform: scaleY(0); transform-origin: bottom; transition: transform .7s var(--ease) .25s; }
.truth.is-in .truth__slash, html:not(.js) .truth__slash { transform: none; }
.truth__gain { font-size: 1.05rem; }

.fit {
  margin-top: 56px; padding: clamp(26px, 4vw, 40px); border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line);
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px 48px; align-items: center;
}
[data-theme="light"] .fit { box-shadow: 0 24px 50px -42px rgba(15,23,42,.45); }
.fit__k { font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -.02em; margin-bottom: 10px; }
.fit__text p:not(.fit__k) { color: var(--muted); }
.fit__list { display: flex; flex-wrap: wrap; gap: 10px; }
.fit__list li { padding: 9px 16px; border-radius: 99px; background: var(--green-soft); color: var(--text); font-size: .95rem; font-weight: 500; }
.fit__list li::before { content: "/"; color: var(--green); font-weight: 700; margin-right: 8px; }

.steps { margin-top: 96px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { padding: 26px 0 0; border-top: 1px solid var(--line-2); position: relative; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) calc(var(--d, 0s) + .2s); }
.step.is-in::before { transform: scaleX(1); }
.step__n { font: 500 .8rem/1 var(--mono); color: var(--green-ink); }
.step h3 { margin-top: 16px; font-size: 1.4rem; }
.step p { margin-top: 10px; color: var(--muted); }

@media (max-width: 900px) {
  .truth { grid-template-columns: 1fr; gap: 10px; }
  .truth__slash { display: none; }
  .truth__gain { padding-left: 16px; border-left: 2px solid var(--green); }
  .fit { grid-template-columns: 1fr; }
  .fit__list li { font-size: .88rem; padding: 8px 13px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 20px; margin-top: 72px; }
}
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- dúvidas ---------- */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-wrap .sec-head { position: sticky; top: 120px; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 24px 48px 24px 0; position: relative; font-size: 1.12rem; font-weight: 500; letter-spacing: -.01em; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 300 1.7rem/1 var(--sans); color: var(--green); transition: rotate .4s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq summary:hover { color: var(--green-ink); }
.faq details p { padding: 0 48px 26px 0; color: var(--muted); }
.faq details p b { color: var(--text); }
.faq details[open] p { animation: drop .5s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; gap: 0; } .faq-wrap .sec-head { position: static; } .faq summary { font-size: 1.04rem; } .faq details p { padding-right: 0; } }

/* ---------- contato ---------- */
.cta { position: relative; padding: clamp(110px, 15vw, 180px) 0; text-align: center; overflow: hidden; isolation: isolate; }
.cta__glow { position: absolute; inset: auto 0 -40% 0; height: 90%; z-index: -1; background: radial-gradient(50% 60% at 50% 100%, var(--glow), transparent 70%); }
.cta__in { display: flex; flex-direction: column; align-items: center; }
.cta__mark { width: 60px; height: auto; margin-bottom: 34px; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.8rem); letter-spacing: -.045em; max-width: 14ch; }
.cta h2 em { font-style: normal; color: var(--green-ink); }
.cta__in > p:not(.cta__note) { margin-top: 22px; color: var(--muted); font-size: 1.15rem; }
.cta__actions { margin-top: 38px; }
.cta__note { margin-top: 22px; color: var(--muted); font: 500 .76rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; }

/* ---------- rodapé ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0; }
.footer__in { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer img { height: 46px; width: auto; }
.footer p { color: var(--muted); font-size: .85rem; line-height: 1.6; }
.footer__copy { margin-left: auto; }
@media (max-width: 600px) { .footer__copy { margin-left: 0; } }

/* ---------- janela de navegação do portfólio ---------- */
html.no-scroll { overflow: hidden; }
.viewer {
  width: min(1240px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 1px solid var(--line-2); border-radius: 22px;
  background: var(--bg); color: var(--text); overflow: hidden;
  box-shadow: 0 50px 120px -40px rgba(0,0,0,.7);
}
.viewer[open] { display: flex; flex-direction: column; animation: viewer-in .5s var(--ease); }
.viewer::backdrop { background: rgba(5,8,14,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .4s; }
@keyframes viewer-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }

.viewer__bar { display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.viewer__title { margin-right: auto; line-height: 1.2; }
.viewer__title small { display: block; font: 500 .7rem/1.4 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.viewer__title strong { font-size: 1.2rem; letter-spacing: -.02em; }
.viewer__modes { display: flex; padding: 4px; border-radius: 99px; background: var(--surface-2); }
.viewer__modes button {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 99px;
  background: transparent; color: var(--muted); font: 500 .88rem/1 var(--sans); cursor: pointer; transition: background .25s, color .25s;
}
.viewer__modes svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.viewer__modes button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px -3px rgba(0,0,0,.35); }
.viewer__real { font-weight: 500; font-size: .92rem; text-decoration: none; border-bottom: 1.5px solid var(--green); padding-bottom: 2px; }
.viewer__real[hidden] { display: none; }
.viewer__close { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; transition: background .25s, border-color .25s; }
.viewer__close:hover { background: var(--green-soft); border-color: var(--green); }
.viewer__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.viewer__stage { flex: 1; min-height: 0; padding: 22px 22px 14px; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: radial-gradient(60% 50% at 50% 100%, var(--glow), transparent 70%); }
.viewer__device { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow); transition: width .5s var(--ease); }
.viewer__chrome { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--chrome); }
.viewer__chrome span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.viewer__chrome em { margin-left: 10px; font: normal .7rem/1.4 var(--mono); color: var(--muted); padding: 3px 12px; border-radius: 99px; background: var(--line); }
.viewer__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--surface-2); scrollbar-width: thin; }
.viewer__scroll img { width: 100%; height: auto; min-height: 100%; object-fit: cover; object-position: top; }
.viewer__scroll.is-loading { background: var(--surface-2) linear-gradient(90deg, transparent, var(--line), transparent) 0 0 / 50% 100% no-repeat; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: -50% 0; } to { background-position: 150% 0; } }

.viewer[data-mode="mob"] .viewer__device { width: min(340px, 100%); border-radius: 38px; border: 10px solid var(--bezel); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); }
.viewer[data-mode="mob"] .viewer__chrome { display: none; }

.viewer__hint { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; }
.viewer__mouse { width: 16px; height: 24px; border-radius: 9px; border: 1.5px solid currentColor; position: relative; }
.viewer__mouse::after { content: ""; position: absolute; left: 50%; top: 4px; width: 2px; height: 5px; margin-left: -1px; border-radius: 2px; background: var(--green); animation: wheel 1.5s infinite; }
@keyframes wheel { 60% { transform: translateY(6px); opacity: 0; } }

@media (max-width: 700px) {
  .viewer { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .viewer__bar { padding: 12px 12px 12px 16px; gap: 10px; }
  .viewer__title { flex: 1 1 calc(100% - 60px); }
  .viewer__modes { order: 3; }
  .viewer__real { order: 4; margin-left: auto; }
  .viewer__close { order: 2; }
  .viewer__stage { padding: 14px 12px 10px; }
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
