*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

section[id], [id="inicio"] { scroll-margin-top: var(--header-h); }

:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--ink);
}

::selection { background: var(--brand); color: var(--white); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Tipografia ---------- */
.display {
  font-family: var(--font-display);
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  font-weight: 800;
  font-size: var(--fs-h2);
  line-height: 0.9;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  text-wrap: balance;
}

.display em, .hero__title em, .manifesto__title em, .ceo__name em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-variation-settings: normal;
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: 1.06em;
  line-height: 0.8;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  background: currentColor;
  flex: none;
}

/* Linhas com máscara para os títulos */
.line {
  display: block;
  overflow: hidden;
  padding: 0.16em 0.06em 0.2em 0;
  margin: -0.16em 0 -0.2em;
}
.line > span { display: block; }

/* ---------- Botões e links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 14px 26px;
  border: 0;
  border-radius: 2px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn .ico { transition: transform 220ms var(--ease-out); }
.btn--sm { min-height: 44px; padding: 10px 18px; font-size: 0.92rem; }
.btn--lg { min-height: 62px; padding: 18px 30px; font-size: 1.08rem; }
.btn--light { background: var(--mist); color: var(--ink); }
.btn--brand { background: var(--brand); color: var(--white); }

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-under {
  display: inline-block;
  font-weight: 600;
  padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 2px;
  transition: background-size 260ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn--light:hover { background: var(--white); }
  .btn--brand:hover { background: var(--deep); }
  .btn:hover .ico { transform: translate(3px, -3px); }
  .link-under:hover { background-size: 0 2px; background-position: 100% 100%; }
}

/* ---------- Grão sutil nas áreas escuras ---------- */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' 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");
}

/* ---------- Revelações (só quando há JS) ---------- */
.js [data-reveal=""],
.js [data-reveal="true"] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out-expo);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-reveal="lines"] .line > span {
  transform: translateY(112%);
  transition: transform 950ms var(--ease-out-expo);
}
.js [data-reveal="lines"] .line:nth-child(2) > span { transition-delay: 90ms; }
.js [data-reveal="lines"] .line:nth-child(3) > span { transition-delay: 180ms; }
.js [data-reveal="lines"] .line:nth-child(4) > span { transition-delay: 270ms; }
.js [data-reveal="lines"] .line:nth-child(5) > span { transition-delay: 360ms; }
.js [data-reveal="lines"].is-in .line > span { transform: none; }

/* A máscara fica na imagem (e não no contêiner observado) para o observador enxergar a área */
.js [data-reveal="mask"] img {
  clip-path: inset(0 0 100% 0);
  transform: scale(1.14);
  transition: clip-path 1100ms var(--ease-out-expo), transform 1500ms var(--ease-out-expo);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal="mask"].is-in img { clip-path: inset(0); transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal],
  .js [data-reveal] .line > span,
  .js [data-reveal="mask"] img {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
  .btn, .btn .ico, .link-under { transition: none; }
}
