/* ============================================================
   BASE — reset + tipografia global
   ============================================================ */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Grão de filme fino sobre tudo — atmosfera de bar noturno */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--noise);
  opacity: 0.06;
  pointer-events: none;
  z-index: 100;
  mix-blend-mode: overlay;
}

/* Vinheta sutil pra dar recolhimento */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 50%, oklch(0 0 0 / 0.45) 100%);
  pointer-events: none;
  z-index: 99;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

video { background: var(--coal-900); }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--ember-500);
  color: var(--coal-950);
}

/* Focus visível — para teclado */
:focus-visible {
  outline: 2px solid var(--ember-500);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Tipografia global */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-stretch: condensed;
}

h1 {
  font-size: var(--step-6);
  letter-spacing: -0.035em;
  line-height: 0.92;
}
h2 {
  font-size: var(--step-5);
  letter-spacing: -0.028em;
  line-height: 0.95;
}
h3 {
  font-size: var(--step-3);
  letter-spacing: -0.020em;
  line-height: 1.02;
}
h4 {
  font-size: var(--step-2);
  letter-spacing: -0.010em;
  line-height: 1.05;
}

p { max-width: 62ch; }

em {
  color: var(--accent);
  font-style: normal;
}

strong { color: var(--ink); font-weight: 600; }

hr { border: 0; height: 1px; background: var(--line-soft); }

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

/* Utility */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.accent-font { font-family: var(--font-accent); text-transform: uppercase; }
.small-caps { text-transform: uppercase; letter-spacing: 0.14em; font-size: var(--step--1); font-weight: 500; }
.color-accent { color: var(--accent); }
.color-brass { color: var(--brass); }
.color-muted { color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Trilho horizontal — usado como separador entre seções */
.rail {
  height: 2px;
  background-image: repeating-linear-gradient(
    90deg,
    oklch(0.93 0.048 92 / 0.14) 0 6px,
    transparent 6px 14px
  );
}

/* Reveal system — default VISÍVEL. Só o gate JS aplica opacity 0. */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
html.js-reveal .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(18px);
}
html.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal:not(.is-in) {
    opacity: 1; transform: none; transition: none;
  }
}

/* Reveal com wipe horizontal (usado em placas / tickets) */
.reveal--wipe {
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur-slow) var(--ease-out),
              opacity var(--dur-slow) var(--ease-out);
}
html.js-reveal .reveal--wipe.is-in { clip-path: inset(0 0 0 0); }
html.js-reveal .reveal--wipe:not(.is-in) { clip-path: inset(0 100% 0 0); }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal--wipe:not(.is-in) { clip-path: none; }
}
