/* ─── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Fondos — 70% del sitio vive aquí */
  --parchment: #fcfaf7;
  --bone: #f2eee8;
  --linen: #faf9f6;
  --deep-cedar: #1a1512;
  --stone: #ede8e0;
  --stone-dark: #e0d9cf;

  /* Tinta — más cálida que negro puro */
  --ink: #1e1a16;
  --ink-80: rgba(30, 26, 22, 0.8);
  --ink-40: rgba(30, 26, 22, 0.4);
  --ink-12: rgba(30, 26, 22, 0.12);
  --ink-06: rgba(30, 26, 22, 0.06);

  /* Profundo — reemplaza al negro frío en secciones oscuras */
  --deep: #1c1410;
  --cedar: #380f12;

  /* Azafrán tostado — más tibetano, menos "lujo occidental" */
  --saffron: #b8832a;
  --saffron-80: #b8842ab2;
  --saffron-50: #b8842a80;
  --saffron-lt: rgba(184, 131, 42, 0.1);
  --saffron-md: rgba(184, 131, 42, 0.28);

  /* Terracota — reemplaza al crimson. Solo en microdetalles */
  --terra: #7a3b2e;
  --terra-lt: rgba(122, 59, 46, 0.08);
  --f-display: 'Outfit', sans-serif;
  --f-serif: 'Cormorant Garamond', Georgia, serif;
  --ease-silk: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout Tokens */
  --side-padding: 6vw;
  --max-width: 1300px;
  --section-max-width: 1200px;
  --section-max-width-wide: 1400px;
  --section-padding: 3rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--f-display);
  font-weight: 300;
  background: var(--parchment);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── GLOBAL EDITORIAL LAYOUT ────────────────────────────── */
.section-inner {
  max-width: var(--section-max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

.section-inner-wide {
  max-width: var(--section-max-width-wide);
  margin: 0 auto;
  padding: 0 var(--side-padding);
}

.editorial-header {
  margin-bottom: 5rem;
}

.editorial-header.text-center {
  text-align: center;
}

.section-tag {
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 1.2rem;
  display: block;
  font-weight: 400;
}

.section-title {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 200;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0px;
  /* Manejado por el header */
}

.section-title i,
.section-title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
}

/* Seguridad: Trampa para bots */
.h-pot {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ─── BOTONES EDITORIALES ───────────────────────────────── */
.btn-editorial {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--saffron);
  font-weight: 500;
  margin-top: 1.5rem;
  transition: all 0.5s var(--ease-expo);
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
}

.btn-editorial:hover {
  gap: 1.4rem;
  color: var(--ink);
  border-bottom: 1px solid var(--saffron-50);
  transform: translateX(5px);
}

/* ─── CURSOR ─────────────────────────────────────────────── */
/* body { cursor: none; } */
#cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: transparent;
  border: 1.5px solid var(--saffron);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-silk), height 0.3s var(--ease-silk), background 0.3s, opacity 0.3s;
  display: block;
}

#cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 3px;
  background: var(--saffron);
  border-radius: 50%;
}

#cursor.expand {
  width: 36px;
  height: 36px;
  opacity: 0.6;
  background: transparent;
}

@media (max-width: 1024px) {
  #cursor {
    display: none !important;
  }
}

/* ─── NAV ────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* Aseguramos que esté sobre todo */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 4rem;
  transition: background 0.6s var(--ease-silk), padding 0.4s;
  background: transparent;
  /* Transparente por defecto */
  border-bottom: 1px solid transparent;
}

nav.scrolled,
nav.nav-solid {
  background: rgba(248, 244, 238, 0.94);
  backdrop-filter: blur(20px);
  padding: 1.2rem 4rem;
  border-bottom: 1px solid var(--ink-06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo-link-text {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--parchment);
  transition: color 0.4s, opacity 0.3s;
}

nav.scrolled .nav-logo-link-text,
nav.nav-solid .nav-logo-link-text {
  color: var(--ink);
}

.nav-logo-link-text:hover {
  opacity: 0.8;
}

.nav-logo-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  opacity: 0.9;
  transition: transform 0.4s var(--ease-silk);
}

.nav-logo-link-img:hover .nav-logo-img {
  transform: translateY(-6px) scale(1.05);
}

.nav-links {
  display: flex;
  gap: 2.8rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.80rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment);
  position: relative;
  transition: color 0.3s;
}

nav.scrolled .nav-links a,
nav.nav-solid .nav-links a {
  color: var(--ink-80);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--saffron);
  transition: width 0.4s var(--ease-expo);
}

.nav-links a:hover {
  color: var(--stone);
}

nav.scrolled .nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 0.68rem !important;
  letter-spacing: 0.22em !important;
  padding: 0.65rem 1.5rem;
  border: 1px solid rgba(237, 232, 224, 0.4) !important;
  border-radius: 0 !important;
  color: var(--stone) !important;
  transition: background 0.3s, color 0.3s, border-color 0.3s !important;
}

nav.scrolled .nav-cta,
nav.nav-solid .nav-cta {
  border-color: var(--ink-40) !important;
  color: var(--ink) !important;
}

.nav-cta:hover {
  background: var(--stone) !important;
  color: var(--ink) !important;
  border-color: var(--stone) !important;
}

nav.scrolled .nav-cta:hover {
  background: var(--ink) !important;
  color: var(--parchment) !important;
  border-color: var(--ink) !important;
}

.nav-cta::after {
  display: none !important;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--cedar);
  padding: 5rem 0 calc(1rem + env(safe-area-inset-bottom));
  color: rgba(237, 232, 224, 0.7);
}

.footer-top {
  width: 100%;
  margin-bottom: 6rem;
}

.footer-top .section-inner,
.footer-bottom .section-inner {
  padding-left: 0;
  padding-right: 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  /* Permitir que bajen las columnas */
  gap: 4rem;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(244, 240, 235, 0.08);
}

.footer-brand {
  flex: 1 1 300px;
  max-width: 400px;
}

.footer-logo-area {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.footer-logo {
  height: 48px;
  width: auto;
  transition: transform 0.4s var(--ease-silk);
}

.footer-logo:hover {
  transform: translateY(-6px) scale(1.05);
}

.footer-brand-name {
  font-family: var(--f-display);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--stone);
  font-weight: 500;
}

.footer-description {
  font-size: 0.85rem;
  line-height: 1.8;
  max-width: 320px;
  color: rgba(237, 232, 224, 0.6);
}

.footer-col-title {
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 2rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-col ul li a {
  font-size: 0.82rem;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: var(--stone);
}

.footer-bottom {
  padding: 0.01rem 0;
  /* border-top: 1px solid rgba(244, 240, 235, 0.05); */
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 1.5rem;
}

.footer-copy {
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: rgba(237, 232, 224, 0.4);
}

.footer-social {
  display: flex;
  gap: 4rem;
  /* Más espacio como en la imagen */
}

.footer-social a {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.3s;
  color: var(--stone);
}

.footer-social a:hover {
  color: var(--saffron);
}

.footer-credit {
  text-align: center;
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: var(--stone);
  opacity: 0.5;
  padding-top: 1rem;
  text-transform: uppercase;
}

.footer-credit a {
  color: inherit;
  font-weight: 500;
  transition: opacity 0.3s ease;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(244, 240, 235, 0.1);
}

.footer-credit a:hover {
  opacity: 1;
  text-decoration-color: var(--saffron);
}

/* ─── ANIMATIONS ─────────────────────────────────────────── */
.leaves-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.leaf {
  position: absolute;
  top: -50px;
  pointer-events: none;
  z-index: 2;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(1);
  }

  50% {
    opacity: 0.8;
    transform: scaleY(0.8);
  }
}

/* SCROLL REVEAL */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s var(--ease-expo), transform 0.9s var(--ease-expo);
}

.reveal.hidden {
  opacity: 0;
  transform: translateY(40px);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ─── MODALS SYSTEM ─────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: rgba(18, 16, 14, 0.94); */
  background: rgba(30, 26, 22, 0.4);
  z-index: 9000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.4s var(--ease-silk);
}

.modal-content {
  background: var(--parchment);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  padding: 4rem 3.5rem;
  position: relative;
  overflow-y: auto;
  display: none;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--ink-06);
  transform: translateY(30px);
  transition: transform 0.6s var(--ease-expo);
}

.modal-content.active {
  display: block;
  animation: fadeUp 0.6s var(--ease-expo);
}

/* Safety: Hide gallery components when not in use */
.modal-gallery {
  display: none;
}

.modal-gallery.active {
  display: flex !important;
}

.modal-overlay.active .modal-content.active {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--ink-40);
  cursor: pointer;
  line-height: 1;
  z-index: 10;
  transition: color 0.4s var(--ease-expo), transform 0.4s var(--ease-expo);
}

.modal-close:hover {
  transform: rotate(90deg);
  color: var(--ink);
}

.modal-header {
  text-align: center;
  margin-bottom: 3rem;
}

.modal-tag {
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--saffron);
  display: block;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--f-display);
  font-size: 2.2rem;
  font-weight: 200;
  margin-bottom: 1rem;
  color: var(--ink);
  line-height: 1.1;
}

.modal-intro {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-80);
  max-width: 450px;
  margin: 0 auto;
}

.modal-body-text {
  font-family: var(--font-main);
  line-height: 1.8;
  color: var(--ink-80);
  text-align: justify;
}

.modal-body-text p {
  margin-bottom: 1.2rem;
  text-align: justify;
  hyphens: auto;
  font-weight: 300;
  font-size: 1.10rem;
}

.modal-body-text strong {
  color: var(--ink);
  font-weight: 500;
  display: block;
  /* margin-bottom: 0.5rem; */
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-decoration: underline;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  nav {
    padding: 1.5rem 2rem;
  }

  nav.scrolled {
    padding: 1rem 2rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  footer {
    padding: 4rem 0 calc(2rem + env(safe-area-inset-bottom));
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Cuadrícula de 2 columnas */
    gap: 3rem 1.5rem;
    padding: 0 2.5rem;
    text-align: center;
    border-bottom: none;
    /* Eliminamos el borde de escritorio */
    margin-bottom: 2rem;
    padding-bottom: 0;
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .footer-col:last-of-type {
    grid-column: 1 / -1;
    margin-top: 1rem;
  }

  .footer-logo-area {
    justify-content: center;
  }

  .footer-description {
    max-width: 280px;
    margin: 0 auto;
    font-size: 0.8rem;
    opacity: 0.5;
  }

  .footer-col-title {
    margin-bottom: 1.2rem;
    font-size: 0.55rem;
    color: var(--saffron);
  }

  .footer-col ul {
    gap: 0.8rem;
    align-items: center;
  }

  .footer-col ul li a {
    font-size: 0.78rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
    border-top: none;
    /* Eliminamos el borde preventivo */
    padding: 2.5rem 2rem 0;
  }

  .footer-social {
    gap: 1.5rem;
    justify-content: center;
    width: 100%;
  }

  .footer-social a {
    font-size: 0.65rem;
  }

  .footer-copy {
    order: 2;
    line-height: 1.6;
    max-width: 260px;
    margin: 0 auto;
  }

  .footer-social {
    order: 1;
  }

  /* Mejora de legibilidad global - Upgrade a 1.25rem */
  p {
    font-size: 1.25rem;
    line-height: 1.75;
    /* Reducimos ligeramente el line-height al ser fuente más grande */
  }
}

@media (max-width: 640px) {
  nav {
    padding: 1.2rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}