/* ===========================================================
   Coopa — Landing
   Stack: HTML5 + CSS3 vanilla. Mobile-first.
   =========================================================== */

:root {
  /* Brand */
  --primary: #5B7052;
  --primary-hover: #4D6046;
  --primary-active: #40503A;
  --secondary: #B67352;
  --secondary-hover: #A86445;

  /* Neutrals */
  --bg: #E2D1C3;
  --white: #F9F9F4;
  --black: #2D2D2A;
  --surface: #F1E6DC;
  --surface-strong: #EADCCF;
  --border: #CCB7A6;
  --text-muted: #6F675D;

  /* System */
  --shadow: rgba(45, 45, 42, 0.14);
  --shadow-soft: rgba(45, 45, 42, 0.06);
  --error: #B04F3F;

  /* Typography */
  --font-title: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --container: 1200px;
  --container-narrow: 820px;
  --nav-height: 72px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 160ms;
  --t-mid: 220ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--black);
}

h1 { font-size: clamp(2.25rem, 4.6vw + 0.5rem, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.85rem, 2.4vw + 1rem, 2.85rem); }
h3 { font-size: clamp(1.15rem, 0.6vw + 1rem, 1.35rem); font-weight: 600; }

p { color: var(--black); }

::selection { background: rgba(91, 112, 82, 0.22); color: var(--black); }

/* ---------- Helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.container-narrow { max-width: var(--container-narrow); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 1000;
  background: var(--primary); color: var(--white);
  padding: 10px 16px; border-radius: 10px; font-weight: 600;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid rgba(91, 112, 82, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Eyebrow pill ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(91, 112, 82, 0.10);
  color: var(--primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow-sm {
  padding: 4px 10px;
  font-size: 10px;
}
.eyebrow-on-dark {
  background: rgba(249, 249, 244, 0.18);
  color: var(--white);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1.5px solid transparent;
  transition:
    background-color var(--t-mid) var(--ease),
    color var(--t-mid) var(--ease),
    border-color var(--t-mid) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-mid) var(--ease);
  white-space: nowrap;
  text-align: center;
}
.btn-sm { padding: 10px 16px; border-radius: 18px; font-size: 14px; }
.btn-block { width: 100%; }

.btn-primary {
  background-color: var(--primary);
  background-image: linear-gradient(180deg, #6E8564 0%, var(--primary) 52%, var(--primary-active) 100%);
  color: #FFFFFF;
  border-color: rgba(45, 45, 42, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 4px rgba(45, 45, 42, 0.14),
    0 12px 24px -8px rgba(64, 80, 58, 0.55);
  text-shadow: 0 1px 1px rgba(34, 40, 30, 0.30);
  font-weight: 700;
}
.btn-primary:hover {
  background-image: linear-gradient(180deg, #778E6C 0%, var(--primary-hover) 52%, var(--primary-active) 100%);
  border-color: rgba(45, 45, 42, 0.18);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 4px 8px rgba(45, 45, 42, 0.16),
    0 18px 34px -10px rgba(64, 80, 58, 0.6);
}
.btn-primary:active {
  transform: translateY(0);
  background-image: linear-gradient(180deg, var(--primary) 0%, var(--primary-active) 100%);
  box-shadow:
    inset 0 1px 2px rgba(34, 40, 30, 0.35),
    0 2px 6px rgba(45, 45, 42, 0.20);
}

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

.btn-on-dark {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.btn-on-dark:hover { background: var(--surface); border-color: var(--surface); transform: translateY(-1px); }

.btn-ghost-on-dark {
  background: transparent;
  color: var(--white);
  border-color: rgba(249, 249, 244, 0.46);
}
.btn-ghost-on-dark:hover { border-color: var(--white); background: rgba(249, 249, 244, 0.08); }

/* ===========================================================
   NAV
   =========================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--t-mid) var(--ease),
    box-shadow var(--t-mid) var(--ease),
    background-color var(--t-mid) var(--ease);
}
.site-nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 6px 18px var(--shadow-soft);
  background: rgba(249, 249, 244, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(91, 112, 82, 0.10);
  color: var(--primary);
  flex: none;
}
.brand-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 30px;
  color: var(--black);
  letter-spacing: -0.015em;
  line-height: 1;
}
.brand-mark { width: 44px; height: 44px; }
@media (min-width: 920px) {
  .brand-name { font-size: 34px; }
  .brand-mark { width: 48px; height: 48px; }
}

/* Mobile menu toggle */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  gap: 5px;
  border: 1px solid var(--border);
  background: var(--white);
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform var(--t-mid) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: none;
  position: absolute;
  inset: var(--nav-height) 0 auto 0;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 18px 20px 22px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 14px 36px var(--shadow);
}
.nav-links.is-open { display: flex; }
.nav-links a:not(.nav-cta) {
  padding: 12px 8px;
  font-weight: 500;
  color: var(--black);
  border-radius: 10px;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-links a:not(.nav-cta):hover { color: var(--primary); background: rgba(91, 112, 82, 0.08); }
.nav-cta { margin-top: 6px; }
.nav-login { color: var(--text-muted); font-weight: 600; }
.nav-login:hover { color: var(--primary); }

@media (min-width: 920px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .nav-links a:not(.nav-cta) { padding: 8px 14px; font-size: 14.5px; }
  .nav-cta { margin: 0 0 0 8px; padding: 10px 18px; }
}

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 9vw, 110px) 0 clamp(56px, 8vw, 96px);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 560px at 88% -8%, rgba(182, 115, 82, 0.12), transparent 60%),
    radial-gradient(900px 520px at -8% 18%, rgba(91, 112, 82, 0.12), transparent 62%),
    radial-gradient(700px 420px at 60% 110%, rgba(91, 112, 82, 0.06), transparent 70%),
    linear-gradient(180deg, var(--white) 0%, var(--surface) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero-copy h1 {
  margin-top: 18px;
  font-family: var(--font-title);
}
.hero-copy h1 em {
  color: var(--primary);
  font-style: italic;
  font-weight: 600;
}
.lede {
  margin-top: 18px;
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem);
  color: var(--text-muted);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 14px;
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-trust svg { color: var(--primary); }

/* Hero media (video + still) */
.hero-media {
  position: relative;
  display: grid;
  gap: 22px;
}
/* Soft warm halo behind hero video */
.hero-media::before {
  content: "";
  position: absolute;
  inset: 8% 6% auto auto;
  width: 70%;
  height: 60%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(208, 138, 102, 0.40), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-media::before { opacity: 0.6; }
}

/* === Device frame compartido para todos los screenshots === */
.app-shot {
  position: relative;
  border-radius: 14px;
  background: #1F1F1D;
  padding: 28px 10px 10px;
  box-shadow:
    inset 0 1px 0 rgba(249, 249, 244, 0.06),
    0 0 0 1px rgba(45, 45, 42, 0.4),
    0 30px 60px -22px rgba(45, 45, 42, 0.45),
    0 12px 28px rgba(45, 45, 42, 0.18);
  transition: transform var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease);
}
.app-shot::before {
  content: "";
  position: absolute;
  inset: 8px 12px auto 12px;
  height: 12px;
  background:
    radial-gradient(circle at 8px 6px,  #E66E5A 4px, transparent 5px),
    radial-gradient(circle at 26px 6px, #E6B450 4px, transparent 5px),
    radial-gradient(circle at 44px 6px, #6EC07A 4px, transparent 5px);
  z-index: 1;
}
.app-shot::after {
  content: "coopa.app";
  position: absolute;
  top: 6px;
  right: 14px;
  padding: 3px 10px;
  font: 600 10px/1 var(--font-body);
  letter-spacing: 0.06em;
  color: rgba(249, 249, 244, 0.55);
  background: rgba(249, 249, 244, 0.06);
  border-radius: 999px;
  z-index: 1;
}
.app-shot > img,
.app-shot > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
  border: 1px solid rgba(45, 45, 42, 0.85);
  aspect-ratio: 1453 / 775;
}
.app-shot-video {
  border-radius: 16px;
}

@media (hover: hover) {
  .app-shot { will-change: transform; }
  .app-shot:hover {
    transform: translateY(-3px);
    box-shadow:
      inset 0 1px 0 rgba(249, 249, 244, 0.08),
      0 0 0 1px rgba(45, 45, 42, 0.45),
      0 38px 70px -22px rgba(45, 45, 42, 0.55),
      0 16px 36px rgba(45, 45, 42, 0.22);
  }
}

@media (max-width: 600px) {
  .app-shot { padding: 22px 6px 6px; border-radius: 12px; }
  .app-shot::before { inset: 7px 10px auto 10px; height: 10px; }
  .app-shot::after  { font-size: 9px; padding: 2px 8px; }
}

.media-pill {
  position: absolute;
  top: 38px;
  left: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(45, 45, 42, 0.82);
  color: var(--white);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.media-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6EC07A;
  box-shadow: 0 0 0 4px rgba(110, 192, 122, 0.22);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* legacy mock leftover (unused but kept to avoid breaking) */
.hero-mock {
  position: relative;
  display: flex;
  justify-content: center;
}
.mock-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow:
    0 30px 60px -20px var(--shadow),
    0 14px 36px var(--shadow-soft);
  display: grid;
  gap: 18px;
}
.mock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mock-title {
  margin-top: 6px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.35rem;
}
.mock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(91, 112, 82, 0.12);
  color: var(--primary);
}
.mock-pill svg { stroke-width: 3; }

.mock-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: grid;
  gap: 4px;
}
.kpi-strong {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(91, 112, 82, 0.96), rgba(64, 80, 58, 0.96));
  border-color: transparent;
  color: var(--white);
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.kpi-strong .kpi-label { color: rgba(249, 249, 244, 0.84); }
.kpi-value {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}
.kpi-strong .kpi-value { font-size: 1.8rem; }
.kpi-trend {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}
.kpi-trend.up::before { content: "▲ "; }
.kpi-foot {
  font-size: 11px;
  color: rgba(249, 249, 244, 0.78);
}

.mock-list {
  display: grid;
  gap: 10px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}
.mock-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.dot-in { background: var(--primary); box-shadow: 0 0 0 4px rgba(91, 112, 82, 0.16); }
.dot-out { background: var(--secondary); box-shadow: 0 0 0 4px rgba(182, 115, 82, 0.16); }
.mock-row-text { display: flex; flex-direction: column; line-height: 1.3; }
.mock-row-text strong { font-size: 14px; font-weight: 600; }
.mock-row-text small { font-size: 12px; color: var(--text-muted); }
.mock-amount {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14.5px;
}
.mock-amount.in { color: var(--primary); }
.mock-amount.out { color: var(--secondary); }

.mock-floating {
  position: absolute;
  left: -22px;
  bottom: -28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 18px 40px var(--shadow);
  max-width: 220px;
  display: none;
}
.mock-mini {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-mini strong { font-size: 14px; }
.mock-mini small { color: var(--text-muted); font-size: 12px; }

@media (min-width: 720px) {
  .mock-floating { display: block; }
}

/* ===========================================================
   BANDS (problem / secure)
   =========================================================== */
.band {
  background: var(--surface);
  padding: clamp(60px, 8vw, 100px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.band-title {
  margin-top: 12px;
  max-width: 18ch;
}
.problem-grid {
  display: grid;
  gap: 18px;
  margin: 36px 0 28px;
}
@media (min-width: 760px) {
  .problem-grid { grid-template-columns: repeat(3, 1fr); }
}
.problem-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 14px 36px var(--shadow-soft);
  display: grid;
  gap: 10px;
  align-content: start;
}
.problem-icon {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(91, 112, 82, 0.1);
  color: var(--primary);
}
.problem-card h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; }
.problem-card p { color: var(--text-muted); font-size: 14.5px; }
.band-closer {
  margin-top: 20px;
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 1.6vw + 1rem, 2rem);
  font-weight: 600;
  color: var(--black);
  max-width: 22ch;
}
.band-closer em {
  color: var(--primary);
  font-style: normal;
}

.band-secure { background: var(--surface-strong); }
.secure-grid {
  display: grid;
  gap: 22px;
}
@media (min-width: 820px) {
  .secure-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
}
.secure-grid li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.secure-grid strong {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--black);
  display: block;
}
.secure-grid p { color: var(--text-muted); margin-top: 4px; font-size: 14.5px; }
.check {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  flex: none;
}

/* ===========================================================
   SECTIONS
   =========================================================== */
.section {
  padding: clamp(64px, 9vw, 120px) 0;
}
.section-soft { background: var(--surface); }

.section-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 60px);
  display: grid;
  justify-items: center;
  gap: 14px;
}
.section-head .eyebrow + h2 { margin-top: 0; }
.section-sub {
  color: var(--text-muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

/* ---------- Steps: línea de tiempo conectada ---------- */
.steps {
  display: grid;
  gap: 30px;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 18px;
  row-gap: 6px;
  align-items: start;
}
.step-node {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(91, 112, 82, 0.28);
}
.step h3 {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
}
.step p {
  grid-column: 2;
  grid-row: 2;
  color: var(--text-muted);
}
/* Conector vertical (mobile) */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 23px;
  top: 48px;
  bottom: -30px;
  width: 2px;
  background: var(--border);
}

@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); column-gap: 24px; }
  .step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    row-gap: 14px;
  }
  .step h3 { grid-column: 1; grid-row: 2; align-self: auto; max-width: 26ch; }
  .step p { grid-column: 1; grid-row: 3; max-width: 32ch; }
  /* Conector horizontal entre nodos */
  .step:not(:last-child)::before {
    left: 50%;
    right: -50%;
    top: 24px;
    bottom: auto;
    width: auto;
    height: 2px;
  }
}

/* ---------- Modules ---------- */
.modules-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 700px) { .modules-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .modules-grid { grid-template-columns: repeat(3, 1fr); } }

.module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: grid;
  gap: 12px;
  align-content: start;
  box-shadow: 0 14px 36px var(--shadow-soft);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}
.module-card:hover {
  transform: translateY(-3px);
  border-color: rgba(91, 112, 82, 0.4);
  box-shadow: 0 22px 48px var(--shadow);
}
.module-icon {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(91, 112, 82, 0.10);
  color: var(--primary);
}
.module-card h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
}
.module-card p { color: var(--text-muted); font-size: 14.8px; }
.module-link {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  transition: gap var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.module-link:hover { gap: 10px; color: var(--primary-hover); }

/* ===========================================================
   ROLES (TABS)
   =========================================================== */
.roles {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 14px 36px var(--shadow-soft);
}
.roles-tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}
.roles-tabs::-webkit-scrollbar { display: none; }
.role-tab {
  flex: 1;
  min-width: 130px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.role-tab:hover { color: var(--primary); }
.role-tab[aria-selected="true"] {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow-soft);
}

.role-panels { padding: clamp(28px, 4vw, 44px); }
.role-panel {
  display: none;
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}
.role-panel.is-active { display: grid; }
@media (min-width: 880px) {
  .role-panel.is-active { grid-template-columns: 0.9fr 1.1fr; }
}
.role-copy h3 {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 1vw + 1.1rem, 1.85rem);
  font-weight: 700;
  margin-bottom: 14px;
}
.role-pain, .role-fix { color: var(--text-muted); margin-bottom: 12px; }
.role-pain strong { color: var(--secondary); font-weight: 600; }
.role-fix strong { color: var(--primary); font-weight: 600; }
.role-bullets { margin-top: 14px; display: grid; gap: 8px; }
.role-bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--black);
  font-size: 14.8px;
}
.role-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Role screenshot mocks */
.role-shot { display: flex; justify-content: center; }
.shot {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 16px 40px var(--shadow-soft);
  display: grid;
  gap: 12px;
}
.shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.shot-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.shot-tag.ok { color: var(--primary); border-color: rgba(91, 112, 82, 0.3); background: rgba(91, 112, 82, 0.08); }
.shot-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  background: var(--white);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
}
.shot-row .ok { color: var(--primary); font-weight: 700; }
.shot-row .amt { font-family: var(--font-title); font-weight: 700; font-size: 14.5px; }
.shot-row .amt.in { color: var(--primary); }
.shot-row .amt.out { color: var(--secondary); }
.shot-row.mono span:first-child { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; }
.shot-row.foot {
  background: transparent;
  border: 0;
  padding: 4px 4px 0;
  color: var(--text-muted);
  font-size: 12px;
  grid-template-columns: 1fr;
}
.shot-row.total { font-weight: 700; background: rgba(91, 112, 82, 0.08); border-color: rgba(91, 112, 82, 0.3); }

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 44px;
  gap: 12px;
  align-items: center;
  font-size: 13.5px;
}
.bar {
  height: 8px;
  background: var(--white);
  border-radius: 999px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: block;
}
.bar i {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
}
.bar-row .pct { font-family: var(--font-title); font-weight: 700; text-align: right; }

/* ===========================================================
   QUOTE / LOGOS
   =========================================================== */
.quote {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 14px 36px var(--shadow-soft);
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 880px;
  margin-inline: auto;
}
.quote-mark {
  color: rgba(91, 112, 82, 0.18);
  position: absolute;
  top: 18px; left: 18px;
}
.quote blockquote p {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 0.8vw + 1rem, 1.5rem);
  line-height: 1.45;
  color: var(--black);
  padding-top: 28px;
}
.quote figcaption { display: grid; }
.quote figcaption strong { font-family: var(--font-body); font-weight: 600; color: var(--black); }
.quote figcaption span { color: var(--text-muted); font-size: 14px; }

.logos-label {
  text-align: center;
  margin: 50px auto 18px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logos-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) { .logos-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .logos-grid { grid-template-columns: repeat(6, 1fr); } }
.logos-grid li {
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  min-height: 78px;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.logos-grid li:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Prueba social (banda de cliente real) ---------- */
.proof {
  padding: clamp(34px, 5vw, 54px) 0;
  background: #E8EDE3;
  border-block: 1px solid var(--border);
}
.proof-inner {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.proof-label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.proof-client {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.proof-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px var(--shadow-soft);
  flex: none;
}
.proof-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.4vw + 1rem, 2rem);
  color: var(--black);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.proof-note {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 54ch;
}

/* ===========================================================
   PRICING
   =========================================================== */
.pricing {
  display: grid;
  gap: 18px;
}
@media (min-width: 880px) {
  .pricing { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}
.price-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: grid;
  gap: 14px;
  align-content: start;
  box-shadow: 0 14px 36px var(--shadow-soft);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.price-card:hover { transform: translateY(-3px); box-shadow: 0 22px 48px var(--shadow); }
.price-feature {
  border: 2px solid var(--primary);
  box-shadow: 0 22px 48px rgba(91, 112, 82, 0.18);
}
.price-eyebrow {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.price-card h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.6rem;
}
.price-tag {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--black);
}
.price-currency { font-size: 1.4rem; color: var(--primary); }
.price-num { font-size: 3rem; line-height: 1; letter-spacing: -0.02em; }
.price-num-alt { font-size: 1.8rem; color: var(--primary); font-weight: 700; }
.price-per { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--text-muted); }
.price-tag-soft { padding-block: 10px; }
.price-blurb { color: var(--text-muted); font-size: 14.5px; }
.price-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
  border-top: 1px dashed var(--border);
  padding-top: 18px;
}
.price-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14.5px;
}
.price-list li::before {
  content: "";
  width: 16px; height: 16px;
  margin-top: 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--primary) 30%, transparent 31%),
    rgba(91, 112, 82, 0.12);
  background-size: 8px 8px, cover;
  background-repeat: no-repeat;
  background-position: center;
}
.price-card .btn { margin-top: 6px; }

/* ===========================================================
   FAQ
   =========================================================== */
.faq {
  display: grid;
  gap: 12px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.faq-item:hover { border-color: rgba(91, 112, 82, 0.4); }
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  text-align: left;
  padding: 20px 22px;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--black);
  transition: color var(--t-fast) var(--ease);
}
.faq-q:hover { color: var(--primary); }
.faq-icon {
  flex: none;
  position: relative;
  width: 18px; height: 18px;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--t-mid) var(--ease);
}
.faq-icon::before { top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: translateX(-50%) rotate(90deg); }

.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-mid) var(--ease);
}
.faq-q[aria-expanded="true"] + .faq-a { grid-template-rows: 1fr; }
.faq-a > .faq-a-inner {
  overflow: hidden;
  min-height: 0;
}
.faq-a-inner > p {
  padding: 0 22px 22px;
  color: var(--text-muted);
  max-width: 70ch;
}
.faq-a-inner em { color: var(--primary); font-style: normal; font-weight: 600; }

/* ===========================================================
   CTA FINAL
   =========================================================== */
.cta-final {
  background:
    linear-gradient(135deg, rgba(45, 45, 42, 0.88), rgba(91, 112, 82, 0.78) 52%, rgba(182, 115, 82, 0.66)),
    radial-gradient(800px 400px at 0% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
    var(--primary);
  color: var(--white);
  padding: clamp(64px, 9vw, 110px) 0;
  position: relative;
  overflow: hidden;
}
.cta-final::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 100%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 100%, black 30%, transparent 75%);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 720px;
  margin-inline: auto;
}
.cta-inner h2 {
  color: var(--white);
  font-size: clamp(2rem, 2.6vw + 1rem, 3rem);
}
.cta-inner p { color: rgba(249, 249, 244, 0.9); max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer {
  background: var(--black);
  color: rgba(249, 249, 244, 0.74);
  padding: clamp(48px, 6vw, 72px) 0 28px;
}
.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; } }

.brand-on-dark { color: var(--white); }
.brand-on-dark .brand-mark { background: rgba(249, 249, 244, 0.10); color: var(--white); }
.brand-on-dark .brand-name { color: var(--white); }
.brand-on-dark .brand-tag { color: rgba(249, 249, 244, 0.66); }

.footer-blurb {
  margin-top: 16px;
  font-size: 14.5px;
  color: rgba(249, 249, 244, 0.74);
  max-width: 32ch;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: rgba(249, 249, 244, 0.80);
  border: 1px solid rgba(249, 249, 244, 0.20);
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
.footer-social a:hover {
  color: #FFFFFF;
  border-color: rgba(249, 249, 244, 0.55);
  background: rgba(249, 249, 244, 0.08);
  transform: translateY(-2px);
}
.footer-col h3 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a {
  font-size: 14px;
  color: rgba(249, 249, 244, 0.74);
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--white); }

.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(249, 249, 244, 0.12);
  font-size: 12.5px;
  color: rgba(249, 249, 244, 0.6);
}

/* ===========================================================
   MODULES CAROUSEL
   =========================================================== */
.carousel {
  display: grid;
  gap: 24px;
}
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.carousel-track {
  display: flex;
  transition: transform 600ms var(--ease);
  will-change: transform;
}
.carousel-slide {
  flex: 0 0 100%;
  padding: 0 6px;
}
.slide-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  gap: 0;
  box-shadow: 0 22px 50px var(--shadow-soft);
  margin: 0;
}
.slide-media {
  display: block;
  margin: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 32px) 0;
}
.slide-card figcaption {
  padding: clamp(22px, 3vw, 36px) clamp(22px, 3vw, 40px);
  display: grid;
  gap: 12px;
  align-content: center;
  text-align: left;
  max-width: 900px;
  margin: 0 auto;
}
.slide-card figcaption h3 {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 1vw + 1.05rem, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.slide-card figcaption p { color: var(--text-muted); font-size: 1.02rem; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.carousel-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--black);
  display: grid;
  place-items: center;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  box-shadow: 0 8px 22px var(--shadow-soft);
}
.carousel-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.carousel-dots { display: flex; gap: 8px; }
.carousel-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(45, 45, 42, 0.18);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.carousel-dot:hover { background: rgba(91, 112, 82, 0.5); }
.carousel-dot[aria-selected="true"] {
  background: var(--primary);
  transform: scale(1.25);
}

/* ===========================================================
   ROLE SHOTS — usan imágenes reales ahora
   =========================================================== */
.role-shot {
  width: 100%;
  display: flex;
  justify-content: center;
}
.role-shot .app-shot {
  width: 100%;
  max-width: none;
}

/* Ken-burns en slide activo del carrusel */
@keyframes app-shot-kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.04); }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .carousel-slide[aria-current="true"] .app-shot > img {
    animation: app-shot-kenburns 14s ease-in-out infinite alternate;
    transform-origin: center;
  }
}

/* ===========================================================
   CONTACTO
   =========================================================== */
.contact {
  background:
    linear-gradient(105deg, rgba(24, 29, 19, 0.94) 0%, rgba(30, 37, 25, 0.88) 45%, rgba(45, 58, 36, 0.62) 100%),
    url("src/assets/images/escuela-ezeyza.jpg") center 30% / cover no-repeat;
  color: var(--white);
  padding: clamp(64px, 9vw, 110px) 0;
  position: relative;
  overflow: hidden;
}
.contact-grid {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
@media (min-width: 920px) {
  .contact-grid { grid-template-columns: 1fr 1.05fr; }
}
.contact-copy h2 {
  color: var(--white);
  font-size: clamp(2rem, 2.6vw + 1rem, 3rem);
  margin-top: 14px;
}
.contact-copy p {
  color: rgba(249, 249, 244, 0.9);
  margin-top: 14px;
  max-width: 48ch;
  font-size: 1.05rem;
}
.contact-meta {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.contact-meta li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(249, 249, 244, 0.86);
  font-size: 14.5px;
}
.contact-meta a {
  color: inherit;
  border-bottom: 1px solid rgba(249, 249, 244, 0.4);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.contact-meta a:hover { color: var(--white); border-color: var(--white); }

.contact-form {
  background: var(--white);
  color: var(--black);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.4vw, 36px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 14px;
}
.field { display: grid; gap: 6px; }
.field-row {
  display: grid;
  gap: 14px;
}
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}
.field .opt {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(45, 45, 42, 0.45); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(91, 112, 82, 0.18);
}
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: var(--error);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.form-feedback {
  margin: 4px 2px 0;
  min-height: 18px;
  font-size: 13.5px;
  color: var(--primary);
  font-weight: 600;
}
.form-feedback.is-error { color: var(--error); }
.form-fineprint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

/* ===========================================================
   REVEAL ON SCROLL
   =========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

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

/* ===========================================================
   LEGAL PAGES (terminos, privacidad, cookies)
   =========================================================== */
.legal-page {
  padding-top: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(64px, 8vw, 96px);
  background: linear-gradient(180deg, var(--white) 0%, var(--surface) 100%);
  min-height: calc(100vh - var(--nav-height));
}
.legal-page .container { max-width: var(--container-narrow); }
.legal-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 24px; font-size: 14px; color: var(--text-muted);
  transition: color var(--t-fast) var(--ease);
}
.legal-back:hover { color: var(--primary); }

.legal-header {
  margin-bottom: clamp(32px, 4vw, 56px);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.legal-header h1 { margin-top: 16px; font-size: clamp(2rem, 3vw + 1rem, 3rem); }
.legal-meta {
  margin-top: 14px; display: flex; gap: 18px; flex-wrap: wrap;
  color: var(--text-muted); font-size: 14px;
}
.legal-meta strong { color: var(--black); font-weight: 600; }

.legal-toc {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  margin-bottom: clamp(36px, 4vw, 56px);
  box-shadow: 0 6px 18px var(--shadow-soft);
}
.legal-toc h2 {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 12px 0;
}
.legal-toc ol { display: grid; gap: 8px; padding-left: 18px; list-style: decimal; }
.legal-toc a { color: var(--black); }
.legal-toc a:hover { color: var(--primary); text-decoration: underline; }

.legal-content { font-family: var(--font-body); line-height: 1.75; color: var(--black); }
.legal-content > section + section { margin-top: clamp(28px, 3vw, 40px); }
.legal-content h2 {
  margin-top: clamp(36px, 4vw, 56px); margin-bottom: 14px;
  font-size: clamp(1.4rem, 1.4vw + 1rem, 1.75rem);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}
.legal-content section:first-child h2 { margin-top: 0; }
.legal-content h3 { margin-top: 24px; margin-bottom: 10px; font-size: 1.1rem; font-weight: 600; font-family: var(--font-body); }
.legal-content p { margin-bottom: 16px; }
.legal-content ul, .legal-content ol { margin: 0 0 18px 0; padding-left: 24px; list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 8px; }
.legal-content a {
  color: var(--primary); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.legal-content a:hover { color: var(--primary-hover); }
.legal-content strong { font-weight: 600; }
.legal-content em { font-style: italic; }
.legal-content hr {
  border: 0; height: 1px; background: var(--border);
  margin: clamp(28px, 3vw, 40px) 0;
}
.legal-content .legal-note {
  background: var(--surface); border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px; margin: 18px 0;
  font-size: 14.5px;
}
.legal-content .legal-callout {
  background: rgba(91, 112, 82, 0.08);
  border: 1px solid rgba(91, 112, 82, 0.22);
  border-radius: var(--radius-sm);
  padding: 16px 18px; margin: 18px 0;
  font-size: 14px; line-height: 1.6;
  text-transform: none;
}
.legal-placeholder {
  background: rgba(182, 115, 82, 0.10); color: var(--secondary);
  padding: 2px 6px; border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.92em;
  font-weight: 600;
}

/* Cookie preferences form */
.prefs-form { display: grid; gap: 18px; margin-top: 24px; }
.prefs-form fieldset {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 20px; margin: 0;
}
.prefs-row {
  display: grid; grid-template-columns: 24px 1fr;
  gap: 4px 12px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.prefs-row:last-child { border-bottom: 0; }
.prefs-row input[type="checkbox"] { grid-row: span 2; margin-top: 4px; width: 18px; height: 18px; cursor: pointer; }
.prefs-row input[type="checkbox"]:disabled { cursor: not-allowed; opacity: 0.7; }
.prefs-name { font-weight: 600; }
.prefs-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.prefs-feedback { font-size: 14px; color: var(--text-muted); min-height: 1.4em; margin-top: 4px; }
.prefs-feedback.is-success { color: var(--primary); font-weight: 600; }

/* ===========================================================
   COOKIE CONSENT BANNER
   =========================================================== */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 200;
  max-width: 640px; margin-inline: auto;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 22px;
  box-shadow: 0 22px 50px var(--shadow), 0 8px 22px var(--shadow-soft);
  display: none; opacity: 0; transform: translateY(10px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.cookie-banner.is-visible { display: block; opacity: 1; transform: translateY(0); }
.cookie-banner p { margin: 0 0 14px 0; font-size: 14px; line-height: 1.55; color: var(--black); }
.cookie-banner p a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner p a:hover { color: var(--primary-hover); }
.cookie-banner-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
  align-items: center;
}
.cookie-banner .btn { padding: 10px 18px; font-size: 14px; border-radius: 999px; }
.cookie-banner .btn-link {
  background: transparent; border: 0; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 3px;
  padding: 10px 12px; font-size: 14px; cursor: pointer;
  font-weight: 500;
}
.cookie-banner .btn-link:hover { color: var(--black); }

@media (min-width: 640px) {
  .cookie-banner { padding: 22px 26px; }
}

/* ===========================================================
   PLANS SECTION
   Reutiliza .pricing / .price-card / .price-feature / .price-eyebrow
   / .price-tag / .price-num / .price-per / .price-list (más arriba).
   Descuento anual actual: 10% (ver data-anual en index.html).
   =========================================================== */

/* ---------- Billing toggle (mensual / anual) ---------- */
.billing-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin: 0 auto clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.section-head + .billing-toggle {
  display: flex;
  width: fit-content;
}
.billing-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.billing-opt:hover { color: var(--primary); }
.billing-opt.is-active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 4px 12px var(--shadow-soft);
}
.billing-save {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(182, 115, 82, 0.16);
  color: var(--secondary);
}
.billing-opt.is-active .billing-save { background: rgba(182, 115, 82, 0.2); }

/* ---------- Precio: sub-línea anual + "todo lo del plan anterior" ---------- */
.price-annual-note {
  margin-top: -6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
}
.price-more {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--black);
}

/* ---------- Add-on Contable+ ---------- */
.plans-addon {
  margin-top: clamp(28px, 4vw, 40px);
  background: rgba(91, 112, 82, 0.07);
  border: 1px solid rgba(91, 112, 82, 0.22);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
  display: grid;
  gap: 18px 32px;
  align-items: center;
}
@media (min-width: 820px) {
  .plans-addon { grid-template-columns: 1fr auto; }
}
.plans-addon-copy { display: grid; gap: 8px; align-content: center; }
.plans-addon h3 { font-family: var(--font-title); font-weight: 700; font-size: 1.35rem; }
.plans-addon p { color: var(--text-muted); font-size: 14.8px; max-width: 68ch; }
.plans-addon p strong { color: var(--primary); font-weight: 700; }
.plans-addon .btn { white-space: nowrap; justify-self: start; }

/* ---------- Matriz comparativa ---------- */
.plans-matrix { margin-top: clamp(40px, 6vw, 64px); }
.plans-matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 14px 36px var(--shadow-soft);
}
.plans-matrix table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.plans-matrix caption { caption-side: top; }
.plans-matrix thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--black);
  text-align: center;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
}
.plans-matrix thead th:first-child { text-align: left; }
.plans-matrix tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--black);
  padding: 14px 16px;
}
.plans-matrix tbody td {
  text-align: center;
  padding: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.plans-matrix tbody tr + tr th,
.plans-matrix tbody tr + tr td { border-top: 1px solid var(--border); }
.plans-matrix th.is-feature,
.plans-matrix td.is-feature {
  background: rgba(91, 112, 82, 0.07);
}
.plans-matrix thead th.is-feature { color: var(--primary); }

.cell-yes {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.cell-no {
  color: var(--text-muted);
  font-weight: 500;
}
td .cell-no[aria-label="Con Contable+"] {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--secondary);
}
.matrix-row-plain td,
.matrix-row-price td { color: var(--black); font-family: var(--font-title); font-weight: 700; }
.matrix-row-price td { font-size: 1.05rem; }
.matrix-row-price th { color: var(--text-muted); font-weight: 600; }

/* ---------- Estado ANUAL (activado por JS con data-billing="anual") ---------- */
#planes[data-billing="anual"] .price-per { color: var(--text-muted); }

/* ===========================================================
   WHATSAPP FLOTANTE (FAB)
   =========================================================== */
.wa-float {
  position: fixed;
  right: clamp(16px, 3vw, 26px);
  bottom: clamp(16px, 3vw, 26px);
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 18px 0 16px;
  border-radius: 999px;
  background: #25D366;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.42), 0 6px 14px var(--shadow-soft);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), background var(--t-fast) var(--ease);
}
.wa-float:hover {
  background: #1FB856;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(37, 211, 102, 0.5), 0 8px 18px var(--shadow-soft);
}
.wa-float:active { transform: translateY(0); }
.wa-float svg { width: 30px; height: 30px; flex: none; }
.wa-float-label { line-height: 1; }

/* Halo animado sutil */
.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  animation: wa-pulse 2.4s var(--ease) infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* En pantallas chicas: solo el ícono, sin texto */
@media (max-width: 560px) {
  .wa-float {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .wa-float-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; }
}
