/* ─── VARIABLES ───────────────────────────────────────────────────────────── */
:root {
  /* Light context (default) */
  --bg:             #F7F5F0;
  --bg-surface:     #EFEEE9;
  --bg-card:        #E8E6DF;
  --bg-card-hover:  #E1DFD7;
  --border:         rgba(0, 0, 0, 0.09);
  --border-hover:   rgba(0, 0, 0, 0.17);
  --border-active:  rgba(139, 102, 16, 0.50);
  --text-primary:   #111110;
  --text-secondary: rgba(17, 17, 16, 0.62);
  --text-muted:     rgba(17, 17, 16, 0.38);
  --accent:         #8B6610;
  --accent-dim:     rgba(139, 102, 16, 0.08);
  --chip-bg:        rgba(0, 0, 0, 0.05);
  --shadow-card:    0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-hover:   0 4px 12px rgba(0,0,0,0.10), 0 12px 40px rgba(0,0,0,0.09);

  /* Dark section overrides (applied via .section-dark) */
  --dark-bg:        #0D0C0B;
  --dark-card:      #1A1815;
  --dark-card-h:    #211F1B;
  --dark-border:    rgba(255, 255, 255, 0.09);
  --dark-text:      #F0EFE9;
  --dark-secondary: rgba(240, 239, 233, 0.62);
  --dark-muted:     rgba(240, 239, 233, 0.36);
  --dark-accent:    #C4962A;
  --dark-accent-dim:rgba(196, 150, 42, 0.09);

  --whatsapp:       #25D366;
  --whatsapp-hover: #1ebe5c;
  --radius:         14px;
  --radius-sm:      9px;
  --max-width:      1100px;
  --nav-height:     68px;
}

/* Dark section context — all var() calls inside auto-adapt */
.section-dark {
  background: var(--dark-bg);
  color: var(--dark-text);
  --bg-card:        var(--dark-card);
  --bg-card-hover:  var(--dark-card-h);
  --border:         var(--dark-border);
  --border-hover:   rgba(255,255,255,0.16);
  --border-active:  rgba(196,150,42,0.52);
  --text-primary:   var(--dark-text);
  --text-secondary: var(--dark-secondary);
  --text-muted:     var(--dark-muted);
  --accent:         var(--dark-accent);
  --accent-dim:     var(--dark-accent-dim);
  --chip-bg:        rgba(255,255,255,0.07);
  --shadow-card:    none;
  --shadow-hover:   none;
}

/* ─── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul { list-style: none; }

/* ─── LAYOUT ──────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── NAV ─────────────────────────────────────────────────────────────────── */
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Nav over dark hero — always dark until scrolled */
#main-nav {
  background: rgba(13, 12, 11, 0);
}

#main-nav.scrolled {
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 36px;
  width: auto;
  /* logo is white — invert to black when nav is over light bg */
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

#main-nav.scrolled .nav-logo {
  filter: brightness(0);
}

/* Nav WhatsApp btn adapts too */
#main-nav .btn-whatsapp { /* stays green always, fine */ }

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: #111110;
  color: #F7F5F0;
  border-color: #111110;
}
.btn-primary:hover { opacity: 0.82; }

.section-dark .btn-primary {
  background: #F0EFE9;
  color: #111110;
  border-color: #F0EFE9;
}

.btn-ghost {
  background: transparent;
  color: #F0EFE9;
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.06);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  border-color: var(--whatsapp);
}
.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
  border-color: var(--whatsapp-hover);
}

.btn-lg {
  padding: 17px 34px;
  font-size: 16px;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-download {
  background: transparent;
  color: var(--accent);
  border-color: rgba(139, 102, 16, 0.35);
  font-size: 14px;
  padding: 11px 22px;
}
.btn-download:hover {
  background: var(--accent-dim);
  border-color: rgba(139, 102, 16, 0.6);
}
.btn-download:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.programas-download {
  display: flex;
  justify-content: center;
  padding-top: 48px;
}

/* ─── SECTION LABEL ───────────────────────────────────────────────────────── */
.label {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

/* ─── HERO (dark section) ─────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 100px) 40px 120px;
  position: relative;
  overflow: hidden;
}

/* Background video */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.35;
}

/* Dark overlay + warm amber glow — sits on top of video */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(13,12,11,0.72) 0%, rgba(13,12,11,0.55) 100%),
    radial-gradient(ellipse 70% 60% at 70% 5%,  rgba(196, 150, 42, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 15% 70%, rgba(196, 150, 42, 0.06) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

/* Dot grid overlay */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 10%, transparent 80%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 10%, transparent 80%);
  pointer-events: none;
  z-index: 2;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  height: 122px;
  width: auto;
  margin-bottom: 40px;
}

.hero-inner .label {
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--dark-secondary);
  max-width: 700px;
  margin-bottom: 48px;
}

.hero-subtitle {
  display: none;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── POSICIONAMIENTO ─────────────────────────────────────────────────────── */
#posicionamiento {
  padding: 110px 40px;
  border-top: 1px solid var(--border);
}

.pos-header {
  text-align: center;
  margin-bottom: 64px;
}

.pos-title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  line-height: 1.08;
}

.pos-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.68;
}

.pos-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.pos-col {
  background: var(--bg-surface);
  padding: 52px 44px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border);
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.pos-col:last-child { border-right: none; }

.pos-concepto {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.pos-col-title {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-primary);
}

.pos-col-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.pos-programa {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 22px;
}

/* ─── PROGRAMAS ───────────────────────────────────────────────────────────── */
#programas {
  padding: 110px 40px;
  border-top: 1px solid var(--border);
}

.programas-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
}

.programas-header {
  margin-bottom: 36px;
}

.programas-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* Selector */
#selector-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.selector-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 28px 26px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  box-shadow: var(--shadow-card);
}

.selector-card:hover:not(.active) {
  border-color: var(--border-hover);
  border-left-color: transparent;
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.selector-card.active {
  border-color: var(--border);
  border-left: 3px solid var(--accent);
  background: var(--bg-card);
  box-shadow: var(--shadow-hover);
}

.selector-concepto {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.selector-nombre {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.selector-desc {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Ficha dinámica */
#ficha-dinamica {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
}

#ficha-dinamica.fade-in {
  animation: fadeUp 0.22s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ficha-header {
  padding: 52px 52px 44px;
  border-bottom: 1px solid var(--border);
}

.ficha-concepto {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.ficha-nombre {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.ficha-tagline {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.74;
}

.ficha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.ficha-bloque {
  padding: 40px 52px;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
}

.ficha-grid .ficha-bloque:last-child,
.ficha-meta .ficha-bloque:last-child {
  border-right: none;
}

.ficha-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.ficha-outcome {
  border-right: none;
  border-bottom: 1px solid var(--border);
}

.ficha-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ficha-bloque p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.74;
}

.ficha-lista {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ficha-lista li {
  font-size: 15px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.58;
}

.ficha-lista li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 3px;
}

.ficha-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-block;
  padding: 6px 14px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13.5px;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.ficha-cta {
  padding: 40px 52px;
  background: var(--bg-surface);
}

/* ─── ENFOQUE ─────────────────────────────────────────────────────────────── */
#enfoque {
  padding: 110px 40px;
  border-top: 1px solid var(--border);
}

.enfoque-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: start;
}

.enfoque-left h2 {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.13;
  margin-bottom: 26px;
}

.enfoque-left p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.78;
  margin-bottom: 22px;
}
.enfoque-left p:last-child { margin-bottom: 0; }

.enfoque-statements { margin-top: 8px; }

.enfoque-statement {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.015em;
  line-height: 1.4;
  transition: color 0.2s ease, padding-left 0.2s ease;
  cursor: default;
}

.enfoque-statement:first-child { border-top: 1px solid var(--border); }

.enfoque-statement:hover {
  color: var(--text-primary);
  padding-left: 12px;
}

/* ─── FORMATOS ────────────────────────────────────────────────────────────── */
#formatos {
  padding: 110px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.formatos-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.formatos-title {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 44px;
  line-height: 1.13;
}

.formatos-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 44px;
}

.formatos-chips .chip {
  padding: 12px 22px;
  font-size: 15px;
  transition: all 0.18s ease;
}

.formatos-chips .chip:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.formatos-support {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.72;
}

/* ─── PEDRO ───────────────────────────────────────────────────────────────── */
#pedro {
  padding: 110px 40px;
  border-top: 1px solid var(--border);
}

.pedro-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  align-items: start;
}

.pedro-photo-col {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.pedro-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  display: block;
  box-shadow: var(--shadow-hover);
}

.pedro-title {
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 22px;
}

.pedro-text {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.78;
  margin-bottom: 40px;
}

.pedro-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.pedro-metric {
  background: var(--bg-surface);
  padding: 36px 32px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pedro-metric:nth-child(2n)      { border-right: none; }
.pedro-metric:nth-last-child(-n+2) { border-bottom: none; }

.pedro-metric-number {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 10px;
}

.pedro-metric-label {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── CTA FINAL (dark section) ────────────────────────────────────────────── */
#contacto {
  padding: 130px 40px;
  border-top: 1px solid var(--dark-border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Bottom glow for CTA */
#contacto::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 110%, rgba(37, 211, 102, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 0%,   rgba(196, 150, 42, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Dot grid for CTA too */
#contacto::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 10%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, #000 10%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

.contacto-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.contacto-title {
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--dark-text);
}

.contacto-text {
  font-size: 17px;
  color: var(--dark-secondary);
  line-height: 1.72;
  margin-bottom: 52px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.contacto-inner .label {
  color: var(--dark-accent);
}

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
footer {
  padding: 30px 40px;
  background: var(--dark-bg);
  border-top: 1px solid var(--dark-border);
  text-align: center;
}

footer p {
  font-size: 14px;
  color: var(--dark-muted);
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .pos-grid { grid-template-columns: 1fr; }
  .pos-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 40px 32px;
  }
  .pos-col:last-child { border-bottom: none; }

  .ficha-grid,
  .ficha-meta { grid-template-columns: 1fr; }

  .ficha-bloque,
  .ficha-meta .ficha-bloque {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .ficha-grid .ficha-bloque:last-child,
  .ficha-meta .ficha-bloque:last-child { border-bottom: none; }

  .enfoque-inner { grid-template-columns: 1fr; gap: 52px; }

  .pedro-inner { grid-template-columns: 1fr; gap: 48px; }
  .pedro-photo-col { position: static; }
  .pedro-photo {
    aspect-ratio: 16/9;
    object-position: center 20%;
    max-height: 420px;
  }
}

@media (max-width: 680px) {
  :root { --nav-height: 60px; }

  #main-nav { padding: 0 20px; }
  #hero { padding: calc(var(--nav-height) + 72px) 20px 90px; }

  #posicionamiento, #programas, #enfoque,
  #formatos, #pedro, #contacto { padding: 80px 20px; }

  .container, .programas-wrap { padding: 0 20px; }

  #selector-cards { grid-template-columns: 1fr; }

  .ficha-header { padding: 36px 24px; }
  .ficha-bloque { padding: 30px 24px; }
  .ficha-cta { padding: 30px 24px; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .btn-lg { width: 100%; justify-content: center; }
}

@media (max-width: 440px) {
  .pedro-metrics { grid-template-columns: 1fr; }
  .pedro-metric:nth-child(2n) { border-right: none; }
  .pedro-metric:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .pedro-metric:last-child { border-bottom: none; }
}
