/* ============================================================
   Orvio — site institucional (marca-mãe)
   Sistema de marca: petróleo + grafite + brasa coral
   ============================================================ */

:root {
  /* Base */
  --ink-0: #070C10;
  --ink-1: #0B1418;
  --ink-2: #0F1B22;
  --ink-3: #142430;
  --ink-4: #1B2E3C;
  --petrol: #0E2230;
  --graphite: #1A1626;
  --graphite-2: #241E36;

  /* Texto */
  --fg:   #E8ECEF;
  --fg-2: #A9B5BE;
  --fg-3: #6B7A85;
  --fg-4: #3C4954;

  /* Acentos (marca-mãe) */
  --coral: #FF6B5C;
  --coral-soft: #FF8A7A;
  --orange: #FFA572;
  --mint: #86E3C9;
  --mint-soft: #B6F0DD;

  /* Tokens fixos de produção */
  --accent: var(--coral);
  --accent-soft: var(--coral-soft);
  --accent-2: var(--orange);
  --glow: 0.28;
  --base: var(--ink-1);

  /* Motion */
  --e: cubic-bezier(.22,.61,.36,1);
  --t-micro: 120ms;
  --t-std: 240ms;
  --t-soft: 420ms;
  --t-scene: 640ms;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--base);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: color-mix(in oklab, var(--accent) 32%, transparent); color: #fff; }

a { color: inherit; text-decoration: none; }
svg { display: block; }

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.mono { font-family: var(--mono); }

h1, h2, h3 { font-weight: 400; letter-spacing: -0.03em; margin: 0; line-height: 1.04; }
h2 { letter-spacing: -0.025em; }

.wordmark {
  font-weight: 500;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { position: relative; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background var(--t-std) var(--e), border-color var(--t-std) var(--e), backdrop-filter var(--t-std);
  border-bottom: 1px solid transparent;
}
.nav[data-scrolled="1"] {
  background: color-mix(in oklab, var(--ink-0) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: color-mix(in oklab, var(--ink-4) 60%, transparent);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 11px; }
.nav-logo .wordmark { font-size: 21px; color: var(--fg); }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 14px; color: var(--fg-2); letter-spacing: -0.01em;
  transition: color var(--t-micro) var(--e);
}
.nav-links a:hover { color: var(--fg); }
.nav-cta {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-2); padding: 9px 16px; border: 1px solid var(--ink-4);
  border-radius: 999px; transition: border-color var(--t-std) var(--e), color var(--t-std) var(--e);
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-cta:hover { border-color: color-mix(in oklab, var(--accent) 60%, var(--ink-4)); color: var(--fg); }
.nav-cta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
@media (max-width: 720px) { .nav-links { display: none; } }

/* ============================================================
   Fundo: glow blobs + grid
   ============================================================ */
.bg-field { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.grid-mask {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 38%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 38%, #000 0%, transparent 75%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: var(--glow); }
.blob.petrol { background: #1F4A6A; }
.blob.graph  { background: #3A2E5C; }
.blob.coral  { background: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: 72px; }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(56px, 11vh, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.9fr; align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero-text { max-width: 620px; }
.hero-eyebrow { display: block; margin-bottom: clamp(22px, 3.5vh, 34px); }
.hero h1.hero-name {
  font-size: clamp(60px, 13vw, 168px);
  font-weight: 500; letter-spacing: -0.05em; line-height: 0.86;
  margin-bottom: clamp(18px, 2.6vh, 28px);
}
.hero-tagline {
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 300; letter-spacing: -0.03em; color: var(--fg);
  margin: 0 0 18px;
}
.hero-sub {
  max-width: 440px; margin: 0;
  font-size: clamp(16px, 1.5vw, 18px); font-weight: 300; line-height: 1.6; color: var(--fg-2);
}

.hero-mark { position: relative; display: flex; align-items: center; justify-content: center; min-height: 380px; }
.hero-mark svg { position: relative; z-index: 2; width: clamp(240px, 34vw, 460px); height: auto; }
.rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; pointer-events: none; }
.rings span { position: absolute; border: 1px solid rgba(255,255,255,.05); border-radius: 50%; aspect-ratio: 1; animation: spin 64s linear infinite; }
.rings span:nth-child(1) { width: 30vw; max-width: 440px; }
.rings span:nth-child(2) { width: 42vw; max-width: 600px; border-color: rgba(255,255,255,.035); animation-duration: 96s; animation-direction: reverse; }
.rings span:nth-child(3) { width: 56vw; max-width: 820px; border-color: rgba(255,255,255,.022); animation-duration: 128s; }
@keyframes spin { to { transform: rotate(360deg); } }
body[data-motion="0"] .rings span { animation: none; }
@media (prefers-reduced-motion: reduce) { .rings span { animation: none; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text { max-width: 620px; margin: 0 auto; order: 2; }
  .hero-sub { margin-inline: auto; }
  .hero-mark { order: 1; min-height: 280px; margin-bottom: 8px; }
  .rings span:nth-child(3) { display: none; }
}
.hero-scroll {
  position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-4);
}
.hero-scroll .line { width: 1px; height: 40px; background: linear-gradient(var(--fg-4), transparent); animation: drift 2.4s var(--e) infinite; }
@keyframes drift { 0%,100% { opacity: .3; transform: scaleY(.7); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ============================================================
   Seção genérica
   ============================================================ */
.band { padding-block: clamp(90px, 14vh, 170px); }
.section-head { max-width: 720px; margin-bottom: clamp(48px, 7vh, 80px); }
.section-head .eyebrow { display: block; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 400; }
.section-head p { margin: 24px 0 0; font-size: clamp(17px, 1.6vw, 19px); font-weight: 300; line-height: 1.6; color: var(--fg-2); max-width: 600px; }

/* ============================================================
   MANIFESTO
   ============================================================ */
.manifesto { text-align: left; }
.manifesto .wrap { max-width: 980px; }
.manifesto h2 {
  font-size: clamp(34px, 6vw, 76px); font-weight: 400; letter-spacing: -0.04em; line-height: 1.02;
}
.manifesto h2 .accent { color: var(--accent); }
.manifesto-body {
  margin-top: clamp(36px, 6vh, 60px);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px);
  max-width: 760px; margin-left: auto;
}
.manifesto-body p { margin: 0; font-size: 17px; font-weight: 300; line-height: 1.65; color: var(--fg-2); }
@media (max-width: 700px) { .manifesto-body { grid-template-columns: 1fr; } }

/* ============================================================
   PRINCÍPIOS (6 valores)
   ============================================================ */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ink-4); border: 1px solid var(--ink-4); border-radius: 24px; overflow: hidden; }
@media (max-width: 880px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .values-grid { grid-template-columns: 1fr; } }
.value {
  background: var(--ink-2); padding: clamp(28px, 3vw, 40px);
  min-height: 230px; display: flex; flex-direction: column;
  transition: background var(--t-std) var(--e);
}
.value:hover { background: var(--ink-3); }
.value-idx { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; color: var(--accent); margin-bottom: auto; }
.value-glyph { width: 30px; height: 30px; margin-bottom: 22px; color: var(--accent); }
.value h3 { font-size: 24px; font-weight: 400; letter-spacing: -0.02em; margin-bottom: 10px; }
.value p { margin: 0; font-size: 15px; font-weight: 300; line-height: 1.55; color: var(--fg-2); }

/* ============================================================
   ARQUITETURA DE MARCA
   ============================================================ */
.arch .wrap { position: relative; z-index: 2; }
.arch-diagram {
  margin-top: clamp(40px, 6vh, 64px);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.arch-mother {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--ink-2); border: 1px solid var(--ink-4); border-radius: 18px;
  padding: 18px 28px; position: relative; z-index: 2;
}
.arch-mother .wordmark { font-size: 26px; }
.arch-mother .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); border-left: 1px solid var(--ink-4); padding-left: 14px; }
.arch-stem { width: 1px; height: 56px; background: linear-gradient(var(--accent), var(--ink-4)); }
.arch-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; }
@media (max-width: 820px) { .arch-slots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .arch-slots { grid-template-columns: 1fr; } }
.slot {
  background: var(--ink-2); border: 1px solid var(--ink-4); border-radius: 18px;
  padding: 24px 22px 22px; min-height: 150px; display: flex; flex-direction: column;
  position: relative; transition: border-color var(--t-std) var(--e), transform var(--t-std) var(--e);
}
.slot:hover { transform: translateY(-3px); }
.slot-name { display: flex; align-items: baseline; gap: 7px; font-size: 19px; letter-spacing: -0.02em; margin-bottom: 8px; }
.slot-name .o { color: var(--fg); font-weight: 500; }
.slot-name .p { color: var(--fg-4); }
.slot-desc { font-size: 13.5px; font-weight: 300; color: var(--fg-3); line-height: 1.5; margin-bottom: auto; }
.slot-status { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; }
.slot-status .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-4); }
.slot.next { border-color: color-mix(in oklab, var(--accent) 40%, var(--ink-4)); }
.slot.next .slot-status { color: var(--accent); }
.slot.next .slot-status .pulse { background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2.6s var(--e) infinite; }

/* Slot Balance — acento verde-água (primeiro em órbita) */
.slot.balance {
  --accent: var(--mint);
  border-color: color-mix(in oklab, var(--mint) 42%, var(--ink-4));
  background:
    radial-gradient(120% 90% at 50% -10%, color-mix(in oklab, var(--mint) 14%, transparent), transparent 60%),
    var(--ink-2);
}
.slot.balance .slot-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.slot.balance .slot-head svg { width: 34px; height: 34px; flex-shrink: 0; }
.slot-orbit { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mint); }
.slot.balance .slot-name { font-size: 21px; }
.slot.balance .slot-name .o { color: var(--fg); }
.slot.balance .slot-name .b { color: var(--mint); font-weight: 500; }
.slot.balance .slot-status { color: var(--mint); }
.slot.balance .slot-status .pulse { background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: pulse 2.6s var(--e) infinite; }
@keyframes pulse { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
.arch-note { margin-top: clamp(40px, 5vh, 56px); display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--ink-4); border: 1px solid var(--ink-4); border-radius: 18px; overflow: hidden; max-width: 720px; }
@media (max-width: 560px) { .arch-note { grid-template-columns: 1fr; } }
.arch-note > div { background: var(--ink-2); padding: 22px 26px; }
.arch-note .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.arch-note .v { font-size: 15px; font-weight: 300; color: var(--fg-2); line-height: 1.55; }
.arch-note .v b { font-weight: 500; color: var(--fg); }

/* ============================================================
   CONSTELAÇÃO (faixa de fechamento)
   ============================================================ */
.constel { text-align: center; padding-block: clamp(110px, 18vh, 200px); overflow: hidden; position: relative; }
.constel-orbits { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0; pointer-events: none; }
.constel-orbits svg { width: min(120vw, 1100px); height: auto; opacity: 0.9; }
.constel .wrap { position: relative; z-index: 2; }
.constel h2 { font-size: clamp(30px, 5.5vw, 64px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; }
.constel h2 .accent { color: var(--accent); }
.constel .eyebrow { display: block; margin-bottom: 26px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--ink-4); padding-block: clamp(56px, 8vh, 84px) 40px; background: var(--ink-0); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: clamp(48px, 7vh, 72px); }
.footer-brand { max-width: 320px; }
.footer-brand .nav-logo { margin-bottom: 18px; }
.footer-brand .nav-logo .wordmark { font-size: 22px; }
.footer-brand p { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.6; color: var(--fg-3); }
.footer-cols { display: flex; gap: clamp(40px, 7vw, 96px); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--fg-2); margin-bottom: 11px; transition: color var(--t-micro) var(--e); }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--ink-4); }
.footer-bottom .meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--fg-4); }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 34px; height: 34px; border: 1px solid var(--ink-4); border-radius: 999px; display: grid; place-items: center; color: var(--fg-3); transition: border-color var(--t-std) var(--e), color var(--t-std) var(--e); }
.footer-social a:hover { color: var(--fg); border-color: color-mix(in oklab, var(--accent) 50%, var(--ink-4)); }

/* ============================================================
   Scroll reveal
   ============================================================ */
/* Estado-base = visível (à prova de contextos sem frames: print, PDF, reduced-motion).
   A entrada animada só é armada via JS quando o movimento pode realmente rodar. */
.reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  body[data-motion="1"] .reveal { transition: opacity var(--t-scene) var(--e), transform var(--t-scene) var(--e); }
  body[data-motion="1"] .reveal.armed:not(.in) { opacity: 0; transform: translateY(22px); }
  body[data-motion="1"] .reveal[data-d="1"] { transition-delay: 80ms; }
  body[data-motion="1"] .reveal[data-d="2"] { transition-delay: 160ms; }
  body[data-motion="1"] .reveal[data-d="3"] { transition-delay: 240ms; }
  body[data-motion="1"] .reveal[data-d="4"] { transition-delay: 320ms; }
  body[data-motion="1"] .reveal[data-d="5"] { transition-delay: 400ms; }
}

body[data-motion="0"] .hero-scroll .line,
body[data-motion="0"] .slot .slot-status .pulse { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-scroll .line, .slot .slot-status .pulse { animation: none; }
}
