/* ==========================================
   DESIGN SYSTEM — BUNKER CAPTAÇÃO SAÚDE
   Paleta: Brutalist (Bunker oficial)
   Fontes: Work Sans + Space Mono (carregadas via <link> no HTML head com preconnect)
   DNA Visual: bloco sólido, sombra dura offset, grafite + roxo elétrico
   ========================================== */

:root {
  /* ===== Fonts ===== */
  --font-heading: 'Work Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-body: 'Work Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  /* ===== Typographic Scale (fluid) =====
     Work Sans em pesos 400/600/800 — headlines em 800, body 400, ctas 600
  */
  --text-display: clamp(3rem, 6.8vw, 5.75rem);
  --text-h1: clamp(2.5rem, 5.5vw, 4.5rem);
  --text-h2: clamp(2rem, 4.2vw, 3.25rem);
  --text-h3: clamp(1.5rem, 3vw, 2.125rem);
  --text-h4: clamp(1.25rem, 2vw, 1.5rem);
  --text-h5: clamp(1.125rem, 1.6vw, 1.25rem);
  --text-body-lg: 1.0625rem;
  --text-body: 1rem;
  --text-body-sm: 0.9375rem;
  --text-caption: 0.8125rem;
  --text-overline: 0.75rem;
  --text-mono-sm: 0.6875rem;

  /* ===== Line-heights ===== */
  --lh-tight: 0.92;
  --lh-snug: 1.12;
  --lh-normal: 1.45;
  --lh-relaxed: 1.6;

  /* ===== Letter spacing ===== */
  --ls-display: -0.037em;
  --ls-heading: -0.028em;
  --ls-body: -0.005em;
  --ls-overline: 0.22em;
  --ls-mono: 0.1em;

  /* ===== Paleta Bunker oficial ===== */
  --color-graphite: #2E293B;
  --color-graphite-light: #423b54;
  --color-graphite-dark: #1a1621;
  --color-graphite-muted: rgba(46, 41, 59, 0.78);

  --color-purple: #9300FF;
  --color-purple-light: #b03dff;
  --color-purple-dark: #7500cc;
  --color-purple-muted: rgba(147, 0, 255, 0.12);

  --color-white: #FFFFFF;
  --color-white-dim: #F5F3F0;

  /* Mapeamento semântico pro design system padrão do Método Zero */
  --color-primary: var(--color-graphite);
  --color-primary-light: var(--color-graphite-light);
  --color-primary-dark: var(--color-graphite-dark);
  --color-primary-muted: rgba(46, 41, 59, 0.15);
  --color-secondary: var(--color-purple);
  --color-secondary-light: var(--color-purple-light);
  --color-secondary-dark: var(--color-purple-dark);
  --color-accent: var(--color-purple);
  --color-accent-light: var(--color-purple-light);
  --color-accent-dark: var(--color-purple-dark);
  --color-bg: var(--color-white);
  --color-surface: var(--color-white-dim);
  --color-surface-dark: var(--color-graphite);
  --color-text: var(--color-graphite);
  --color-text-muted: rgba(46, 41, 59, 0.68);
  --color-border: rgba(46, 41, 59, 0.18);
  --color-error: #c8281e;
  --color-success: #118a4a;

  /* ===== Shadows — brutalist hard offset ===== */
  --shadow-hard-sm: 4px 4px 0 var(--color-graphite);
  --shadow-hard-md: 6px 6px 0 var(--color-graphite);
  --shadow-hard-lg: 10px 10px 0 var(--color-graphite);
  --shadow-hard-purple-sm: 4px 4px 0 var(--color-purple);
  --shadow-hard-purple-md: 6px 6px 0 var(--color-purple);
  --shadow-hard-purple-lg: 10px 10px 0 var(--color-purple);
  --shadow-subtle: 0 2px 8px rgba(46, 41, 59, 0.08);
  --shadow-medium: 0 6px 24px rgba(46, 41, 59, 0.12);
  --shadow-dramatic: 0 20px 60px rgba(46, 41, 59, 0.2);

  /* ===== Spacing — escala 4/8px ===== */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* ===== Animation tokens ===== */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;
  --duration-cinematic: 1000ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-dramatic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-brutal: cubic-bezier(0.2, 0, 0, 1);

  /* ===== Layout ===== */
  --section-py: clamp(4rem, 9vw, 7rem);
  --container-px: clamp(1.25rem, 4vw, 3.5rem);
  --container-max: 1480px;
  --radius-sharp: 4px;
  --radius-block: 6px;
  --radius-pill: 999px;

  /* ===== DNA Visual — registro ===== */
  /*
    Elemento recorrente: bloco sólido com borda 2px grafite e sombra dura offset (roxa ou grafite)
    Tratamento de mídia: multiply blend mode para efeitos de canvas sobre fundo branco
    Movimento de assinatura: hover translate(-2px, -2px) com shadow crescendo
    Detalhe tipográfico: marca roxa skewed -4deg em palavras-chave dentro de headlines

    Efeitos complementares selecionados (por seção, ver layout.md):
    - Hero: line-waves (backgrounds)
    - Scroll: data-aos fade-up com disableMutationObserver
    - Transition entre seções: diagonal divider grafite
    - Botões: hard shadow offset hover lift
    - Bordas: bloco brutal 2px com sombra offset
    - Decorative: overline + traço horizontal gradiente
    - Text effects: marca roxa skewed para destaque
  */
}

/* ==========================================
   RESET
   ========================================== */

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

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-heading);
  color: var(--color-text);
  font-weight: 800;
}

h1 { font-size: var(--text-h1); letter-spacing: var(--ls-display); line-height: var(--lh-tight); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); }

p {
  font-size: var(--text-body);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
}

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

input, button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-mono);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

::selection {
  background: var(--color-purple);
  color: var(--color-white);
}

/* ==========================================
   LAYOUT
   ========================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

/* ==========================================
   COMPONENTES BRUTALISTAS (reutilizáveis)
   ========================================== */

.overline {
  font-family: var(--font-mono);
  font-size: var(--text-overline);
  font-weight: 700;
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--color-purple);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}
.overline::after {
  content: "";
  width: 3rem;
  height: 1.5px;
  background: var(--color-graphite);
  opacity: 0.3;
}

.mark-purple {
  display: inline-block;
  background: var(--color-purple);
  color: var(--color-white);
  padding: 0 0.4em;
  margin-left: -0.1em;
  transform: skew(-4deg);
}
.mark-purple > span { display: inline-block; transform: skew(4deg); }

.btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  padding: 1.125rem 1.625rem;
  border-radius: var(--radius-sharp);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default),
              background var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary {
  background: var(--color-purple);
  color: var(--color-white);
  box-shadow: var(--shadow-hard-md);
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--color-graphite);
}
.btn-secondary {
  background: var(--color-white);
  color: var(--color-graphite);
  border: 2px solid var(--color-graphite);
}
.btn-secondary:hover {
  background: var(--color-graphite);
  color: var(--color-white);
}
.btn-dark {
  background: var(--color-graphite);
  color: var(--color-white);
  box-shadow: var(--shadow-hard-purple-md);
}
.btn-dark:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--color-purple);
}

.block-card {
  background: var(--color-white);
  border: 2px solid var(--color-graphite);
  border-radius: var(--radius-block);
  padding: 1.75rem 1.875rem;
  box-shadow: var(--shadow-hard-purple-lg);
}
.block-card.inverted {
  background: var(--color-graphite);
  color: var(--color-white);
  box-shadow: var(--shadow-hard-purple-lg);
}

.tag-pill {
  display: inline-block;
  background: var(--color-purple);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.3125rem 0.75rem;
  border-radius: 2px;
}

/* ==========================================
   FORMS
   ========================================== */

.form-group { margin-bottom: var(--space-md); }
.form-label { display: block; margin-bottom: var(--space-sm); font-weight: 600; font-size: var(--text-caption); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); }
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-graphite);
  border-radius: var(--radius-sharp);
  font-size: var(--text-body);
  background: var(--color-white);
  color: var(--color-graphite);
  transition: box-shadow var(--duration-fast);
}
.form-input:focus {
  outline: none;
  box-shadow: var(--shadow-hard-purple-sm);
}
.form-input.error { border-color: var(--color-error); }
.form-feedback { padding: 0.875rem 1rem; border-radius: var(--radius-sharp); margin-bottom: var(--space-md); display: none; font-family: var(--font-mono); font-size: var(--text-body-sm); }
.form-feedback.success { display: block; background: #e8f5ee; color: #065f2e; border: 1.5px solid #a7e3c2; }
.form-feedback.error { display: block; background: #fdecea; color: #7a150e; border: 1.5px solid #f5b4ae; }

.iti { width: 100%; }
.iti__country-list { z-index: 100; }

/* ==========================================
   UTILITIES
   ========================================== */

.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-muted { color: var(--color-text-muted); }
.text-mono { font-family: var(--font-mono); }

/* ==========================================
   ACCESSIBILITY
   ========================================== */

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