/* ==========================================================================
   DataZine — Sistema visual provisório V0.1 (Registro + Estrutura)
   ========================================================================== */

/* -- Fontes (self-hospedadas: Inter, Space Grotesk, IBM Plex Mono) -- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-mono-600.woff2') format('woff2');
}

/* -- Reset -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* -- Tokens -- */
:root {
  --ink: #171A1F;
  --graphite: #20252B;
  --paper: #F4F1E8;
  --surface: #FFFCF5;
  --amber: #E89A2F;
  --amber-dark: #9A511E;
  --steel: #626A73;
  --border: #D8D2C6;
  --success: #46705B;

  /* semânticos — contexto claro (padrão) */
  --text-primary: var(--ink);
  --text-secondary: var(--steel);
  --text-accent: var(--amber-dark);
  --bg-page: var(--paper);
  --bg-surface: var(--surface);
  --border-color: var(--border);
  --focus-color: var(--amber-dark);

  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;

  --container-w: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 6px;
}

.section-dark {
  --text-primary: var(--paper);
  --text-secondary: #A9B0B8;
  --text-accent: var(--amber);
  --bg-page: var(--graphite);
  --bg-surface: #262C33;
  --border-color: rgba(244, 241, 232, 0.16);
  --focus-color: var(--amber);
  background: var(--bg-page);
  color: var(--text-primary);
}

/* -- Base -- */
body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p { color: var(--text-secondary); }

section p:not([class]) { max-width: 62ch; }

.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3.5rem, 6vw, 6rem); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--amber);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* -- Kicker (assinatura de seção: registro/metadado) -- */
.section-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.kicker-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-accent);
  letter-spacing: 0.05em;
}
.kicker-rule {
  height: 1px;
  width: 2.5rem;
  background: var(--border-color);
  flex: 0 0 auto;
}
.kicker-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.section-intro {
  font-size: 1.0625rem;
  max-width: 56ch;
  margin-bottom: 2.5rem;
}

/* -- Botões -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 4px;
  border: 1.5px solid transparent;
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
}
.btn-primary {
  background: var(--amber);
  color: var(--ink);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--amber-dark);
  color: var(--paper);
}
.btn-secondary {
  background: transparent;
  color: var(--text-accent);
  border-color: currentColor;
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: var(--amber-dark);
  color: var(--surface);
  border-color: var(--amber-dark);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* -- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.nav { display: none; align-items: center; gap: 2rem; }
.nav-list { display: flex; gap: 1.75rem; font-size: 0.9375rem; }
.nav-list a { color: var(--text-secondary); }
@media (prefers-reduced-motion: no-preference) {
  .nav-list a { transition: color .2s ease; }
}
.nav-list a:hover { color: var(--text-primary); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.5rem;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
}
@media (prefers-reduced-motion: no-preference) {
  .nav-toggle-bar { transition: transform .18s ease, opacity .18s ease; }
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-panel {
  border-top: 1px solid var(--border);
  padding: 1.25rem var(--gutter) 1.5rem;
  opacity: 0;
  transform: translateY(-6px);
}
.nav-panel.is-open { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: no-preference) {
  .nav-panel { transition: opacity .2s ease, transform .2s ease; }
}
.nav-panel-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.25rem; font-size: 1.0625rem; }
.nav-panel-list a { display: block; }

@media (min-width: 900px) {
  .nav { display: flex; }
  .nav-toggle, .nav-panel { display: none; }
}

/* -- Hero -- */
.hero { padding-top: clamp(3rem, 7vw, 5.5rem); }
.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
  min-width: 0;
}
.hero-inner > * { min-width: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-accent);
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2.25rem, 1.6rem + 3.2vw, 3.75rem);
  margin-bottom: 1.25rem;
  max-width: 18ch;
}
.hero-lede {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  max-width: 46ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }
.hero-trust {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content > * { opacity: 0; animation: reveal-up .55s ease both; }
  .hero-content .eyebrow { animation-delay: .05s; }
  .hero-content .hero-title { animation-delay: .12s; }
  .hero-content .hero-lede { animation-delay: .2s; }
  .hero-content .hero-actions { animation-delay: .28s; }
  .hero-content .hero-trust { animation-delay: .36s; }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -- Gráfico do hero -- */
.hero-graphic-frame { position: relative; width: 100%; }
.hero-graphic-svg { width: 100%; height: auto; }
.flow-pulse {
  opacity: 0;
  offset-path: path('M200,330 L228,220 L408,220 L420,94');
  offset-rotate: 0deg;
}
@media (prefers-reduced-motion: no-preference) {
  .flow-pulse { animation: flow-travel 2.2s ease-in-out .5s 1 both; }
}
@keyframes flow-travel {
  0% { offset-distance: 0%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

.flow-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0 0.85rem;
}
.flow-node-index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--amber-dark);
}
.flow-node-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
}
.flow-node-micro {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}

/* -- Tese -- */
.tese-lead {
  font-size: clamp(1.375rem, 1rem + 1.4vw, 1.875rem);
  max-width: 42ch;
  margin-bottom: 1.25rem;
}
.tese-text { max-width: 58ch; font-size: 1.0625rem; }

/* -- Capacidades -- */
.capacidades-flow {
  display: grid;
  gap: 2.5rem;
  position: relative;
}
.stage {
  position: relative;
  padding-left: 1.75rem;
  border-left: 1px solid var(--border-color);
}
.stage-node {
  position: absolute;
  left: -5px;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid var(--bg-page);
}
.stage-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-accent);
  margin-bottom: 0.5rem;
}
.stage-text { margin-bottom: 0.75rem; max-width: 46ch; }
.stage-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text-primary);
}

@media (min-width: 900px) {
  .capacidades-flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-top: 1.5rem;
  }
  .stage { border-left: none; border-top: 1px solid var(--border-color); padding-left: 0; padding-top: 1.75rem; }
  .stage-node { left: 0; top: -5px; }
}

/* -- Diferenciais -- */
.principles {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}
.principle-icon { width: 30px; height: 30px; color: var(--amber); margin-bottom: 1.25rem; }
.principle-title { font-size: 1.1875rem; }
.principle-text { max-width: 40ch; }

@media (min-width: 900px) {
  .principles { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* -- Projeto -- */
.projeto-inner { display: grid; gap: 2.5rem; min-width: 0; }
.projeto-inner > * { min-width: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.25rem;
}
.projeto-text h2 { margin-bottom: 1rem; }
.projeto-text p { margin-bottom: 1rem; }
.projeto-complement { font-size: 0.9375rem; }

.mini-flow {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-left: 1px solid var(--border);
  padding-left: 1.25rem;
}
.mini-flow li {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.mini-flow-node {
  position: absolute;
  left: -1.5rem;
  top: 0.2rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-dark);
  border: 2px solid var(--bg-page);
}

@media (min-width: 800px) {
  .projeto-inner { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
  .mini-flow { flex-direction: row; border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: 1.5rem; justify-content: space-between; }
  .mini-flow-node { left: 0.5rem; top: -1.6rem; }
}

/* -- Sobre -- */
.sobre-inner { max-width: 68ch; }
.sobre-inner p { margin-bottom: 1.1rem; font-size: 1.0625rem; }

/* -- Chamada final -- */
.cta-final-inner {
  max-width: 52ch;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3rem);
}
.cta-final-inner .section-kicker { margin-bottom: 1.25rem; }
.cta-final-inner p { margin-bottom: 1.75rem; }
.cta-final-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.cta-final-email { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--text-accent); }
@media (prefers-reduced-motion: no-preference) {
  .cta-final-email { transition: color .2s ease; }
}
.cta-final-email:hover { color: var(--ink); }

/* -- Footer -- */
.site-footer { padding-block: 3rem; }
.footer-inner {
  display: grid;
  gap: 2.5rem;
}
.footer-wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.footer-descriptor { color: var(--text-secondary); font-size: 0.9375rem; max-width: 30ch; }
.footer-nav ul { display: flex; flex-direction: column; gap: 0.65rem; font-size: 0.9375rem; }
.footer-nav a { color: var(--text-secondary); }
.footer-nav a:hover { color: var(--text-primary); }
.footer-meta { font-size: 0.875rem; color: var(--text-secondary); display: flex; flex-direction: column; gap: 0.5rem; }
.footer-meta a { color: var(--text-accent); font-family: var(--font-mono); }

@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1.2fr 0.8fr 0.8fr; }
}

/* -- Utilidades de movimento -- */
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-pulse { display: none; }
}
