/* ============================================================
   FEANOR CONSTRUCCIONES Y GESTIONES S.L.
   Global Stylesheet — Single Source of Truth
   ============================================================ */

/* ── RESET & ROOT ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --stone: #0d1410;
  --stone-deep: #030605;
  --malachite: #0b6b4b;
  --editorial-paper: #f2f0ea;
  --editorial-paper-deep: #e8e5dc;
  --editorial-ink: #111712;
  --editorial-muted: #4f5c52;
  --corporate-green: #063d2a;
  --warm-white: #f5f0e8;
  --gold: #b8975a;
  --gold-light: #d4b483;
  --muted: #9aac9e;
  --line: rgba(184, 151, 90, 0.25);
  --white-hover: #ffffff;
}

html {
  scroll-behavior: smooth;
  background:
    linear-gradient(180deg, rgba(2, 8, 4, 0.90), rgba(2, 8, 4, 0.96)),
    url('../malachite_bg.webp') center center / cover no-repeat;
}

body {
  background:
    linear-gradient(180deg, rgba(2, 8, 4, 0.90), rgba(2, 8, 4, 0.96)),
    url('../malachite_bg.webp') center center / cover no-repeat;
  color: var(--editorial-ink);
  font-family: 'Manrope', 'Aptos', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  overflow-x: clip;
  font-size: 16px;
}

/* ── BACKGROUND OVERLAY ───────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(6,61,42,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(6,61,42,0.03) 1px, transparent 1px);
  background-size: 96px 96px;
  pointer-events: none;
  opacity: 0.56;
}

body > section,
body > main,
body > .privacy-body {
  background-color: var(--editorial-paper);
}

body > section.hero,
body > section.page-hero,
body > .hero {
  background-color: transparent;
}

@media (max-width: 900px) {
  body::before {
    opacity: 0.38;
  }
}

/* Hide the legacy .page-bg div */
.page-bg {
  display: none;
}

/* All page content sits above the overlay */
body > nav,
body > section,
body > div,
body > footer,
body > main {
  position: relative;
  z-index: 10;
}

/* ── NAV ─────────────────────────────────────────────────── */
body > nav {
  position: fixed !important;
  top: 18px;
  left: 50%;
  right: auto;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 12px;
  width: min(92vw, 1040px);
  min-height: 62px;
  padding: 9px 12px;
  background:
    radial-gradient(ellipse 120% 180% at var(--nav-x, 50%) 50%, rgba(184,151,90,0.16), transparent 46%),
    rgba(3, 10, 5, 0.72);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid rgba(184, 151, 90, 0.28);
  border-radius: 999px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.26);
  transform: translateX(-50%) scaleX(0.92);
  transform-origin: 50% 0;
  transition:
    width 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s,
    box-shadow 0.5s,
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

body > nav.scrolled {
  background:
    radial-gradient(ellipse 120% 180% at var(--nav-x, 50%) 50%, rgba(184,151,90,0.13), transparent 46%),
    rgba(2, 7, 3, 0.88);
  border-color: rgba(184, 151, 90, 0.34);
  box-shadow: 0 20px 70px rgba(0,0,0,0.34);
}

body > nav.nav-expanded,
body > nav:hover,
body > nav:focus-within {
  width: min(94vw, 1120px);
  background:
    radial-gradient(ellipse 120% 180% at var(--nav-x, 50%) 50%, rgba(184,151,90,0.22), transparent 48%),
    rgba(3, 10, 5, 0.86);
  border-color: rgba(212, 180, 131, 0.48);
  box-shadow: 0 24px 84px rgba(0,0,0,0.42);
  transform: translateX(-50%) scaleX(1);
}

/* Logo */
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: 'Manrope', 'Aptos Display', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  justify-self: start;
  min-width: 156px;
  padding: 0 12px 0 4px;
  transition: color 0.25s, opacity 0.25s, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover {
  color: var(--white-hover);
  opacity: 0.92;
  transform: translateX(2px);
}

.nav-logo img {
  width: 42px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.nav-logo-text {
  display: grid;
  gap: 2px;
}

.nav-logo-text span {
  display: block;
  font-size: 0.42rem;
  letter-spacing: 0.18em;
  color: rgba(184, 151, 90, 0.55);
  font-family: inherit;
  font-weight: 500;
  transition: color 0.25s;
}

.nav-logo:hover .nav-logo-text span {
  color: rgba(255, 255, 255, 0.45);
}

/* Nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  padding: 0 16px;
  font-family: 'Manrope', 'Aptos', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm-white);
  text-decoration: none;
  opacity: 0.72;
  white-space: nowrap;
  position: relative;
  border-radius: 999px;
  transform: translateY(var(--nav-cascade-y, 0)) scale(var(--nav-cascade-scale, 1));
  transition:
    opacity 0.34s,
    color 0.34s,
    background 0.34s,
    transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--nav-i, 0) * 42ms);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  opacity: 1;
  color: var(--white-hover);
  background: rgba(255,255,255,0.065);
}

.nav-menu > li > a.active::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.nav-text {
  display: inline-flex;
  align-items: center;
  height: 1.12em;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
}

.nav-char {
  display: inline-block;
  line-height: 1;
  transform-origin: 50% 70%;
  transform: translateY(72%) skewY(7deg);
  opacity: 0.62;
  transition:
    transform 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.45s ease;
  transition-delay: calc(var(--nav-i, 0) * 36ms + var(--char-i, 0) * 14ms);
}

body > nav.nav-expanded .nav-char,
body > nav:hover .nav-char,
body > nav:focus-within .nav-char,
.nav-menu > li > a.active .nav-char {
  transform: translateY(0) skewY(0deg);
  opacity: 1;
}

body > nav.nav-contracting .nav-char {
  transform: translateY(-62%) skewY(-6deg);
  opacity: 0.45;
}

body > nav:not(.nav-expanded):not(:hover):not(:focus-within) .nav-menu > li > a {
  --nav-cascade-y: 3px;
  --nav-cascade-scale: 0.96;
  opacity: 0.54;
}

body > nav.nav-contracting {
  will-change: width;
}

body > nav.nav-expanding {
  will-change: width;
}

@keyframes navViscousExpand {
  0% { transform: translateX(-50%) scaleX(0.265) scaleY(0.965); filter: saturate(0.96); }
  18% { transform: translateX(-50%) scaleX(0.48) scaleY(0.975); filter: saturate(0.98); }
  42% { transform: translateX(-50%) scaleX(0.82) scaleY(0.99); filter: saturate(1.03); }
  66% { transform: translateX(-50%) scaleX(1.025) scaleY(0.985); filter: saturate(1.06); }
  84% { transform: translateX(-50%) scaleX(0.992) scaleY(1.008); filter: saturate(1.02); }
  100% { transform: translateX(-50%) scaleX(1) scaleY(1); filter: saturate(1); }
}

@keyframes navViscousContract {
  0% { transform: translateX(-50%) scaleX(3.77) scaleY(0.985); filter: saturate(1.06); }
  18% { transform: translateX(-50%) scaleX(2.55) scaleY(0.992); filter: saturate(1.04); }
  44% { transform: translateX(-50%) scaleX(1.38) scaleY(1.006); filter: saturate(1.01); }
  68% { transform: translateX(-50%) scaleX(0.94) scaleY(1.016); filter: saturate(0.98); }
  86% { transform: translateX(-50%) scaleX(1.018) scaleY(0.996); filter: saturate(1.01); }
  100% { transform: translateX(-50%) scaleX(1) scaleY(1); filter: saturate(1); }
}

@media (prefers-reduced-motion: reduce) {
  body > nav,
  .nav-menu > li > a,
  .nav-char {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .nav-char {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Dropdown arrow */
.has-drop > a .arrow {
  font-size: 0.5rem;
  opacity: 0.55;
  transition: transform 0.25s;
}

.has-drop:hover > a .arrow {
  transform: rotate(180deg);
}

/* Dropdown panel */
.nav-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 210px;
  background: rgba(5, 14, 8, 0.96);
  border: 1px solid rgba(184, 151, 90, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}

.has-drop:hover .nav-drop {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-drop a {
  display: block;
  padding: 11px 24px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}

.nav-drop a:hover {
  color: var(--white-hover);
  padding-left: 30px;
}

.nav-drop .drop-divider {
  height: 1px;
  background: rgba(184, 151, 90, 0.12);
  margin: 5px 16px;
}

/* ── NAV RIGHT / LANGUAGE SWITCHER ──────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.lang-switcher {
  position: relative;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', 'Helvetica Neue', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.88);
  background: rgba(255,255,255,0.065);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.lang-trigger:hover {
  color: var(--white-hover);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255,255,255,0.11);
}

.flag-svg {
  border-radius: 2px;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}

.lang-arrow {
  transition: transform 0.22s;
  opacity: 0.7;
  margin-left: 2px;
}

.lang-switcher.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-drop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 204px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(242,240,234,0.66)),
    rgba(242, 240, 234, 0.82);
  border: 1px solid rgba(6,61,42,0.18);
  border-radius: 18px;
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  box-shadow: 0 18px 52px rgba(17,23,18,0.14), inset 0 1px 0 rgba(255,255,255,0.70);
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s, transform 0.22s;
  z-index: 3000;
}

.lang-switcher.open .lang-drop {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-drop.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lang-drop.is-floating {
  position: fixed !important;
  top: var(--lang-top, 76px) !important;
  left: var(--lang-left, 16px) !important;
  right: auto !important;
  bottom: auto !important;
}

.lang-drop a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  padding: 10px 16px;
  font-family: 'Manrope', 'Helvetica Neue', sans-serif;
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--editorial-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s, padding-left 0.2s;
  white-space: nowrap;
}

.lang-drop .flag-svg {
  width: 22px;
  height: 16px;
  object-fit: cover;
}

.lang-label {
  display: inline-block;
  min-width: 0;
}

.lang-label[dir="rtl"] {
  letter-spacing: 0.04em;
  text-transform: none;
}

.lang-drop a:hover {
  color: var(--corporate-green);
  background: rgba(6,61,42,0.08);
  padding-left: 24px;
}

.lang-drop a.lang-active {
  color: var(--corporate-green);
}

/* ── HAMBURGER ───────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--warm-white);
  transition: transform 0.28s, opacity 0.28s;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}



/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(184,151,90,0.25);
  padding: 40px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(2, 8, 4, 0.90), rgba(2, 8, 4, 0.96)),
    url('../malachite_bg.webp') center bottom / cover no-repeat;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 0;
}

.footer-brand {
  font-family: 'Manrope', 'Aptos Display', 'Helvetica Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  transition: color 0.25s;
}

.footer-brand:hover {
  color: var(--white-hover);
}

.footer-addr {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(154, 172, 158, 0.5);
  margin-top: 6px;
  line-height: 1.7;
}

.footer-privacy {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(154, 172, 158, 0.5);
  text-decoration: none;
  display: block;
  margin-top: 4px;
  transition: color 0.25s;
}

.footer-privacy:hover {
  color: var(--white-hover);
}

.footer-copy {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(154, 172, 158, 0.4);
  display: grid;
  justify-items: end;
  gap: 7px;
  transition: color 0.25s;
}

.footer-copy:hover {
  color: rgba(255, 255, 255, 0.6);
}

.footer-credit {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(184, 151, 90, 0.62);
  text-decoration: none;
  transition: color 0.25s, opacity 0.25s;
}

.footer-credit:hover {
  color: var(--gold-light);
}

/* ── MALACHITE PATTERN (inner sections) ─────────────────── */
.malachite-bg {
  position: relative;
  overflow: hidden;
}

.malachite-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(
      -35deg,
      transparent 0px, transparent 6px,
      rgba(42, 90, 60, 0.14) 6px, rgba(42, 90, 60, 0.14) 7px,
      transparent 7px, transparent 15px,
      rgba(30, 70, 45, 0.10) 15px, rgba(30, 70, 45, 0.10) 17px,
      transparent 17px, transparent 28px,
      rgba(55, 110, 75, 0.12) 28px, rgba(55, 110, 75, 0.12) 30px
    ),
    repeating-linear-gradient(
      -58deg,
      transparent 0px, transparent 22px,
      rgba(20, 60, 38, 0.08) 22px, rgba(20, 60, 38, 0.08) 24px,
      transparent 24px, transparent 50px,
      rgba(42, 90, 60, 0.07) 50px, rgba(42, 90, 60, 0.07) 52px
    );
  mix-blend-mode: overlay;
}

.malachite-bg > * {
  position: relative;
  z-index: 1;
}

/* ── SHARED SECTION TYPOGRAPHY ───────────────────────────── */
.section-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Manrope', 'Aptos Display', 'Helvetica Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--editorial-ink);
  line-height: 1.15;
  margin-bottom: 28px;
}

.section-body {
  font-size: 0.96rem;
  line-height: 1.9;
  color: var(--editorial-muted);
  max-width: 560px;
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  body > nav {
    top: 14px;
    grid-template-columns: 1fr auto;
    width: calc(100vw - 28px);
    min-height: 58px;
    padding: 8px 10px;
    transform: translateX(-50%) scaleX(1);
  }

  /* Dropdown panel — auto height, not fullscreen */
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5, 14, 8, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(184, 151, 90, 0.24);
    border-radius: 28px;
    padding: 10px;
    overflow: hidden;
    z-index: 150;
    /* No overflow-y, no bottom:0 — height is natural */
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu > li > a {
    height: auto;
    padding: 16px 18px;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    opacity: 1;
    color: rgba(245, 240, 232, 0.75);
    border-bottom: 0;
    border-radius: 18px;
  }

  .nav-menu > li > a:hover,
  .nav-menu > li > a.active {
    color: var(--white-hover);
    opacity: 1;
  }

  .nav-menu > li > a.active::after {
    display: none;
  }

  .nav-drop {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    border: none;
    backdrop-filter: none;
    padding: 0 0 0 16px;
    display: none;
  }

  .has-drop.open .nav-drop {
    display: block;
  }

  /* Hide desktop lang switcher */
  .nav-right {
    display: none;
  }

  /* Mobile lang trigger item — after Contacto */
  .nav-menu-lang-item {
    position: relative;
    padding: 12px 28px;
    border-top: 1px solid rgba(184, 151, 90, 0.15);
    border-bottom: 1px solid rgba(184, 151, 90, 0.08);
  }

  .mobile-lang-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Manrope', 'Helvetica Neue', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(245, 240, 232, 0.88);
    background: transparent;
    border: 1px solid rgba(184, 151, 90, 0.4);
    padding: 8px 14px;
    cursor: pointer;
    transition: color 0.25s, border-color 0.25s;
  }

  .mobile-lang-trigger:hover {
    color: var(--white-hover);
    border-color: rgba(255, 255, 255, 0.5);
  }

  /* Mobile dropdown — opens upward to avoid clipping */
  .mobile-lang-drop {
    position: absolute;
    bottom: calc(100% - 12px);
    left: 28px;
    min-width: 168px;
    background: rgba(4, 12, 6, 0.99);
    border: 1px solid rgba(184, 151, 90, 0.28);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.22s, transform 0.22s;
    z-index: 3000;
  }

  .mobile-lang-drop.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-lang-drop a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-family: 'Manrope', 'Helvetica Neue', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(200, 215, 205, 0.85);
    text-decoration: none;
    transition: color 0.2s, background 0.2s, padding-left 0.2s;
  }

  .mobile-lang-drop a:hover {
    color: var(--white-hover);
    background: rgba(255, 255, 255, 0.06);
    padding-left: 24px;
  }

  .mobile-lang-drop a.lang-active {
    color: var(--gold-light);
  }

  /* Hamburger — gold lines, always visible */
  .nav-hamburger {
    display: flex;
  }

  .nav-hamburger span {
    background: var(--gold);
  }
}

/* Hide mobile lang item on desktop — it lives inside @media but
   we explicitly hide it at larger viewports to be safe */
.nav-menu-lang-item {
  display: none;
}

@media (max-width: 900px) {
  .nav-menu-lang-item {
    display: block;
  }

  /* Fix background on mobile: cover full viewport, scroll attachment
     prevents iOS/Android fixed-background rendering bug */
  body {
    background-attachment: scroll;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
}

@media (max-width: 768px) {
  footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 32px 24px;
    margin: 0;
  }

  .footer-brand {
    font-size: 0.95rem;
  }

  .footer-copy {
    font-size: 0.72rem;
    justify-items: center;
  }
}

/* ── TOUCH HOVER (móvil) ─────────────────────────────────── */
/* Regla universal: cualquier elemento táctil activo → blanco */
.touch-hover,
.touch-hover * {
  color: #ffffff !important;
  opacity: 1 !important;
}

/* ── MOBILE TYPOGRAPHY — Mayor tamaño y contraste ──────────── */
@media (max-width: 900px) {
  /* Body text más grande y contraste máximo */
  body {
    font-size: 17px;
  }

  /* Títulos de sección — más grandes y blancos puros */
  .section-title {
    font-size: clamp(2.4rem, 7.5vw, 3.2rem) !important;
    color: #ffffff !important;
    font-weight: 400;
  }

  /* Eyebrows — más visibles */
  .section-eyebrow {
    font-size: 0.78rem !important;
    letter-spacing: 0.28em;
    color: var(--gold-light) !important;
    opacity: 1;
  }

  /* Texto de cuerpo — mayor tamaño y contraste */
  .section-body {
    font-size: 1.05rem !important;
    color: rgba(255, 248, 235, 0.95) !important;
    line-height: 1.85;
  }

  /* Overlay más oscuro en móvil para mayor contraste de texto */
  body::before {
    background: rgba(3, 10, 5, 0.88) !important;
  }

  /* Hero titles */
  .hero-title {
    font-size: clamp(2.8rem, 9vw, 4.5rem) !important;
    color: #ffffff !important;
  }

  .hero-lead {
    font-size: 1.05rem !important;
    color: rgba(255, 248, 235, 0.92) !important;
    line-height: 1.9;
  }

  /* Textos de párrafo genéricos */
  p, .v-desc, .dif-desc, .checker-intro, .form-intro,
  .step-desc, .definition-block p, .faq-a {
    font-size: 1rem !important;
    color: rgba(255, 248, 235, 0.92) !important;
    line-height: 1.85;
  }

  /* V-titles y dif-titles */
  .v-title, .dif-title {
    color: #ffffff !important;
    font-size: 1.3rem !important;
  }

  /* Definition block — texto itálico bien legible */
  .definition-block p {
    font-size: 1.15rem !important;
    color: #ffffff !important;
  }

  /* Step numbers y títulos en proceso */
  .step-title {
    font-size: 0.9rem !important;
    color: #ffffff !important;
  }

  /* Labels pequeños — ligeramente más grandes */
  label, .diagram-title, .legend-item,
  .ba-header div, .ba-row div {
    font-size: 0.8rem !important;
  }

  /* Números de pisos en diagrama */
  .floor-label {
    font-size: 0.8rem !important;
    color: rgba(255, 248, 235, 0.85) !important;
  }

  .floor.new .floor-label {
    color: var(--gold-light) !important;
  }

  /* FAQ question text */
  .faq-q-text {
    font-size: 1.15rem !important;
    color: #ffffff !important;
  }

  /* Comp labels esta sí/esta no */
  .comp-label {
    font-size: 0.84rem !important;
    letter-spacing: 0.2em;
  }

  /* CTA question-mark sections */
  .cstep-q {
    font-size: 1rem !important;
    color: #ffffff !important;
  }
}

@media (max-width: 600px) {
  .section-title {
    font-size: clamp(2.1rem, 8.5vw, 2.8rem) !important;
  }

  .hero-title {
    font-size: clamp(2.4rem, 10vw, 3.5rem) !important;
  }

  p, .v-desc, .dif-desc, .section-body, .hero-lead {
    font-size: 1.02rem !important;
  }
}

/* ── DESKTOP — Aumentar intensidad tipográfica global ────────── */
.section-title {
  color: #f8f4ec;
}
.section-body {
  color: rgba(210, 225, 215, 0.92);
}
.v-title {
  color: #f0ebe0;
}
.v-desc, .dif-desc {
  color: rgba(200, 218, 205, 0.90);
}
.faq-q-text {
  color: #f0ebe0;
}
.faq-a {
  color: rgba(200, 218, 205, 0.90);
}
.definition-block p {
  color: #f5f0e8;
}
.ba-row .ba-before {
  color: rgba(200, 218, 205, 0.88);
}
.ba-row .ba-after {
  color: #f0ebe0;
}
.checker-intro, .form-intro {
  color: rgba(210, 225, 215, 0.92);
}
.cstep-q {
  color: #f0ebe0;
}
.form-note {
  color: rgba(200, 218, 205, 0.85);
}

/* Final pill navigation: compact by default, click to expand */
body > nav {
  top: 18px;
  left: 50%;
  right: auto;
  width: min(88vw, 238px);
  min-height: 64px;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px 8px 16px;
  background:
    radial-gradient(ellipse 130% 180% at var(--nav-x, 50%) 50%, rgba(184,151,90,0.11), transparent 52%),
    rgba(3, 10, 5, 0.38);
  border: 1px solid rgba(184, 151, 90, 0.48);
  border-radius: 999px;
  box-shadow: 0 18px 70px rgba(0,0,0,0.24);
  transform: translateX(-50%) scaleX(1);
}

body > nav.scrolled {
  background:
    radial-gradient(ellipse 130% 180% at var(--nav-x, 50%) 50%, rgba(184,151,90,0.12), transparent 52%),
    rgba(3, 10, 5, 0.52);
}

body > nav:hover,
body > nav:focus-within {
  width: min(88vw, 238px);
  transform: translateX(-50%) scaleX(1);
}

body > nav.nav-open,
body > nav.nav-open:hover,
body > nav.nav-open:focus-within {
  width: min(94vw, 1120px);
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  justify-content: stretch;
  gap: 16px;
  padding: 8px 12px 8px 18px;
  background:
    radial-gradient(ellipse 130% 180% at var(--nav-x, 50%) 50%, rgba(184,151,90,0.20), transparent 52%),
    rgba(13, 17, 9, 0.74);
  border-color: rgba(212, 180, 131, 0.58);
  box-shadow: 0 26px 90px rgba(0,0,0,0.42);
}

.nav-logo {
  min-width: 0;
  padding: 0;
}

.nav-logo img {
  width: 126px;
  height: 46px;
  object-fit: contain;
}

.nav-logo-text {
  display: none;
}

.nav-menu,
.nav-right {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(-12px) scaleX(0.94);
  transform-origin: left center;
  transition:
    opacity 0.34s ease,
    max-width 0.68s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.68s cubic-bezier(0.16, 1, 0.3, 1);
}

body > nav.nav-open .nav-menu,
body > nav.nav-open .nav-right {
  opacity: 1;
  max-width: 820px;
  pointer-events: auto;
  transform: translateX(0) scaleX(1);
}

body > nav:not(.nav-open) .nav-menu > li > a {
  opacity: 0;
}

body > nav:not(.nav-open) .nav-char {
  transform: translateY(82%) skewY(8deg);
  opacity: 0;
}

body > nav.nav-open .nav-char,
body > nav.nav-open .nav-menu > li > a.active .nav-char {
  transform: translateY(0) skewY(0deg);
  opacity: 1;
}

.nav-hamburger {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  border: 1px solid rgba(184,151,90,0.28);
  background: rgba(255,255,255,0.04);
  justify-self: end;
  transition: background 0.28s, border-color 0.28s, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-hamburger:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(212,180,131,0.52);
  transform: scale(1.04);
}

.nav-hamburger span {
  width: 18px;
  background: var(--gold-light);
}

body > nav.nav-open .nav-hamburger {
  background: rgba(184,151,90,0.16);
}

@media (min-width: 901px) {
  .nav-menu {
    display: flex;
    justify-content: center;
  }

  .nav-right {
    display: flex;
  }
}

@media (max-width: 900px) {
  body > nav,
  body > nav:hover,
  body > nav:focus-within {
    width: calc(100vw - 28px);
    grid-template-columns: 1fr auto;
    justify-content: stretch;
  }

  body > nav.nav-open {
    grid-template-columns: 1fr auto;
  }

  .nav-menu {
    max-width: none;
    transform: none;
  }

  body > nav.nav-open .nav-menu {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Slim pill correction: closed state is logo + trigger only */
body > nav {
  width: min(86vw, 260px);
  min-height: 50px;
  grid-template-columns: auto auto;
  gap: 66px;
  padding: 5px 9px 5px 26px;
  align-content: center;
  overflow: hidden;
  transform-origin: 50% 50%;
  transform: translateX(-50%) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.76), rgba(242,240,234,0.52)),
    rgba(242, 240, 234, 0.58);
  border-color: rgba(6,61,42,0.20);
  backdrop-filter: blur(30px) saturate(1.18);
  -webkit-backdrop-filter: blur(30px) saturate(1.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.68),
    inset 0 -1px 0 rgba(6,61,42,0.08),
    0 14px 42px rgba(17,23,18,0.12);
  transition:
    top 0.72s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.72s cubic-bezier(0.16, 1, 0.3, 1),
    min-height 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    gap 0.62s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s,
    box-shadow 0.5s,
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

body > nav::before {
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 48%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.70), transparent);
  opacity: 0.58;
  pointer-events: none;
}

body > nav > * {
  position: relative;
  z-index: 1;
}

body > nav:hover,
body > nav:focus-within {
  width: min(86vw, 260px);
}

body > nav.nav-open,
body > nav.nav-open:hover,
body > nav.nav-open:focus-within {
  width: min(92vw, 980px);
  min-height: 54px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 6px 8px 6px 14px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.82), rgba(242,240,234,0.62)),
    rgba(242, 240, 234, 0.68);
  border-color: rgba(6,61,42,0.26);
  box-shadow: 0 26px 90px rgba(17,23,18,0.16);
}

.nav-logo img {
  width: 40px;
  height: 40px;
  opacity: 0.94;
  filter: brightness(0) saturate(100%) invert(16%) sepia(20%) saturate(1250%) hue-rotate(106deg) brightness(86%) contrast(94%);
}

.nav-menu,
.nav-right {
  display: none;
}

body > nav.nav-open .nav-menu {
  display: flex;
  position: absolute;
  left: 50%;
  top: 50%;
  justify-self: center;
  justify-content: center;
  opacity: 1;
  width: min(100%, 650px);
  max-width: 650px;
  pointer-events: auto;
  transform: translate(-50%, -50%) scaleX(1);
}

body > nav.nav-open .nav-right {
  display: flex;
  opacity: 1;
  max-width: 120px;
  pointer-events: auto;
  transform: translateX(0) scaleX(1);
}

.nav-menu > li > a {
  height: 38px;
  padding: 0 13px;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--editorial-ink);
  opacity: 0.76;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  color: var(--corporate-green);
  background: rgba(6,61,42,0.08);
}

.nav-menu > li > a.active::after {
  background: linear-gradient(to right, transparent, var(--corporate-green), transparent);
}

.lang-trigger {
  height: 38px;
  padding: 7px 12px;
  color: var(--editorial-ink);
  background: rgba(255,255,255,0.38);
  border-color: rgba(6,61,42,0.18);
}

.lang-trigger:hover {
  color: var(--corporate-green);
  border-color: rgba(6,61,42,0.34);
  background: rgba(255,255,255,0.64);
}

.nav-hamburger {
  width: 40px;
  height: 40px;
  border-color: rgba(6,61,42,0.20);
  background: rgba(255,255,255,0.36);
}

.nav-hamburger:hover,
body > nav.nav-open .nav-hamburger {
  background: rgba(6,61,42,0.08);
  border-color: rgba(6,61,42,0.34);
}

.nav-hamburger span {
  width: 16px;
  background: var(--corporate-green);
}

@media (max-width: 900px) {
  body > nav,
  body > nav:hover,
  body > nav:focus-within {
    width: min(calc(100vw - 28px), 230px);
    min-height: 52px;
  }

  body > nav.nav-open,
  body > nav.nav-open:hover,
  body > nav.nav-open:focus-within {
    width: calc(100vw - 28px);
  }

  body > nav.nav-open .nav-menu {
    display: flex;
    position: static;
    max-width: none;
    width: auto;
    transform: none;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.82), rgba(242,240,234,0.66)),
      rgba(242, 240, 234, 0.82);
    border-color: rgba(6,61,42,0.18);
  }

  .mobile-lang-trigger {
    color: var(--editorial-ink);
    background: rgba(255,255,255,0.38);
    border-color: rgba(6,61,42,0.18);
  }

  .mobile-lang-drop {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.86), rgba(242,240,234,0.72)),
      rgba(242, 240, 234, 0.88);
    border-color: rgba(6,61,42,0.18);
  }

  .mobile-lang-drop a {
    color: var(--editorial-muted);
  }

  .mobile-lang-drop a:hover,
  .mobile-lang-drop a.lang-active {
    color: var(--corporate-green);
    background: rgba(6,61,42,0.08);
  }
}

body > nav:not(.nav-open) .nav-char {
  transform: translateY(96%) skewY(9deg) scaleY(1.08);
  opacity: 0;
}

body > nav.nav-open .nav-char,
body > nav.nav-open .nav-menu > li > a.active .nav-char {
  transform: translateY(0) skewY(0deg) scaleY(1);
  opacity: 1;
}

body > nav.nav-opening .nav-char {
  animation: navCharViscousIn 0.84s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--nav-i, 0) * 34ms + var(--char-i, 0) * 11ms);
}

body > nav.nav-closing .nav-char {
  animation: navCharViscousOut 0.38s cubic-bezier(0.7, 0, 0.84, 0) both;
  animation-delay: calc(var(--char-i, 0) * 4ms);
}

body > nav.nav-open .nav-menu > li > a:hover .nav-char,
body > nav.nav-open .nav-menu > li > a:focus-visible .nav-char {
  animation: navCharViscousHover 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--char-i, 0) * 15ms);
  will-change: transform;
}

@keyframes navCharViscousIn {
  0% { transform: translateY(72%) skewY(4deg) scaleY(1.04); opacity: 0; }
  62% { transform: translateY(-7%) skewY(-1.5deg) scaleY(0.985); opacity: 1; }
  100% { transform: translateY(0) skewY(0deg) scaleY(1); opacity: 1; }
}

@keyframes navCharViscousOut {
  0% { transform: translateY(0) skewY(0deg) scaleY(1); opacity: 1; }
  100% { transform: translateY(-48%) skewY(-3deg) scaleY(1.03); opacity: 0; }
}

@keyframes navCharViscousHover {
  0% { transform: translateY(0) skewY(0deg) scaleY(1); opacity: 1; }
  36% { transform: translateY(-124%) skewY(-3deg) scaleY(1.035); opacity: 1; }
  37% { transform: translateY(-124%) skewY(0deg) scaleY(1); opacity: 0; }
  38% { transform: translateY(118%) skewY(0deg) scaleY(1); opacity: 0; }
  39% { transform: translateY(118%) skewY(3deg) scaleY(1.035); opacity: 1; }
  74% { transform: translateY(-7%) skewY(-1deg) scaleY(0.99); opacity: 1; }
  100% { transform: translateY(0) skewY(0deg) scaleY(1); opacity: 1; }
}

/* Width authority after all pill overrides */
body > nav.nav-open,
body > nav.nav-open:hover,
body > nav.nav-open:focus-within {
  width: min(92vw, 980px);
}

body > nav:not(.nav-open),
body > nav:not(.nav-open):hover,
body > nav:not(.nav-open):focus-within {
  width: min(86vw, 260px);
}

@media (max-width: 900px) {
  body > nav.nav-open,
  body > nav.nav-open:hover,
  body > nav.nav-open:focus-within {
    width: calc(100vw - 28px);
  }

  body > nav:not(.nav-open),
  body > nav:not(.nav-open):hover,
  body > nav:not(.nav-open):focus-within {
    width: min(calc(100vw - 28px), 230px);
  }
}
.footer-addr {
  color: rgba(154, 172, 158, 0.75) !important;
}
.footer-copy {
  color: rgba(154, 172, 158, 0.6) !important;
}
.footer-credit {
  color: rgba(184, 151, 90, 0.72) !important;
}

/* Final nav material: clean adaptive glass, no specular 3D band */
body > nav {
  --nav-surface: rgba(248, 247, 242, 0.72);
  --nav-border: rgba(6, 61, 42, 0.22);
  --nav-ink: var(--corporate-green);
  --nav-muted-ink: var(--editorial-ink);
  --nav-control: rgba(255, 255, 255, 0.38);
  --nav-control-hover: rgba(6, 61, 42, 0.08);
  --nav-shadow: 0 10px 28px rgba(17, 23, 18, 0.10);
  background: var(--nav-surface) !important;
  border-color: var(--nav-border) !important;
  box-shadow: var(--nav-shadow) !important;
  backdrop-filter: blur(24px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.05) !important;
}

body > nav::before {
  display: none !important;
}

body > nav.nav-on-dark {
  --nav-surface: rgba(248, 247, 242, 0.78);
  --nav-border: rgba(248, 247, 242, 0.34);
  --nav-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

body > nav.nav-on-light {
  --nav-surface: rgba(255, 255, 255, 0.46);
  --nav-border: rgba(6, 61, 42, 0.18);
  --nav-shadow: 0 8px 22px rgba(17, 23, 18, 0.08);
}

body > nav.nav-open,
body > nav.nav-open:hover,
body > nav.nav-open:focus-within {
  background: var(--nav-surface) !important;
  border-color: var(--nav-border) !important;
  box-shadow: var(--nav-shadow) !important;
}

.nav-logo img {
  filter: none !important;
  object-fit: contain;
}

.nav-menu > li > a {
  color: var(--nav-muted-ink) !important;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  color: var(--nav-ink) !important;
  background: var(--nav-control-hover) !important;
}

.lang-trigger,
.mobile-lang-trigger,
.nav-hamburger {
  color: var(--nav-muted-ink) !important;
  background: var(--nav-control) !important;
  border-color: var(--nav-border) !important;
  box-shadow: none !important;
}

.lang-trigger:hover,
.mobile-lang-trigger:hover,
.nav-hamburger:hover,
body > nav.nav-open .nav-hamburger {
  color: var(--nav-ink) !important;
  background: var(--nav-control-hover) !important;
  border-color: rgba(6, 61, 42, 0.30) !important;
}

.nav-hamburger span {
  background: var(--nav-ink) !important;
}

body > nav.nav-on-dark .nav-hamburger,
body > nav.nav-on-dark .lang-trigger,
body > nav.nav-on-dark .mobile-lang-trigger {
  --nav-control: rgba(255, 255, 255, 0.32);
}

body > nav.nav-on-dark .nav-hamburger:hover,
body > nav.nav-on-dark .lang-trigger:hover,
body > nav.nav-on-dark .mobile-lang-trigger:hover,
body > nav.nav-on-dark.nav-open .nav-hamburger {
  background: rgba(6, 61, 42, 0.09) !important;
}

body > nav.nav-on-light .nav-hamburger,
body > nav.nav-on-light .lang-trigger,
body > nav.nav-on-light .mobile-lang-trigger {
  --nav-control: rgba(255, 255, 255, 0.34);
}

body > nav.nav-open .nav-menu {
  background: transparent !important;
}

@media (max-width: 900px) {
  body > nav.nav-open .nav-menu {
    background: rgba(255, 255, 255, 0.34) !important;
    border-color: var(--nav-border) !important;
    box-shadow: none !important;
  }
}

/* Home hero turn: centered mineral poster with contextual nav */
.hero {
  grid-template-columns: minmax(0, 1fr) !important;
  place-items: center !important;
  text-align: center !important;
  padding: clamp(118px, 14vh, 156px) clamp(22px, 7vw, 96px) clamp(118px, 14vh, 156px) !important;
}

.hero-content {
  max-width: 880px !important;
  justify-self: center;
  transform: translateY(-3.8vh) !important;
}

.hero-ornament {
  justify-content: center;
}

.hero-ornament::before {
  display: none;
}

.hero-title em,
.hero-tagline {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
}

.hero-title em {
  font-weight: 500;
  letter-spacing: -0.025em;
}

.hero-tagline {
  max-width: 620px !important;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(1.18rem, 1.9vw, 1.52rem) !important;
  line-height: 1.55 !important;
}

.proof-strip {
  max-width: 980px;
  width: min(100%, 980px);
  align-self: end;
}

@keyframes heroCopyIn {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(-3.8vh);
    filter: blur(0);
  }
}

@media (max-width: 980px) {
  .hero {
    min-height: 100svh !important;
    padding-top: 126px !important;
    padding-bottom: 122px !important;
  }

  .hero-content {
    transform: translateY(-4vh) !important;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 112px 22px 108px !important;
  }

  .hero-title {
    font-size: clamp(3rem, 13vw, 4.35rem) !important;
  }

  .hero-tagline {
    font-size: 1.12rem !important;
  }
}

/* Mobile authority: keep navigation and page layout inside the viewport */
html,
body {
  max-width: 100%;
  overflow-x: clip;
  overflow-y: visible;
  background-color: var(--stone-deep);
  background-image:
    linear-gradient(180deg, rgba(2, 8, 4, 0.90), rgba(2, 8, 4, 0.96)),
    url('../malachite_bg.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

section,
article,
div,
ul,
li,
p,
h1,
h2,
h3,
a,
button {
  min-width: 0;
}

p,
h1,
h2,
h3,
a,
button,
label {
  overflow-wrap: anywhere;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

body.nav-menu-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  body > nav,
  body > nav:hover,
  body > nav:focus-within,
  body > nav:not(.nav-open),
  body > nav:not(.nav-open):hover,
  body > nav:not(.nav-open):focus-within {
    top: 12px;
    width: min(calc(100svw - 24px), 232px);
    min-height: 52px;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 6px 8px 6px 16px;
    overflow: hidden;
  }

  body > nav.nav-open,
  body > nav.nav-open:hover,
  body > nav.nav-open:focus-within {
    top: 12px;
    width: calc(100svw - 24px);
    max-width: 520px;
    max-height: calc(100svh - 24px);
    min-height: 0;
    grid-template-columns: 1fr auto;
    grid-template-rows: 44px auto auto;
    align-items: start;
    gap: 12px;
    padding: 8px;
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 28px;
  }

  body > nav.nav-open .nav-logo {
    min-width: 0;
    justify-self: start;
  }

  body > nav.nav-open .nav-hamburger {
    justify-self: end;
  }

  body > nav.nav-open .nav-menu {
    grid-column: 1 / -1;
    display: flex;
    position: static;
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: start;
    gap: 4px;
    padding: 8px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    overflow: visible;
    border: 1px solid var(--nav-border) !important;
    border-radius: 22px;
  }

  body > nav.nav-open .nav-menu > li,
  body > nav.nav-open .nav-menu > li > a {
    width: 100%;
  }

  body > nav.nav-open .nav-menu > li > a {
    min-height: 44px;
    height: auto;
    justify-content: center;
    padding: 12px 14px;
    white-space: normal;
    text-align: center;
  }

  body > nav.nav-open .nav-right {
    grid-column: 1 / -1;
    display: none;
  }

  .nav-menu-lang-item {
    display: block;
    width: 100%;
    padding: 8px 0 0;
  }

  .mobile-lang-trigger {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .mobile-lang-drop {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    transform: none;
    border-radius: 16px;
    overflow: hidden;
  }

  .mobile-lang-drop a {
    justify-content: center;
    padding: 10px 12px;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 640px) {
  body > nav,
  body > nav:hover,
  body > nav:focus-within,
  body > nav:not(.nav-open),
  body > nav:not(.nav-open):hover,
  body > nav:not(.nav-open):focus-within {
    width: min(calc(100svw - 20px), 224px);
  }

  body > nav.nav-open,
  body > nav.nav-open:hover,
  body > nav.nav-open:focus-within {
    width: calc(100svw - 20px);
  }
}

/* Mobile contrast authority for light editorial pages */
@media (max-width: 900px) {
  .page-vuelo section:not(.hero),
  .page-promocion section:not(.hero),
  .page-home .decision-system {
    color: var(--editorial-ink);
  }

  .page-vuelo section:not(.hero) .section-title,
  .page-vuelo section:not(.hero) .v-title,
  .page-vuelo section:not(.hero) .dif-title,
  .page-vuelo section:not(.hero) .faq-q-text,
  .page-vuelo section:not(.hero) .definition-block p,
  .page-vuelo section:not(.hero) .cstep-q,
  .page-vuelo section:not(.hero) .result-title,
  .page-vuelo section:not(.hero) label,
  .page-promocion section:not(.hero) .section-title,
  .page-promocion section:not(.hero) .step-title,
  .page-promocion section:not(.hero) .p-title,
  .page-promocion section:not(.hero) .cr-label,
  .page-promocion section:not(.hero) .cta-title,
  .page-home .decision-system .decision-title,
  .page-home .decision-system .decision-slab h3 {
    color: var(--editorial-ink) !important;
  }

  .page-vuelo section:not(.hero) .section-body,
  .page-vuelo section:not(.hero) .v-desc,
  .page-vuelo section:not(.hero) .dif-desc,
  .page-vuelo section:not(.hero) .faq-a,
  .page-vuelo section:not(.hero) .checker-intro,
  .page-vuelo section:not(.hero) .form-intro,
  .page-vuelo section:not(.hero) .result-body,
  .page-vuelo section:not(.hero) .form-check label,
  .page-promocion section:not(.hero) .section-body,
  .page-promocion section:not(.hero) .p-desc,
  .page-promocion section:not(.hero) .step-desc,
  .page-promocion section:not(.hero) .cta-sub,
  .page-home .decision-system .decision-copy,
  .page-home .decision-system .decision-slab p {
    color: var(--editorial-muted) !important;
  }

  .page-vuelo section:not(.hero) .section-eyebrow,
  .page-vuelo section:not(.hero) .v-icon,
  .page-vuelo section:not(.hero) .dif-n,
  .page-vuelo section:not(.hero) .cstep-num,
  .page-vuelo section:not(.hero) .result-label,
  .page-vuelo section:not(.hero) .result-cta-text,
  .page-vuelo section:not(.hero) .floor.new .floor-label,
  .page-promocion section:not(.hero) .section-eyebrow,
  .page-promocion section:not(.hero) .p-label,
  .page-promocion section:not(.hero) .step-num,
  .page-promocion section:not(.hero) .cta-title em,
  .page-promocion section:not(.hero) .cta-email,
  .page-home .decision-system .decision-kicker,
  .page-home .decision-system .decision-token {
    color: var(--corporate-green) !important;
  }
}

@media (max-width: 768px) {
  footer {
    margin: 0;
    min-height: 0;
    justify-content: center;
    background:
      linear-gradient(180deg, rgba(2, 8, 4, 0.82), rgba(2, 8, 4, 0.90)),
      url('../malachite_bg.webp') center center / cover no-repeat;
    padding: 44px 24px calc(44px + env(safe-area-inset-bottom, 0px));
  }

  .page-promocion .cta-section {
    padding-bottom: 64px;
  }
}

/* Final responsive navigation authority */
@media (min-width: 901px) {
  body > nav,
  body > nav:hover,
  body > nav:focus-within,
  body > nav.nav-open,
  body > nav.nav-open:hover,
  body > nav.nav-open:focus-within,
  body > nav:not(.nav-open),
  body > nav:not(.nav-open):hover,
  body > nav:not(.nav-open):focus-within {
    top: 18px;
    width: min(92vw, 980px);
    min-height: 56px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: 7px 10px 7px 16px;
    overflow: visible;
    transform: translateX(-50%) !important;
  }

  body > nav .nav-menu,
  body > nav.nav-open .nav-menu,
  body > nav .nav-right,
  body > nav.nav-open .nav-right {
    display: flex;
    position: static;
    width: auto;
    max-width: none;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transform: none;
  }

  body > nav .nav-menu,
  body > nav.nav-open .nav-menu {
    justify-self: center;
    justify-content: center;
  }

  body > nav .nav-right,
  body > nav.nav-open .nav-right {
    justify-self: end;
  }

  body > nav .nav-hamburger {
    display: none;
  }

  body > nav:not(.nav-expanded):not(:hover):not(:focus-within) .nav-menu > li > a,
  body > nav:not(.nav-open) .nav-menu > li > a {
    --nav-cascade-y: 0;
    --nav-cascade-scale: 1;
    opacity: 1;
  }

  body > nav .nav-menu .nav-char {
    animation: navCharViscousIn 0.84s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--nav-i, 0) * 34ms + var(--char-i, 0) * 11ms);
  }

  body > nav .nav-menu > li > a:hover .nav-char,
  body > nav .nav-menu > li > a:focus-visible .nav-char {
    animation: navCharViscousHover 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--char-i, 0) * 15ms);
    will-change: transform;
  }

  body > nav .nav-logo {
    min-width: 0;
    padding-right: 8px;
  }
}

@media (max-width: 900px) {
  body > nav,
  body > nav:hover,
  body > nav:focus-within,
  body > nav.nav-open,
  body > nav.nav-open:hover,
  body > nav.nav-open:focus-within,
  body > nav:not(.nav-open),
  body > nav:not(.nav-open):hover,
  body > nav:not(.nav-open):focus-within {
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    width: 100svw;
    max-width: none;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible;
    transform: none !important;
  }

  body > nav .nav-logo,
  body > nav .nav-hamburger {
    min-width: 56px;
    height: 56px;
    border: 1px solid var(--nav-border) !important;
    border-radius: 999px;
    background: var(--nav-surface) !important;
    box-shadow: var(--nav-shadow) !important;
    backdrop-filter: blur(24px) saturate(1.05);
    -webkit-backdrop-filter: blur(24px) saturate(1.05);
  }

  body > nav .nav-logo {
    width: 74px;
    justify-content: center;
    padding: 0 14px;
  }

  body > nav .nav-logo img {
    width: 42px;
    height: 42px;
  }

  body > nav .nav-logo-text,
  body > nav .nav-right {
    display: none !important;
  }

  body > nav .nav-hamburger {
    display: flex;
    width: 56px;
    flex: 0 0 56px;
  }

  body > nav .nav-menu {
    display: none;
  }

  body > nav.nav-open .nav-menu {
    position: fixed;
    top: calc(80px + env(safe-area-inset-top, 0px));
    right: 14px;
    left: auto;
    grid-column: auto;
    display: flex;
    width: min(330px, calc(100svw - 28px));
    max-width: none;
    max-height: calc(100svh - 104px - env(safe-area-inset-top, 0px));
    flex-direction: column;
    align-items: stretch;
    justify-content: start;
    gap: 6px;
    margin: 0;
    padding: 10px;
    overflow: auto;
    overscroll-behavior: contain;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.90), rgba(242,240,234,0.78)),
      rgba(242, 240, 234, 0.86) !important;
    border: 1px solid var(--nav-border) !important;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(17, 23, 18, 0.18) !important;
    backdrop-filter: blur(26px) saturate(1.08);
    -webkit-backdrop-filter: blur(26px) saturate(1.08);
  }

  body > nav.nav-open .nav-menu > li,
  body > nav.nav-open .nav-menu > li > a {
    width: 100%;
  }

  body > nav.nav-open .nav-menu > li > a {
    min-height: 48px;
    height: auto;
    justify-content: flex-start;
    padding: 13px 14px;
    text-align: left;
    white-space: normal;
    color: var(--editorial-ink) !important;
  }

  body > nav.nav-open .nav-menu > li > a.active,
  body > nav.nav-open .nav-menu > li > a:hover {
    color: var(--corporate-green) !important;
  }

  body > nav.nav-open .nav-menu .nav-char,
  body > nav.nav-open .nav-menu > li > a.active .nav-char {
    opacity: 1;
    transform: translateY(0) skewY(0deg) scaleY(1);
  }

  .nav-menu-lang-item {
    display: block;
    width: 100%;
    padding-top: 6px;
  }

  .mobile-lang-trigger {
    width: 100%;
    min-height: 44px;
    justify-content: space-between;
    padding: 10px 14px;
  }

  .mobile-lang-drop {
    display: none;
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 6px;
    padding: 6px 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    border-radius: 16px;
    overflow: hidden;
  }

  .mobile-lang-drop.open {
    display: block;
  }

  .mobile-lang-drop a {
    justify-content: flex-start;
    padding: 10px 12px;
    white-space: normal;
    text-align: left;
  }
}

/* Reading text authority: justify medium and long body copy only */
:where(
  .section-body,
  .card-desc,
  .decision-copy,
  .decision-slab p,
  .p-desc,
  .step-desc,
  .v-desc,
  .dif-desc,
  .definition-block p,
  .checker-intro,
  .form-intro,
  .result-body,
  .form-success-body,
  .faq-a,
  .privacy-body p,
  .privacy-body li
) {
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  hyphens: auto;
  text-wrap: pretty;
}

.hero .hero-lead,
.page-hero .hero-lead {
  text-align: inherit;
  text-align-last: auto;
  hyphens: auto;
  text-wrap: pretty;
}

html[dir="rtl"] :where(
  .section-body,
  .card-desc,
  .decision-copy,
  .decision-slab p,
  .p-desc,
  .step-desc,
  .v-desc,
  .dif-desc,
  .definition-block p,
  .checker-intro,
  .form-intro,
  .result-body,
  .form-success-body,
  .faq-a,
  .privacy-body p,
  .privacy-body li
) {
  text-align-last: right;
}

/* Mobile hamburger contrast on dark imagery */
@media (max-width: 900px) {
  body > nav.nav-on-dark .nav-hamburger,
  body > nav.nav-on-dark .nav-hamburger:hover,
  body > nav.nav-on-dark.nav-open .nav-hamburger,
  body > nav.nav-on-dark.nav-open .nav-hamburger:hover,
  body > nav.nav-on-dark.nav-open .nav-hamburger:focus-visible {
    color: var(--corporate-green) !important;
    background: rgba(248, 247, 242, 0.94) !important;
    border-color: rgba(248, 247, 242, 0.72) !important;
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  }

  body > nav.nav-on-dark .nav-hamburger span,
  body > nav.nav-on-dark.nav-open .nav-hamburger span {
    background: var(--corporate-green) !important;
  }

  body > nav.nav-on-dark .nav-hamburger:focus-visible {
    outline: 2px solid rgba(212, 180, 131, 0.92);
    outline-offset: 4px;
  }
}
