/* ==========================================================================
   VIRETTO — Base Styles
   Typography, global styles, utility classes
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=Fraunces:ital,opsz,wght,SOFT@0,9..144,300..700,30..100;1,9..144,300..600,30..100&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Body — cru como base, seções específicas viram azul ─────────────────── */
body {
  font-family: var(--v-font-body);
  font-size: var(--v-fs-body);
  font-weight: 400;
  line-height: var(--v-lh-body);
  color: var(--viretto-marrom);
  background-color: var(--viretto-cru);
  overflow-x: hidden;
}

/* ── Plate identifier — código tipo "AP·0042" estilo prancha ──────────── */
.plate {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--viretto-marrom-claro);
  padding: 0.3rem 0.6rem 0.3rem 0;
  position: relative;
}

.plate::before {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 1px;
  background: currentColor;
  margin-right: 0.4em;
  opacity: 0.6;
}

/* ── Numbered eyebrow — "01 / Captação" estilo blueprint ────────────────── */
.numbered-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--v-font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--viretto-marrom);
  margin-bottom: var(--v-space-3);
}

.numbered-eyebrow .num {
  font-family: var(--v-font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4em;
  color: var(--viretto-caramelo);
  letter-spacing: 0;
  line-height: 0.8;
  font-variation-settings: 'SOFT' 100;
}

.numbered-eyebrow .num::after {
  content: ' /';
  color: var(--viretto-marrom-claro);
  font-style: normal;
  margin-left: 0.15em;
}

/* ── Blueprint rule — divisor estilo planta arquitetônica ──────────────── */
.blueprint-rule {
  display: block;
  height: 1px;
  background:
    linear-gradient(90deg,
      var(--viretto-caramelo) 0,
      var(--viretto-caramelo) 80px,
      rgba(90, 64, 41, 0.15) 80px,
      rgba(90, 64, 41, 0.15) 100%);
  border: none;
  margin: 0;
  width: 100%;
}

.blueprint-rule--short {
  width: 80px;
  height: 2px;
  background: var(--viretto-caramelo);
}

.blueprint-rule--with-tick {
  display: flex;
  align-items: center;
  width: 100%;
  height: 12px;
  background: none;
  position: relative;
}

.blueprint-rule--with-tick::before,
.blueprint-rule--with-tick::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 1px;
  background: rgba(90, 64, 41, 0.18);
}

.blueprint-rule--with-tick::before {
  left: 0;
  right: 90px;
}

.blueprint-rule--with-tick::after {
  right: 0;
  width: 80px;
  height: 2px;
  background: var(--viretto-caramelo);
}

/* ── Page-edge ornament — pequeno crop mark estilo prancha ─────────────── */
.crop-mark {
  position: relative;
}

.crop-mark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-left: 1px solid var(--viretto-marrom-claro);
  border-top: 1px solid var(--viretto-marrom-claro);
  opacity: 0.4;
}

.crop-mark::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-right: 1px solid var(--viretto-marrom-claro);
  border-bottom: 1px solid var(--viretto-marrom-claro);
  opacity: 0.4;
}

/* ── Section variant atlas (fundo azul-tinta, texto cru) ───────────────── */
.section--atlas {
  background: var(--viretto-azul-escuro);
  color: var(--viretto-cru);
  position: relative;
  overflow: hidden;
  --viretto-caramelo: var(--viretto-cru-quente); /* sobre fundo escuro, caramelo → cru-quente */
}

.section--atlas::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.section--atlas h1,
.section--atlas h2,
.section--atlas h3,
.section--atlas h4 {
  color: var(--viretto-cru);
}

.section--atlas .numbered-eyebrow {
  color: var(--viretto-caramelo);
}

.section--atlas .numbered-eyebrow .num {
  color: var(--viretto-caramelo-claro);
}

.section--atlas .numbered-eyebrow .num::after {
  color: rgba(241, 233, 216, 0.5);
}

.section--atlas .section-header .section-subtitle,
.section--atlas .section-subtitle {
  color: var(--viretto-cru) !important;
}

/* Header de seção atlas — meta plates + numbered eyebrow + h2 dramático */
.section-header--atlas {
  text-align: center;
  max-width: none;
  margin-bottom: var(--v-space-11);
  position: relative;
  z-index: 2;
}

.section-header--atlas .atlas-h2 {
  margin-left: auto;
  margin-right: auto;
}

.section-header--atlas .numbered-eyebrow {
  justify-content: center;
}

.section-header--atlas .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.section-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--v-space-9);
  padding-bottom: var(--v-space-4);
  border-bottom: 1px solid rgba(241, 233, 216, 0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(241, 233, 216, 0.6);
}

.section--atlas .section-header-meta .plate {
  color: rgba(241, 233, 216, 0.7);
  padding: 0;
}

.section--atlas .section-header-meta .plate--right::before {
  content: none;
}

.section--atlas .section-header-meta .plate--right::after {
  content: '';
  display: inline-block;
  width: 0.5rem;
  height: 1px;
  background: currentColor;
  margin-left: 0.4em;
  opacity: 0.6;
  vertical-align: middle;
}

.section-header--atlas .numbered-eyebrow {
  margin-bottom: var(--v-space-6);
}

.section-header--atlas .section-subtitle {
  max-width: 38rem;
  margin: var(--v-space-6) 0 0;
  font-family: var(--v-font-heading);
  font-style: italic;
  font-size: clamp(1.1rem, 1.4vw, 1.4rem);
  line-height: 1.5;
  font-variation-settings: 'opsz' 96;
}

/* h2 dramático estilo atlas — Bricolage Grotesque com italic Fraunces accent */
.atlas-h2 {
  font-family: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 18ch;
  font-variation-settings: 'opsz' 96;
  color: var(--viretto-azul-tinta);
}

.atlas-h2 .italic {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--viretto-caramelo);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  letter-spacing: -0.02em;
}

/* No atlas (fundo azul-escuro), o italic já é caramelo claro */
.section--atlas .atlas-h2 .italic {
  color: var(--viretto-caramelo);
}

/* Process step-card sobre atlas — fundo transparente, borda fina */
.section--atlas .step-card {
  background: rgba(241, 233, 216, 0.03);
  border: 1px solid rgba(232, 222, 200, 0.15);
}

.section--atlas .step-card h3 {
  color: var(--viretto-cru);
}

.section--atlas .step-card p {
  color: rgba(241, 233, 216, 0.7);
}

.section--atlas .step-card .step-number {
  color: var(--viretto-caramelo);
  opacity: 0.6;
}

.section--atlas .step-card:hover {
  background: rgba(232, 222, 200, 0.08);
  border-color: rgba(232, 222, 200, 0.3);
  transform: translateY(-4px);
}

.section--atlas .step-card:hover .step-number {
  color: var(--viretto-caramelo);
  opacity: 1;
}

.section--atlas .step-card:hover h3 {
  color: var(--viretto-caramelo);
}

.section--atlas .step-card:hover p {
  color: var(--viretto-cru);
}

/* ── Headings ────────────────────────────────────────────────────────────── */
.heading-display {
  font-family: var(--v-font-heading);
  font-size: var(--v-fs-display);
  font-weight: 700;
  line-height: var(--v-lh-tight);
  letter-spacing: var(--v-ls-tight);
  color: var(--viretto-azul);
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, h6 {
  color: var(--viretto-azul);
}

h1, .h1 {
  font-family: var(--v-font-heading);
  font-size: var(--v-fs-h1);
  font-weight: 700;
  line-height: var(--v-lh-tight);
  letter-spacing: var(--v-ls-tight);
}

h2, .h2 {
  font-family: var(--v-font-heading);
  font-size: var(--v-fs-h2);
  font-weight: 600;
  line-height: var(--v-lh-heading);
  letter-spacing: var(--v-ls-tight);
}

h3, .h3 {
  font-family: var(--v-font-heading);
  font-size: var(--v-fs-h3);
  font-weight: 600;
  line-height: var(--v-lh-heading);
  letter-spacing: var(--v-ls-tight);
}

h4, .h4 {
  font-family: var(--v-font-heading);
  font-size: var(--v-fs-h4);
  font-weight: 600;
  line-height: var(--v-lh-heading);
}

/* ── Display / Drama text ────────────────────────────────────────────────── */
.text-display {
  font-family: var(--v-font-display);
  font-style: italic;
  font-weight: 400;
}

.text-display-accent {
  font-family: var(--v-font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--viretto-azul);
  font-variation-settings: 'SOFT' 100;
}

.accent {
  color: var(--viretto-azul);
}

.italic {
  font-style: italic;
  font-family: var(--v-font-heading);
  color: var(--viretto-caramelo);
  font-variation-settings: 'SOFT' 100;
}

/* ── Body variants ───────────────────────────────────────────────────────── */
.text-lg {
  font-size: var(--v-fs-body-lg);
  line-height: var(--v-lh-body);
}

.text-sm {
  font-size: var(--v-fs-body-sm);
}

.text-caption {
  font-size: var(--v-fs-caption);
  color: var(--v-text-tertiary);
}

/* ── Overline / Label ────────────────────────────────────────────────────── */
.overline {
  font-family: var(--v-font-body);
  font-size: var(--v-fs-overline);
  font-weight: 600;
  letter-spacing: var(--v-ls-overline);
  text-transform: uppercase;
  color: var(--viretto-marrom);
}

.overline--teal,
.overline--caramelo {
  color: var(--viretto-caramelo);
}

/* Stroke editorial — usar antes de headlines principais */
.editorial-stroke {
  display: block;
  width: 80px;
  height: 3px;
  background: var(--viretto-caramelo);
  margin: var(--v-space-5) 0 var(--v-space-6);
  border: none;
}

.section-header .editorial-stroke {
  margin-left: auto;
  margin-right: auto;
}

/* ── Mono / Data ─────────────────────────────────────────────────────────── */
.text-mono {
  font-family: var(--v-font-mono);
  font-size: var(--v-fs-body-sm);
}

.text-price {
  font-family: var(--v-font-heading);
  font-weight: 700;
  color: var(--viretto-azul);
  letter-spacing: var(--v-ls-tight);
}

/* ── Text Colors ─────────────────────────────────────────────────────────── */
.text-primary { color: var(--viretto-azul); }
.text-secondary { color: var(--viretto-marrom); }
.text-tertiary { color: var(--viretto-marrom-claro); }
.text-accent { color: var(--viretto-azul); }
.text-teal { color: var(--viretto-azul); }
.text-gold { color: var(--viretto-caramelo); }
.text-azul { color: var(--viretto-azul); }
.text-marrom { color: var(--viretto-marrom); }
.text-terracota { color: var(--viretto-terracota); }
.text-cru { color: var(--viretto-cru); }

/* ── Links ───────────────────────────────────────────────────────────────── */
a:not([class]) {
  color: var(--viretto-terracota);
  transition: color var(--v-duration-fast) var(--v-ease-out);
}

a:not([class]):hover {
  color: var(--viretto-azul);
}

/* ── Dividers ────────────────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(107, 79, 58, 0.25),
    transparent
  );
  border: none;
}

.divider--short {
  width: 80px;
  height: 3px;
  background: var(--viretto-caramelo);
  border-radius: 0;
  border: none;
}

.divider--teal {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(43, 90, 122, 0.25),
    transparent
  );
}

/* ── Section Titles ──────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--v-space-9);
}

.section-header .overline {
  margin-bottom: var(--v-space-3);
  display: block;
}

.section-header h2 {
  margin-bottom: var(--v-space-4);
}

.section-header .section-subtitle {
  font-size: var(--v-fs-body-lg);
  color: var(--v-text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: var(--v-lh-body);
}

/* ── Scroll reveal animation ─────────────────────────────────────────────── */
/* Default: visível. Apenas quando JS adiciona .js-reveal ao html, esconde
   até o IntersectionObserver detectar entrada na viewport. */
.reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--v-duration-slow) var(--v-ease-out),
    transform var(--v-duration-slow) var(--v-ease-out);
}

html.js-reveal .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(20px);
}

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .reveal { opacity: 1 !important; transform: none !important; }
}

/* ── Utility Classes ─────────────────────────────────────────────────────── */
.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;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.mx-auto { margin-left: auto; margin-right: auto; }
.w-full  { width: 100%; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--v-space-2); }
.gap-3 { gap: var(--v-space-3); }
.gap-4 { gap: var(--v-space-4); }
.gap-5 { gap: var(--v-space-5); }
.gap-6 { gap: var(--v-space-6); }

/* ── Image fallback ──────────────────────────────────────────────────────── */
.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--viretto-cru), var(--viretto-cru-quente));
  color: var(--viretto-marrom);
  font-family: var(--v-font-heading);
  font-weight: 600;
  font-size: var(--v-fs-body-sm);
  letter-spacing: var(--v-ls-wide);
}

/* Os ícones inline não têm width/height próprios; sem esta regra o reset
   (svg { max-width: 100%; height: auto }) deixa o SVG ocupar o card inteiro. */
.img-fallback svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
