/* ============================================================
   The Art of Being Human — chapter engine styles
   Palette per the brief: sand · stone · sun · deep water · night ·
   fire · skin · earth. Warm, tactile, luxurious but never glossy.
   ============================================================ */

/* ============================================================
   Stage — fixed full-viewport chapter layers
   ============================================================ */
.stage { position: fixed; inset: 0; z-index: 1; overflow: hidden; }

.ch-layer {
  position: absolute; inset: 0;
  opacity: 0;
  background: linear-gradient(160deg, var(--tint-1) 0%, var(--tint-2) 45%, var(--tint-3) 100%);
  will-change: opacity;
}

.ch-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  transform-origin: center;
  will-change: transform;
}

/* Veil — keeps type legible over any photograph without flattening it.
   Weighted to the bottom because the copy sits low-left. */
.ch-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(20,15,10,.72) 0%, rgba(20,15,10,.28) 42%, rgba(20,15,10,.08) 70%, rgba(20,15,10,.22) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 40%, rgba(20,15,10,.42) 100%);
}

/* ============================================================
   Copy
   ============================================================ */
.ch-copy-wrap {
  position: fixed; inset: 0; z-index: 3;
  display: grid; align-items: end;
  padding: clamp(1.75rem, 6vw, 6rem);
  padding-bottom: clamp(4.5rem, 12vh, 9rem);
  pointer-events: none;
}

.ch-copy {
  position: relative;
  grid-area: 1 / 1;
  max-width: min(46rem, 88vw);
  opacity: 0;
  will-change: opacity, transform;
}

/* Scrim travels WITH the copy block, so a beat is legible over any frame in the
   library — the near-black lotus and the blown-out sun both. Soft-edged and
   oversized so it never reads as a box; it reads as the photograph darkening. */
.ch-copy::before {
  content: '';
  position: absolute;
  inset: -5rem -7.5rem -5.5rem -7.5rem;
  z-index: -1;
  pointer-events: none;
  /* `closest-side` is load-bearing: it pins the transparent stop to the nearest
     edge, so the gradient is fully clear before the box ends. A percentage-sized
     gradient gets clipped by that box and the scrim shows up as a rectangle. */
  background: radial-gradient(ellipse closest-side at 34% 48%,
    rgba(16, 12, 8, .78) 0%, rgba(16, 12, 8, .66) 40%,
    rgba(16, 12, 8, .32) 70%, rgba(16, 12, 8, 0) 100%);
}
.is-opening::before, .is-closing::before, .is-climax::before {
  inset: -5.5rem -7.5rem;
  background: radial-gradient(ellipse closest-side at 50% 50%,
    rgba(16, 12, 8, .66) 0%, rgba(16, 12, 8, .50) 40%,
    rgba(16, 12, 8, .20) 70%, rgba(16, 12, 8, 0) 100%);
}
.ch-copy > * + * { margin-top: clamp(.85rem, 2vh, 1.5rem); }
.ch-copy a { pointer-events: auto; }

.ch-num {
  font-family: var(--type-sans);
  font-size: calc(clamp(.68rem, 1.5vw, .8rem) * var(--ck-text-scale));
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(244, 237, 225, .62);
}

.ch-title {
  font-family: var(--type-display);
  font-weight: 300;
  font-size: calc(clamp(2.1rem, 7vw, 5.25rem) * var(--ck-text-scale));
  line-height: calc(1.02 * var(--ck-line-height-mul));
  letter-spacing: -.015em;
  text-wrap: balance;
  color: var(--sand-pale);
  text-shadow: 0 1px 40px rgba(20,15,10,.5);
}

.ch-meta {
  font-size: calc(clamp(.85rem, 1.8vw, 1.05rem) * var(--ck-text-scale));
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(244, 237, 225, .78);
}

.ch-lines {
  font-family: var(--type-display);
  font-weight: 300;
  font-size: calc(clamp(1.15rem, 2.9vw, 1.95rem) * var(--ck-text-scale));
  line-height: calc(1.5 * var(--ck-line-height-mul));
  color: rgba(244, 237, 225, .95);
  text-shadow: 0 1px 30px rgba(20,15,10,.5), 0 0 12px rgba(20,15,10,.55);
}

/* The fragment stack — "Heat. Cold. Water. Flowers." Quieter, wider-tracked,
   so it reads as breath between the larger statements rather than as a list. */
.ch-soft {
  font-size: calc(clamp(.95rem, 2.1vw, 1.2rem) * var(--ck-text-scale));
  font-weight: 300;
  line-height: calc(1.95 * var(--ck-line-height-mul));
  letter-spacing: .04em;
  color: rgba(244, 237, 225, .8);
  text-shadow: 0 1px 24px rgba(20,15,10,.55);
}

.ch-cta {
  display: inline-block;
  margin-top: clamp(1.25rem, 3vh, 2.25rem);
  padding: .85rem 2rem;
  font-size: calc(.78rem * var(--ck-text-scale));
  letter-spacing: .26em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--sand-pale);
  border: 1px solid rgba(244, 237, 225, .45);
  border-radius: 2px;
  background: rgba(20, 15, 10, .18);
  backdrop-filter: blur(3px);
  transition: background .5s var(--ease), border-color .5s var(--ease), color .5s var(--ease);
}
.ch-cta:hover, .ch-cta:focus-visible {
  background: rgba(244, 237, 225, .92);
  border-color: rgba(244, 237, 225, .92);
  color: var(--ink);
}
.ch-cta + .ch-cta { margin-left: .6rem; }
.ch-cta.is-primary { border-color: rgba(244,237,225,.8); background: rgba(244,237,225,.1); }

/* Opening + closing beats centre themselves; the climax beats stand alone big */
.is-opening, .is-closing { align-self: center; justify-self: center; text-align: center; max-width: min(38rem, 88vw); }
.is-opening .ch-title, .is-closing .ch-title {
  font-size: calc(clamp(2.4rem, 8.5vw, 6.5rem) * var(--ck-text-scale));
  line-height: calc(1.08 * var(--ck-line-height-mul));
}
.ch-title + .ch-meta { margin-top: clamp(1.1rem, 2.6vh, 1.9rem); }
.is-climax { align-self: center; justify-self: center; text-align: center; }
.is-climax .ch-title {
  font-size: calc(clamp(2.6rem, 10vw, 7.5rem) * var(--ck-text-scale));
  letter-spacing: .01em;
}

/* ============================================================
   Rail + counter + scroll cue
   ============================================================ */
.rail {
  position: fixed; z-index: 5;
  right: clamp(1rem, 2.5vw, 2.25rem); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: .9rem;
}
.rail-dot {
  position: relative;
  width: 10px; height: 10px; padding: 0;
  border: 1px solid rgba(244, 237, 225, .5);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
.rail-dot:hover { border-color: var(--sand-pale); transform: scale(1.25); }
.rail-dot.is-active { background: var(--sand-pale); border-color: var(--sand-pale); }
.rail-label {
  position: absolute; right: calc(100% + .85rem); top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--sand-pale);
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease);
  text-shadow: 0 1px 12px rgba(20,15,10,.8);
}
.rail-dot:hover .rail-label, .rail-dot:focus-visible .rail-label { opacity: 1; }

.counter {
  position: fixed; z-index: 5;
  left: clamp(1.75rem, 6vw, 6rem); top: clamp(1.5rem, 4vh, 2.75rem);
  font-size: .72rem; letter-spacing: .3em;
  color: rgba(244, 237, 225, .65);
  text-shadow: 0 1px 12px rgba(20,15,10,.8);
}

.scroll-cue {
  position: fixed; z-index: 5;
  left: 50%; bottom: clamp(1.5rem, 4vh, 2.5rem);
  transform: translateX(-50%);
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(244, 237, 225, .6);
  transition: opacity 1s var(--ease);
}
body.has-moved .scroll-cue { opacity: 0; }
.scroll-cue::after {
  content: ''; display: block; width: 1px; height: 2.25rem;
  margin: .7rem auto 0;
  background: linear-gradient(to bottom, rgba(244,237,225,.6), transparent);
  animation: cue 3.4s ease-in-out infinite;
}
@keyframes cue { 0%,100% { opacity: .25; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

#scroll-driver { position: relative; z-index: 0; pointer-events: none; }

/* ============================================================
   Static fallback — motion off / no JS.
   Not a degraded mode: it is the readable, indexable version of the journey.
   ============================================================ */
.fallback { display: none; position: relative; z-index: 10; background: var(--paper); color: var(--ink); }
.fallback-inner { max-width: 46rem; margin: 0 auto; padding: clamp(2.5rem, 8vw, 6rem) 1.5rem; }
.fallback h1 {
  font-family: var(--type-display); font-weight: 300;
  font-size: calc(clamp(2rem, 6vw, 3.5rem) * var(--ck-text-scale));
  line-height: 1.05; margin-bottom: .75rem;
}
.fallback .f-meta { letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; color: var(--ink-faint); margin-bottom: 3rem; }
.fallback section { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.fallback h2 {
  font-family: var(--type-display); font-weight: 300;
  font-size: calc(clamp(1.4rem, 3.5vw, 2.1rem) * var(--ck-text-scale));
  line-height: 1.15; margin: .5rem 0 1rem;
}
.fallback .f-num { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-faint); }
.fallback p { line-height: calc(1.75 * var(--ck-line-height-mul)); color: var(--ink-soft); margin-bottom: .85rem; }

html.ck-motion-off .stage,
html.ck-motion-off .rail,
html.ck-motion-off .scroll-cue,
html.ck-motion-off .ch-copy-wrap,
html.ck-motion-off #scroll-driver { display: none !important; }
html.ck-motion-off .fallback { display: block; }

/* No-JS: the engine never builds the layers, so show the fallback outright */
html.no-js .stage, html.no-js .rail, html.no-js .scroll-cue, html.no-js #scroll-driver { display: none; }
html.no-js .fallback { display: block; }

/* ============================================================
   Responsive + accessibility
   ============================================================ */
@media (max-width: 640px) {
  .rail { gap: .6rem; right: .85rem; }
  .rail-dot { width: 8px; height: 8px; }
  .rail-label { display: none; }
  .ch-copy-wrap { padding-bottom: clamp(3.5rem, 14vh, 7rem); }
  /* Long fragment stacks overflow small screens — tighten the ladder */
  .ch-soft { line-height: calc(1.7 * var(--ck-line-height-mul)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ch-img { transform: scale(1.02) !important; }
  .scroll-cue::after { animation: none; }
}

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


/* ---- Chapter stage → paper fade --------------------------------------
   Matches the hero dissolve on the personal pages (and the one Mehta
   pointed at on inclusifund.co.uk): the fixed chapter photography settles
   into the sand ground at the foot of the viewport instead of stopping
   dead against it. Sits above the veil, below the copy.                 */
.stage::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: clamp(80px, 14vh, 170px);
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(240, 231, 216, 0) 0%,
    rgba(240, 231, 216, .40) 60%,
    rgba(240, 231, 216, .92) 100%);
}

/* ============================================================
   Sheets — Practical and Come With Us (contracted pages 4 and 5)
   These sit BELOW the journey on the sand ground, so they need a
   z-index above the fixed .stage and an opaque background of their
   own. Her direction doc: "Beautiful but functional. No poetry
   where clarity is needed."
   ============================================================ */
.sheet {
  position: relative;
  z-index: 10;
  background: var(--paper);
  color: var(--ink);
}
.sheet + .sheet { border-top: 1px solid var(--rule); }
.sheet-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6.5rem) 1.5rem;
}

.sheet-kicker {
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1.25rem;
}
.sheet-h2 {
  font-family: var(--type-serif, Fraunces, Georgia, serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.12; letter-spacing: -.01em;
  margin: 0 0 2.5rem;
}
.sheet-h3 {
  font-family: var(--type-serif, Fraunces, Georgia, serif);
  font-weight: 400; font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  margin: 3rem 0 1rem;
}
.sheet-p { color: var(--ink-soft); line-height: calc(1.7 * var(--ck-line-height-mul)); margin: 0 0 1.25rem; }

/* ---- Mandatory notices -------------------------------------------------
   Three things on this page can end someone's retreat at the airport: the
   open-jaw ticket, the offshore insurance clause and the full Egyptian visa.
   They are not decoration and they must not read as decoration — a left rule
   in the fire colour, a title, and body type that stays the same size as
   everything else so it reads as fact rather than as a banner someone has
   learned to skip. */
.must {
  margin: 2.5rem 0;
  padding: 1.25rem 0 1.25rem 1.25rem;
  border-left: 3px solid var(--fire);
}
.must-title {
  margin: 0 0 .6rem;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fire); font-weight: 600;
}
.must p:not(.must-title) {
  margin: 0 0 .7rem;
  color: var(--ink-soft);
  line-height: calc(1.7 * var(--ck-line-height-mul));
}
.must p:last-child { margin-bottom: 0; }
.must strong { color: var(--ink); font-weight: 600; }

/* ---- Price ------------------------------------------------------------
   The only number on the site, and it sits at the end of the practical sheet
   where a reader has just finished working out whether they can actually go.
   Quiet, not a price tag: serif figure, hairline rule above, no badge and no
   colour shouting. The deadline line is the one that has to be legible —
   it is the reason to act now, and it expires on 20 October 2026. */
.price-block {
  margin: 3.5rem 0 0; padding: 2rem 0 0;
  border-top: 1px solid var(--rule);
}
.price-kicker {
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1rem;
}
.price-now { margin: 0 0 .75rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.price-fig {
  font-family: var(--type-serif, Fraunces, Georgia, serif);
  font-weight: 300; font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1; letter-spacing: -.02em; color: var(--ink);
}
.price-per { font-size: .95rem; color: var(--ink-soft); }
.price-note, .price-then {
  margin: 0 0 .4rem; color: var(--ink-soft);
  line-height: calc(1.7 * var(--ck-line-height-mul));
}
.price-note strong { color: var(--fire); font-weight: 600; }
.price-then { font-size: .92rem; color: var(--ink-faint); }
.price-then strong { color: var(--ink-soft); font-weight: 500; }
.price-cancel {
  margin: 1.5rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: .88rem; color: var(--ink-faint);
  line-height: calc(1.7 * var(--ck-line-height-mul));
}
.price-cancel strong { color: var(--ink-soft); font-weight: 600; }

/* ---- Facts: label above value, so a long value never squeezes ---- */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.75rem 2.5rem;
  margin: 0;
}
.fact dt {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .45rem;
}
.fact dd {
  margin: 0; line-height: calc(1.6 * var(--ck-line-height-mul));
  color: var(--ink-soft);
}
.fact dd strong { color: var(--ink); font-weight: 500; }

/* ---- The three stays ---- */
.stay-list { list-style: none; margin: 0; padding: 0; }
.stay-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  line-height: calc(1.6 * var(--ck-line-height-mul));
}
.stay-when {
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); padding-top: .2em;
}
.stay-what { color: var(--ink-soft); }
.stay-what strong { color: var(--ink); font-weight: 500; }
@media (max-width: 34rem) {
  .stay-list li { grid-template-columns: 1fr; gap: .3rem; }
}

.bring-list { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); }
.bring-list li { margin-bottom: .5rem; line-height: calc(1.55 * var(--ck-line-height-mul)); }

/* ---- Closing ---- */
.sheet-close { text-align: center; }
.close-copy {
  font-family: var(--type-serif, Fraunces, Georgia, serif);
  font-weight: 300;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  line-height: 1.6; color: var(--ink); margin: 0 0 2.5rem;
}
.close-copy em { font-style: italic; color: var(--fire); }
.close-sign {
  font-size: .95rem; letter-spacing: .04em; color: var(--ink-soft);
  line-height: 1.9; margin: 0 0 2.75rem;
}
.close-actions { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: .9rem 1.9rem;
  border-radius: 2px; text-decoration: none;
  font-size: .95rem; letter-spacing: .02em;
  transition: background .25s var(--ease, ease), color .25s var(--ease, ease),
              border-color .25s var(--ease, ease);
}
.cta-primary { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.cta-primary:hover, .cta-primary:focus-visible { background: var(--earth); border-color: var(--earth); }
.cta-ghost { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.cta-ghost:hover, .cta-ghost:focus-visible { border-color: var(--ink); }
/* Both close buttons open the same WhatsApp inbox (see the note in
   index.html), so this line is what tells a reader that is deliberate —
   and it is the only place Trish's number is reachable from the main page. */
.close-hosts {
  margin: 1.4rem 0 0; text-align: center;
  font-size: .85rem; line-height: 1.7; color: var(--ink-soft);
}
.close-hosts a {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color .25s var(--ease, ease);
}
.close-hosts a:hover, .close-hosts a:focus-visible { border-bottom-color: var(--ink); }

.close-meta {
  margin: 3rem 0 0; font-size: .72rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ---- Unconfirmed content ---------------------------------------------
   Deliberately loud. This is a build-time marker, not a design element:
   ./check-ready.sh refuses to package the site while any data-confirm
   block survives, so it cannot reach a visitor by accident.            */
.confirm-block {
  margin: 3rem 0 0; padding: 1.5rem 1.6rem;
  border: 2px dashed var(--fire);
  background: rgba(196, 98, 45, .07);
  text-align: left; border-radius: 3px;
}
.confirm-title {
  margin: 0 0 .85rem; font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--fire); font-weight: 600;
}
.confirm-block ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); }
.confirm-block li { margin-bottom: .55rem; line-height: 1.6; font-size: .92rem; }
.confirm-block b { color: var(--ink); font-weight: 600; }
.confirm-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .86em; background: rgba(42,33,24,.07); padding: .1em .35em; border-radius: 2px;
}
.confirm-foot { margin: .9rem 0 0; font-size: .84rem; color: var(--ink-faint); line-height: 1.55; }
