/* =====================================================================
   Agrosínteses — página institucional
   Tokens de marca (manual oficial): navy #2a3c50 · dourado #aa915a/#bfa66b/#77562e
   Tipografia web: Playfair Display (títulos) + DM Sans (texto)
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy: #2a3c50;
  --navy-deep: #1e2d40;
  --navy-soft: #3a4f66;
  --gold: #aa915a;
  --gold-light: #bfa66b;
  --gold-dark: #77562e;
  --gold-pale: #f0dfc0;
  --cream: #f7f4ee;
  --cream-2: #e8e3da;
  --cream-3: #d8d1c3;
  --green: #4a7c59;
  --green-light: #6ba382;
  --white: #ffffff;

  /* Tema claro (padrão) */
  --bg: var(--cream);
  --bg-alt: #efeae0;
  --surface: var(--white);
  --surface-2: var(--cream-2);
  --text: var(--navy);
  --text-muted: #5b6b7d;
  --text-soft: #8a96a3;
  --line: rgba(42, 60, 80, 0.14);
  --line-strong: rgba(42, 60, 80, 0.28);
  --accent: var(--gold);
  --accent-ink: var(--gold-dark);
  --on-accent: var(--navy-deep);
  --shadow: 0 10px 30px -14px rgba(42, 60, 80, 0.35);
  --shadow-lg: 0 30px 60px -30px rgba(42, 60, 80, 0.45);
  --header-bg: rgba(247, 244, 238, 0.82);
  --diagram-layer-ags: rgba(170, 145, 90, 0.16);
  --diagram-layer-erp: rgba(42, 60, 80, 0.07);
  --diagram-chip: var(--white);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1180px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;
}

:root[data-theme="dark"] {
  --bg: var(--navy-deep);
  --bg-alt: #182636;
  --surface: #24364a;
  --surface-2: #2c4055;
  --text: #f3efe6;
  --text-muted: #c8c0b0;
  --text-soft: #94a0ad;
  --line: rgba(247, 244, 238, 0.12);
  --line-strong: rgba(247, 244, 238, 0.26);
  --accent: var(--gold-light);
  --accent-ink: var(--gold-light);
  --on-accent: var(--navy-deep);
  --shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --header-bg: rgba(30, 45, 64, 0.82);
  --diagram-layer-ags: rgba(191, 166, 107, 0.18);
  --diagram-layer-erp: rgba(247, 244, 238, 0.06);
  --diagram-chip: #1e2d40;
  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: hidden; } /* o menu mobile fechado fica fora da tela à direita; isto impede scroll lateral */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong { font-weight: 600; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--navy); color: var(--cream); padding: 0.6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.9rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
.display { font-size: clamp(2.4rem, 1.4rem + 4.2vw, 4.6rem); line-height: 1.04; letter-spacing: -0.02em; }
.display-md { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.6rem); line-height: 1.06; letter-spacing: -0.015em; }
.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 1.1rem; display: flex; align-items: center; gap: 0.7rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.subtitle { font-size: 1.2rem; color: var(--text-muted); font-weight: 400; margin-bottom: 1.3rem; }
.lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); line-height: 1.6; }
.section-note { max-width: 62ch; color: var(--text-muted); margin: 2.6rem auto 0; text-align: center; }
.hint { font-size: 0.9rem; color: var(--text-soft); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1.5px solid transparent; transition: transform 0.25s var(--ease), box-shadow 0.25s, background-color 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-dark)); color: var(--white); box-shadow: 0 12px 28px -12px rgba(119, 86, 46, 0.7); }
.btn-gold:hover { box-shadow: 0 16px 34px -12px rgba(119, 86, 46, 0.85); }
.btn-ghost { color: var(--cream); border-color: rgba(247, 244, 238, 0.45); background: rgba(30, 45, 64, 0.25); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--cream); background: rgba(30, 45, 64, 0.45); }
.btn-outline { color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-whatsapp { background: var(--green); color: var(--white); }
.btn-whatsapp:hover { background: #3f6b4c; }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }
@media (max-width: 640px) { .btn:not(.btn-sm) { white-space: normal; text-align: center; justify-content: center; } }
.btn-lg { padding: 1.15rem 2.1rem; font-size: 1.08rem; }

/* ---------- Barra de progresso ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-light), var(--gold-dark)); transition: width 0.1s linear; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: 1rem 0; transition: padding 0.3s var(--ease), border-color 0.3s;
  border-bottom: 1px solid transparent;
}
/* O fundo desfocado fica num pseudo-elemento: backdrop-filter no próprio header
   criaria um bloco de contenção e prenderia o menu mobile (position: fixed) dentro dele. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: var(--header-bg); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: opacity 0.3s;
}
.site-header.is-scrolled { padding: 0.55rem 0; border-color: var(--line); }
.site-header.is-scrolled::before, .site-header.menu-open::before { opacity: 1; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand img { height: 42px; width: auto; transition: height 0.3s var(--ease); }
.is-scrolled .brand img { height: 36px; }
/* Sobre o hero (topo, sem scroll) a marca é branca; depois segue o tema */
.brand-dark { display: none; }
.site-header:not(.is-scrolled) .brand-light { display: none; }
.site-header:not(.is-scrolled) .brand-dark { display: block; }
:root[data-theme="dark"] .is-scrolled .brand-light { display: none; }
:root[data-theme="dark"] .is-scrolled .brand-dark { display: block; }

.nav { display: flex; gap: 1.6rem; align-items: center; font-size: 0.95rem; font-weight: 500; }
.nav a { position: relative; color: var(--cream); opacity: 0.92; padding: 0.3rem 0; transition: color 0.3s, opacity 0.2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px; background: var(--gold-light); transition: right 0.3s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { right: 0; }
.is-scrolled .nav a { color: var(--text); }
.nav .nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--cream); border: 1px solid rgba(247, 244, 238, 0.35); transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}
.is-scrolled .theme-toggle { color: var(--text); border-color: var(--line-strong); }
.theme-toggle:hover { background: rgba(170, 145, 90, 0.15); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; width: 42px; height: 42px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; border-radius: 10px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); transition: transform 0.3s var(--ease), opacity 0.2s, background-color 0.3s; }
.is-scrolled .menu-toggle span, .site-header.menu-open .menu-toggle span { background: var(--text); }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 360px); flex-direction: column; align-items: flex-start; justify-content: center; gap: 1.4rem;
    padding: 6rem 2.2rem 3rem; background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateX(100%); visibility: hidden; transition: transform 0.4s var(--ease), visibility 0s 0.4s; font-size: 1.25rem;
  }
  .menu-open .nav { visibility: visible; transition: transform 0.4s var(--ease), visibility 0s; }
  .nav a, .is-scrolled .nav a { color: var(--text); }
  .nav .nav-cta { display: inline-flex; margin-top: 1rem; padding: 0.8rem 1.4rem; border-radius: 999px; background: var(--navy); color: var(--cream); }
  :root[data-theme="dark"] .nav .nav-cta { background: var(--gold); color: var(--navy-deep); }
  .menu-open .nav { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .header-actions .btn-whatsapp span { display: none; }
  .header-actions .btn-whatsapp { padding: 0.55rem; border-radius: 50%; }
  .site-header.menu-open .brand-light { display: block; } .site-header.menu-open .brand-dark { display: none; }
  :root[data-theme="dark"] .site-header.menu-open .brand-light { display: none; }
  :root[data-theme="dark"] .site-header.menu-open .brand-dark { display: block; }
  .menu-open .theme-toggle { color: var(--text); border-color: var(--line-strong); }
}

/* ---------- Seções ---------- */
.section { padding: clamp(4.5rem, 4rem + 4vw, 8rem) 0; position: relative; }
.section-head { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.section-head .eyebrow { justify-content: center; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4.5rem; }
  .grid-2-wide { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}
.col-text { min-width: 0; }
.col-visual { margin: 0; }
.col-visual figcaption { font-size: 0.88rem; color: var(--text-soft); margin-top: 0.9rem; text-align: center; }

/* Reveal no scroll */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- 1. Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: center; color: var(--cream);
  padding: 8rem 0 6rem; overflow: hidden; isolation: isolate;
}
.hero-bg, .hero-bg img, .hero-canvas, .hero-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg img { object-fit: cover; object-position: center 62%; transform: scale(1.04); animation: hero-zoom 14s var(--ease) forwards; }
@keyframes hero-zoom { to { transform: scale(1); } }
.hero-canvas { z-index: 1; opacity: 0.55; mix-blend-mode: screen; pointer-events: none; }
.hero-overlay { z-index: 2; background:
  linear-gradient(180deg, rgba(30, 45, 64, 0.55) 0%, rgba(30, 45, 64, 0.25) 35%, rgba(30, 45, 64, 0.72) 80%, rgba(30, 45, 64, 0.95) 100%),
  linear-gradient(90deg, rgba(30, 45, 64, 0.65) 0%, rgba(30, 45, 64, 0.15) 60%);
}
.hero-content { position: relative; z-index: 3; max-width: 820px; }
.hero .eyebrow { color: var(--gold-light); }
.hero .eyebrow::before { background: var(--gold-light); }
.hero h1 { color: var(--white); text-wrap: balance; }
.hero .lead { color: rgba(247, 244, 238, 0.9); max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.scroll-hint { position: absolute; left: 50%; bottom: 1.8rem; transform: translateX(-50%); z-index: 3; width: 26px; height: 42px; border: 1.5px solid rgba(247, 244, 238, 0.5); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--gold-light); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-hint span { animation: none; } .hero-bg img { animation: none; transform: none; } }

/* ---------- 2. Problema · timeline ---------- */
.timeline-figure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.2rem 1rem; box-shadow: var(--shadow); }
.timeline { width: 100%; height: auto; font-family: var(--font-body); }
.timeline text { fill: var(--text-muted); font-size: 13px; }
.tl-axis { stroke: var(--line-strong); stroke-width: 1.5; }
.tl-marks circle { fill: var(--surface); stroke: var(--text-soft); stroke-width: 1.5; }
.tl-marks text { text-anchor: middle; font-size: 12px; }
.tl-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; }
.tl-custo { stroke: var(--text-soft); }
.tl-preco { stroke: var(--gold); }
.tl-resultado { stroke: var(--green-light); }
.tl-label { font-weight: 600; opacity: 0; transition: opacity 0.5s ease; }
.tl-custo-label { fill: var(--text-soft); } .tl-preco-label { fill: var(--gold); } .tl-resultado-label { fill: var(--green-light); }
.tl-decisao line { stroke: var(--gold); stroke-width: 1.5; opacity: 0; transition: opacity 0.6s ease 0.2s; }
.tl-decisao text { fill: var(--accent-ink); font-weight: 600; font-size: 12px; letter-spacing: 0.04em; opacity: 0; transition: opacity 0.6s ease 0.3s; }
.tl-leitura rect { fill: var(--navy); opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.5s var(--ease); }
:root[data-theme="dark"] .tl-leitura rect { fill: var(--gold-light); }
.tl-leitura text { fill: var(--cream); font-weight: 600; font-size: 12px; opacity: 0; transition: opacity 0.5s ease; }
:root[data-theme="dark"] .tl-leitura text { fill: var(--navy-deep); }
.is-animated .tl-custo { animation: draw 1.4s var(--ease) 0.2s forwards; }
.is-animated .tl-preco { animation: draw 1.4s var(--ease) 0.9s forwards; }
.is-animated .tl-resultado { animation: draw 1.2s var(--ease) 1.6s forwards; }
.is-animated .tl-custo-label { opacity: 1; transition-delay: 1.2s; }
.is-animated .tl-preco-label { opacity: 1; transition-delay: 1.9s; }
.is-animated .tl-resultado-label { opacity: 1; transition-delay: 2.5s; }
.is-animated .tl-decisao line, .is-animated .tl-decisao text { opacity: 1; }
.is-animated .tl-leitura rect { opacity: 1; transform: none; transition-delay: 2.7s; }
.is-animated .tl-leitura text { opacity: 1; transition-delay: 2.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- 3 & 10. Split ---------- */
.section-era, .section-quem { padding: 0; }
.split { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; min-height: 80vh; }
  .split-reverse .split-media { order: 2; }
}
.split-media { margin: 0; position: relative; overflow: hidden; min-height: 60vw; }
@media (min-width: 900px) { .split-media { min-height: 0; } }
.split-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transform: scale(1.06); transition: transform 1.6s var(--ease); }
.split-media.is-visible img { transform: scale(1); }
.split-text { padding: clamp(3.5rem, 3rem + 3vw, 6.5rem) clamp(1.25rem, 5vw, 5.5rem); align-self: center; max-width: 640px; }
.section-era { background: var(--bg-alt); }
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.chips li { padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.audience { display: grid; gap: 0.85rem; margin-top: 1.4rem; }
.audience li { padding-left: 1.4rem; position: relative; color: var(--text-muted); }
.audience li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.audience strong { color: var(--text); }

/* ---------- 4. Passos ---------- */
.steps { position: relative; display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1rem; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem 1.8rem 1.8rem; box-shadow: var(--shadow); transition: transform 0.4s var(--ease), border-color 0.3s; }
.step:hover { transform: translateY(-4px); border-color: var(--gold); }
.step-num { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--accent); display: block; margin-bottom: 1rem; letter-spacing: -0.02em; }
.step h3 { margin-bottom: 0.4rem; }
.step p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }
.steps-line { display: none; position: absolute; left: 6%; right: 6%; top: 3.4rem; width: 88%; height: 3px; z-index: -1; }
@media (min-width: 800px) { .steps-line { display: block; } }
.steps-line path { stroke: var(--gold); stroke-width: 3; stroke-dasharray: 1000; stroke-dashoffset: 1000; fill: none; }
.is-animated .steps-line path { animation: draw 1.6s var(--ease) 0.3s forwards; }
.steps.is-animated .step { animation: step-pop 0.7s var(--ease) both; }
.steps.is-animated .step:nth-child(2) { animation-delay: 0.5s; }
.steps.is-animated .step:nth-child(3) { animation-delay: 1s; }
@keyframes step-pop { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- 5. Propriedade Governada ---------- */
.section-governada { background: var(--navy-deep); color: var(--cream); overflow: hidden; }
.section-governada::before {
  content: ""; position: absolute; inset: auto -10% -30% auto; width: 60vw; max-width: 760px; aspect-ratio: 1;
  background: url("../assets/brand/ags-icone-dourado.png") center / contain no-repeat; opacity: 0.06; pointer-events: none;
}
.section-governada .eyebrow { color: var(--gold-light); } .section-governada .eyebrow::before { background: var(--gold-light); }
.section-governada .subtitle { color: rgba(247, 244, 238, 0.75); }
.section-governada .section-note { color: rgba(247, 244, 238, 0.72); }
.definition {
  margin: 0 auto 3rem; max-width: 840px; padding: 2rem 2.4rem; border-left: 3px solid var(--gold);
  background: rgba(247, 244, 238, 0.05); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display); font-size: clamp(1.2rem, 1rem + 0.9vw, 1.65rem); line-height: 1.45;
}
.definition p { margin: 0; } .definition strong { color: var(--gold-light); font-weight: 600; }
.conditions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; max-width: 960px; margin: 0 auto; }
@media (max-width: 640px) { .conditions { grid-template-columns: repeat(2, 1fr); } }
.condition { display: grid; gap: 0.7rem; }
.condition-bar { height: 10px; border-radius: 6px; background: rgba(247, 244, 238, 0.12); position: relative; overflow: hidden; }
.condition-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease); transition-delay: calc(var(--n) * 0.45s); }
.is-final .condition-bar::after { background: linear-gradient(90deg, var(--green), var(--green-light)); }
.is-animated .condition-bar::after { transform: scaleX(1); }
.condition-name { font-family: var(--font-display); font-size: clamp(1.05rem, 0.9rem + 0.8vw, 1.5rem); color: rgba(247, 244, 238, 0.55); transition: color 0.5s ease; transition-delay: calc(var(--n) * 0.45s + 0.4s); display: flex; align-items: center; gap: 0.5rem; }
.condition-name::before { content: "→"; font-family: var(--font-body); font-size: 0.85em; opacity: 0.5; }
.condition:first-child .condition-name::before { content: none; }
.is-animated .condition-name { color: var(--cream); }
.is-animated .is-final .condition-name { color: var(--green-light); }

/* ---------- 6 & 8. Diagramas ---------- */
.diagram-figure { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.diagram { width: 100%; height: auto; font-family: var(--font-body); }
.dg-node { cursor: pointer; outline: none; transition: opacity 0.4s ease, transform 0.4s var(--ease); }
.dg-node rect, .dg-node circle { transition: fill 0.25s, stroke 0.25s, stroke-width 0.25s; }
.dg-node:hover rect, .dg-node:focus-visible rect, .dg-node.is-active rect,
.dg-node:hover circle, .dg-node:focus-visible circle, .dg-node.is-active circle { stroke: var(--gold); stroke-width: 2; }
.dg-layer rect { fill: var(--diagram-layer-erp); stroke: var(--line-strong); stroke-width: 1.2; }
.dg-layer-ags rect, .dg-layer-mpga rect { fill: var(--diagram-layer-ags); stroke: var(--gold); }
.dg-layer-title { fill: var(--text); font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.dg-layer-sub { fill: var(--text-muted); font-size: 13px; }
.dg-chip rect { fill: var(--diagram-chip); stroke: var(--line-strong); stroke-width: 1.2; }
.dg-chip text { fill: var(--text); font-size: 14px; font-weight: 600; }
.dg-chip-sm text { font-size: 13px; }
.dg-door rect { fill: var(--diagram-chip); stroke: var(--gold); stroke-width: 1.4; }
.dg-door text { fill: var(--text); font-size: 15px; font-weight: 600; }
.dg-caption { fill: var(--text-soft); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.dg-link line, .dg-link path { stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 5; fill: none; }
.dg-link text { fill: var(--text-soft); font-size: 12px; font-style: italic; }
.dg-satellite circle { fill: var(--diagram-chip); stroke: var(--line-strong); stroke-width: 1.4; }
.dg-satellite text { fill: var(--text); font-size: 14px; font-weight: 600; }
/* entrada em sequência */
.diagram .dg-node { opacity: 0; transform: translateY(10px); }
.is-animated .dg-node { opacity: 1; transform: none; }
.is-animated .dg-node:nth-of-type(1) { transition-delay: 0.05s; }
.is-animated .dg-node:nth-of-type(2) { transition-delay: 0.15s; }
.is-animated .dg-node:nth-of-type(3) { transition-delay: 0.25s; }
.is-animated .dg-node:nth-of-type(4) { transition-delay: 0.35s; }
.is-animated .dg-node:nth-of-type(5) { transition-delay: 0.45s; }
.is-animated .dg-node:nth-of-type(6) { transition-delay: 0.6s; }
.is-animated .dg-node:nth-of-type(7) { transition-delay: 0.7s; }
.is-animated .dg-node:nth-of-type(8) { transition-delay: 0.8s; }
.is-animated .dg-node:nth-of-type(9) { transition-delay: 0.9s; }
.dg-tooltip {
  position: absolute; left: 50%; bottom: 1.2rem; transform: translate(-50%, 8px); width: min(92%, 420px);
  background: var(--navy); color: var(--cream); font-size: 0.9rem; line-height: 1.45; padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.3s var(--ease); z-index: 2;
}
:root[data-theme="dark"] .dg-tooltip { background: var(--gold-light); color: var(--navy-deep); }
.dg-tooltip.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  .diagram .dg-node { opacity: 1; transform: none; transition: none; }
  .tl-line, .steps-line path { stroke-dashoffset: 0 !important; animation: none !important; }
  .tl-label, .tl-decisao line, .tl-decisao text, .tl-leitura rect, .tl-leitura text { opacity: 1 !important; transform: none !important; transition: none !important; }
  .condition-bar::after { transform: scaleX(1) !important; transition: none !important; }
  .condition-name { transition: none !important; }
  .steps.is-animated .step { animation: none; }
  .split-media img { transform: none; transition: none; }
}

/* ---------- 7. ÍRIA ---------- */
.section-iria { background: var(--bg-alt); }
.iria-visual { position: relative; }
.iria-visual picture img { border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 3 / 4; object-fit: cover; }
.registro-card {
  position: absolute; right: -6%; bottom: 8%; width: min(62%, 260px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1rem; box-shadow: var(--shadow-lg); display: grid; gap: 0.7rem;
}
@media (max-width: 899px) { .registro-card { right: 0.5rem; } }
.registro-rows { display: grid; gap: 6px; }
.registro-rows span { display: block; height: 8px; border-radius: 4px; background: var(--line-strong); transform-origin: left; transform: scaleX(0); }
.registro-rows span:nth-child(odd) { width: 85%; } .registro-rows span:nth-child(even) { width: 60%; }
.registro-arrow { width: 2px; height: 16px; background: var(--gold); margin-left: 8px; position: relative; opacity: 0; }
.registro-arrow::after { content: ""; position: absolute; left: -4px; bottom: -2px; border: 5px solid transparent; border-top-color: var(--gold); }
.registro-read { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; opacity: 0; transform: translateY(6px); }
.registro-read i { width: 34px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.registro-read b { font-weight: 600; color: var(--text); }
.is-animated .registro-rows span { animation: grow 0.6s var(--ease) forwards; }
.is-animated .registro-rows span:nth-child(1) { animation-delay: 0.1s; }
.is-animated .registro-rows span:nth-child(2) { animation-delay: 0.3s; }
.is-animated .registro-rows span:nth-child(3) { animation-delay: 0.5s; }
.is-animated .registro-rows span:nth-child(4) { animation-delay: 0.7s; }
.is-animated .registro-rows span:nth-child(5) { animation-delay: 0.9s; }
.is-animated .registro-arrow { animation: fade 0.5s ease 1.3s forwards; }
.is-animated .registro-read { animation: rise 0.6s var(--ease) 1.6s forwards; }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .registro-rows span { transform: none; } .registro-arrow, .registro-read { opacity: 1; transform: none; } }
.product-logo { margin-bottom: 1.6rem; }
.product-logo-iria { height: 48px; width: auto; }
:root[data-theme="dark"] .product-logo-iria { filter: brightness(0) invert(1); opacity: 0.92; }
.product-logo-mpga { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.6rem; letter-spacing: -0.02em; color: var(--text); }
.product-logo-mpga img { width: 44px; height: 44px; border-radius: 10px; }

/* ---------- 9. Pilares ---------- */
.pillars { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2.2rem 1.8rem; box-shadow: var(--shadow); transition: background-color 0.4s, border-color 0.3s, transform 0.4s var(--ease); display: grid; align-content: start; gap: 0.6rem; }
.pillar svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: 0.6rem; }
.pillar h3 { margin: 0; }
.pillar p { margin: 0; color: var(--text-muted); font-size: 0.98rem; }
.pillar:hover { background: var(--gold-pale); border-color: var(--gold); transform: translateY(-4px); }
:root[data-theme="dark"] .pillar:hover { background: rgba(191, 166, 107, 0.16); }
.pillar:hover p { color: var(--text); }

/* ---------- 11. CTA ---------- */
.section-cta { position: relative; color: var(--cream); overflow: hidden; isolation: isolate; padding: clamp(6rem, 5rem + 5vw, 10rem) 0; text-align: center; }
.cta-bg, .cta-bg img, .cta-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.cta-bg img { object-fit: cover; object-position: center 30%; }
.cta-overlay { background: linear-gradient(180deg, rgba(30, 45, 64, 0.88), rgba(30, 45, 64, 0.82) 50%, rgba(30, 45, 64, 0.94)); z-index: 1; }
.cta-content { position: relative; z-index: 2; max-width: 780px; display: grid; justify-items: center; }
.cta-logo { height: 110px; width: auto; margin-bottom: 1.8rem; }
.section-cta h2 { color: var(--white); text-wrap: balance; }
.section-cta .subtitle { color: var(--gold-light); font-family: var(--font-display); font-style: italic; }
.section-cta .lead { color: rgba(247, 244, 238, 0.86); }
.section-cta .btn-lg { margin-top: 1.4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(247, 244, 238, 0.8); padding: 3.5rem 0 1.5rem; border-top: 1px solid rgba(247, 244, 238, 0.08); }
.footer-inner { display: grid; gap: 2.2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: 1.4fr 1fr auto; align-items: start; } }
.footer-brand img { height: 40px; width: auto; margin-bottom: 1rem; }
.footer-brand p { max-width: 42ch; font-size: 0.95rem; margin: 0; }
.footer-nav { display: grid; gap: 0.5rem; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--gold-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(247, 244, 238, 0.1); font-size: 0.85rem; color: rgba(247, 244, 238, 0.55); }
.footer-bottom p { margin: 0; }
.to-top { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(247, 244, 238, 0.3); color: var(--cream); display: grid; place-items: center; transition: background-color 0.25s, border-color 0.25s; }
.to-top:hover { background: rgba(191, 166, 107, 0.2); border-color: var(--gold-light); }

/* ---------- Utilitários ---------- */
.is-hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }
