/* María Gamero · inner pages: Tratamientos / Preocupaciones (one template), Nosotros, Reservar. [O] = Odyssée, measured. */

/* ── Inner hero: 1858 tall at 900 (206.5svh), over the header; its own white header copy; the split headline holds
   at mid-screen for ~900 px (a 100svh sticky box); the intro paragraph rises over the photo [O] ── */
.ihero { position: relative; z-index: 95; height: 206.5svh; background: #8E8D89; color: var(--blanco); }
.ihero--short { height: 100svh; }
.ihero__media { position: absolute; inset: 0; overflow: clip; }
.ihero__layer { position: absolute; inset: 0 0 auto; height: 110%; transform: translate3d(0, -8%, 0); } /* [O-lib] yPercent −8 → 8 */
.ihero__zoom { position: absolute; inset: 0; }
.ihero__zoom > * { width: 100%; height: 100%; object-fit: cover; }
.ihero__media--grey .ihero__zoom > * { filter: grayscale(1) brightness(.8) contrast(.9); } /* [O] greyscale macros, held mid-grey so the white headline reads */
.ihd-track { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ihd { position: sticky; top: 0; height: var(--hd); align-items: center; pointer-events: auto; }
.ihd .wm { grid-column: 1 / span 2; justify-self: start; }
.ihd .hd__end > * { min-height: var(--hd); display: inline-flex; align-items: center; }
/* The headline's hold ends while the intro paragraph (top 151svh) is still a clear gap below it, so the two never cross:
   released at scroll = hold − 100svh, the headline's bottom (50svh + 24px) stays 56 px above the paragraph from then on,
   both moving at 1×. Odyssée holds to the hero's end and lets them cross; Pedro asked for no overlap (2026-10-19). */
.ihero__hold { position: absolute; left: 0; right: 0; top: 0; height: calc(151svh + 50svh - 24px - 56px); z-index: 2; pointer-events: none; }
.ihero--short .ihero__hold { height: 100%; }
.ihero__title { position: sticky; top: 0; height: 100svh; align-items: center; }
.half { display: block; }
.half--l { grid-column: 1 / span 6; }
.half--r { grid-column: 7 / -1; justify-self: end; text-align: right; }
.half--c { grid-column: 6 / span 5; }
.ihero__intro { position: absolute; left: 0; right: 0; top: 151svh; z-index: 3; }
.ihero__intro-in { grid-column: 7 / -1; display: grid; gap: 22px; }
.ihero__intro .indent { --span: 6; }
.ihero__line { position: absolute; right: var(--m); bottom: 22px; z-index: 3; text-align: left; width: calc((100% - 2 * var(--m) - 11 * var(--g)) / 12 * 3 + 2 * var(--g)); line-height: 15px; }
@media (max-width: 767px) {
  .ihero { height: 175svh; }
  .ihero--short { height: 100svh; }
  .ihero__title { position: relative; } /* phones: no hold, so the paragraph never crosses the headline */
  .half--l, .half--r, .half--c { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .ihero__title { align-content: center; row-gap: 4px; }
  .ihero__intro { top: 106svh; }
  .ihero__intro-in { grid-column: 1 / -1; }
  .ihero__line { width: auto; left: var(--m); }
}

/* ── The page index: bottom-left, sticky across the hero, the index and the aftercare [O] ── */
.pindex-track { position: absolute; left: 0; right: 0; top: 0; height: var(--pindex-h, 100%); z-index: 96; pointer-events: none; } /* to the end of the last block it indexes (js/pindex.js) */
.pindex { position: sticky; top: calc(100% - 66px); display: grid; justify-items: start; gap: 4px; width: max-content; margin-left: var(--m); pointer-events: auto; color: var(--blanco); transition: color .3s var(--std); }
.pindex[data-on="light"] { color: var(--ink); }
.pindex a { padding-left: 12px; margin-left: -12px; line-height: 14px; }
.pindex .dot::before { left: 0; }
.pindex .dot { padding-left: 12px; }
@media (max-width: 767px) { .pindex-track { display: none; } }

/* ── Category index: a sticky numbered list (top 200) beside tall photos (cols 7–12) moving at 0.5× [O] ── */
.tindex { position: relative; z-index: 1; align-items: start; background: var(--cal); margin-top: 32px; } /* [O] gaps: hero 32 · index 120 · aftercare 240 */
.tindex__left { grid-column: 3 / span 3; grid-row: 1; align-self: stretch; }
.tindex__stick { position: sticky; top: 12px; } /* one sticky box: the tagline (in the header's row, [O] top 16) and the list ([O] top 200) leave together */
.tindex__tag { height: 18px; margin-bottom: 170px; }
.tindex__list { display: grid; gap: 8px; }
.cat__t { display: grid; grid-template-columns: 55px 1fr; width: 100%; text-align: left; align-items: baseline; color: var(--ink-soft); transition: color 1s var(--expo); }
.cat.is-on .cat__t { color: var(--ink); }
.cat__body { overflow: hidden; height: 0; opacity: 0; }
.cat__in { padding: 14px 0 22px 55px; display: grid; gap: 16px; }
.cat__list { display: grid; gap: 2px; padding-left: 16px; }
.cat__list li { position: relative; }
.cat__list li::before { content: ""; position: absolute; left: -14px; top: 7px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.tindex__photos { grid-column: 7 / -1; grid-row: 1; padding-top: 190px; }
.tindex__photo { position: relative; height: 100svh; overflow: clip; }
.tindex__layer { position: absolute; inset: 0; }
.tindex__layer > * { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
  .tindex { padding-top: 72px; row-gap: 32px; }
  .tindex__left, .tindex__photos { grid-column: 1 / -1; }
  .tindex__photos { grid-row: 2; padding-top: 0; display: grid; gap: var(--g); }
  .tindex__photo { height: 70svh; }
  .tindex__tag { display: none; }
  .tindex__stick { position: static; }
  .tindex__list { gap: 20px; }
  .cat__body { height: auto; opacity: 1; }
}

/* ── Aftercare: full-bleed greyscale photo, a 32 px paragraph sticky near the bottom [O] ── */
.care { position: relative; z-index: 1; margin-top: 120px; min-height: 110svh; color: var(--blanco); background: #8E8D89; }
.care__frame { position: absolute; inset: 0; }
.care__layer { position: absolute; inset: 0 0 auto; height: 110%; }
.care__layer > * { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.62) contrast(.92); } /* held down: the white paragraph sits on it */
.care__in { position: relative; min-height: 110svh; align-items: end; padding-bottom: 46px; }
.care__text { grid-column: 3 / span 8; position: sticky; bottom: 46px; --span: 8; }
@media (max-width: 767px) { .care__text { grid-column: 1 / -1; --span: 6; } }

/* ── Journey: a centred stacked pair read as one image; the triad row sticky at top 360 [O] ── */
.journey { position: relative; z-index: 1; margin-top: 240px; padding-block: 0; }
.journey__triad { position: sticky; top: 360px; z-index: 1; margin-inline: calc(var(--m) + 2 * ((100% - 2 * var(--m) - 11 * var(--g)) / 12 + var(--g))); }
.journey__triad .rv { display: flex; justify-content: space-between; width: 100%; }
.journey__pair { position: relative; z-index: 2; width: calc((100% - 2 * var(--m) - 11 * var(--g)) / 12 * 4 + 3 * var(--g)); margin: 420px auto 0; }
.journey__half { aspect-ratio: 447 / 323; overflow: hidden; }
.journey__half--lead { transform-origin: 50% 50%; }
.closing { position: relative; z-index: 2; background: var(--cal); padding-block: 120px 120px; align-items: start; }
.closing__thumb { grid-column: 1 / span 1; width: 54px; aspect-ratio: 54 / 80; overflow: hidden; }
.closing__thumb img { width: 100%; height: 100%; object-fit: cover; }
.closing__body { grid-column: 3 / -1; display: grid; justify-items: start; gap: 24px; }
@media (max-width: 767px) {
  .journey__triad { margin-inline: var(--m); top: 240px; }
  .journey__pair { width: auto; margin: 240px var(--m) 0; }
  .closing__body { grid-column: 2 / -1; }
}

/* ── Nosotros ── */
.ihero__title--about .half--l { grid-column: 1 / span 5; }
.about { position: relative; z-index: 1; margin-top: 24px; padding-block: 0; align-items: start; } /* [O] gaps: 24 · 120 · 120 · 120 */
.about__body { grid-column: 7 / -1; display: grid; gap: 30px; }
.about__body .indent { --span: 6; }
.about__contact { display: grid; gap: 14px; }
.teamimg { position: relative; margin-top: 120px; align-items: end; }
.teamimg__duo { grid-column: 1 / span 6; position: relative; height: 112svh; overflow: clip; }
.teamimg__layer { position: absolute; inset: 0; }
.teamimg__layer > * { width: 100%; height: 100%; object-fit: cover; }
.teamimg__detail { grid-column: 7 / span 2; align-self: start; margin-top: 110px; aspect-ratio: 4 / 5; overflow: hidden; }
.teamimg__detail img { filter: grayscale(1); }
.teamimg__title { grid-column: 10 / -1; align-self: end; }
.team { margin-top: 120px; }
.team__note { padding-block: 0 20px; color: var(--ink-soft); }
.team__note span { grid-column: 1 / -1; }
.member { border-top: 1px solid rgb(42 26 36 / .2); padding-block: 20px 80px; align-items: start; margin-inline: var(--m); padding-inline: 0; }
.member__name { grid-column: 1 / span 3; }
.member__photo { grid-column: 4 / span 1; width: 100px; aspect-ratio: 3 / 4; overflow: hidden; }
.member__role { grid-column: 7 / span 3; display: grid; gap: 6px; line-height: 14px; }
.member__soft { color: var(--ink-soft); }
.member__bio { grid-column: 10 / -1; }
.bookdoors { margin-top: 120px; }
.book { padding-bottom: 60px; }
.book__txt { grid-column: 1 / span 3; display: grid; justify-items: start; gap: 16px; }
.bigdoors { display: grid; grid-template-columns: 1fr 1fr; }
.bigdoor { position: relative; display: block; height: 100svh; color: var(--blanco); transition: opacity .3s var(--std); }
.bigdoor__media { position: absolute; inset: 0; overflow: clip; }
.bigdoor__layer { position: absolute; inset: 0 0 auto; height: 110%; }
.bigdoor__layer > * { width: 100%; height: 100%; object-fit: cover; }
.bigdoor__track { position: absolute; inset: 0; z-index: 2; }
.bigdoor__label { position: sticky; top: 50%; display: block; width: max-content; margin: 0 auto; padding-left: 12px; transition: opacity .3s var(--std); } /* [O] labels sticky at 450 */
.bigdoor__label::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; }
.bigdoor__track { padding-top: 50svh; }
@media (hover: hover) {
  .bigdoor:hover .duo img, .bigdoor:focus-visible .duo img { filter: grayscale(0) contrast(1); opacity: 1; mix-blend-mode: normal; }
  .bigdoor:hover .duo::after, .bigdoor:focus-visible .duo::after { opacity: 0; }
  .bigdoors:has(.bigdoor:hover) .bigdoor:not(:hover) { opacity: .3; }
  .bigdoors:has(.bigdoor:hover) .bigdoor:not(:hover) .bigdoor__label { opacity: 0; }
}
@media (max-width: 767px) {
  .about__body, .teamimg__duo, .teamimg__title, .book__txt { grid-column: 1 / -1; }
  .teamimg { row-gap: 24px; }
  .teamimg__duo { height: 80svh; }
  .teamimg__detail { grid-column: 1 / span 3; margin-top: 0; }
  .member__name { grid-column: 1 / span 4; }
  .member__photo { grid-column: 5 / span 2; justify-self: end; width: 80px; }
  .member__role, .member__bio { grid-column: 1 / -1; margin-top: 16px; }
  .bigdoors { grid-template-columns: 1fr; }
  .bigdoor { height: 70svh; }
}

/* ── Reservar (demo booking) and 404 ── */
.bk { padding-block: calc(var(--hd) + 120px) 120px; align-items: start; row-gap: 0; }
.bk__label { grid-column: 1 / span 2; padding-top: 14px; }
.bk__title { grid-column: 3 / -1; }
.bk__facts { grid-column: 3 / span 3; margin-top: 48px; display: grid; gap: 22px; align-content: start; }
.bk__steps { display: grid; gap: 8px; }
.bk__steps li { display: grid; grid-template-columns: 24px 1fr; }
.bk__formwrap { grid-column: 7 / span 5; margin-top: 48px; }
.bk__demo { color: var(--ink-soft); line-height: 16px; margin-bottom: 28px; }
.bk__form { display: grid; gap: 26px; }
.field { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.field legend { padding: 0; margin-bottom: 10px; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select {
  width: 100%; height: 44px; padding: 0; border: 0; border-bottom: 1px solid rgb(42 26 36 / .45); border-radius: 0;
  background: transparent; color: var(--ink); font: 300 22px/1 var(--serif); appearance: none;
}
.field select { background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 10px) 50% / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, var(--ink) 50%) calc(100% - 4px) 50% / 6px 6px no-repeat; }
.field input:focus-visible, .field select:focus-visible { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.field [aria-invalid="true"] { border-bottom-color: #8A3B2E; }
.field--radio { grid-template-columns: auto auto; justify-content: start; column-gap: 32px; }
.field--radio legend { grid-column: 1 / -1; }
.field--radio label { display: inline-flex; align-items: center; gap: 10px; font: 300 20px/1 var(--serif); cursor: pointer; }
.field--radio input { width: 16px; height: 16px; margin: 0; accent-color: var(--tinta); }
.field__err { color: #8A3B2E; grid-column: 1 / -1; }
.bk__send {
  justify-self: start; min-width: 240px; height: 48px; padding: 0 24px; border: 1px solid var(--ink); white-space: nowrap;
  transition: background-color .3s var(--std), color .3s var(--std);
}
@media (hover: hover) { .bk__send:hover { background: var(--ink); color: var(--cal); } }
.bk__send:focus-visible { background: var(--ink); color: var(--cal); }
.bk__done { display: grid; gap: 16px; justify-items: start; outline: none; }
.bk__legal { grid-column: 3 / span 4; margin-top: 120px; display: grid; gap: 10px; color: var(--ink-soft); }
@media (max-width: 767px) {
  .bk { padding-top: calc(var(--hd) + 64px); }
  .bk__title, .bk__facts, .bk__formwrap, .bk__legal { grid-column: 1 / -1; }
  .bk__label { grid-column: 1 / -1; margin-bottom: 20px; }
}
/* the colour inner hero (Nosotros): held down so the white split headline reads on a bright interior */
:root { --film-shade: saturate(.82) brightness(.74) contrast(.95); } /* js/morph.js grows a film's frame into this shade */
.ihero__media:not(.ihero__media--grey) .ihero__zoom > * { filter: var(--film-shade); }
