/*
 * Envío Propio — public pitch site (enviopropio.com / :4310/site/enviopropio).
 * Vanilla CSS, no framework, no build. Enterprise B2B identity: confident navy hero +
 * gold accent, clean off-white body. Mobile-first (works at 375px).
 */

:root {
  /* brand palette — brand/color-psychology/palettes.registry.json → "envio-propio" */
  --ep-navy: #14213D;         /* primary — trust, authority, logistics */
  --ep-navy-dark: #0c1830;    /* hover/active on navy */
  --ep-gold: #E0A02C;         /* accent — value, ownership, premium */
  --ep-gold-dark: #C0871F;    /* hover/active on gold */
  --ep-slate: #425065;        /* structure — neutral/steel */
  --ep-teal: #2F8F7A;         /* secondary — modern, movement, "savings" */
  --ep-surface: #F4F6F8;      /* light/cool body surface */
  --ep-white: #FFFFFF;

  --ep-good: #2F8F7A;
  --ep-neutral: #425065;

  /* mapped for the shared i18n.js toggle (injectStyles uses var(--panel-2,var(--panel)) etc.) */
  --panel: var(--ep-white);
  --panel-2: var(--ep-surface);
  --border: rgba(20, 33, 61, 0.14);
  --text: var(--ep-navy);
  --muted: rgba(20, 33, 61, 0.60);
  --accent: var(--ep-gold);

  --ep-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Roboto, Arial, sans-serif;

  --ep-radius: 14px;
  --ep-radius-sm: 9px;
  --ep-container: 1160px;
  --ep-shadow: 0 12px 32px rgba(20, 33, 61, 0.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ep-surface);
  color: var(--ep-navy);
  font-family: var(--ep-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

.ep-container {
  width: 100%;
  max-width: var(--ep-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------- nav */
.ep-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 248, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.ep-nav-inner {
  max-width: var(--ep-container);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ep-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ep-navy);
}

.ep-wordmark-mark {
  flex: none;
  width: 28px;
  height: 28px;
}

.ep-wordmark-gold { color: var(--ep-gold-dark); }

.ep-nav-links {
  display: none;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}

.ep-nav-links a {
  text-decoration: none;
  color: var(--ep-navy);
  opacity: 0.72;
}
.ep-nav-links a:hover { opacity: 1; color: var(--ep-gold-dark); }

.ep-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (min-width: 900px) {
  .ep-nav-links { display: flex; }
}

/* narrow phones (≤480px): wordmark + toggle + "Agenda demo" pill don't all fit on one
   sticky row — drop the nav CTA (the hero button one scroll away covers it) rather than
   let the row overflow horizontally. */
@media (max-width: 480px) {
  .ep-nav-actions .ep-btn--primary { display: none; }
}

/* ---------------------------------------------------------------- buttons */
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-family: inherit;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}
.ep-btn--sm { padding: 8px 16px; font-size: 13px; }
.ep-btn--lg { padding: 14px 26px; font-size: 15.5px; }

.ep-btn--primary {
  background: var(--ep-gold);
  color: var(--ep-navy);
  box-shadow: 0 6px 18px rgba(224, 160, 44, 0.32);
}
.ep-btn--primary:hover { background: var(--ep-gold-dark); transform: translateY(-1px); }

.ep-btn--ghost {
  background: transparent;
  color: var(--ep-navy);
  border-color: var(--border);
}
.ep-btn--ghost:hover { border-color: var(--ep-gold); color: var(--ep-gold-dark); }

.ep-btn--ghost-on-dark {
  background: transparent;
  color: var(--ep-white);
  border-color: rgba(244, 246, 248, 0.35);
}
.ep-btn--ghost-on-dark:hover { border-color: var(--ep-gold); color: var(--ep-gold); }

/* ---------------------------------------------------------------- hero */
.ep-hero {
  padding: 56px 0 48px;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(224, 160, 44, 0.16), transparent 60%),
    radial-gradient(900px 360px at 0% 100%, rgba(47, 143, 122, 0.14), transparent 60%),
    var(--ep-navy);
  color: var(--ep-surface);
}

.ep-hero-grid {
  display: grid;
  gap: 40px;
}

.ep-eyebrow {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ep-teal);
  margin: 0 0 12px;
}
.ep-eyebrow--on-dark { color: #f0c470; }

.ep-hero-title {
  font-weight: 800;
  font-size: clamp(36px, 8vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--ep-white);
}

.ep-hero-tagline {
  font-weight: 700;
  font-size: clamp(17px, 3vw, 21px);
  color: var(--ep-gold);
  margin: 0 0 18px;
}

.ep-hero-sub {
  font-size: clamp(16px, 3vw, 19px);
  color: rgba(244, 246, 248, 0.80);
  max-width: 48ch;
  margin: 0 0 28px;
}

.ep-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ep-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 480px) {
  .ep-hero-stats { grid-template-columns: 1fr; }
}

.ep-stat {
  background: rgba(244, 246, 248, 0.07);
  border: 1px solid rgba(244, 246, 248, 0.16);
  border-radius: var(--ep-radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ep-stat-num {
  font-size: 27px;
  font-weight: 800;
  color: var(--ep-gold);
}

.ep-stat-label {
  font-size: 12.5px;
  color: rgba(244, 246, 248, 0.75);
  line-height: 1.35;
}

@media (min-width: 860px) {
  .ep-hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .ep-hero-stats { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- sections */
.ep-section { padding: 64px 0; }
.ep-section--tint { background: var(--ep-white); }
.ep-section--dark { background: var(--ep-navy); color: var(--ep-surface); }

.ep-h2 {
  font-weight: 800;
  font-size: clamp(26px, 4.4vw, 38px);
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
}
.ep-h2--on-dark { color: var(--ep-white); }

.ep-lead {
  font-size: 16.5px;
  color: rgba(20, 33, 61, 0.76);
  max-width: 70ch;
  margin: 0 0 32px;
}
.ep-lead--on-dark { color: rgba(244, 246, 248, 0.78); }

.ep-sources {
  margin: 24px 0 0;
  font-size: 12.5px;
  color: rgba(20, 33, 61, 0.55);
}

/* ---------------------------------------------------------------- fact / pillar cards */
.ep-cardgrid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .ep-cardgrid--3 { grid-template-columns: repeat(3, 1fr); }
}

.ep-fact-card {
  background: var(--ep-surface);
  border: 1px solid var(--border);
  border-radius: var(--ep-radius);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ep-fact-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--ep-navy);
}

.ep-fact-label {
  font-size: 14px;
  color: rgba(20, 33, 61, 0.70);
  line-height: 1.4;
}

.ep-pillar-card {
  background: var(--ep-surface);
  border: 1px solid var(--border);
  border-radius: var(--ep-radius);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ep-pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ep-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.ep-pillar-icon svg { width: 22px; height: 22px; }

.ep-pillar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ep-navy);
}

.ep-pillar-body {
  margin: 0;
  font-size: 14px;
  color: rgba(20, 33, 61, 0.72);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- who it's for */
.ep-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ep-tag {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ep-white);
  border: 1.5px solid var(--border);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ep-navy);
}

/* ---------------------------------------------------------------- footer CTA + footer */
.ep-footer {
  background: var(--ep-navy);
  color: var(--ep-surface);
  padding: 60px 0 40px;
  text-align: center;
}

.ep-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.ep-footer-title {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 800;
  margin: 0;
  max-width: 22ch;
  color: var(--ep-white);
}

.ep-footer-body {
  margin: 0;
  max-width: 52ch;
  font-size: 15px;
  color: rgba(244, 246, 248, 0.72);
}

.ep-footer-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ep-footer-family {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(244, 246, 248, 0.55);
}

.ep-footer-legal {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(244, 246, 248, 0.40);
}

/* =================================================================
   scenarios.html — wholesale calculator
   ================================================================= */

.ep-calc {
  display: grid;
  gap: 22px;
  background: var(--ep-white);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--ep-shadow);
}

@media (min-width: 820px) {
  .ep-calc { grid-template-columns: 1fr 1fr; padding: 28px; gap: 32px; }
}

.ep-calc-form {
  display: grid;
  gap: 16px;
  align-content: start;
}

.ep-calc-volume-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--ep-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  align-self: start;
}

.ep-calc-volume-toggle button {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(20, 33, 61, 0.62);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.ep-calc-volume-toggle button.is-active { background: var(--ep-navy); color: var(--ep-white); }

.ep-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(20, 33, 61, 0.82);
}

.ep-field input {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: var(--ep-radius-sm);
  border: 1.5px solid var(--border);
  background: var(--ep-surface);
  color: var(--ep-navy);
}

.ep-field input:focus {
  outline: none;
  border-color: var(--ep-gold);
  box-shadow: 0 0 0 3px rgba(224, 160, 44, 0.18);
}

.ep-calc-advanced {
  border: 1px dashed var(--border);
  border-radius: var(--ep-radius-sm);
  padding: 4px 14px;
}
.ep-calc-advanced summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--ep-slate);
  padding: 10px 0;
}
.ep-calc-advanced-grid {
  display: grid;
  gap: 14px;
  padding: 4px 0 14px;
}
@media (min-width: 480px) {
  .ep-calc-advanced-grid { grid-template-columns: 1fr 1fr; }
}

.ep-calc-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-content: start;
}

.ep-calc-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ep-calc-compare-col {
  background: var(--ep-surface);
  border-radius: var(--ep-radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ep-calc-compare-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(20, 33, 61, 0.55);
}

.ep-calc-compare-value {
  font-size: 19px;
  font-weight: 800;
  color: var(--ep-navy);
}

.ep-verdict {
  border-radius: var(--ep-radius);
  padding: 20px;
  transition: background-color .15s ease;
}

.ep-verdict[data-state="win"] {
  background: rgba(47, 143, 122, 0.14);
  border: 1.5px solid rgba(47, 143, 122, 0.4);
}
.ep-verdict[data-state="lose"] {
  background: rgba(20, 33, 61, 0.05);
  border: 1.5px solid var(--border);
}
.ep-verdict[data-state="loading"] {
  background: rgba(20, 33, 61, 0.04);
  border: 1.5px dashed var(--border);
}

.ep-verdict-title {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.15;
}
.ep-verdict[data-state="win"] .ep-verdict-title { color: var(--ep-good); }
.ep-verdict[data-state="lose"] .ep-verdict-title { color: var(--ep-navy); }

.ep-verdict-body {
  margin: 0;
  font-size: 14.5px;
  color: rgba(20, 33, 61, 0.75);
}

.ep-calc-extra {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(20, 33, 61, 0.68);
}
.ep-calc-extra div { display: flex; justify-content: space-between; gap: 10px; }
.ep-calc-extra dt { margin: 0; color: rgba(20, 33, 61, 0.55); }
.ep-calc-extra dd { margin: 0; font-weight: 700; }

.ep-calc-honesty {
  margin: 0;
  font-size: 12.5px;
  color: rgba(20, 33, 61, 0.60);
  line-height: 1.5;
}
.ep-calc-honesty a { color: var(--ep-gold-dark); font-weight: 700; text-decoration: none; }
.ep-calc-honesty a:hover { text-decoration: underline; }

/* =================================================================
   scenarios.html — tier cards (expandable)
   ================================================================= */

.ep-scn-card {
  background: var(--ep-white);
  border: 1.5px solid var(--border);
  border-radius: var(--ep-radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ep-scn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ep-scn-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.ep-scn-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 143, 122, 0.16);
  color: var(--ep-good);
  flex: none;
}

.ep-scn-volume {
  margin: 0;
  font-size: 13px;
  color: rgba(20, 33, 61, 0.6);
}

.ep-scn-rows {
  margin: 4px 0 0;
  display: grid;
  gap: 6px;
}
.ep-scn-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}
.ep-scn-row dt { margin: 0; color: rgba(20, 33, 61, 0.6); }
.ep-scn-row dd { margin: 0; font-weight: 700; }

.ep-scn-result {
  margin: 2px 0 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--ep-good);
}
.ep-scn-result-extra {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(20, 33, 61, 0.5);
  margin-top: 2px;
}

.ep-scn-invest {
  margin: 0;
  font-size: 13px;
  color: rgba(20, 33, 61, 0.7);
}

.ep-scn-expand-btn {
  appearance: none;
  align-self: flex-start;
  margin-top: 4px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ep-navy);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ep-scn-expand-btn:hover { border-color: var(--ep-gold); color: var(--ep-gold-dark); }
.ep-scn-expand-btn .ep-chevron { transition: transform .15s ease; }
.ep-scn-card.is-open .ep-scn-expand-btn .ep-chevron { transform: rotate(180deg); }

.ep-scn-breakdown {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}
.ep-scn-card.is-open .ep-scn-breakdown { max-height: 900px; }

.ep-scn-breakdown-inner {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  display: grid;
  gap: 18px;
}

.ep-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.ep-scn-table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  font-size: 13.5px;
}
.ep-scn-table th, .ep-scn-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.ep-scn-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; color: rgba(20, 33, 61, 0.55); font-weight: 700; }
.ep-scn-table td.num { text-align: right; font-weight: 700; }

.ep-scn-costgrid {
  display: grid;
  gap: 12px;
}
@media (min-width: 560px) {
  .ep-scn-costgrid { grid-template-columns: 1fr 1fr; }
}
.ep-scn-costblock {
  background: var(--ep-surface);
  border-radius: var(--ep-radius-sm);
  padding: 14px;
}
.ep-scn-costblock h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ep-navy);
}
.ep-scn-costblock p {
  margin: 0;
  font-size: 13px;
  color: rgba(20, 33, 61, 0.68);
  line-height: 1.5;
}

.ep-recovery-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ep-navy);
}
.ep-recovery-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 33, 61, 0.10);
}
.ep-recovery-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  border-radius: 999px;
  background: var(--ep-gold);
}
.ep-recovery-marker {
  position: absolute;
  top: -5px;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--ep-navy);
  border: 3px solid var(--ep-white);
  box-shadow: 0 2px 6px rgba(20, 33, 61, 0.35);
}
.ep-recovery-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(20, 33, 61, 0.5);
}
.ep-recovery-note {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(20, 33, 61, 0.72);
}

.ep-scn-backhaul {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(224, 160, 44, 0.10);
  border: 1px solid rgba(224, 160, 44, 0.30);
  border-radius: var(--ep-radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: rgba(20, 33, 61, 0.80);
  line-height: 1.5;
}

.ep-scn-modeled-note {
  margin: 0;
  font-size: 12px;
  color: rgba(20, 33, 61, 0.5);
}

/* ---------------------------------------------------------------- page header (scenarios) */
.ep-page-header {
  padding: 40px 0 8px;
}
.ep-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: rgba(20, 33, 61, 0.62);
  text-decoration: none;
  margin-bottom: 18px;
}
.ep-back-link:hover { color: var(--ep-gold-dark); }
