/* ============================================================
   NICOL MILLÁN · EDICIÓN II — tratamiento oscuro/botánico
   Se carga junto a brand.css/pages.css; no redefine paleta ni
   tipografía (esas siguen siendo la ley del Brand Book), solo
   añade el sistema de capítulos numerados y el tratamiento de
   fotografía oscura usado en Home.
   ============================================================ */

:root { --rail-w: 84px; }

/* ---------- Tratamiento oscuro/botánico — igual línea a línea a la vista previa ---------- */
.moody { position: relative; overflow: hidden; }
.moody > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(.72) sepia(.08) contrast(1.06); }
.moody::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,18,12,.25), rgba(12,14,10,.55) 70%, rgba(10,12,9,.72));
  mix-blend-mode: multiply; pointer-events: none;
}
.moody::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 15%, rgba(171,186,124,.10), transparent 60%);
}

/* ---------- Capítulo: número + línea + etiqueta vertical ---------- */
.chapter { position: relative; display: grid; grid-template-columns: var(--rail-w) 1fr; }
.chapter-rail { position: relative; padding-top: clamp(2.6rem, 5vw, 4rem); display: flex; flex-direction: column; align-items: center; }
.chapter-num { font-family: var(--ff-sans); font-size: .72rem; letter-spacing: .08em; font-weight: 500; }
.chapter-line { width: 1px; flex: 1; background: var(--line); margin-top: 1.1rem; }
.chapter-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); margin-top: 1.6rem; white-space: nowrap; }
.chapter.on-dark .chapter-line { background: rgba(242,240,235,.22); }
.chapter.on-dark .chapter-label, .chapter.on-dark .chapter-num { color: rgba(242,240,235,.6); }
.chapter-content { padding: clamp(3.5rem, 7vw, 6rem) clamp(1.2rem, 3vw, 2.6rem) clamp(3.5rem, 7vw, 6rem) 0; }
.chapter-content .wrap { padding-inline: 0; }
@media (max-width: 760px) { :root { --rail-w: 44px; } .chapter-label { display: none; } }

/* ---------- Hero centrado (edición oscura) ----------
   La foto vive en .hero-media (background-image, editable desde /admin).
   El degradado oscuro va en pseudo-elementos del header, así el filtro de
   la foto no oscurece también el texto. */
.hero-ii { position: relative; height: 100svh; min-height: 660px; }
.hero-ii .hero-media {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: brightness(.62) saturate(.72) sepia(.08) contrast(1.06); /* anula el filtro/opacidad viejo de pages.css (.hero-media) */
  opacity: 1;
}
.hero-ii .hero-media::after { content: none; } /* anula el degradado viejo de pages.css */
.hero-ii .hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.62) saturate(.72) sepia(.08) contrast(1.06);
}
.hero-ii .hero-video[hidden] { display: none; }

/* ---------- Hero con foto en paginas internas (Experiences) — mismo tratamiento que hero-ii ---------- */
.hero .hero-media {
  filter: brightness(.62) saturate(.72) sepia(.08) contrast(1.06); /* anula grayscale/brightness(.7)/opacity(.5) de pages.css */
  opacity: 1;
}
.hero .hero-media::after {
  background: linear-gradient(180deg, rgba(15,18,12,.25), rgba(12,14,10,.55) 70%, rgba(10,12,9,.72)); /* anula el degradado viejo de pages.css */
}
.hero-ii::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15,18,12,.25), rgba(12,14,10,.55) 70%, rgba(10,12,9,.72));
}
.hero-ii::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 90% at 50% 15%, rgba(171,186,124,.10), transparent 60%);
}
.hero-eyebrow-v {
  position: absolute; left: clamp(1.2rem, 3vw, 2.6rem); top: 50%; transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl; color: rgba(242,240,235,.65); font-size: .66rem; letter-spacing: .24em;
  text-transform: uppercase; z-index: 2; max-width: 1.2rem;
}
@media (max-width: 760px) { .hero-eyebrow-v { display: none; } }
.hero-ii-center {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; color: var(--bone); padding: 0 1.5rem;
}
.hero-ii-mark { margin-bottom: 1.5rem; display: flex; justify-content: center; }
.hero-ii-mark svg { height: clamp(2.4rem, 1.6rem + 2vw, 3.6rem); width: auto; }
.hero-ii-word,
.hero-ii-center h1, .hero-ii-center h2 { color: var(--bone) !important; font-family: var(--ff-display); font-size: clamp(2.2rem, 1.2rem + 4.6vw, 4.6rem); letter-spacing: .02em; margin: 0; }
.hero-ii-word sup { font-size: .34em; top: -1.3em; }
.hero-ii-sub { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; margin-top: 1.1rem; color: rgba(242,240,235,.82); }
.hero-ii-tagline { font-family: var(--ff-display); font-style: italic; font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem); margin-top: 1.6rem; color: rgba(242,240,235,.92); }
.hero-ii-foot {
  position: absolute; left: 0; right: 0; bottom: clamp(1.4rem, 3vw, 2.2rem); z-index: 2;
  display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1.2rem, 3vw, 2.6rem);
  color: rgba(242,240,235,.7);
}
.hero-ii-scroll {
  width: 34px; height: 34px; border: 1px solid rgba(242,240,235,.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: .8rem; animation: ii-bob 2.4s ease-in-out infinite;
}
@keyframes ii-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.hero-ii-tag { font-size: .72rem; letter-spacing: .1em; display: flex; align-items: center; gap: .6rem; }
.hero-ii-tag::before { content: ''; width: 22px; height: 1px; background: rgba(242,240,235,.5); }

/* ---------- Marca grande (manifiesto / cierre) ---------- */
.chapter-mark { display: flex; justify-content: center; align-items: center; }
.chapter-mark svg { width: min(11vw, 150px); opacity: .55; }

/* ---------- Filmstrip (Stories) ---------- */
.filmstrip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.film { position: relative; aspect-ratio: 3/4; }
.film img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.6) saturate(.7) sepia(.08) contrast(1.05);
  transition: transform 1.2s cubic-bezier(.19,1,.22,1), filter .5s;
}
.film::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,9,.82), transparent 55%); pointer-events: none; }
.film:hover img { transform: scale(1.05); filter: brightness(.7) saturate(.8) sepia(.06) contrast(1.05); }
.film-cap { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1.1rem; z-index: 2; }
.film-cap .label { color: var(--butter); display: block; margin-bottom: .35rem; font-size: .62rem; }
.film-cap .t { font-family: var(--ff-display); font-size: 1.15rem; line-height: 1.2; color: var(--bone); }
@media (max-width: 820px) { .filmstrip { grid-template-columns: 1fr; } }

/* ---------- The Story teaser: texto + pasos ---------- */
.story-teaser-grid { grid-template-columns: 1fr 1.6fr; }
@media (max-width: 820px) { .story-teaser-grid { grid-template-columns: 1fr; } }

/* ---------- Pasos compactos (The Story teaser) ---------- */
.steps-ii { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
.step-ii { text-align: center; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.step-ii-icon { width: 38px; height: 38px; margin: 0 auto .9rem; border: 1px solid var(--ink-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.step-ii-icon svg { width: 16px; height: 16px; }
.step-ii-num { font-size: .68rem; letter-spacing: .1em; color: var(--ink-soft); }
.step-ii h3 { font-size: 1.15rem; margin: .4rem 0 .3rem; font-family: var(--ff-display); }
.step-ii p { font-size: .86rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 820px) { .steps-ii { grid-template-columns: 1fr 1fr; } }

/* ---------- Fichas oscuras (Experiences) ---------- */
.tiles-ii { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.tile-ii { position: relative; aspect-ratio: 4/5; }
.tile-ii img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.55) saturate(.65) sepia(.1) contrast(1.05);
  transition: transform 1.2s cubic-bezier(.19,1,.22,1);
}
.tile-ii::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,9,.86), rgba(10,12,9,.15) 60%); pointer-events: none; }
.tile-ii:hover img { transform: scale(1.05); }
.tile-ii-cap { position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1.1rem; z-index: 2; }
.tile-ii-cap .label { color: var(--butter); font-size: .6rem; display: block; margin-bottom: .3rem; }
.tile-ii-cap .t { font-family: var(--ff-display); font-size: 1.2rem; color: var(--bone); }
@media (max-width: 820px) { .tiles-ii { grid-template-columns: 1fr; } }

/* ---------- Cierre oscuro ---------- */
.closing-ii { position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--bone); }
.closing-ii-inner { position: relative; z-index: 2; padding: 3rem 1.5rem; }

/* ---------- Formulario por pasos (Discover The Story) ---------- */
.wizard-progress { display: flex; align-items: center; margin-bottom: 3rem; }
.wizard-line { flex: 1; height: 1px; background: var(--line); margin: 0 .4rem; }
.wizard-step { display: flex; flex-direction: column; align-items: center; gap: .4rem; opacity: .4; transition: opacity .3s; flex-shrink: 0; }
.wizard-step .n { font-family: var(--ff-display); font-style: italic; color: var(--plum); font-size: 1.1rem; }
.wizard-step .t { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; display: none; }
.wizard-step.active, .wizard-step.done { opacity: 1; }
.wizard-step.done { cursor: pointer; }
@media (min-width: 640px) { .wizard-step .t { display: block; } }

.narrative-form .form-section { display: none; }
.narrative-form .form-section.active { display: block; animation: wizard-fade .5s ease; }
@keyframes wizard-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.wizard-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 2.4rem; }
.wizard-nav .btn { margin: 0; }
.wizard-prev { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

/* ---------- Fotos editables desde /admin: ocultas hasta confirmar cual es la actual ----------
   Evita el destello de la foto/video anterior mientras Firestore responde. */
.dyn-img { opacity: 0 !important; transition: opacity .4s ease; }
.dyn-img.dyn-ready { opacity: 1 !important; }

/* ---------- Marca real (reemplaza el spiral "huella" antiguo) ----------
   Brillo fino al hover/focus, igual de sutil al que ya usa el wordmark. */
.brand-mark { display: inline-flex; transition: filter .6s cubic-bezier(.19,1,.22,1); }
.brand-mark svg { width: 100%; height: auto; display: block; }
.brand-mark:hover, .brand-mark:focus-within { filter: drop-shadow(0 0 6px var(--glow-soft)); }
.brand-mark--lg { width: clamp(140px, 20vw, 240px); color: var(--ink); margin: 0 auto; }
.brand-mark--sm { width: 46px; color: var(--bone); margin: 0 auto; }
.brand-mark--corner { width: 30px; height: 30px; opacity: .6; }

/* ---------- Footer delgado (igual a la vista previa) ---------- */
.foot-strip {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 1.4rem clamp(1.2rem, 3vw, 2.6rem); background: var(--ink); color: rgba(242,240,235,.55);
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
}
.foot-strip .logo-lockup { justify-self: start; display: inline-flex; align-items: center; gap: .6rem; color: var(--bone); }
.foot-strip .logo-lockup .word { font-family: var(--ff-display); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.foot-strip .brandmark { width: 18px; height: auto; }
.foot-strip .social-icons { justify-self: center; margin-top: 0; gap: 1.2rem; }
.foot-strip .social-icons svg { width: 24px; height: 24px; }
.foot-strip .social-icons a { transition: opacity .3s, filter .3s, transform .3s; }
.foot-strip .social-icons a:hover { opacity: 1; filter: drop-shadow(0 0 6px var(--glow-soft)); transform: translateY(-2px); }
.foot-strip-meta { justify-self: end; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.foot-strip .credit { color: rgba(242,240,235,.4); text-decoration: none; transition: color .3s; }
.foot-strip .credit:hover { color: rgba(242,240,235,.75); }
.foot-strip .tagline, .foot-strip .credit { text-transform: none; letter-spacing: .02em; }
.foot-strip-meta .sep { color: rgba(242,240,235,.3); }
@media (max-width: 760px) {
  .foot-strip { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .foot-strip .logo-lockup, .foot-strip .social-icons, .foot-strip-meta { justify-self: center; }
}
