/* ============================================================
   VOID — Engenharia Digital · v3 (o Eclipse)
   1. Base / Reset
   2. Custom Properties
   3. Tipografia e máscaras
   4. Camadas fixas (cena, grão, cursor, header, preloader)
   5. Componentes (botão-luz, fecho, pilares de vidro)
   6. Seções
   7. Media queries / acessibilidade
   ============================================================ */

/* ---------- 1. Base / Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Sem scroll-behavior: smooth — o Lenis controla o scroll; CSS smooth briga com ele */
html {
  background: #050505;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

::selection { background: var(--amber); color: var(--void); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #2e2e2e; }

/* ---------- 2. Custom Properties ---------- */
:root {
  --void: #050505;
  --ink: #FFFFFF;
  --ink-soft: rgba(255, 255, 255, 0.78);
  --ink-mute: rgba(255, 255, 255, 0.42);
  --amber: #FF9D00;
  --amber-38: rgba(255, 157, 0, 0.38);

  /*
    Monument Extended: quando licenciar os arquivos, declare o @font-face
    abaixo e a pilha inteira passa a usá-lo automaticamente.

    @font-face {
      font-family: 'Monument Extended';
      src: url('../fonts/MonumentExtended-Black.woff2') format('woff2');
      font-weight: 900;
      font-display: swap;
    }
  */
  --font-display: 'Monument Extended', 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- 3. Tipografia e máscaras ---------- */
.title-display,
.title-section {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  line-height: 1.04;
  letter-spacing: 0.005em;
}

.title-display { font-size: clamp(1.8rem, 7.6vw, 6rem); }
.title-section { font-size: clamp(1.1rem, 4.85vw, 3.7rem); }

/* Alçapão de linha — o texto emerge da aresta invisível */
.line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.line-inner { display: block; will-change: transform; }

/* Alçapão de bloco — parágrafos e botões sobem como placas.
   Depois da revelação a máscara abre (mask-open), liberando o glow
   e o magnetismo dos botões do perímetro de recorte. */
.mask { overflow: hidden; }
.mask.mask-open { overflow: visible; }
.mask-inner { display: block; will-change: transform; }

.dot-amber {
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 157, 0, 0.55);
}

/* ---------- 4. Camadas fixas ---------- */

/* A cena: o vazio e o Eclipse */
#void-scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Grão cinematográfico — pele de filme sobre tudo, quase imperceptível */
.film-grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.68' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: grain-shift 0.84s steps(1) infinite;
}

@keyframes grain-shift {
  0%      { transform: translate3d(0, 0, 0); }
  12.5%   { transform: translate3d(-4%, -6%, 0); }
  25%     { transform: translate3d(3%, -3%, 0); }
  37.5%   { transform: translate3d(-2%, 5%, 0); }
  50%     { transform: translate3d(6%, 2%, 0); }
  62.5%   { transform: translate3d(-5%, 3%, 0); }
  75%     { transform: translate3d(2%, -5%, 0); }
  87.5%   { transform: translate3d(-3%, -2%, 0); }
  100%    { transform: translate3d(0, 0, 0); }
}

/* Cursor customizado — só ponteiro fino, ativado via JS */
.cursor-dot, .cursor-ring {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--ink);
  box-shadow: 0 0 10px rgba(255, 157, 0, 0.35);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: width 0.35s ease, height 0.35s ease, border-color 0.35s ease;
}

.cursor-ring.is-hover {
  width: 56px;
  height: 56px;
  border-color: var(--amber-38);
}

html.has-cursor, html.has-cursor a, html.has-cursor .btn { cursor: none; }
html.has-cursor .cursor-dot, html.has-cursor .cursor-ring { display: block; }

/* Marca fixa */
.site-header {
  position: fixed;
  top: 30px;
  left: 34px;
  z-index: 20;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 0.9rem;
  letter-spacing: 0.32em;
  color: var(--ink);
  opacity: 0.9;
}

.brand-mark { width: 18px; height: 18px; }

/* Pré-loader — sem fundo próprio: o Eclipse do canvas é o palco */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  pointer-events: none;
}

.pl-type {
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(3rem, 11vw, 8rem);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.pl-letter {
  display: inline-block;
  will-change: transform;
}

.preloader-tag {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.42em;
  color: var(--ink);
  opacity: 0;
  white-space: nowrap;
}

/* ---------- 5. Componentes ---------- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Botão-luz: o âmbar nunca preenche — ele emana */
.btn {
  position: relative;
  display: inline-block;
  padding: 1.2rem 2.8rem;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--amber-38);
  border-radius: 4px;
  box-shadow:
    0 0 18px rgba(255, 157, 0, 0.10),
    inset 0 0 12px rgba(255, 157, 0, 0.05);
  transition: border-color var(--transition), box-shadow var(--transition), color var(--transition);
  will-change: transform;
}

.btn:hover, .btn:focus-visible {
  border-color: rgba(255, 157, 0, 0.95);
  color: #FFE3BC;
  box-shadow:
    0 0 30px rgba(255, 157, 0, 0.35),
    0 0 72px rgba(255, 157, 0, 0.14),
    inset 0 0 18px rgba(255, 157, 0, 0.10);
}

.btn:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }

.btn-lg { padding: 1.4rem 3.6rem; font-size: 0.88rem; }

/* Frase-fecho — a linha que fica */
.fecho {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--ink);
  border-left: 1px solid rgba(255, 157, 0, 0.5);
  padding-left: 1.6rem;
  max-width: 34em;
}

.fecho-center {
  border-left: none;
  border-top: 1px solid rgba(255, 157, 0, 0.5);
  padding-left: 0;
  padding-top: 1.8rem;
  margin: 0 auto;
  text-align: center;
}

/* Frase em âmbar dentro do corpo — luz, não tinta */
.amber-phrase {
  color: var(--amber);
  text-shadow: 0 0 16px rgba(255, 157, 0, 0.28);
}

/* Pilares — monólitos de vidro fumê sobre a luz do Eclipse */
.pillars {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 3vh, 2.4rem);
  width: 100%;
}

.pillar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "word"
    "text";
  column-gap: clamp(1.4rem, 3vw, 2.8rem);
  row-gap: 0.5rem;
  align-items: baseline;
  padding: clamp(1.8rem, 4vh, 3rem) clamp(1.6rem, 3.5vw, 3.2rem);
  background: rgba(255, 255, 255, 0.024);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
  text-align: left;
}

.pillar:hover {
  border-color: rgba(255, 157, 0, 0.30);
  background: rgba(255, 255, 255, 0.034);
}

.pillar-rule {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 157, 0, 0.55), rgba(255, 157, 0, 0.0) 60%);
  transform-origin: left center;
}

.pillar-word {
  grid-area: word;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(1.3rem, 4.6vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.pillar-text {
  grid-area: text;
  font-size: clamp(1.02rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 30em;
}

/* ---------- 6. Seções ---------- */
main { position: relative; z-index: 2; }

section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(120px, 18vh, 220px) 0;
}

/* Hero */
.hero { position: relative; }

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(2.2rem, 5vh, 3.4rem);
}

.hero-sub {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-weight: 300;
  color: var(--ink-soft);
  max-width: 32em;
  line-height: 1.75;
}

.hero-scroll {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.38em;
  color: var(--ink-mute);
  z-index: 2;
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 54px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  overflow: hidden;
  animation: scroll-pulse 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scroll-pulse {
  0%   { transform: scaleY(0); transform-origin: top center; }
  45%  { transform: scaleY(1); transform-origin: top center; }
  55%  { transform: scaleY(1); transform-origin: bottom center; }
  100% { transform: scaleY(0); transform-origin: bottom center; }
}

/* Respiro — o Eclipse em silêncio. O canvas faz tudo. */
.respiro { min-height: 130vh; }

/* A Dor — confronto, alinhado à esquerda */
.dor-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2.6rem, 6vh, 4rem);
}

.dor-body {
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
  max-width: 38em;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.75;
}

/* A Diferença */
.diferenca { min-height: 140vh; }

.diferenca-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(4rem, 9vh, 6.5rem);
}

/* Formatos — o índice do que construímos: editorial, hairlines, sem vidro */
.formatos-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(2.2rem, 5vh, 3.4rem);
}

.formatos-lead {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 36em;
  line-height: 1.75;
}

.formats {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  margin-top: 0.6rem;
}

.format {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: clamp(1.4rem, 3vw, 2.8rem);
  align-items: center;
  padding: clamp(1.8rem, 3.6vh, 2.6rem) 0.4rem;
}

.format-rule {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.13);
  transform-origin: left center;
  transition: background var(--transition), box-shadow var(--transition);
}

.format:hover .format-rule {
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 157, 0, 0.4);
}

.format-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(1.15rem, 3.2vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-transform: uppercase;
}

.format-text {
  font-size: clamp(0.98rem, 1.4vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 36em;
  margin-top: 0.55rem;
  line-height: 1.7;
}

.format-tag {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--ink-mute);
  white-space: nowrap;
  transition: color var(--transition);
}

.format:hover .format-tag { color: var(--amber); }

/* CTA Final — composta com o rodapé num único quadro final */
.cta-final {
  min-height: 82vh;
  padding-bottom: clamp(50px, 7vh, 90px);
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(2.4rem, 5.5vh, 3.4rem);
}

.cta-body {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 34em;
  line-height: 1.8;
}

.cta-note {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
}

/* O botão-decisão: a única coisa viva da última tela — ele respira */
.btn-decision {
  padding: 1.55rem 4rem;
  font-size: 0.95rem;
  border-color: rgba(255, 157, 0, 0.55);
  animation: decision-breath 4.5s ease-in-out infinite;
}

@keyframes decision-breath {
  0%, 100% {
    box-shadow:
      0 0 26px rgba(255, 157, 0, 0.16),
      0 0 70px rgba(255, 157, 0, 0.07),
      inset 0 0 16px rgba(255, 157, 0, 0.07);
  }
  50% {
    box-shadow:
      0 0 40px rgba(255, 157, 0, 0.30),
      0 0 96px rgba(255, 157, 0, 0.13),
      inset 0 0 22px rgba(255, 157, 0, 0.12);
  }
}

/* Rodapé */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 36px 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--ink-mute);
}

.footer-mark { width: 20px; height: 20px; opacity: 0.8; }

/* ---------- 7. Media queries / acessibilidade ---------- */
@media (min-width: 900px) {
  .pillar {
    grid-template-columns: 1fr minmax(16em, 22em);
    grid-template-areas: "word text";
    align-items: center;
  }
  .pillar-text { justify-self: end; text-align: right; }
}

@media (max-width: 640px) {
  .site-header { top: 22px; left: 22px; }
  .hero-scroll { display: none; }
  .fecho { padding-left: 1.2rem; }
  .btn { padding: 1.05rem 2rem; letter-spacing: 0.16em; }
  .btn-lg { padding: 1.25rem 2.6rem; }
  .btn-decision { padding: 1.4rem 2.8rem; font-size: 0.85rem; }
  .pillar {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  .format {
    grid-template-columns: 1fr;
    row-gap: 0.7rem;
  }
  .format-tag {
    grid-column: 1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .film-grain { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
