/* ==========================================================================
   CORPORACIÓN CULTURAL LUCILA — Base editorial 1945
   v2.0 · Corregido: márgenes, ritmo vertical, escala tipográfica
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(17px, 1.05vw, 19px);
  background-color: var(--papel);
  color: var(--tinta);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Textura sutil de papel prensa — capa por encima pero no bloqueante */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.20 0 0 0 0 0.12 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

img, picture, video { max-width: 100%; display: block; height: auto; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

/* ============================ PALETA 1945 ============================ */
:root {
  --papel:        #F0E6D2;
  --papel-claro:  #F7EFDD;
  --tinta:        #2B1E14;
  --tinta-suave:  #5A4632;
  --rojo-oxido:   #7A2E1E;
  --rojo-fuego:   #A8352A;
  --mostaza:      #B8862F;
  --verde-botella:#3B4A38;
  --azul-petroleo:#2E4A52;
  --crema-borde:  #D9C7A8;
  --sepia-linea:  #B9A181;
  --dorado:       #9C7A2E;

  --serif-display: 'Playfair Display', 'Times New Roman', serif;
  --serif-body:    'Cormorant Garamond', Georgia, serif;
  --serif-alt:     'DM Serif Display', Georgia, serif;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --sombra-papel:  0 2px 6px rgba(43, 30, 20, 0.08), 0 1px 2px rgba(43, 30, 20, 0.06);
  --sombra-card:   0 4px 16px rgba(43, 30, 20, 0.10), 0 1px 3px rgba(43, 30, 20, 0.08);
  --sombra-hover:  0 12px 32px rgba(43, 30, 20, 0.18), 0 4px 8px rgba(43, 30, 20, 0.10);
  --focus-ring:    0 0 0 3px rgba(168, 53, 42, 0.35);

  --trans: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Espaciado fluido con clamp para evitar saltos */
  --container-pad: clamp(20px, 4vw, 40px);
  --section-pad-y:  clamp(64px, 9vw, 128px);
  --section-pad-y-sm: clamp(48px, 6vw, 80px);
  --block-gap:     clamp(24px, 3vw, 48px);

  --container-max: 1240px;
  --navbar-height: 76px;
}

/* ============================ ACCESIBILIDAD ============================ */
.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  padding: 12px 20px;
  background: var(--rojo-oxido);
  color: var(--papel-claro);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 9999;
  transition: top var(--trans);
}
.skip-link:focus { top: 16px; outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

*:focus-visible { outline: 2px solid var(--rojo-fuego); outline-offset: 3px; }

/* ============================ TIPOGRAFÍA ============================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--tinta);
  text-wrap: balance;
}

p { text-wrap: pretty; }

.title-display {
  font-family: var(--serif-display);
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--tinta);
  margin-bottom: 16px;
}
.title-display--light { color: var(--papel-claro); }

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--rojo-oxido);
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid currentColor;
}
.eyebrow i { margin-right: 6px; font-size: 0.75rem; }
.eyebrow--light { color: var(--mostaza); }

.section-lead {
  font-family: var(--serif-body);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  font-style: italic;
  color: var(--tinta-suave);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.header-flourish {
  margin-top: 28px;
  font-size: 1.4rem;
  color: var(--mostaza);
  letter-spacing: 1em;
  padding-left: 1em;
  opacity: 0.7;
  text-align: center;
}

.drop-cap > p::first-letter {
  font-family: var(--serif-display);
  font-size: 4.2em;
  font-weight: 900;
  float: left;
  line-height: 0.85;
  margin: 6px 12px 0 0;
  color: var(--rojo-oxido);
  font-style: italic;
}

/* ============================ LAYOUT ============================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  position: relative;
  z-index: 2;
  width: 100%;
}

.section {
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  position: relative;
}

.section--paper { background: var(--papel); }
.section--cream { background: var(--papel-claro); }
.section--dark  { background: var(--tinta); color: var(--papel); }
.section--dark .title-display,
.section--dark h2,
.section--dark h3 { color: var(--papel-claro); }
.section--dark p { color: rgba(240, 230, 210, 0.82); }

.section-header {
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.text-center { text-align: center; }

/* ============================ BOTONES ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  background: var(--rojo-oxido);
  color: var(--papel-claro);
  border: 1.5px solid var(--rojo-oxido);
  transition: var(--trans);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  line-height: 1;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rojo-fuego);
  transform: translateY(100%);
  transition: transform var(--trans);
  z-index: 0;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover {
  color: var(--papel-claro);
  border-color: var(--rojo-fuego);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(122, 46, 30, 0.3);
}
.btn:hover::before { transform: translateY(0); }
.btn i { font-size: 0.85rem; }
.btn--lg { padding: 16px 36px; font-size: 0.75rem; }
.btn--full { width: 100%; }

.btn-outline {
  background: transparent;
  color: var(--tinta);
  border: 1.5px solid var(--tinta);
}
.btn-outline::before { background: var(--tinta); }
.btn-outline:hover {
  background: var(--tinta);
  color: var(--papel-claro);
  border-color: var(--tinta);
}
.section--dark .btn-outline { color: var(--papel-claro); border-color: var(--papel-claro); }
.section--dark .btn-outline::before { background: var(--papel-claro); }
.section--dark .btn-outline:hover { color: var(--tinta); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--rojo-oxido);
  transition: var(--trans);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.link-arrow i { transition: transform var(--trans); }
.link-arrow:hover { border-bottom-color: var(--rojo-oxido); }
.link-arrow:hover i { transform: translateX(4px); }

/* ============================ NAVBAR ============================ */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background: rgba(240, 230, 210, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px 0;
  z-index: 1000;
  border-bottom: 1px solid var(--sepia-linea);
  transition: var(--trans);
}
.navbar::after {
  content: "";
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  height: 1px;
  background: var(--sepia-linea);
  opacity: 0.5;
}

.navbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 40px;
}
.navbar__logo img {
  height: 42px;
  width: auto;
  display: block;
}

/* Fallback textual si el SVG no carga */
.navbar__logo-fallback {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--tinta);
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.navbar__logo-fallback small {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--rojo-oxido);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: clamp(1.2rem, 2vw, 2rem);
  align-items: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.nav-links a {
  color: var(--tinta);
  transition: var(--trans);
  padding: 8px 0;
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 2px; left: 50%;
  width: 0; height: 1.5px;
  background: var(--rojo-oxido);
  transition: var(--trans);
  transform: translateX(-50%);
}
.nav-links a:hover { color: var(--rojo-oxido); }
.nav-links a:hover::after { width: 100%; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 26px; height: 1.5px;
  background: var(--tinta);
  transition: var(--trans);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================ HERO ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(var(--navbar-height) + 60px) var(--container-pad) 100px;
  background: var(--papel);
  overflow: hidden;
  color: var(--tinta);
  isolation: isolate;
}

/* Fondo con gradiente editorial (funciona sin imágenes) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184, 134, 47, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(122, 46, 30, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(46, 74, 82, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--papel-claro) 0%, var(--papel) 100%);
}

.hero__bg {
  position: absolute;
  top: 76px;                              /* altura del navbar */
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background-image: url('../img/lucila-godoy-alcayaga-1920.jpg');
  background-size: contain;               /* 👈 en vez de 'cover' */
  background-position: center top;        /* 👈 ancla la cabeza arriba */
  background-repeat: no-repeat;
  background-color: var(--papel);         /* relleno del espacio sobrante */
  filter: sepia(0.15) brightness(0.9) contrast(1.02);
  opacity: 0.85;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse at 50% 30%,
    rgba(247, 239, 221, 0.15) 0%,
    rgba(240, 230, 210, 0.7) 55%,
    rgba(240, 230, 210, 0.95) 100%
  );
  pointer-events: none;
}

.hero__texture {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(184, 134, 47, 0.10) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(122, 46, 30, 0.08) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.hero__arches {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  color: var(--rojo-oxido);
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}
.hero__arches svg { width: 100%; height: 100%; display: block; }

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  animation: heroIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero__kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--tinta-suave);
  margin-bottom: 32px;
  padding: 10px 24px;
  border-top: 1px solid var(--sepia-linea);
  border-bottom: 1px solid var(--sepia-linea);
  line-height: 1;
}

.hero__title {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero__title-line { display: block; }
.hero__title-line--italic {
  font-style: italic;
  font-weight: 400;
  color: var(--tinta-suave);
}
.hero__title-line--red {
  color: var(--rojo-oxido);
  font-family: var(--serif-alt);
  font-weight: 400;
  font-style: italic;
  position: relative;
  display: inline-block;
}
.hero__title-line--red::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  background: var(--mostaza);
  margin: 14px auto 0;
}

.hero__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 32px;
  max-width: 460px;
  width: 100%;
  color: var(--mostaza);
}
.hero__rule span { flex: 1; height: 1px; background: var(--sepia-linea); }
.hero__rule i { font-size: 1rem; }

.hero__lead {
  font-family: var(--serif-body);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-style: italic;
  color: var(--tinta-suave);
  margin-bottom: 32px;
  line-height: 1.5;
  max-width: 560px;
}

.hero__quote {
  font-family: var(--serif-body);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-style: italic;
  color: var(--rojo-oxido);
  margin-bottom: 6px;
}
.hero__quote-author {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tinta-suave);
  margin-bottom: 44px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__seal {
  position: absolute;
  top: 22%;
  right: 5%;
  width: clamp(80px, 9vw, 130px);
  opacity: 0.35;
  animation: rotateSeal 60s linear infinite;
  pointer-events: none;
  z-index: 2;
}
.hero__seal img { width: 100%; }

@keyframes rotateSeal { to { transform: rotate(360deg); } }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================ RIBBON ============================ */
.ribbon {
  display: flex;
  gap: 2.5rem;
  background: var(--rojo-oxido);
  color: var(--papel-claro);
  padding: 16px 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  border-top: 1px solid var(--mostaza);
  border-bottom: 1px solid var(--mostaza);
}
.ribbon__track {
  display: flex;
  gap: 2.5rem;
  padding-left: 2.5rem;
  animation: scrollRibbon 40s linear infinite;
  flex-shrink: 0;
  min-width: 100%;
}
.ribbon__track span { flex-shrink: 0; }

@keyframes scrollRibbon {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ============================ ABOUT ============================ */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-text { display: flex; flex-direction: column; }
.about-text .eyebrow { align-self: flex-start; }
.about-text h2 { margin-bottom: 20px; }
.about-text p {
  font-family: var(--serif-body);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  color: var(--tinta-suave);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.mv-cards {
  display: grid;
  gap: 24px;
}

.mv-card {
  background: var(--papel-claro);
  border: 1px solid var(--sepia-linea);
  padding: 42px 32px 32px;
  position: relative;
  transition: var(--trans);
  box-shadow: var(--sombra-papel);
}
.mv-card::before {
  content: "";
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid var(--sepia-linea);
  opacity: 0.35;
  pointer-events: none;
  transition: var(--trans);
}
.mv-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-card);
  border-color: var(--rojo-oxido);
}
.mv-card:hover::before { opacity: 0.6; border-color: var(--rojo-oxido); }

.mv-card__ornament {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--papel);
  padding: 0 14px;
  color: var(--mostaza);
  font-size: 1.2rem;
  line-height: 1;
}

.mv-card h3 {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.55rem;
  color: var(--rojo-oxido);
  margin-bottom: 16px;
  font-weight: 600;
}
.mv-card p {
  font-family: var(--serif-body);
  font-size: 1.02rem;
  color: var(--tinta-suave);
  margin-bottom: 0.8rem;
  line-height: 1.65;
}
.mv-card p:last-child { margin-bottom: 0; }