/* descent.css — vertical part: footer (+ the VSL video facade). The series section lives in series.css.
   Mobile first (390px); wider rules at 960 / 1024 px. Tokens from tokens.css. */

.descent {
  position: relative;
  background: var(--stone-900);
  color: var(--bone-200);
}

.wrap {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 40rem; text-align: center; }

.dsec {
  position: relative;
  padding-block: var(--section-pad);
  background-color: var(--stone-900);
}
/* fire-lit stone: a faint ember bleeding in from alternate sides */
.dsec:nth-of-type(odd)::after,
.dsec:nth-of-type(even)::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.dsec > .wrap { position: relative; z-index: 1; }

/* ---------- persistent ember light ---------- */
.descent-light {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(80% 60% at 15% 100%, rgba(217, 84, 26, .08), transparent 70%);
  opacity: 0;
  transition: opacity .5s linear;
}
/* lit only in the vertical phases; never painted over the black cave stage (SPEC-v2 §2.4) */
html[data-phase="descent"] .descent-light,
html[data-phase="closing"] .descent-light { opacity: var(--dl, .9); }

/* the cave sits above the persistent light and the page */
#cueva { position: relative; z-index: 5; }

/* ---------- section heads ---------- */
.sec-head { margin-bottom: var(--s-7); }
.sec-head .eyebrow { margin-bottom: var(--s-3); }
.sec-head h2,
.wrap--narrow h2 {
  font-size: var(--fs-h2); font-weight: 360; line-height: 1.08; letter-spacing: -.01em;
}
.sec-head .trazo-line,
.wrap--narrow > .trazo-line { margin-top: var(--s-2); }
.wrap--narrow > .trazo-line { margin-inline: auto; }

/* reveal.js moves the gradient onto each split line; descenders need room inside the clip */
.title-fire .mline { padding-bottom: .08em; }
/* ---------- section dividers: ochre stroke + a small hand, resting on the seam ---------- */
.divider {
  position: relative; height: 0; z-index: 3;
}
.divider > * { position: absolute; top: 0; }
.divider__line {
  left: 50%; width: 160px; height: 18px; transform: translate(-50%, -50%);
}
.divider__line svg { width: 100%; height: 100%; margin: 0; overflow: visible; }
.divider__line path { stroke: var(--pig-ochre); stroke-width: 4; }
.divider__hand {
  left: calc(50% + 100px); width: 28px; height: 28px; transform: translate(0, -50%) rotate(12deg);
  opacity: .5; color: var(--pig-ochre);
}

/* ---------- slabs (carved stone tablets) ---------- */
.slab {
  position: relative;
  background: var(--grad-slab);
  border: 1px solid rgba(192, 138, 62, .22);
  border-radius: var(--r-slab);
  box-shadow: var(--sh-slab);
}
.slab::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: url("/assets/img/rock/rock-slab.webp") center / 400px 400px;
  mix-blend-mode: multiply; opacity: .25;
}
.slab > * { position: relative; z-index: 1; }

/* ---------- VSL video facade (hero.vsl.youtube_id; only rendered when a YouTube id is configured) ---------- */
.yt {
  position: relative; display: block; width: 100%; padding: 0;
  background: var(--stone-800);
  border: 1px solid rgba(192, 138, 62, .22);
  border-radius: var(--r-m);
  overflow: hidden; cursor: pointer;
  box-shadow: var(--sh-slab);
}
.yt--wide { aspect-ratio: 16 / 9; }
.yt img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: sepia(.35) saturate(.8) brightness(.85);
  opacity: 0; transition: opacity var(--d-s, .4s) ease-out;
}
.yt img.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .yt img { transition: none; } }
.yt::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 7, 5, 0) 40%, rgba(11, 7, 5, .75));
}
.yt__play {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background-image: var(--grad-btn);
  display: grid; place-items: center;
  box-shadow: 0 8px 30px -8px rgba(217, 84, 26, .7);
  transition: transform var(--d-xs) var(--ease-stroke);
}
.yt__play i {
  display: block; width: 22px; height: 24px; margin-left: 4px;
  background: var(--ink-on-fire);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.yt:hover .yt__play, .yt:focus-visible .yt__play { transform: scale(1.08); }
.yt-frame { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--void); border: 1px solid rgba(192, 138, 62, .22); }
.yt-frame--wide { aspect-ratio: 16 / 9; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- D7 · footer ---------- */
.foot {
  position: relative; background: var(--void);
  padding: 4rem 0 2.5rem;
  text-align: center;
}
.foot::before {
  content: ""; position: absolute; left: 50%; top: 0; width: min(28rem, 70%); height: 2px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--pig-ochre) 18%, var(--pig-ochre) 82%, transparent);
  opacity: .75; border-radius: 2px;
}
.foot__grid { display: grid; gap: 2rem; justify-items: center; }
.foot__logo { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; line-height: 1; letter-spacing: -.01em; color: var(--bone-100); }
.foot__tag { margin-top: .6rem; font-family: var(--font-display); font-style: italic; font-weight: 340; font-size: var(--fs-lead); color: var(--bone-400); }
.foot__social { font-weight: 500; font-size: var(--fs-label); letter-spacing: .16em; text-transform: uppercase; color: var(--bone-600); }
/* instagram = the bright link; tiktok / youtube (no URL yet) dim plain text */
.foot .foot__social a { color: var(--bone-200); }
.foot .foot__social a:is(:hover, :focus-visible) { color: var(--fire-8); }
.foot__plain { color: var(--bone-600); cursor: default; }
/* 44 px tall targets, no shift: padding taken back by a negative margin */
.foot .foot__social a, .foot .foot__links > a, .foot .foot__links > button {
  display: inline-block;
  --hit: max(0px, (44px - 1lh) / 2);
  padding-block: var(--hit);
  margin-block: calc(-1 * var(--hit));
}
.foot__legal { display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.foot__copy { font-size: var(--fs-small); color: var(--bone-400); }

/* ---------- ≥ 960px ---------- */
@media (min-width: 960px) {
  .foot__grid { grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: stretch; text-align: left; }
  .foot__social { text-align: center; }
  .foot__legal { align-items: flex-end; text-align: right; }
}

/* ---------- «¿Quiénes somos?» (after the application form) ---------- */
.about { overflow: clip; }
.about::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 45% at 100% 8%, rgba(217, 84, 26, .12), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(240, 122, 34, .07), transparent 70%);
}
.about__wrap { max-width: 46rem; text-align: center; }
.about__head { margin-bottom: var(--s-5); }
.about__head .trazo-line { margin-inline: auto; }
.about__lead {
  margin: 0 0 var(--s-6);
  font-family: var(--font-display); font-optical-sizing: auto; font-weight: 360;
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.4rem); line-height: 1.2; letter-spacing: -.01em;
  color: var(--bone-100); text-wrap: balance; text-shadow: var(--legible-shadow);
}
.about__body { display: grid; gap: var(--s-4); max-width: 38rem; margin-inline: auto; text-align: left; }
.about__body p {
  margin: 0; font-size: clamp(1.05rem, .98rem + .35vw, 1.28rem); line-height: 1.62;
  color: var(--bone-200); text-shadow: var(--legible-shadow);
  text-align: left; /* phones: justified ~36-char lines open rivers */ hyphens: manual; -webkit-hyphens: manual;
}
@media (min-width: 600px) {
  .about__body p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
}
.about__closing {
  margin: var(--s-7) auto 0; padding-top: var(--s-5); max-width: 30rem;
  border-top: 1px solid rgba(192, 138, 62, .28);
  font-family: var(--font-display); font-optical-sizing: auto; font-style: italic; font-weight: 360;
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 2rem); line-height: 1.25;
  color: var(--fire-8); text-wrap: balance; text-shadow: var(--legible-shadow);
}
/* the owner's *emphasis* (content.json → about): amber ink on a low ember marker stroke, upright (not a subtle italic) */
.hl { font-style: normal; color: var(--fire-8); background: linear-gradient(transparent 42%, rgba(217, 84, 26, .24) 0 96%, transparent 0); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.about__lead .hl { color: var(--fire-7); }
