:root {
  color-scheme: light;
  --color-orange: #f19854;
  --color-sand: #f8e7d5;
  --color-teal: #87cbce;
  --color-deep: #1c4d64;
  --color-white: #fffaf5;
  --bg: var(--color-sand);
  --bg-soft: rgba(255, 255, 255, 0.34);
  --surface: rgba(255, 250, 245, 0.74);
  --surface-strong: rgba(255, 250, 245, 0.92);
  --surface-muted: rgba(28, 77, 100, 0.06);
  --text: var(--color-deep);
  --muted: rgba(28, 77, 100, 0.74);
  --line: rgba(28, 77, 100, 0.12);
  --nav-bg: rgba(248, 231, 213, 0.82);
  --glow-orange: rgba(241, 152, 84, 0.28);
  --glow-teal: rgba(135, 203, 206, 0.32);
  --shadow: 0 24px 64px rgba(28, 77, 100, 0.16);
  --shadow-soft: 0 14px 32px rgba(28, 77, 100, 0.08);
  --radius: 28px;
  --radius-lg: 40px;
  --max-width: 1180px;
  --brand-logo-width: 252px;
  --brand-logo-width-mobile: 168px;
  --hero-logo-width: 100%;
  --footer-logo-width: 220px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--color-deep);
  --bg-soft: rgba(248, 231, 213, 0.04);
  --surface: rgba(248, 231, 213, 0.08);
  --surface-strong: rgba(248, 231, 213, 0.12);
  --surface-muted: rgba(135, 203, 206, 0.14);
  --text: var(--color-sand);
  --muted: rgba(248, 231, 213, 0.78);
  --line: rgba(248, 231, 213, 0.14);
  --nav-bg: rgba(28, 77, 100, 0.84);
  --glow-orange: rgba(241, 152, 84, 0.2);
  --glow-teal: rgba(135, 203, 206, 0.18);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 14px 32px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at top left, var(--glow-orange), transparent 32%),
    radial-gradient(circle at top right, var(--glow-teal), transparent 24%),
    linear-gradient(180deg, var(--bg), var(--bg));
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.container {
  width: min(100% - 32px, var(--max-width));
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section-soft {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-copy {
  max-width: 760px;
  margin-bottom: 36px;
}

.section-copy h2 {
  margin: 0 0 14px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.section-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--color-orange);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: 0 18px 38px rgba(241, 152, 84, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 22px 42px rgba(241, 152, 84, 0.34);
}

.btn-light {
  background: var(--surface-strong);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost {
  color: var(--color-orange);
  background: transparent;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: min(var(--brand-logo-width), calc(100% - 96px));
}

.brand-mark {
  width: min(var(--brand-logo-width), 100%);
  height: 52px;
  background: url("./NuevaGestion.png") no-repeat left center / contain;
  flex: 0 0 auto;
}

.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-burger:hover {
  transform: translateY(-2px);
}

.nav-burger__box {
  display: grid;
  gap: 5px;
  width: 20px;
}

.nav-burger__line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}

.nav-burger__line:nth-child(2) {
  width: 80%;
  justify-self: end;
}

.nav.is-open .nav-burger {
  background: rgba(241, 152, 84, 0.14);
  border-color: rgba(241, 152, 84, 0.32);
}

.nav.is-open .nav-burger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.is-open .nav-burger__line:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav.is-open .nav-burger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--color-orange);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
}

.hero {
  padding-top: 102px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr; /* Proporción más flexible */
  gap: 32px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 20px;
  max-width: 780px;
  font-family: "Sora", sans-serif;
  font-size: clamp(3rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.accent {
  color: var(--color-orange);
  font-style: italic;
}

.hero-copy p {
  margin: 0 0 30px;
  max-width: 700px;
  padding-left: 20px;
  border-left: 4px solid var(--color-orange);
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.4rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Injerto para que los botones mantengan el diseño de los tags */
.hero-tags button {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  font-family: inherit; /* Para que no use la letra por defecto de sistema */
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-tags button:hover {
  transform: translateY(-2px);
  border-color: var(--color-orange);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -48px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--glow-teal), transparent 68%);
  pointer-events: none;
}

.hero-panel__frame {
  position: relative;
  z-index: 1;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(241, 152, 84, 0.12), rgba(135, 203, 206, 0.16));
}

.hero-logo {
  width: min(var(--hero-logo-width), 100%);
  margin-inline: auto;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.12));
}

.hero-panel__copy {
  position: relative;
  z-index: 1;
  margin-top: 24px;
}

.hero-panel__copy p {
  margin: 0;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: flex-end;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 77, 100, 0.08), rgba(28, 77, 100, 0.8));
}

html[data-theme="dark"] .card::before {
  background: linear-gradient(180deg, rgba(28, 77, 100, 0.12), rgba(7, 16, 20, 0.9));
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.card-content {
  position: relative;
  z-index: 1;
}

.card h3 {
  margin: 0 0 8px;
  color: var(--color-white);
  font-family: "Sora", sans-serif;
  font-size: 1.7rem;
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.card p {
  margin: 0;
  color: rgba(248, 231, 213, 0.88);
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: rgba(241, 152, 84, 0.18);
  color: var(--color-orange);
  backdrop-filter: blur(8px);
}

.story {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 40px;
  align-items: center;
}

.story.reverse {
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
}

.story h2 {
  margin: 0 0 18px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.story p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.08rem;
}

.story p.strong {
  color: var(--text);
  font-weight: 800;
}

.story-actions {
  margin-top: 28px;
}

.story-media {
  position: relative;
}

.media-circle,
.media-rect,
.box,
.portrait {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.media-circle {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.media-rect {
  aspect-ratio: 4 / 5;
  border-radius: 32px;
}

.media-circle img,
.media-rect img,
.box img,
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.badge strong {
  display: block;
  color: var(--color-orange);
  font-family: "Sora", sans-serif;
  font-size: 2.3rem;
  line-height: 1;
}

.badge span {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mosaic-col {
  display: grid;
  gap: 16px;
}

.mosaic-col-shift {
  padding-top: 48px;
}

.box {
  min-height: 160px;
  border-radius: 24px;
}

.box.square {
  aspect-ratio: 1 / 1;
}

.box.tall {
  min-height: 180px;
}

.box-accent {
  background: linear-gradient(135deg, rgba(241, 152, 84, 0.24), rgba(248, 231, 213, 0.46));
}

.box-secondary {
  background: linear-gradient(135deg, rgba(135, 203, 206, 0.34), rgba(28, 77, 100, 0.12));
}

.leaders .section-copy {
  margin-bottom: 44px;
}

.leader {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
}

.leader + .leader {
  margin-top: 80px;
}

.leader.reverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
}

.portrait {
  aspect-ratio: 1 / 1;
  padding: 12px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(241, 152, 84, 0.22), rgba(135, 203, 206, 0.24));
}

.portrait img {
  border-radius: 22px;
}

.leader h3 {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.leader .role {
  margin: 0 0 18px;
  color: var(--color-orange);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 800;
}

.leader .desc {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.manifesto {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(28, 77, 100, 0.95), rgba(28, 77, 100, 1));
  color: var(--color-sand);
}

.manifesto::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(241, 152, 84, 0.24), transparent 28%),
    radial-gradient(circle at 84% 28%, rgba(135, 203, 206, 0.2), transparent 24%);
  pointer-events: none;
}

.manifesto-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.manifesto h2 {
  margin: 0 0 34px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.manifesto h2 span {
  color: var(--color-orange);
  font-style: italic;
}

.pillars {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  margin-bottom: 42px;
}

.pillar {
  min-width: 180px;
  padding: 0 14px;
}

.pillar:not(:last-child) {
  border-right: 1px solid rgba(248, 231, 213, 0.12);
}

.pillar strong {
  display: block;
  margin-bottom: 8px;
  color: var(--color-orange);
  font-size: 1.8rem;
}

.pillar span {
  color: rgba(248, 231, 213, 0.74);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wordmark {
  color: rgba(248, 231, 213, 0.08);
  font-family: "Sora", sans-serif;
  font-size: clamp(3.2rem, 9vw, 8rem);
  letter-spacing: -0.08em;
}

.cta-box {
  padding: 54px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
  text-align: center;
}

.cta-box h3 {
  margin: 0 0 14px;
  font-family: "Sora", sans-serif;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.cta-box p {
  max-width: 720px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  flex-wrap: wrap;
}

.footer-logo {
  width: min(var(--footer-logo-width), 100%);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-3,
  .story,
  .story.reverse,
  .leader,
  .leader.reverse {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 88px;
  }

  .hero-grid,
  .story,
  .story.reverse,
  .leader,
  .leader.reverse {
    gap: 28px;
  }

  .section-copy {
    margin-bottom: 28px;
  }

  .badge {
    position: static;
    margin-top: 18px;
    display: inline-block;
  }

  .leader.reverse .portrait {
    order: -1;
  }

  .pillar:not(:last-child) {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .nav {
    padding-top: 12px;
    overflow: visible;
    border-bottom: none;
    background: transparent;
    backdrop-filter: none;
  }

  .nav-inner {
    flex-wrap: wrap;
    align-items: center;
    min-height: auto;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow-soft);
  }

  .brand {
    max-width: calc(100% - 66px);
  }

  .brand-mark {
    width: min(var(--brand-logo-width-mobile), 100%);
    height: 38px;
  }

  .nav-burger {
    display: inline-flex;
    flex-shrink: 0;
    margin-left: auto;
    border-color: rgba(241, 152, 84, 0.22);
    background: rgba(241, 152, 84, 0.1);
    color: var(--text);
    box-shadow: none;
  }

  .nav-actions {
    order: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    overflow: hidden;
    border-top: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition: max-height 0.28s ease, opacity 0.2s ease, margin-top 0.2s ease, padding-top 0.2s ease, visibility 0.2s ease;
  }

  .nav.is-open .nav-actions {
    max-height: 360px;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links {
    display: grid;
    gap: 4px;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--muted);
  }

  .nav-links a::after {
    display: none;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a.active,
  .nav-links a:hover {
    background: transparent;
    color: var(--text);
  }

  .theme-toggle {
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    border-color: var(--line);
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
  }

  .hero-panel {
    padding: 22px;
  }

  .card {
    min-height: 260px;
  }
}

@media (min-width: 769px) {
  .nav-burger {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 72px 0;
  }

  .hero {
    padding-top: 72px;
  }

  .container {
    width: min(100% - 24px, var(--max-width));
  }

  .nav {
    padding-top: 10px;
  }

  .nav-inner {
    padding: 12px 14px;
    border-radius: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(2.35rem, 13vw, 3.2rem);
  }

  .hero-copy p,
  .story p,
  .cta-box p,
  .section-copy p,
  .leader .desc {
    font-size: 1rem;
  }

  .story h2,
  .section-copy h2,
  .leader h3,
  .cta-box h3 {
    font-size: clamp(1.95rem, 9vw, 2.6rem);
  }

  .manifesto h2 {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
  }

  .btn,
  .theme-toggle {
    width: 100%;
  }

  .mosaic {
    grid-template-columns: 1fr;
  }

  .mosaic-col-shift {
    padding-top: 0;
  }

  .pillars {
    gap: 24px;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

/* --- CORRECCIÓN BOTONES HERO --- */
.hero-tags button {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-tags button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--color-orange);
}

/* --- ESTILOS DEL MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 77, 100, 0.4); 
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

html[data-theme="dark"] .modal-overlay {
  background: rgba(7, 16, 20, 0.6);
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  padding: 40px 32px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.modal-overlay.is-active .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--color-orange);
  color: var(--color-white);
  transform: rotate(90deg);
}

.modal-card h3 {
  margin: 0 0 16px;
  font-family: "Sora", sans-serif;
  font-size: 1.8rem;
  color: var(--color-orange);
  line-height: 1.2;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

/* --- FUNCIONALIDAD DE MODALES (NUEVO) --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 77, 100, 0.5);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 90%;
  max-width: 500px;
  padding: 40px;
  background: var(--surface-strong);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  position: relative;
}

/* --- EFECTO HEADROOM: OCULTAMIENTO INTELIGENTE --- */
.nav {
  transition: transform 0.3s ease-in-out, background-color 0.3s ease;
  will-change: transform;
}

/* Esta clase se activará mediante JavaScript */
.nav--hidden {
  transform: translateY(-110%);
}