/* ============================================================
   somado · base.css — EDIÇÃO FUTURISTA CLARA
   reset + tipografia base + utilitários + motion global
   ============================================================ */

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

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

/* View Transitions API — navegação entre páginas com cross-fade nativo */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- Barra de progresso de scroll (CSS scroll-driven, sem JS) --- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-orange);
  box-shadow: 0 1px 10px hsl(28 95% 55% / 0.5);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 200;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  body::before {
    animation: scroll-progress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes scroll-progress { to { transform: scaleX(1); } }
}

/* --- Spotlight que segue o cursor (futurista.js escreve --cx/--cy) --- */
.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    480px circle at calc(var(--cx, 50) * 1px) calc(var(--cy, -200) * 1px),
    hsl(28 95% 55% / 0.07),
    transparent 70%
  );
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary-strong); }

button { font: inherit; cursor: pointer; border: none; background: none; }

ul, ol { list-style: none; padding: 0; }

::selection { background: hsl(28 95% 55% / 0.3); color: var(--navy-900); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  color: var(--navy-900);
  letter-spacing: -0.02em;
}
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
p { line-height: var(--lh-base); }

:focus-visible {
  outline: 3px solid var(--orange-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Scrollbar clara --- */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--color-bg-alt); }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 8px; border: 2px solid var(--color-bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--orange-500); }

/* --- Layout helpers --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--text { max-width: var(--max-w-text); }

.section { padding-block: var(--sp-12); position: relative; }
.section--tint { background: var(--color-bg-tint); }
.section--alt { background: var(--color-bg-alt); }
.section--navy { background: var(--navy-900); color: var(--color-text-inverse); }
.section--navy h2, .section--navy h3 { color: #fff; }

/* Eyebrow — etiqueta técnica (mono + traço de energia) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary-strong);
  margin-bottom: var(--sp-1);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-orange);
}
.section--navy .eyebrow { color: var(--orange-400); }

.section-head { max-width: 760px; margin-inline: auto; text-align: center; margin-bottom: var(--sp-8); }
.section-head .eyebrow { justify-content: center; }
.section-head .eyebrow::after {
  content: "";
  width: 24px; height: 2px;
  border-radius: 2px;
  background: var(--grad-orange);
}
.section-head p { color: var(--color-text-muted); font-size: var(--fs-md); margin-top: var(--sp-2); }
.section--navy .section-head p { color: #C5CEE3; }

/* Texto gradiente com shimmer animado */
.text-grad {
  background: linear-gradient(110deg, #FBA81A 0%, #F15A22 40%, #FDBE4D 60%, #FBA81A 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-shimmer 5s linear infinite;
}
@keyframes text-shimmer {
  to { background-position: -220% 0; }
}

/* --- Image placeholder (espaço reservado pra imagem real) --- */
.imgph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  background:
    repeating-linear-gradient(45deg, #FFF7EF, #FFF7EF 14px, #FFEFDD 14px, #FFEFDD 28px);
  border: 2px dashed var(--orange-400);
  border-radius: var(--radius-md);
  color: var(--orange-700);
  padding: var(--sp-3);
  width: 100%;
}
.imgph__label { font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--navy-800); }
.imgph__spec { font-size: var(--fs-xs); color: var(--orange-700); font-family: var(--font-mono); }
.imgph__icon { width: 30px; height: 30px; opacity: 0.7; }
/* proporções comuns */
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-3  { aspect-ratio: 4 / 3; }
.ratio-1-1  { aspect-ratio: 1 / 1; }
.ratio-3-4  { aspect-ratio: 3 / 4; }
.ratio-9-16 { aspect-ratio: 9 / 16; }
.ratio-21-9 { aspect-ratio: 21 / 9; }

/* ============================================================
   REVEAL — entrada ao rolar.
   1) Padrão: scroll-driven animation nativa (animation-timeline: view)
   2) Fallback: IntersectionObserver adiciona .is-visible (futurista.js)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out),
    filter 0.7s var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

@supports (animation-timeline: view()) {
  .reveal {
    opacity: 1; transform: none; filter: none;
    transition: none;
    animation: reveal-in both;
    animation-timeline: view();
    animation-range: entry 0% entry 42%;
  }
  @keyframes reveal-in {
    from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
    to   { opacity: 1; transform: none; filter: none; }
  }
}

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

/* --- Acessibilidade: pular pro conteúdo --- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--navy-900); color: #fff; padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.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;
}

@media (max-width: 720px) {
  h2 { font-size: var(--fs-xl); }
  .section { padding-block: var(--sp-8); }
}
