/* ==========================================================================
   Pedro Bertogna Capuano · Design System v2
   Preto, branco e cinza. Tipografia derivada do logotipo (capitais romanas).
   Base compartilhada pela home e pelas LPs.
   ========================================================================== */

:root {
  --bg: #060606;
  --bg-2: #0e0e0f;
  --bg-3: #171718;
  --ink: #f4f4f2;
  --ink-2: #d4d4d0;
  --ink-3: #a2a29d;
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.32);
  --hi: #ffffff;
  --on-hi: #060606;

  --font-display: "Forum", "Marcellus", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-h1: clamp(50px, 7.3vw, 132px);
  --fs-h2: clamp(40px, 5.6vw, 96px);
  --fs-h3: clamp(28px, 2.8vw, 44px);
  --fs-lead: clamp(19px, 1.5vw, 23px);
  --fs-body: 18px;

  --wrap: 1360px;
  --gutter: clamp(20px, 4vw, 60px);
  --section: clamp(100px, 16vh, 200px);
  --nav-h: 80px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t0: 0s; /* atraso da entrada do hero quando a abertura roda */
}

.paper {
  --bg: #efefec;
  --bg-2: #e4e4e0;
  --bg-3: #d8d8d3;
  --ink: #0a0a0a;
  --ink-2: #2e2e2d;
  --ink-3: #5a5a57;
  --line: rgba(0, 0, 0, 0.16);
  --line-2: rgba(0, 0, 0, 0.38);
  --hi: #0a0a0a;
  --on-hi: #f4f4f2;
  background: var(--bg);
  color: var(--ink);
}

/* --------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
html.lenis, html.lenis body { height: auto; }
html:not(.lenis) { scroll-behavior: smooth; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 4px; }

.skip { position: fixed; left: 16px; top: -80px; z-index: 300; background: var(--ink); color: var(--bg); padding: 12px 18px; font-weight: 600; }
.skip:focus { top: 16px; }

/* grão de filme, vivo */
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } 100% { transform: translate(3%, 3%); } }
body::after {
  content: ""; position: fixed; inset: -10%; z-index: 250; pointer-events: none; opacity: 0.022;
  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='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 900ms steps(4) infinite;
}

/* -------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; background: var(--bg); }
.section--alt { --bg: #0c0c0d; }
/* transição de seção: o painel seguinte sobe arredondado e se abre até a borda */
[data-curtain] { will-change: clip-path; }

/* ---------------------------------------------------------- tipografia */
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; line-height: 1; letter-spacing: -0.012em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 0.96; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 0.98; }
h3 { font-size: var(--fs-h3); line-height: 1.06; }
.dim { color: var(--ink-3); }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); max-width: 44ch; text-wrap: pretty; }
p { text-wrap: pretty; }

/* rótulo: capitais espaçadas como no logotipo, com as caneluras ao lado */
.eyebrow {
  display: inline-flex; align-items: center; gap: 16px;
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before {
  content: ""; width: 26px; height: 16px; flex: none;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 5px);
}

/* -------------------------------------------------------------- botões */
@keyframes sheen { 0%, 62% { transform: translateX(-140%) skewX(-18deg); } 100% { transform: translateX(260%) skewX(-18deg); } }
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 58px; padding: 0 30px; border-radius: 999px;
  background: var(--hi); color: var(--on-hi);
  font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: transform 180ms var(--ease-out), background-color 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
.btn::after { /* brilho que atravessa o botão, de tempos em tempos */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.14), transparent);
  animation: sheen 5.5s var(--ease-in-out) infinite;
}
.btn svg { width: 20px; height: 20px; flex: none; fill: currentColor; }
.btn .arrow { fill: none; transition: transform 400ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent); }
.btn--small { min-height: 46px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1); }
  .paper .btn:hover { box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.1); }
  .btn:hover .arrow { transform: translateX(5px); }
  .btn--ghost:hover { background: var(--ink); color: var(--bg); }
}

.link {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 500; padding-bottom: 4px;
  background: linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat;
  transition: background-size 500ms var(--ease-out);
}
.link .arrow { transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link:hover { background-size: 100% 1px; background-position: 0 100%; }
  .link:hover .arrow { transform: translateX(5px); }
}
.arrow { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.4; }

/* -------------------------------------------------- ícones animados */
.ico { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ico .draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .ico .draw { stroke-dashoffset: 1; transition: stroke-dashoffset 1600ms var(--ease-in-out); transition-delay: calc(var(--k, 0) * 140ms); }
.js .is-in .ico .draw, .js .ico.is-in .draw { stroke-dashoffset: 0; }
.ico .faint { opacity: 0.28; }
@keyframes ico-col { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes ico-apart-l { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }
@keyframes ico-apart-r { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes ico-run { to { stroke-dashoffset: -1; } }
@keyframes ico-dot { 0%, 100% { opacity: 0.2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes ico-scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(26px); } }
@keyframes ico-spin { to { transform: rotate(360deg); } }
@keyframes ico-branch { 0%, 100% { opacity: 0.25; } 33% { opacity: 1; } 66% { opacity: 0.25; } }
.ico .col { animation: ico-col 3.2s ease-in-out infinite; animation-delay: calc(var(--k) * 320ms); }
.ico .apart-l { animation: ico-apart-l 5s var(--ease-in-out) infinite; }
.ico .apart-r { animation: ico-apart-r 5s var(--ease-in-out) infinite; }
.ico .run { stroke-dasharray: 0.22 0.78; animation: ico-run 2.6s linear infinite; }
.ico .dot { fill: currentColor; stroke: none; animation: ico-dot 1.5s ease-in-out infinite; animation-delay: calc(var(--k) * 180ms); }
.ico .scan { animation: ico-scan 3s var(--ease-in-out) infinite; }
.ico .spin { transform-origin: 32px 32px; stroke-dasharray: 0.3 0.7; animation: ico-spin 4s linear infinite; }
.ico .branch { animation: ico-branch 3.6s ease-in-out infinite; animation-delay: calc(var(--k) * 1.2s); }

/* ----------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h); display: flex; align-items: center;
  transition: background-color 400ms ease, transform 500ms var(--ease-out);
}
.nav::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: var(--line); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease-out); }
.nav.is-scrolled { background: rgba(6, 6, 6, 0.82); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.nav.is-scrolled::after { transform: scaleX(1); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo { display: flex; align-items: center; min-height: 44px; }
.nav__logo img { height: 62px; width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 42px); font-size: 16px; color: var(--ink-2); }
.nav__links a:not(.btn) { position: relative; overflow: hidden; display: inline-flex; flex-direction: column; height: 22px; line-height: 22px; }
.nav__links a:not(.btn)::before { content: ""; position: absolute; inset: -12px 0; }
.nav__links a:not(.btn) span { display: block; transition: transform 500ms var(--ease-out); }
.nav__links a:not(.btn) span + span { color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .nav__links a:not(.btn):hover span { transform: translateY(-22px); } }
.nav__toggle { display: none; width: 48px; height: 48px; align-items: center; justify-content: center; margin-right: -10px; }
.nav__toggle span { display: block; width: 28px; height: 1px; background: var(--ink); position: relative; transition: background-color 200ms ease; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; width: 28px; height: 1px; background: var(--ink); transition: transform 450ms var(--ease-out); }
.nav__toggle span::before { transform: translateY(-8px); }
.nav__toggle span::after { transform: translateY(8px); }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }

.progress { position: fixed; inset: 0 0 auto 0; height: 1px; z-index: 110; transform-origin: 0 50%; transform: scaleX(0); background: var(--hi); }

.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 700ms var(--ease-in-out), visibility 0s 700ms;
}
.menu.is-open { clip-path: inset(0); visibility: visible; transition: clip-path 700ms var(--ease-in-out), visibility 0s; }
.menu__links a { display: block; font-family: var(--font-display); font-size: clamp(42px, 12vw, 68px); line-height: 1.12; padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu__foot { display: grid; gap: 14px; color: var(--ink-2); font-size: 15px; }

/* -------------------------------- revelação: o texto entra em foco */
.js [data-split] .w { display: inline-block; }
.js [data-split] .w > span {
  display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(0.35em);
  transition: opacity 900ms ease, filter 1100ms var(--ease-out), transform 1100ms var(--ease-out);
  transition-delay: calc(var(--i) * 55ms);
}
.js [data-split].is-in .w > span { opacity: 1; filter: blur(0); transform: none; }
.js [data-rise] { opacity: 0; transform: translateY(22px); transition: opacity 900ms ease, transform 1100ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }
/* linha que se desenha */
.js [data-line] { transform: scaleX(0); transform-origin: left; transition: transform 1400ms var(--ease-in-out); }
.js [data-line].is-in { transform: none; }

/* ----------------------------------------------------------------- faq */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0; text-align: left;
  font-family: var(--font-display); font-size: clamp(24px, 2.3vw, 34px); line-height: 1.12; transition: color 300ms ease, padding 500ms var(--ease-out);
}
.faq__icon { position: relative; width: 44px; height: 44px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; transition: background-color 400ms ease, transform 600ms var(--ease-out); }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 1px; background: currentColor; transition: transform 500ms var(--ease-out); }
.faq__icon::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__icon { background: var(--ink); color: var(--bg); transform: rotate(180deg); }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: rotate(0deg); }
.faq__a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 650ms var(--ease-out); }
.js .faq__a { grid-template-rows: 0fr; }
.js .faq__q[aria-expanded="true"] + .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 72px 32px 0; color: var(--ink-2); max-width: 60ch; font-size: var(--fs-lead); line-height: 1.5; }
@media (hover: hover) and (pointer: fine) { .faq__q:hover { padding-left: 14px; } }

/* ---------------------------------------------------------- formulário */
.form { display: grid; gap: 26px; }
.field { display: grid; gap: 6px; position: relative; }
.field label { font-family: var(--font-display); font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 0; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; font-size: 18px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23f4f4f2' stroke-width='1.2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; }
.field select option { background: #171718; color: #f4f4f2; }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hi); transform: scaleX(0); transform-origin: left; transition: transform 600ms var(--ease-out); }
.field:focus-within::after { transform: scaleX(1); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field__error { font-size: 14px; color: #d9d9d6; }
.field__error:empty { display: none; }
.form__note { font-size: 14px; color: var(--ink-3); }
.form__note a { text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------- WhatsApp fixo + consent */
@keyframes halo { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35); } 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 80; transform: translateY(160%); transition: transform 700ms var(--ease-out); }
@media (min-width: 641px) {
  .wa-float { width: 62px; height: 62px; min-height: 0; padding: 0; animation: halo 2.6s ease-out infinite; }
  .wa-float svg { width: 26px; height: 26px; }
  .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
.wa-float.is-on { transform: none; }
.wa-float.is-on:active { transform: scale(0.96); }

.consent {
  position: fixed; left: 22px; bottom: 22px; z-index: 120; max-width: 430px;
  display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 22px;
  background: rgba(23, 23, 24, 0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2); border-radius: 999px; font-size: 15px; line-height: 1.4; color: var(--ink-2);
  transform: translateY(180%); transition: transform 800ms var(--ease-out);
}
.consent[hidden] { display: none; }
.consent.is-on { transform: none; }
.consent a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.consent__actions { display: flex; gap: 6px; flex: none; }
.consent button { min-height: 44px; padding: 0 16px; font-size: 14px; font-weight: 600; border-radius: 999px; }
.consent__no { color: var(--ink-2); }
.consent__yes { background: var(--ink); color: var(--bg); }

/* cursor: ponto que inverte as cores por onde passa */
.cursor { position: fixed; left: 0; top: 0; z-index: 260; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none; opacity: 0; transition: opacity 300ms ease, width 400ms var(--ease-out), height 400ms var(--ease-out), margin 400ms var(--ease-out); }
.cursor.is-on { opacity: 1; }
.cursor.is-link { width: 56px; height: 56px; margin: -28px 0 0 -28px; }

/* ---------------------------------------------------------- responsivo */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  :root { --nav-h: 70px; --fs-body: 17.5px; }
  .nav__logo img { height: 50px; }
  .btn { min-height: 56px; }
  .faq__a p { padding-right: 0; }
  .faq__icon { width: 40px; height: 40px; }
  .faq__icon::before, .faq__icon::after { left: 12px; }
  .wa-float { left: 12px; right: 12px; bottom: 12px; }
  .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; border-radius: 22px; flex-direction: column; align-items: stretch; padding: 16px; text-align: center; }
  .consent__actions button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js [data-split] .w > span, .js [data-rise], .js [data-line] { transform: none; opacity: 1; filter: none; }
  .js .ico .draw { stroke-dashoffset: 0; }
  .cursor { display: none; }
}
