/**
 * ============================================================
 * ECTOLAB — Design System e Estilos Globais globais
 * ============================================================
 * 
 * ÍNDICE DE MANUTENÇÃO (Use CTRL+F para buscar as sessões abaixo):
 * 1. Tokens (Variáveis Nativas de Cor, Tipografia e Layout)
 * 2. Tipografia (Tags Títulos, Parágrafos, Classes Úteis)
 * 3. Primitivas de Layout (Wrap, Section, Grid Lab)
 * 4. Utilitários Glassmorphism e Atmosfera
 * 5. Componentes Genéricos (Botões, Cards, Tags)
 * 6. Estrutura Global (Menu Header e Rodapé)
 * 7. Classes de Auxílio Rápido (Flex, Gaps)
 * ============================================================
 */

:root {
  /* Color tokens — Ectolab brand palette */
  --ink:        #08222b;
  --ink-2:      #1a3d4a;
  --ink-3:      #56707a;
  --line:       #d8e3e8;
  --line-2:     #bfd0d7;
  --paper:      #eef5f8;   /* gelo — cool teal-tinted white */
  --paper-2:    #dfeaf0;
  --white:      #ffffff;

  --teal:       #155366;   /* primary deep teal (from "ECTO" wordmark) */
  --teal-2:     #0e3e4d;
  --teal-3:     #082831;
  --teal-soft:  #d4e3e8;
  --teal-soft2: #aac7d0;
  --teal-glow:  #1f87a8;   /* lighter teal (from DNA accents) */
  --teal-glow2: #2da3c4;

  --orange:     #f0a030;   /* primary orange (from human + curve) */
  --orange-2:   #d68915;
  --orange-soft: #ffe1b2;
  --orange-soft2: #f5c878;

  /* Legacy aliases so older rules keep working */
  --blue:       var(--teal);
  --blue-2:     var(--teal-2);
  --blue-3:     var(--teal-3);
  --blue-soft:  var(--teal-soft);
  --blue-soft2: var(--teal-soft2);
  --blue-glow:  var(--teal-glow);
  --gold:       var(--orange);
  --gold-2:     var(--orange-2);
  --gold-soft:  var(--orange-soft);
  --gold-soft2: var(--orange-soft2);

  /* Type — scientific, present, geometric */
  --display: "Space Grotesk", "Inter Tight", system-ui, sans-serif;
  --serif:   "Space Grotesk", "Inter Tight", system-ui, sans-serif;
  --sans:    "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Typography ---------- */

.serif { font-family: var(--display); font-feature-settings: "ss01", "ss02"; letter-spacing: -0.025em; }
.display { font-family: var(--display); }
.mono  { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold);
  margin-right: 8px;
  transform: translateY(-2px);
}

.h-display {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(48px, 7.5vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.035em;
}
.h-display em { font-style: normal; }
.h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.h1 em { font-style: normal; }
.h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.h2 em { font-style: normal; }
.h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.015em;
}
.h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.005em;
}

.lede {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }

/* ---------- Layout primitives ---------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: clamp(64px, 8vw, 128px) 0; }
.section-sm { padding: clamp(48px, 5vw, 80px) 0; }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}
.rule-thick {
  height: 2px;
  background: var(--ink);
  border: 0;
  margin: 0;
}

/* Subtle lab-paper grid background */
.lab-grid {
  background-image:
    linear-gradient(to right, rgba(21,83,102,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(21,83,102,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ---------- Glassmorphism utilities ---------- */
.glass {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 12px 40px -12px rgba(8,34,43,0.18),
    0 2px 8px -2px rgba(8,34,43,0.06);
}
.glass-teal {
  background: linear-gradient(140deg, rgba(21,83,102,0.92), rgba(31,135,168,0.85));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--white);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 20px 50px -16px rgba(8,34,43,0.45);
}
.glass-orange {
  background: linear-gradient(140deg, rgba(255,225,178,0.92), rgba(245,200,120,0.85));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 16px 40px -12px rgba(214,137,21,0.25);
}

/* Ambient color blobs — give the page a luminous blue/yellow atmosphere */
.atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.atmosphere::before, .atmosphere::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.atmosphere::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--blue-glow) 0%, transparent 60%);
  top: -120px; left: -180px;
}
.atmosphere::after {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 60%);
  bottom: -160px; right: -120px;
  opacity: 0.35;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(238,245,248, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(21,83,102,0.1);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-img {
  height: 42px;
  width: auto;
  display: block;
}
.brand-mark {
  width: 36px; height: 36px;
  position: relative;
  flex: none;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--blue);
}
.brand-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-top: 1px;
  max-width: 200px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  font-size: 14px;
}
.nav-item { position: relative; }
.nav-item > a {
  position: relative;
  color: var(--ink-2);
  padding: 8px 0;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-item > a:hover { color: var(--blue); }
.nav-item > a.active { color: var(--blue); }
.nav-item > a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  background: var(--gold);
}
.caret { font-size: 10px; opacity: 0.6; }

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 16px 40px rgba(8,34,43,0.12);
  padding: 24px;
  display: flex;
  gap: 40px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  pointer-events: none;
  min-width: max-content;
}
.nav-item.has-drop:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-drop-group { display: flex; flex-direction: column; gap: 8px; }
.nav-drop-cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 6px;
}
.nav-drop-group a {
  color: var(--ink-2);
  font-size: 14px;
  padding: 4px 0;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-drop-group a:hover { color: var(--blue); }
.nav-drop-group a.nav-drop-cat--link {
  color: var(--blue);
  font-size: 10px;
  padding: 0 0 6px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-drop-group a.nav-drop-cat--link:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.lang-select {
  appearance: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-3) 50%) right 10px center / 5px 5px no-repeat,
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%) right 6px center / 5px 5px no-repeat,
    var(--white);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 22px 7px 10px;
  min-width: 62px;
  cursor: pointer;
}
.lang-select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.lang-switch {
  display: flex;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}
.lang-switch button {
  background: none;
  border: 0;
  padding: 6px 10px;
  color: var(--ink-3);
  cursor: pointer;
}
.lang-switch button.on {
  background: var(--ink);
  color: var(--white);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--ink);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue); }

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover { background: var(--gold-2); color: var(--white); }

.btn-orange {
  background: var(--orange);
  color: var(--ink);
  font-weight: 600;
}
.btn-orange:hover { background: var(--orange-2); color: var(--white); }

.btn-sm { padding: 10px 16px; font-size: 13.5px; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 1180px) {
  .header-actions { display: none; }
}

.btn-system {
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
}
.btn-system:hover {
  background: var(--teal-2);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--white); }

.btn-parcerias {
  background: linear-gradient(var(--paper), var(--paper)) padding-box,
              linear-gradient(90deg, var(--teal-soft2), var(--orange-soft), var(--teal-soft2)) border-box;
  border: 1px solid transparent;
  color: var(--ink-2);
  background-size: 200% 100%;
  animation: btn-parcerias-spin 3s linear infinite;
  box-shadow: none !important;
}
.btn-parcerias:hover {
  background: linear-gradient(var(--white), var(--white)) padding-box,
              linear-gradient(90deg, var(--teal), var(--orange), var(--teal)) border-box;
  color: var(--ink);
}
@keyframes btn-parcerias-spin {
  to { background-position: 200% center; }
}

.btn-text {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--blue);
  font-weight: 500;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--ink); }

.card__visual {
  aspect-ratio: 3 / 2;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
}
.card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.card__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
}

/* ---------- Tags / chips ---------- */

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--blue);
  font-weight: 500;
}
.tag.gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.tag.dark { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.tag.ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.tag.soft { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-soft2); }

/* ---------- Specimen / classification label ---------- */
.specimen {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Image placeholder (lab-paper) ---------- */
.ph {
  position: relative;
  background: var(--paper-2);
  background-image:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(21,83,102,0.06) 14px 15px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(21,83,102,0.25);
  border-radius: 2px;
  pointer-events: none;
}
.ph__label {
  position: relative;
  z-index: 2;
  background: rgba(250,250,246,0.92);
  padding: 6px 10px;
  border: 1px solid var(--line-2);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.site-footer a { color: var(--paper); opacity: 0.78; }
.site-footer a:hover { opacity: 1; color: var(--gold); }
.site-footer .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 20px;
  font-weight: 500;
}
.site-footer ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
}
.footer-apoie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 32px;
  margin-bottom: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r);
}
.footer-apoie__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-apoie__label {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -0.01em;
}
.footer-apoie__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  max-width: 480px;
}
.site-footer .footer-apoie .btn-orange {
  color: var(--white);
  opacity: 1;
}
.site-footer .footer-apoie .btn-orange:hover {
  color: var(--white);
  opacity: 1;
}
@media (max-width: 600px) {
  .footer-apoie { flex-direction: column; align-items: flex-start; }
}

.site-footer .copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Asterisk / star accent ---------- */
.aster {
  display: inline-block;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.1em;
  line-height: 1;
}

/* ---------- Animated underline ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--blue-soft2);
  transition: gap 0.2s, border-color 0.2s;
}
.link-arrow:hover { gap: 12px; border-color: var(--blue); }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.marquee__track {
  display: flex;
  gap: 56px;
  padding: 18px 0;
  white-space: nowrap;
  animation: scroll 60s linear infinite;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.marquee__track span { display: inline-flex; align-items: center; gap: 56px; }
.marquee__track .sep { color: var(--gold); }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Utility ---------- */
.flex { display: flex; }
.col  { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.grid { display: grid; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.hide-mobile { }

@media (max-width: 900px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .site-footer .grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .hide-mobile { display: none !important; }
}

@media (max-width: 540px) {
  .site-footer .grid { grid-template-columns: 1fr; }
  .footer-apoie { padding: 20px; gap: 16px; }
  .site-footer { padding: 56px 0 24px; }
  .site-footer .copy { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- Inputs ---------- */
.input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--white);
  font: inherit;
  color: var(--ink);
}
.input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }

/* ---------- Article / prose ---------- */
.prose { max-width: 720px; margin: 0 auto; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose h2 { font-family: var(--display); font-size: 32px; font-weight: 700; color: var(--ink); margin: 48px 0 16px; letter-spacing: -0.025em; }
.prose h3 { font-family: var(--display); font-size: 24px; font-weight: 600; color: var(--ink); margin: 36px 0 12px; letter-spacing: -0.02em; }
.prose p  { margin: 0 0 1.2em; }
.prose blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--gold);
  background: var(--blue-soft);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--blue);
  letter-spacing: -0.015em;
}
.prose figure { margin: 32px 0; }
.prose figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 10px;
}
.prose a {
  color: var(--blue);
  border-bottom: 1px solid var(--blue-soft2);
}
.prose a:hover { border-color: var(--blue); }

/* ---------- Numeric stat ---------- */
.stat {
  font-family: var(--display);
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--blue);
}
.stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 6px;
}

/* ============================================================
   MENU MOBILE — Hambúrguer + Gaveta (Drawer)
   ============================================================ */

/* Botão hambúrguer */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  padding: 8px 10px;
  flex-shrink: 0;
  margin-left: 4px;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s 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;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay escuro por trás da gaveta */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 34, 43, 0.52);
  z-index: 88;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.nav-overlay.is-open { display: block; }

/* Gaveta lateral */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(360px, 92vw);
  height: 100dvh;
  background: var(--white);
  z-index: 90;
  overflow: hidden;
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(8, 34, 43, 0.2);
}
.nav-drawer.is-open { right: 0; }

.nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  flex-shrink: 0;
}
.nav-drawer__header .brand-img { height: 34px; }

.nav-drawer__close {
  background: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink-3);
  transition: all 0.15s;
  flex-shrink: 0;
}
.nav-drawer__close:hover { background: var(--paper); color: var(--ink); }

/* Nav interna da gaveta */
.mnav {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mnav-item { border-bottom: 1px solid var(--line); }
.mnav-row {
  display: flex;
  align-items: stretch;
}
.mnav-label {
  flex: 1;
  display: block;
  padding: 15px 20px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.mnav-label:hover { color: var(--teal); }
.mnav-item:not(.has-sub) > .mnav-label { display: block; }
.mnav-expander {
  background: none;
  border: none;
  border-left: 1px solid var(--line);
  padding: 0 18px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
  transition: transform 0.2s, color 0.15s, background 0.15s;
}
.mnav-expander:hover { background: var(--paper); color: var(--teal); }
.mnav-expander[aria-expanded="true"] { transform: rotate(180deg); color: var(--teal); }

.mnav-sub {
  display: none;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.mnav-sub.is-open { display: block; }

.mnav-group { padding: 14px 20px; }
.mnav-group + .mnav-group { border-top: 1px dashed var(--line); }
.mnav-cat {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
  font-weight: 600;
}
a.mnav-cat--link {
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}
a.mnav-cat--link:hover { color: var(--teal-2); }
.mnav-link {
  display: block;
  color: var(--ink-2);
  font-size: 14px;
  padding: 5px 0;
  text-decoration: none;
  transition: color 0.15s;
}
.mnav-link:hover { color: var(--teal); }

/* CTAs no rodapé da gaveta */
.nav-drawer__ctas {
  padding: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: var(--white);
}
.drawer-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.drawer-action-grid .btn {
  justify-content: center;
  width: 100%;
}

/* Ativa o hambúrguer no mobile — DEVE ficar após .nav-toggle { display: none } */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  /* Header compacto: logo à esquerda, idioma + hambúrguer à direita.
     Sem isto o excesso de gap empurra o hambúrguer para fora da tela. */
  .site-header__inner { gap: 10px; padding-left: var(--gutter); padding-right: var(--gutter); }
  .lang-select { margin-left: auto; min-width: 58px; padding-top: 6px; padding-bottom: 6px; }
  .lang-switch { margin-left: auto; }
  .lang-switch button { padding: 6px 8px; }
  .brand-img { height: 34px; }

  /* Sidebars com position:sticky inline (páginas de curso, dinâmica, rede,
     materiais, etc.) deixam de "grudar" e sobrepor o conteúdo no mobile. */
  [style*="position: sticky"],
  [style*="position:sticky"] { position: static !important; }
}

/* ============================================================
   POPUP — Acervo Gratuito (+30 livros de Conscienciologia)
   Cartão discreto no canto que abre o formulário ao clicar.
   ============================================================ */

.books-pop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  width: min(360px, calc(100vw - 32px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 50px -20px rgba(8, 34, 43, 0.35),
              0 4px 12px -6px rgba(8, 34, 43, 0.15);
  padding: 22px 22px 20px;
  font-family: var(--sans);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.4s ease,
              transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.books-pop.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.books-pop__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.18s, color 0.18s;
}
.books-pop__close:hover {
  background: var(--paper);
  color: var(--ink);
}

.books-pop__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-soft), var(--orange-soft));
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--teal);
}
.books-pop__icon svg { width: 22px; height: 22px; }

.books-pop__eyebrow {
  display: flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.books-pop__eyebrow .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--orange);
  margin-right: 8px;
  border-radius: 50%;
}
.books-pop__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}
.books-pop__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0 0 18px;
}

.books-pop__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.books-pop__btn:hover {
  background: var(--orange-2);
  color: var(--white);
  transform: translateY(-1px);
}

/* Estado formulário (modal centrado com iframe) */
.books-pop.is-form {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 0;
  transform: translate(-50%, -50%) scale(0.98);
}
.books-pop.is-form.is-in {
  transform: translate(-50%, -50%) scale(1);
}
.books-pop__form-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.books-pop__form-head .books-pop__close {
  top: 16px;
  right: 16px;
}
.books-pop__form-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.books-pop__form-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin: 4px 0 0;
}
.books-pop__iframe {
  width: 100%;
  height: 660px;
  border: none;
  background: var(--white);
  display: block;
}

/* Backdrop quando o formulário está aberto */
.books-pop__backdrop {
  position: fixed;
  inset: 0;
  z-index: 8999;
  background: rgba(8, 34, 43, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.books-pop__backdrop.is-in {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 480px) {
  .books-pop {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 18px 18px 16px;
  }
  .books-pop.is-form {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }
  .books-pop__iframe { height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .books-pop,
  .books-pop__backdrop { transition: opacity 0.2s ease; }
}
