/* ==========================================================================
   IAP PHOENIX — INSTITUTO DE APOIO POPULAR
   Design System inspirado na estética cinematográfica & editorial minimalista
   ========================================================================== */

:root {
  /* Paleta Dark & Refinada */
  --bg-deep: #08090b;
  --bg-surface: #0f1116;
  --bg-card: #14171f;
  --bg-card-glass: rgba(20, 23, 31, 0.72);
  --bg-card-hover: #1a1e28;
  --bg-pill: rgba(255, 255, 255, 0.06);

  /* Acentos de Chama & Cidadania */
  --accent-amber: #f59e0b;
  --accent-amber-light: #fde68a;
  --accent-orange: #f97316;
  --accent-flame: #ef4444;
  --accent-emerald: #10b981;
  --accent-blue: #38bdf8;

  /* Tipografia & Textos */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dark: #0a0a0c;

  /* Bordas & Sombras */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(245, 158, 11, 0.35);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 50px rgba(245, 158, 11, 0.15);

  /* Dimensões & Curvaturas */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-canvas: 32px;
  --radius-pill: 9999px;

  /* Transições suaves */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: all 0.3s var(--ease-spring);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-deep);
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   CONTAINERS & ESTRUTURA GERAL
   ========================================================================== */

.page-wrapper {
  padding: 16px;
  max-width: 1600px;
  margin: 0 auto;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.container-narrow {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
}

/* ==========================================================================
   HERO CANVAS (Estilo do vídeo de referência)
   ========================================================================== */

.hero-canvas {
  position: relative;
  min-height: calc(100vh - 32px);
  border-radius: var(--radius-canvas);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 32px 48px;
  background-color: #0b0c10;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Background com iluminação cinematográfica quente e gradiente */
.hero-backdrop {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(239, 68, 68, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.35) 0%, rgba(8, 9, 11, 0.85) 100%),
    url('assets/images/foto_14.jpg') center/cover no-repeat;
  filter: contrast(1.08) brightness(0.65);
  z-index: 1;
  transform: scale(1.02);
  transition: transform 10s ease;
}

.hero-canvas:hover .hero-backdrop {
  transform: scale(1.05);
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  flex-grow: 1;
}

/* ==========================================================================
   HEADER & NAVEGAÇÃO FLUTUANTE
   ========================================================================== */

.canvas-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 24px;
}

.brand-emblem {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.3));
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-amber);
}

/* Nav flutuante centralizada */
.canvas-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 17, 22, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.nav-item {
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.header-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-trigger {
  display: none;
  background: rgba(15, 17, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   HERO BOTTOM (Layout do vídeo: Marca gigante à esquerda + resumo à direita)
   ========================================================================== */

.hero-bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: flex-end;
  gap: 40px;
  margin-top: auto;
  padding-top: 80px;
}

.hero-statement {
  display: flex;
  flex-direction: column;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 12px;
}

.hero-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-amber);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-amber);
}

/* Tipografia gigante Lumen-like */
.hero-giant-title {
  font-size: clamp(3.8rem, 9.5vw, 8rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.hero-giant-title .asterisk {
  font-size: 0.55em;
  color: var(--accent-amber);
  font-weight: 400;
  line-height: 1;
  transform: translateY(10px);
}

.hero-side-editorial {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: 480px;
  margin-left: auto;
}

.hero-narrative {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #e2e8f0;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Botão estilo Pill do vídeo (Join the Lab ->) */
.btn-pill-light {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: #ffffff;
  color: #0b0c10;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.btn-pill-light:hover {
  background-color: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.18);
}

.btn-pill-light .arrow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: #0b0c10;
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.75rem;
  transition: transform 0.25s ease;
}

.btn-pill-light:hover .arrow-icon {
  transform: translateX(3px);
}

/* ==========================================================================
   SEÇÕES INSET (Rounded Cards no estilo Frame 00:05)
   ========================================================================== */

.section-inset {
  background-color: var(--bg-surface);
  border-radius: var(--radius-canvas);
  border: 1px solid var(--border-subtle);
  padding: 80px 48px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.section-inset.dark-accent {
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.08), transparent 70%),
    var(--bg-card);
}

/* Tag editorial estilo [ VISUAL ARTS ] do vídeo */
.editorial-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.18);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}

/* Headline Editorial Grande */
.editorial-headline {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 24px;
  max-width: 950px;
}

.editorial-lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 48px;
}

/* ==========================================================================
   STATISTICS STRIP (Números de Impacto)
   ========================================================================== */

.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 32px 0 0;
  border-top: 1px solid var(--border-subtle);
}

.stat-box {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.stat-val .stat-plus {
  font-size: 0.6em;
  color: var(--accent-amber);
}

.stat-caption {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==========================================================================
   GRID DE PILARES & CARDS MODULARES
   ========================================================================== */

.cards-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.bento-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.bento-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.bento-col-8 { grid-column: span 8; }
.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-12 { grid-column: span 12; }

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.card-badge.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
}

.card-badge.badge-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.card-heading {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 12px;
}

.card-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Imagem dentro do card */
.card-media-wrapper {
  margin: 16px 0 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 260px;
  border: 1px solid var(--border-subtle);
}

.card-media-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bento-card:hover .card-media-wrapper img {
  transform: scale(1.04);
}

.card-footer-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.link-inline-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-amber);
  transition: var(--transition);
}

.link-inline-arrow:hover {
  color: var(--accent-amber-light);
  gap: 12px;
}

/* ==========================================================================
   OFFICIAL SOURCES & PROOFS BADGES
   ========================================================================== */

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.source-item-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.source-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.source-icon {
  font-size: 1.4rem;
  background: rgba(245, 158, 11, 0.1);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--accent-amber);
  flex-shrink: 0;
}

.source-details {
  display: flex;
  flex-direction: column;
}

.source-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.source-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   GALERIA HISTÓRICA MODERNA
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 240px;
  border: 1px solid var(--border-subtle);
  background: #000;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-spring), filter 0.3s ease;
  filter: brightness(0.85);
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 9, 11, 0.95) 100%);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  transform: translateY(4px);
  transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* ==========================================================================
   TIMELINE HISTÓRICA EDITORIAL
   ========================================================================== */

.timeline-editorial {
  position: relative;
  padding-left: 36px;
  margin-top: 40px;
}

.timeline-editorial::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-amber), rgba(255, 255, 255, 0.05));
}

.timeline-block {
  position: relative;
  padding-bottom: 48px;
}

.timeline-block:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -36px;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--accent-amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.timeline-year-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 6px;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ==========================================================================
   FORMULÁRIO DE CONTATO & CHAVE PIX
   ========================================================================== */

.contact-layout-modern {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.pix-donation-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(239, 68, 68, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 24px;
}

.pix-key-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin: 16px 0 12px;
}

.pix-key-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--accent-amber);
  font-weight: 600;
}

.btn-copy-pix {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-pix:hover {
  background: var(--accent-amber);
  color: #000;
}

.form-modern {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-modern {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label-modern {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.form-input-modern,
.form-textarea-modern {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  color: #fff;
  transition: var(--transition);
  outline: none;
}

.form-input-modern:focus,
.form-textarea-modern:focus {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
  background: #171a22;
}

/* ==========================================================================
   FOOTER EDITORIAL
   ========================================================================== */

.footer-canvas {
  background-color: #07080a;
  border-radius: var(--radius-canvas);
  border: 1px solid var(--border-subtle);
  padding: 64px 48px 32px;
  margin-top: 40px;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link-item {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-link-item:hover {
  color: var(--accent-amber);
  transform: translateX(3px);
}

.footer-legal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */

.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent-amber);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s var(--ease-spring);
  z-index: 9999;
}

.toast-notification.active {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE & TABLETS)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-bottom-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .hero-side-editorial {
    margin-left: 0;
    max-width: 100%;
  }

  .bento-col-8,
  .bento-col-4,
  .bento-col-6 {
    grid-column: span 12;
  }

  .stats-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .page-wrapper {
    padding: 8px;
  }

  .hero-canvas {
    padding: 20px 20px 36px;
    border-radius: 20px;
    min-height: auto;
  }

  .section-inset {
    padding: 48px 20px;
    border-radius: 20px;
    margin: 20px 0;
  }

  .canvas-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    padding: 16px;
    background: rgba(15, 17, 22, 0.96);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8);
  }

  .canvas-nav.is-open {
    display: flex;
  }

  .menu-trigger {
    display: block;
  }

  .hero-giant-title {
    font-size: 3.4rem;
  }

  .editorial-headline {
    font-size: 1.85rem;
  }

  .contact-layout-modern {
    grid-template-columns: 1fr;
  }

  .footer-canvas {
    padding: 40px 20px 24px;
    border-radius: 20px;
  }

  .footer-legal-bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
