/* =========================================================
   AFULINK — Estilos
   Temas: Claro (padrão) e Suave
   Idiomas: PT, EN, ES · Acessibilidade e daltonismo
   ========================================================= */

/* ---------- 1. Tokens de design ---------- */
/* Temas: Claro (padrão) e Suave */
:root,
[data-theme="light"] {
  /* Claro — off-white quente, cartões brancos */
  --bg-primary: #f7f7f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f1ee;
  --text-primary: #1b1c1f;
  --text-secondary: #464a52;
  --text-muted: #6d717a;
  --border-color: #e4e4e0;
  --accent-primary: #cf3a43;
  --accent-hover: #b42f38;
  --accent-soft: rgba(207, 58, 67, 0.08);
  --on-accent: #ffffff;

  --shadow-sm: 0 1px 2px rgba(20, 20, 30, 0.05);
  --shadow-card: 0 12px 32px rgba(20, 20, 30, 0.07);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-scale: 1;
}

/* Suave — azul-acinzentado, confortável para a leitura */
[data-theme="dim"] {
  --bg-primary: #1f232b;
  --bg-secondary: #262b34;
  --bg-tertiary: #2e3440;
  --text-primary: #eef1f5;
  --text-secondary: #c6ccd6;
  --text-muted: #98a1b0;
  --border-color: #384050;
  --accent-primary: #f06470;
  --accent-hover: #f47c86;
  --accent-soft: rgba(240, 100, 112, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 10px 28px rgba(10, 12, 18, 0.28);
}

/* Logos por tema: no Claro usa a logo escura; no Suave, a logo clara */
.logo-for-dark { display: none; }
[data-theme="dim"] .logo-for-dark { display: block; }
[data-theme="dim"] .logo-for-light { display: none; }

/* ---------- 2. Daltonismo e contraste ---------- */
[data-colorblind="protanopia"] {
  --accent-primary: #0077b6;
  --accent-hover: #0096c7;
  --accent-soft: rgba(0, 119, 182, 0.14);
}
[data-colorblind="deuteranopia"] {
  --accent-primary: #0284c7;
  --accent-hover: #0369a1;
  --accent-soft: rgba(2, 132, 199, 0.14);
}
[data-colorblind="tritanopia"] {
  --accent-primary: #c026d3;
  --accent-hover: #a21caf;
  --accent-soft: rgba(192, 38, 211, 0.14);
}
[data-colorblind="achromatopsia"] { filter: grayscale(100%); }

[data-contrast="high"] {
  --bg-primary: #000 !important;
  --bg-secondary: #0a0a0a !important;
  --bg-tertiary: #141414 !important;
  --text-primary: #fff !important;
  --text-secondary: #ffff00 !important;
  --text-muted: #e5e5e5 !important;
  --border-color: #fff !important;
  --accent-primary: #ffff00 !important;
  --accent-hover: #ffd60a !important;
  --accent-soft: rgba(255, 255, 0, 0.2) !important;
  --on-accent: #000 !important;
}
[data-contrast="high"] .logo-for-dark { display: block !important; }
[data-contrast="high"] .logo-for-light { display: none !important; }

[data-underline-links="true"] a {
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

[data-dyslexic="true"] body,
[data-dyslexic="true"] * {
  letter-spacing: 0.04em !important;
  word-spacing: 0.12em !important;
  line-height: 1.75 !important;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.modal-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

#scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  background: var(--accent-primary);
  opacity: 0.85;
  z-index: 9999;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent-primary);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ---------- 4. Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border-color);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
  position: relative;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 0;
}
.brand-logo img { height: 32px; width: auto; }
.brand-logo-sm img { height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.25s ease, background-color 0.25s ease;
}
.nav-links a:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.nav-links .nav-cta {
  color: var(--accent-primary);
  background: var(--accent-soft);
  font-weight: 600;
  margin-left: 6px;
}
.nav-links .nav-cta:hover { color: var(--accent-hover); background: var(--accent-soft); }

.toolbar-controls { display: flex; align-items: center; gap: 8px; }

.segmented-control {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.seg-btn:hover { color: var(--text-primary); }
.seg-btn.active { background: var(--bg-tertiary); color: var(--text-primary); box-shadow: var(--shadow-sm); }

.icon-btn,
.a11y-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.icon-btn { width: 38px; }
.a11y-trigger { padding: 0 12px; font-size: 0.8rem; font-weight: 500; }
.icon-btn:hover,
.a11y-trigger:hover { border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color)); }

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon { display: none; }
[data-theme="dim"] .theme-icon-dim,
[data-theme="light"] .theme-icon-light { display: block; }

.mobile-menu-btn { display: none; }
.mobile-menu-btn .icon-menu-close { display: none; }
.mobile-menu-btn[aria-expanded="true"] .icon-menu-open { display: none; }
.mobile-menu-btn[aria-expanded="true"] .icon-menu-close { display: block; }

/* ---------- 5. Painel de acessibilidade ---------- */
.a11y-drawer {
  position: fixed;
  top: 84px;
  right: 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  z-index: 500;
  display: none;
}
.a11y-drawer.open { display: block; animation: fadeSlideDown 0.3s var(--ease); }

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.a11y-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.a11y-group { margin-bottom: 16px; }
.a11y-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.a11y-row { display: flex; gap: 6px; }
.a11y-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.span-2 { grid-column: span 2; }

.a11y-option {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.a11y-option:hover { border-color: color-mix(in srgb, var(--accent-primary) 40%, var(--border-color)); }
.a11y-option.active {
  border-color: var(--accent-primary);
  background: var(--accent-soft);
  font-weight: 600;
}
.a11y-close { padding: 4px 9px; line-height: 1; }

/* ---------- 6. Botões ---------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}
.btn-primary {
  background: var(--accent-primary);
  color: var(--on-accent);
  border: 1px solid transparent;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-primary) 22%, transparent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-primary) 28%, transparent);
}
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color));
  transform: translateY(-1px);
}
.btn-sm { padding: 9px 16px; font-size: 0.84rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

.link-btn {
  background: none;
  border: 0;
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: inherit;
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -180px;
  right: -140px;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  filter: blur(10px);
  pointer-events: none;
  will-change: transform;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
  position: relative;
}
.hero-content { min-width: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 100%;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--accent-primary); }

.hero-lead {
  margin-top: 22px;
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 600px;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-points {
  list-style: none;
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: var(--accent-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.4l3.2 3.1L13 4.6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.4l3.2 3.1L13 4.6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hero-visual { margin: 0; display: flex; justify-content: center; }
.hero-image-frame {
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-card);
  transition: transform 0.6s var(--ease);
}
.hero-image-frame:hover { transform: translateY(-3px); }
.hero-image-frame img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* ---------- 8. Seções ---------- */
section { padding: 96px 0; }
.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.section-alt .card,
.section-alt .step,
.section-alt .contact-form { background: var(--bg-primary); }

.section-head { max-width: 680px; }
.section-head-center { margin: 0 auto; text-align: center; }

.section-tag {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.section-desc { color: var(--text-secondary); font-size: 1.03rem; }

.grid-2,
.grid-3 { display: grid; gap: 24px; margin-top: 48px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent-primary) 30%, var(--border-color));
  box-shadow: var(--shadow-card);
}
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.14rem; font-weight: 600; line-height: 1.35; margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 0.95rem; }

.saas-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.pill {
  background: var(--accent-soft);
  color: var(--accent-primary);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.domain-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.card-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.card p + .card-footer { margin-top: 24px; }
.link-arrow {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.92rem;
}
.link-arrow:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 9. Como trabalhamos ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
}
.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 0.92rem; }

/* ---------- 10. Trajetória ---------- */
.about-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
}
.about-photo { margin: 0; }
.about-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}
.about-name { margin-bottom: 6px; }
.about-role { font-weight: 600; color: var(--text-primary); margin-bottom: 14px; }
.about-bio { color: var(--text-secondary); font-size: 0.98rem; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}
.stat-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.stat-item small {
  display: block;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.stat-item strong { display: block; font-size: 0.92rem; font-weight: 500; line-height: 1.5; }

.linkedin-btn { margin-top: 22px; }
.linkedin-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- 11. Contato ---------- */
.contact-form {
  max-width: 620px;
  margin: 44px auto 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.section-alt .form-control { background: var(--bg-secondary); }
.form-control::placeholder { color: var(--text-muted); opacity: 0.8; }
.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.form-control[aria-invalid="true"] { border-color: var(--accent-primary); }
textarea.form-control { resize: vertical; min-height: 120px; }

.form-note { font-size: 0.82rem; color: var(--text-muted); margin: -2px 0 18px; }
.form-feedback {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-align: center;
}
.form-feedback:empty { display: none; }
.form-feedback.is-error { color: var(--accent-primary); }

.contact-direct {
  text-align: center;
  margin-top: 24px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.contact-direct a { color: var(--accent-primary); font-weight: 600; text-decoration: none; margin-left: 4px; }
.contact-direct a:hover { text-decoration: underline; text-underline-offset: 3px; }

.section-last { border-bottom: 0; }

/* ---------- 12. Animação de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal-left { transform: translateX(-56px); }
.reveal-right { transform: translateX(56px); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------- 13. Rodapé ---------- */
.site-footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 56px 0 32px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}
.footer-brand p { margin-top: 14px; max-width: 320px; color: var(--text-muted); font-size: 0.88rem; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-social a:hover { color: var(--accent-primary); border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color)); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-col a,
.footer-legal button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col a:hover,
.footer-legal button:hover { color: var(--accent-primary); }

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-legal button { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- 13b. Blog ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  margin-top: 40px;
}
.post-card { padding: 0; overflow: hidden; }
.post-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.post-card:hover .post-card-cover img { transform: scale(1.03); }
.post-card-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.post-card h3 a { color: inherit; text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.post-card { position: relative; }
.post-card p { flex: 1; }
.post-card .tag-list { position: relative; z-index: 1; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.post-meta span + span::before { content: "·"; margin-right: 14px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; list-style: none; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
a.tag:hover, .tag.active { color: var(--accent-primary); border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color)); }

.section-more { margin-top: 36px; }

.blog-hero { padding: 72px 0 24px; }
.blog-hero .tag-list { margin-top: 24px; }
.blog-list { padding-top: 24px; }
.empty-state { color: var(--text-muted); margin-top: 32px; }

.breadcrumb { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-primary); }

/* Artigo */
.article { padding: 64px 0 80px; }
.article-wrap {margin: 0 auto; }
.article-header h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.article-lead { font-size: 1.12rem; color: var(--text-secondary); margin-bottom: 18px; }
.article-cover {
  margin: 32px 0 8px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.prose { margin-top: 36px; font-size: 1.04rem; line-height: 1.8; color: var(--text-secondary); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--text-primary); line-height: 1.3; letter-spacing: -0.01em; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.22rem; margin-top: 1.7em; }
.prose h4 { font-size: 1.05rem; margin-top: 1.5em; }
.prose strong { color: var(--text-primary); }
.prose a { color: var(--accent-primary); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote {
  border-left: 3px solid var(--accent-primary);
  background: var(--bg-secondary);
  padding: 14px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 1px 6px;
  border-radius: 6px;
}
.prose pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.88rem; color: var(--text-primary); }
.prose img { border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.prose hr { border: 0; border-top: 1px solid var(--border-color); margin: 2.2em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border-color); padding: 8px 12px; text-align: left; }
.prose th { background: var(--bg-secondary); color: var(--text-primary); }

.article-footer { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border-color); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.post-nav a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: border-color 0.2s ease;
}
.post-nav a:hover { border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color)); }
.post-nav small { display: block; color: var(--text-muted); font-size: 0.76rem; font-weight: 500; margin-bottom: 4px; }
.post-nav .next { text-align: right; grid-column: 2; }

.article-cta {
  margin-top: 40px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 25%, var(--border-color));
}
.article-cta h2 { font-size: 1.2rem; margin-bottom: 8px; }
.article-cta p { color: var(--text-secondary); margin-bottom: 18px; }

/* ---------- 14. Aviso de cookies ---------- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(880px, calc(100vw - 32px));
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cookie-banner.show { display: flex; animation: fadeUp 0.4s var(--ease); }
@keyframes fadeUp {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.cookie-text { font-size: 0.86rem; color: var(--text-secondary); }
.cookie-text strong { color: var(--text-primary); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }

/* ---------- 15. Modais ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 12, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.open .modal-box { animation: fadeSlideDown 0.3s var(--ease); }
.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 600; }
.modal-body { padding: 24px; overflow-y: auto; font-size: 0.92rem; color: var(--text-secondary); }
.modal-body h4 { color: var(--text-primary); margin: 20px 0 6px; font-size: 0.98rem; font-weight: 600; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body ul { margin: 0 0 12px 20px; }
.modal-body li { margin-bottom: 6px; }
.modal-body a { color: var(--accent-primary); }

/* ---------- 16. Responsivo ---------- */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1060px) {
  .mobile-menu-btn { display: inline-flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: -24px;
    right: -24px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px 20px;
    box-shadow: var(--shadow-card);
    z-index: 99;
  }
  .nav-links.open { display: flex; animation: fadeSlideDown 0.3s var(--ease); }
  .nav-links a { padding: 12px 14px; font-size: 0.96rem; }
  .nav-links .nav-cta { margin: 8px 0 0; text-align: center; }
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-image-frame { max-width: 440px; }

  .about-box { grid-template-columns: 1fr; padding: 30px; gap: 28px; }
  .about-photo { max-width: 260px; }

  .cookie-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-links { left: -20px; right: -20px; padding-left: 20px; padding-right: 20px; }
  section { padding: 72px 0; }
  .card { padding: 24px; }
  .contact-form { padding: 26px 20px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .stats { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; }
}

@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .nav-links { left: -16px; right: -16px; padding-left: 16px; padding-right: 16px; }
  .nav-wrap { min-height: 64px; gap: 8px; }
  .brand-logo img { height: 26px; }
  .toolbar-controls { gap: 6px; }
  .seg-btn { padding: 5px 6px; font-size: 0.7rem; }
  .icon-btn { width: 34px; height: 34px; }
  .a11y-trigger { height: 34px; padding: 0 10px; }
  .a11y-btn-text { display: none; }

  .a11y-drawer { top: 72px; right: 16px; left: 16px; width: auto; max-width: none; }

  .hero { padding: 44px 0 56px; }
  .badge { font-size: 0.74rem; }
  .hero h1 { font-size: 1.85rem; }
  .hero-lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions a { width: 100%; }
  .hero-points { flex-direction: column; }

  section { padding: 60px 0; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-box { padding: 22px 18px; }
  .about-photo { max-width: 200px; }

  .cookie-banner { bottom: 12px; padding: 16px; }
  .cookie-actions { width: 100%; }
  .cookie-actions button { flex: 1 1 auto; }

  .modal-header,
  .modal-body { padding: 18px; }
}

/* ---------- 17. Página Sobre ---------- */
.about-more { display: inline-block; margin: 22px 0 0 18px; }

.mvv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.mvv-card h3 { display: flex; align-items: center; gap: 12px; }
.mvv-card .card-icon { margin-bottom: 0; }
.mvv-card p { margin-top: 14px; font-size: 1rem; }
.mvv-head { margin-bottom: 4px; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
  list-style: none;
}
.value-item {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}
.section-alt .value-item { background: var(--bg-primary); }
.value-item h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; }
.value-item p { font-size: 0.93rem; color: var(--text-secondary); }

.esg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.esg-letter {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.esg-list { list-style: none; margin-top: 14px; display: grid; gap: 10px; }
.esg-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  font-size: 0.93rem;
}
.esg-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0.7;
}
.esg-note { margin-top: 28px; font-size: 0.9rem; color: var(--text-muted); max-width: 760px; }

@media (max-width: 960px) {
  .values-grid, .esg-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .mvv-grid, .values-grid, .esg-grid { grid-template-columns: 1fr; }
  .about-more { margin-left: 0; display: block; }
}
.section-tight { padding-top: 24px; }

/* ---------- 18. Blog: navegação e paginação ---------- */
.nav-links a[aria-current="page"] { color: var(--text-primary); background: var(--bg-tertiary); }
.tag small { color: var(--text-muted); font-size: 0.7rem; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 48px; }
.page-link {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
}
a.page-link:hover { border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color)); color: var(--text-primary); }
.page-link.active { background: var(--accent-primary); border-color: var(--accent-primary); color: var(--on-accent); }
.table-wrap { overflow-x: auto; }
.prose input[type="checkbox"] { margin-right: 6px; accent-color: var(--accent-primary); }
.not-found { text-align: center; padding: 120px 0; }
.not-found .section-desc { margin: 0 auto 28px; }
.actions-center { justify-content: center; }

/* ---------- 19. Arquivme (NAS) ---------- */
.nas-card {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  align-items: start;
  padding: 36px;
}
.nas-card:hover { transform: none; }
.nas-intro h3 { font-size: 1.3rem; margin-bottom: 12px; }
.nas-cta { margin-top: 22px; }
.nas-audiences { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nas-audience {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}
.nas-audience h4 { font-size: 0.98rem; font-weight: 600; }
.nas-audience .esg-list { margin-top: 12px; }

.section-alt .about-box { background: var(--bg-primary); }
.section-alt .stat-item { background: var(--bg-secondary); }

@media (max-width: 960px) {
  .nas-card { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 560px) {
  .nas-audiences { grid-template-columns: 1fr; }
  .nas-card { padding: 22px 18px; }
}

/* ---------- 20. Página 404 ---------- */
.not-found { padding: 96px 0 112px; }
.nf-code {
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent-primary);
  opacity: 0.9;
  margin-bottom: 12px;
}
.nf-links {
  margin: 56px auto 0;
  max-width: 560px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
}
.nf-links h2 {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.nf-links ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nf-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nf-links a:hover { color: var(--accent-primary); border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color)); }

/* Seletor de idioma como links */
a.seg-btn { text-decoration: none; display: inline-block; line-height: 1.2; }

/* Aviso de blog sem artigos no idioma */
.blog-other-lang { display: inline-block; margin-top: 14px; }

/* Animação lateral: mantém o efeito de hover e evita rolagem horizontal */
.card.reveal.visible:hover { transform: translateY(-3px); }
main { overflow-x: clip; }

/* ---------- 21. CTA com engrenagens animadas ---------- */
.article-cta {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  padding: 40px 44px;
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, var(--accent-soft), color-mix(in srgb, var(--accent-primary) 3%, var(--bg-secondary)) 70%);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 25%, var(--border-color));
  transition: border-color 0.4s ease, box-shadow 0.5s var(--ease), transform 0.5s var(--ease);
}
.article-cta:hover {
  border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent-primary) 14%, transparent);
}
/* Linhas finas fluindo no fundo do quadro */
.cta-lines {
  position: absolute;
  inset: -40% -10%;
  z-index: -1;
  background: var(--accent-primary);
  opacity: 0.16;
  -webkit-mask: url("assets/linhas-fita.svg") center / 100% 100% no-repeat;
          mask: url("assets/linhas-fita.svg") center / 100% 100% no-repeat;
  animation: cta-lines 14s ease-in-out infinite alternate;
}
@keyframes cta-lines {
  from { transform: translateX(-6%) rotate(-4deg); }
  to { transform: translateX(6%) rotate(2deg); }
}
/* Brilho que segue o mouse */
.cta-glow {
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 360px;
  left: var(--mx, 80%);
  top: var(--my, 50%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-primary) 18%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.article-cta:hover .cta-glow { opacity: 1; }

.cta-text { position: relative; }
.cta-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 8px;
}
.article-cta h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -0.01em; margin-bottom: 8px; }
.article-cta p { color: var(--text-secondary); margin-bottom: 22px; max-width: 460px; }

/* Botão: seta que avança e brilho que atravessa */
.cta-btn { position: relative; overflow: hidden; gap: 10px; }
.cta-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.cta-btn:hover svg { transform: translateX(5px); }
.cta-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  animation: cta-shine 4.5s ease-in-out infinite;
}
@keyframes cta-shine {
  0%, 60% { left: -60%; }
  85%, 100% { left: 130%; }
}

/* Engrenagens em traço fino */
.cta-gears { width: 190px; height: 180px; flex-shrink: 0; overflow: visible; }
.cta-gears .gear path {
  fill: color-mix(in srgb, var(--accent-primary) 10%, var(--bg-secondary));
  stroke: var(--accent-primary);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.cta-gears .gear-b path { stroke: color-mix(in srgb, var(--accent-primary) 70%, var(--text-muted)); }
.cta-gears .gear-c path { fill: none; stroke-dasharray: 3 2; }
.cta-gears .gear { transform-box: view-box; }
.cta-gears .gear-a { transform-origin: 64px 64px; animation: gear-spin 16s linear infinite; }
.cta-gears .gear-b { transform-origin: 110.67px 110.67px; animation: gear-spin-reverse 10.667s linear infinite; }
.cta-gears .gear-c { transform-origin: 117.9px 36.5px; animation: gear-spin-reverse 8s linear infinite; }
.cta-gears .gear-orbit {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  opacity: 0.45;
  transform-box: view-box;
  transform-origin: 64px 64px;
  animation: gear-spin 30s linear infinite;
}
.cta-gears .gear-spark { fill: var(--accent-primary); opacity: 0; animation: gear-spark 2.4s ease-in-out infinite; }
.cta-gears .s2 { animation-delay: 0.8s; }
.cta-gears .s3 { animation-delay: 1.6s; }
@keyframes gear-spark {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  40% { opacity: 1; transform: scale(1.4); }
}
.cta-gears .gear-spark { transform-box: fill-box; transform-origin: center; }
/* Ao passar o mouse, as engrenagens aceleram juntas (mesma proporção) */
.article-cta:hover .gear-a { animation-duration: 5s; }
.article-cta:hover .gear-b { animation-duration: 3.333s; }
.article-cta:hover .gear-c { animation-duration: 2.5s; }
@keyframes gear-spin { to { transform: rotate(360deg); } }
@keyframes gear-spin-reverse { to { transform: rotate(-360deg); } }

@media (max-width: 560px) {
  .article-cta { grid-template-columns: 1fr; padding: 28px 22px; gap: 8px; }
  .cta-gears { width: 120px; height: 114px; order: -1; }
}

/* ---------- 22. Hover com fundo em todos os botões ---------- */
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color));
}
.icon-btn:hover,
.a11y-trigger:hover { background: var(--accent-soft); color: var(--accent-primary); }
.seg-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.seg-btn.active:hover { background: var(--bg-tertiary); }
.a11y-option:hover { background: var(--accent-soft); }
.nav-links .nav-cta:hover { background: var(--accent-primary); color: var(--on-accent); }
a.tag:hover { background: var(--accent-soft); }
.footer-social a:hover { background: var(--accent-soft); }
.nf-links a:hover { background: var(--accent-soft); }
a.page-link:hover { background: var(--accent-soft); color: var(--accent-primary); }
.post-nav a:hover { background: var(--accent-soft); }
.footer-legal button:hover,
.link-btn:hover { background: var(--accent-soft); border-radius: 6px; }
.footer-legal button { padding: 2px 6px; margin: 0 -6px; border-radius: 6px; transition: color 0.2s ease, background-color 0.2s ease; }
.btn-primary, .btn-secondary, .icon-btn, .a11y-trigger, .seg-btn, .a11y-option, .tag, .page-link, .post-nav a, .nf-links a, .footer-social a, .link-btn {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease), box-shadow 0.3s ease;
}

/* ---------- 23. Ícones das etapas (Como trabalhamos) ---------- */
.step { text-align: center; padding-top: 30px; }
.step .step-num {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
  margin: 0;
}
.step-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  transition: transform 0.4s var(--ease), background-color 0.3s ease, color 0.3s ease;
}
.step-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step:hover .step-icon { transform: translateY(-3px) scale(1.05); background: var(--accent-primary); color: var(--on-accent); }

/* ---------- 24. Seções com arte de fundo (contato da home e topo do Sobre) ---------- */
.contact-section { position: relative; overflow: hidden; isolation: isolate; }
.contact-section .contact-wrap { position: relative; z-index: 1; }

/* ---------- 25. Linha de ligação (trilho pelas bordas) ---------- */
main.has-chain { position: relative; }
.chain-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.chain-track {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chain-draw {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chain-head {
  fill: var(--accent-primary);
  stroke: var(--bg-primary);
  stroke-width: 3;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent-primary) 70%, transparent));
  transition: opacity 0.3s ease;
}
.chain-dot {
  fill: var(--border-color);
  transition: fill 0.35s ease, r 0.35s ease;
}
.chain-stub {
  stroke: var(--accent-primary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 0.5s var(--ease);
}
.chain-mark.on .chain-dot { fill: var(--accent-primary); r: 5.5; }
.chain-mark.on .chain-stub { stroke-dashoffset: 0; }

/* Conteúdo por cima da linha */
.has-chain [data-chain],
.has-chain .section-head,
.has-chain .section-more,
.has-chain .steps { position: relative; z-index: 1; }
[data-chain].chain-lit { border-color: color-mix(in srgb, var(--accent-primary) 45%, var(--border-color)); }
[data-chain] { transition: border-color 0.4s ease, transform 0.9s var(--ease), opacity 0.9s var(--ease), box-shadow 0.5s var(--ease); }
/* Espaço para o trilho da linha acima do card do Arquivme */
.has-chain .nas-card { margin-top: 64px; }
@media (max-width: 767px) { .has-chain .nas-card { margin-top: 48px; } }

/* ---------- 26. Página Sobre: fundo artístico e linha nos Valores ---------- */
.art-wrap > section { position: relative; z-index: 1; }
.has-chain .values-section .values-grid { row-gap: 64px; }
@media (max-width: 767px) { .has-chain .values-section .values-grid { row-gap: 48px; } }

/* ---------- 27. Arte do topo da página Sobre: cérebro, sinapses e conhecimento ---------- */
.about-art {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background: var(--accent-primary);
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
}
/* Cérebro em linhas com rede de neurônios, à direita do título */
.about-brain,
.about-synapses {
  width: 620px;
  height: 620px;
  top: -40px;
  right: -60px;
}
.about-brain {
  opacity: 0.4;
  -webkit-mask-image: url("assets/arte-cerebro.svg");
          mask-image: url("assets/arte-cerebro.svg");
  animation: brain-float 12s ease-in-out infinite alternate;
}
/* Sinapses acendendo e apagando */
.about-synapses {
  opacity: 0;
  -webkit-mask-image: url("assets/arte-sinapses.svg");
          mask-image: url("assets/arte-sinapses.svg");
  animation: brain-float 12s ease-in-out infinite alternate, synapse-pulse 2.8s ease-in-out infinite;
}
/* Livro aberto com o conhecimento subindo em direção ao cérebro */
.about-book {
  width: 540px;
  height: 540px;
  bottom: -70px;
  left: -110px;
  opacity: 0.4;
  background: color-mix(in srgb, var(--accent-primary) 70%, var(--text-muted));
  -webkit-mask-image: url("assets/arte-livro.svg");
          mask-image: url("assets/arte-livro.svg");
  animation: book-rise 9s ease-in-out infinite alternate;
}
@keyframes brain-float {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-14px) rotate(2deg); }
}
@keyframes synapse-pulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.55; }
}
@keyframes book-rise {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}
[data-theme="dim"] .about-brain { opacity: 0.32; }
[data-theme="dim"] .about-book { opacity: 0.28; }

@media (max-width: 960px) {
  .about-brain, .about-synapses { width: 420px; height: 420px; top: -60px; right: -150px; }
  .about-brain { opacity: 0.26; }
  .about-book { width: 380px; height: 380px; left: -140px; bottom: -60px; }
}

/* ---------- 28. Contato da home: cérebro, livro e animação de carta ---------- */
/* Composição: carta (sup. esq.), cérebro (sup. dir.), livro (inf. dir.)
   e a fita atravessando do canto inferior esquerdo até a direita, entre o cérebro e o livro */
/* Cérebro e livro presos ao centro, espelhando a carta do outro lado do formulário */
#contato .about-brain,
#contato .about-synapses { width: 380px; height: 380px; top: 40px; right: auto; left: calc(50% + 330px); }
#contato .about-book { width: 440px; height: 440px; right: auto; left: calc(50% + 280px); bottom: 20px; }
#contato .contact-ribbon {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: max(2400px, calc(100vw + 400px));
  height: 900px;
  left: 50%;
  top: 57%;
  opacity: 0.36;
  background: var(--accent-primary);
  --rot: -9deg;
  transform: translate(-50%, -50%) rotate(var(--rot));
  -webkit-mask: url("assets/linhas-fita.svg") center / 100% 100% no-repeat;
          mask: url("assets/linhas-fita.svg") center / 100% 100% no-repeat;
  animation: ribbon-drift 26s ease-in-out infinite alternate;
}
@keyframes ribbon-drift {
  from { transform: translate(calc(-50% - 40px), -50%) rotate(var(--rot)); }
  to { transform: translate(calc(-50% + 40px), -50%) rotate(calc(var(--rot) + 2deg)); }
}
[data-theme="dim"] #contato .contact-ribbon { opacity: 0.26; }
/* Leque de raios girando, embaixo do e-mail de contato */
#contato .contact-rays {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  width: 560px;
  height: 560px;
  left: 50%;
  bottom: -330px;
  margin-left: -280px;
  opacity: 0.24;
  background: var(--accent-primary);
  -webkit-mask: url("assets/linhas-raios.svg") center / contain no-repeat;
          mask: url("assets/linhas-raios.svg") center / contain no-repeat;
  animation: art-spin 120s linear infinite;
}
@keyframes art-spin { to { transform: rotate(360deg); } }
[data-theme="dim"] #contato .contact-rays { opacity: 0.18; }

/* Carta: sai do envelope, volta, o envelope fecha e voa */
.mail-anim {
  display: block;
  color: var(--accent-primary);
  overflow: visible;
}
/* Carta como parte do fundo, no canto superior esquerdo */
.mail-bg {
  position: absolute;
  z-index: 0;
  top: 90px;
  left: max(24px, calc(50% - 640px));
  width: 300px;
  height: 240px;
  opacity: 0.5;
  pointer-events: none;
}
[data-theme="dim"] .mail-bg { opacity: 0.4; }
.mail-anim .mail-env { animation: mail-fly 7s var(--ease) infinite; transform-box: view-box; transform-origin: 100px 110px; }
.mail-anim .mail-letter { animation: mail-letter 7s var(--ease) infinite; }
.mail-anim .mail-flap-open { animation: mail-flap-open 7s var(--ease) infinite; transform-box: view-box; transform-origin: 100px 78px; }
.mail-anim .mail-flap-closed { animation: mail-flap-closed 7s var(--ease) infinite; transform-box: view-box; transform-origin: 100px 76px; transform: scaleY(0); }
/* Estilo de traço fino, igual ao cérebro e ao livro (o preenchimento é a cor do fundo, só para esconder a carta) */
.mail-anim .mail-paper,
.mail-anim .mail-body,
.mail-anim .mail-back { fill: var(--bg-secondary); stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.mail-anim .mail-paper-back { opacity: 0.6; }
.mail-anim .mail-echo { fill: none; stroke: currentColor; stroke-width: 1; stroke-linejoin: round; opacity: 0.55; }
.mail-anim .mail-text { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; opacity: 0.6; }
.mail-anim .mail-heart { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.mail-anim .mail-trail { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; opacity: 0; animation: mail-trail 7s ease infinite; }
.mail-anim .mail-trail path { stroke-dasharray: 3 7; }
.mail-anim .mail-trail circle { fill: currentColor; stroke: none; }
.mail-anim .mail-trail path:nth-child(2), .mail-anim .mail-trail path:nth-child(3) { opacity: 0.5; }

@keyframes mail-letter {
  0%, 6%   { transform: translateY(40px); }
  20%, 44% { transform: translateY(0); }
  56%, 100% { transform: translateY(40px); }
}
@keyframes mail-flap-open {
  0%, 56%  { transform: scaleY(1); }
  60%, 92% { transform: scaleY(0); }
  100%     { transform: scaleY(1); }
}
@keyframes mail-flap-closed {
  0%, 60%  { transform: scaleY(0); }
  64%, 92% { transform: scaleY(1); }
  96%, 100% { transform: scaleY(0); }
}
@keyframes mail-fly {
  0%, 66%  { transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
  80%      { transform: translate(150px, -90px) rotate(-14deg) scale(0.55); opacity: 0; }
  81%      { transform: translate(-120px, 30px) scale(0.6); opacity: 0; }
  92%, 100%{ transform: translate(0, 0) rotate(0) scale(1); opacity: 1; }
}
@keyframes mail-trail {
  0%, 66% { opacity: 0; stroke-dashoffset: 0; }
  72% { opacity: 0.7; }
  84% { opacity: 0; stroke-dashoffset: -40; }
  100% { opacity: 0; }
}
/* Ao enviar o formulário a carta repete o envio mais rápido */
.mail-anim.sending .mail-env,
.mail-anim.sending .mail-letter,
.mail-anim.sending .mail-flap-open,
.mail-anim.sending .mail-flap-closed,
.mail-anim.sending .mail-trail { animation-duration: 3.2s; animation-iteration-count: 1; }

@media (max-width: 960px) {
  .mail-bg { width: 150px; height: 120px; top: auto; left: auto; bottom: 10px; right: -24px; opacity: 0.26; }
  #contato .about-brain, #contato .about-synapses { width: 380px; height: 380px; top: -40px; left: auto; right: -170px; }
  #contato .about-book { width: 380px; height: 380px; left: -150px; right: auto; bottom: -50px; }
  #contato .contact-ribbon { width: 1500px; height: 562px; top: 60%; opacity: 0.24; }
  #contato .contact-rays { width: 420px; height: 420px; margin-left: -210px; bottom: -250px; }
}
