/* Zaldara homepage. Registered report grammar.
   Palette and type from Brand Book v1.2, product register. */

:root {
  --well:   #081F1C;
  --cord:   #0E3833;
  --raised: #174640;
  --bone:   #F6ECE3;
  --mist:   #D6CBBF;
  --amber:  #F2AE2E;
  --jade:   #3BD3A4;

  --sc-canvas:     var(--well);
  --sc-surface:    var(--raised);
  --sc-ink:        var(--bone);
  --sc-ink-soft:   var(--mist);
  --sc-accent:     var(--bone);
  --sc-accent-ink: var(--well);
  --sc-shadow-color: 172 60% 3%;

  --sc-font-display: "Archivo", "Helvetica Neue", system-ui, sans-serif;
  --sc-font-text:    "Spectral", "Iowan Old Style", Palatino, Georgia, serif;
  --sc-font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --rail-x: clamp(1.25rem, 2.2vw, 2.25rem);
  --hair: color-mix(in oklab, var(--bone) 16%, transparent);
  --hair-strong: color-mix(in oklab, var(--bone) 30%, transparent);
}

body { line-height: 1.66; letter-spacing: 0.002em; }
::selection { background: var(--amber); color: var(--well); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nw { white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--bone); color: var(--well); padding: .6rem 1rem; font-family: var(--sc-font-display); }
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------ type ---- */
.d-lg, .d-md, .cover__title, .proof__t, .step__t, .svc__name, .who__t, .ent__name, .svc__letter, .proof__n, .step__n {
  font-family: var(--sc-font-display);
  font-stretch: 118%;
  font-weight: 600;
  text-wrap: balance;
  margin: 0;
}
.d-lg { font-size: clamp(2.3rem, 1.5rem + 3.2vw, 4.6rem); line-height: 1.0; letter-spacing: -0.03em; }
.d-md { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.5rem); line-height: 1.04; letter-spacing: -0.025em; }
.body { font-size: clamp(1.03rem, 0.98rem + 0.25vw, 1.18rem); color: var(--mist); max-width: 60ch; margin: 0; text-wrap: pretty; }
.label {
  font-family: var(--sc-font-display); font-stretch: 112%; font-weight: 500;
  font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist);
}

/* --------------------------------------------------------- controls --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 3.1rem; padding: 0 1.5rem;
  background: var(--bone); color: var(--well);
  font-family: var(--sc-font-display); font-stretch: 108%; font-weight: 600; font-size: .98rem;
  text-decoration: none; white-space: nowrap; border: 1px solid var(--bone); border-radius: 2px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform 140ms var(--sc-ease-out), color 160ms var(--sc-ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--jade);
  transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--sc-ease-out);
}
.btn:active { transform: translateY(1px); }
@media (hover: hover) and (pointer: fine) { .btn:hover::before { transform: scaleX(1); } }
.btn--sm { min-height: 2.5rem; padding: 0 1.05rem; font-size: .88rem; }
.btn--line { background: transparent; color: var(--bone); border-color: var(--hair-strong); }
.btn--line::before { background: var(--raised); }

.tlink {
  color: var(--bone); font-family: var(--sc-font-display); font-stretch: 108%; font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: .35em;
  transition: text-decoration-color 160ms var(--sc-ease-out);
}
.tlink:hover { text-decoration-color: var(--amber); }

/* ------------------------------------------------------------- bar ---- */
.bar { position: absolute; inset: 0 0 auto 0; z-index: 50; }
.bar__in {
  max-width: var(--sc-maxw); margin: 0 auto; padding: 1.4rem var(--sc-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.bar__logo img { width: 150px; height: auto; }
.bar__nav { display: flex; align-items: center; gap: 1.6rem; font-family: var(--sc-font-display); font-size: .9rem; font-weight: 500; }
.bar__nav > a:not(.btn), .bar__svc summary, .bar__lang a { color: var(--bone); text-decoration: none; }
.bar__nav > a:not(.btn):hover, .bar__svc summary:hover { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: .4em; }
.bar__lang { display: inline-flex; gap: .35rem; color: var(--mist); }
.bar__lang [aria-current] { color: var(--jade); }
.bar__svc { position: relative; }
.bar__svc summary { cursor: pointer; list-style: none; }
.bar__svc summary::-webkit-details-marker { display: none; }
.bar__svc summary::after { content: "+"; margin-left: .35em; color: var(--mist); }
.bar__svc[open] summary::after { content: "−"; }
.bar__svc ul {
  position: absolute; top: calc(100% + .9rem); left: -1rem; margin: 0; padding: .5rem 0; list-style: none;
  min-width: 18rem; background: var(--well); border: 1px solid var(--hair); box-shadow: var(--sc-e2);
}
.bar__svc li a { display: flex; gap: .9rem; padding: .6rem 1rem; color: var(--bone); text-decoration: none; }
.bar__svc li a:hover { background: var(--raised); }
.bar__svc b { color: var(--mist); font-weight: 600; width: 1ch; }
.bar__menu { display: none; }

@media (max-width: 1020px) {
  .bar__menu {
    display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; background: transparent; border: 1px solid var(--hair-strong);
    color: var(--bone); font-family: var(--sc-font-display); font-weight: 500; border-radius: 2px; cursor: pointer;
  }
  .bar__nav {
    position: absolute; top: 100%; left: var(--sc-gutter); right: var(--sc-gutter);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 0 1rem;
    background: var(--well); border: 1px solid var(--hair); box-shadow: var(--sc-e3);
    display: none;
  }
  .bar.is-open .bar__nav { display: flex; }
  .bar__nav > a:not(.btn), .bar__svc summary, .bar__lang { padding: .85rem 1.2rem; }
  .bar__svc ul { position: static; border: 0; box-shadow: none; padding: 0 0 .5rem; }
  .bar__nav .btn { margin: .6rem 1.2rem 0; }
}

/* ------------------------------------------------------------ rail ---- */
.rail {
  position: fixed; left: var(--rail-x); top: 22vh; bottom: 22vh; width: 2px; z-index: 40;
  opacity: 0; visibility: hidden; transition: opacity 320ms var(--sc-ease-out), visibility 0s linear 320ms;
}
.rail.is-on { opacity: 1; visibility: visible; transition: opacity 320ms var(--sc-ease-out), visibility 0s; }
.rail__line { position: absolute; inset: 0; background: var(--hair); }
.rail__trace { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--bone); transform-origin: top; transform: scaleY(var(--rail-k, 0)); }
.rail__ticks { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.rail__ticks li { position: absolute; left: 50%; top: var(--t); }
.rail__ticks a {
  position: absolute; left: 0; top: 0; width: 2.75rem; height: 2.75rem; translate: -50% -50%;
  display: grid; place-items: center; color: var(--bone); text-decoration: none;
}
.rail__ticks a::before { content: ""; width: 9px; height: 1px; background: var(--hair-strong); transition: width 200ms var(--sc-ease-out), background 200ms; }
.rail__ticks a.is-passed::before { background: var(--bone); }
.rail__ticks a span {
  position: absolute; left: 2.2rem; top: 50%; translate: 0 -50%; white-space: nowrap;
  font-family: var(--sc-font-display); font-stretch: 112%; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mist); opacity: 0; transition: opacity 180ms var(--sc-ease-out);
}
.rail__ticks a:hover span, .rail__ticks a:focus-visible span { opacity: 1; background: var(--well); padding: .3rem .55rem; color: var(--bone); }
.rail__ticks a[aria-current]::before { width: 15px; background: var(--bone); }
.rail__node {
  position: absolute; left: 50%; top: 0; width: 13px; height: 13px; border-radius: 50%;
  translate: -50% -50%; transform: translateY(var(--rail-y, 0px));
  background: var(--bone); box-shadow: 0 0 0 4px var(--well);
  transition: background 300ms var(--sc-ease-out);
}
.rail.is-settled .rail__node { background: var(--jade); }
.rail.is-settled .rail__trace { background: var(--jade); }

@media (max-width: 1180px) {
  .rail { display: none; }
}

/* ------------------------------------------------------------ cover --- */
.cover { background: var(--well); }
.cover__stage { overflow: hidden; height: 100svh; min-height: 36rem; }
/* Planes share one origin low on the horizon, so the whole scene descends
   toward the same point and nothing drifts off its anchor. Clouds are shot on
   black and screen-blended, which keeps their soft edges. */
.cover__plane { position: absolute; inset: 0; transform-origin: 62% 72%; }
.cover__plane img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 58% 50%; }
.cover__plane--plate  { z-index: 1; transform: scale(1.04); }
.cover__plane--clouds { z-index: 2; mix-blend-mode: screen; }
.cover__plane--wisps  { z-index: 3; mix-blend-mode: screen; pointer-events: none; }
.cover__scrim {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--well) 90%, transparent) 0%,
    color-mix(in oklab, var(--well) 84%, transparent) 28%,
    color-mix(in oklab, var(--well) 72%, transparent) 42%,
    color-mix(in oklab, var(--well) 40%, transparent) 56%,
    color-mix(in oklab, var(--well) 10%, transparent) 66%,
    transparent 76%);
}
.cover__copy {
  position: absolute; z-index: 6; left: var(--sc-gutter); top: clamp(5.5rem, 15vh, 11rem);
  width: min(38rem, 46vw);
}
.cover__title {
  /* sized by width and by height, so a short laptop screen keeps the copy
     clear of the corridor strip */
  font-size: clamp(2.6rem, min(1.6rem + 5.4vw, 10.5vh), 7rem); line-height: .96; letter-spacing: -0.035em;
}
/* Spanish runs longer: a slightly smaller title on a wider column keeps the
   headline to two lines and clear of the corridor strip. */
html[lang="es"] .cover__copy { width: min(44rem, 50vw); }
@media (min-width: 861px) {
  html[lang="es"] .cover__scrim { background: linear-gradient(90deg,
    color-mix(in oklab, var(--well) 92%, transparent) 0%,
    color-mix(in oklab, var(--well) 86%, transparent) 36%,
    color-mix(in oklab, var(--well) 76%, transparent) 50%,
    color-mix(in oklab, var(--well) 44%, transparent) 62%,
    color-mix(in oklab, var(--well) 12%, transparent) 72%,
    transparent 82%); }
}
html[lang="es"] .cover__title { font-size: clamp(2.4rem, min(1.2rem + 4.6vw, 9vh), 6rem); }
.cover__lede { margin: clamp(.8rem, 2.4vh, 1.6rem) 0 0; max-width: 34rem; font-size: clamp(1.02rem, .96rem + .3vw, 1.2rem); color: var(--bone); }
.cover__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: clamp(1rem, 3vh, 2rem); }
@media (max-height: 820px) { .cover__slogan { display: none; } }
.cover__slogan { margin: 1.4rem 0 0; font-family: var(--sc-font-display); font-stretch: 112%; font-size: .9rem; color: var(--bone); }
.cover__floor { position: absolute; inset: auto 0 0 0; height: 22vh; z-index: 7; background: linear-gradient(transparent, var(--well)); pointer-events: none; }

/* the corridor strip */
.corr {
  position: absolute; z-index: 8; left: var(--sc-gutter); right: var(--sc-gutter); bottom: clamp(1.8rem, 6vh, 3.5rem);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem;
  font-family: var(--sc-font-display); font-stretch: 112%;
}
.corr__end { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bone); font-weight: 600; }
.corr__track { position: relative; height: 2px; background: var(--hair-strong); }
.corr__trunk { position: absolute; left: 30%; right: 30%; top: -1px; height: 4px; background: var(--bone); opacity: .9; }
.corr__fill { position: absolute; left: 0; top: 0; height: 100%; width: 100%; background: var(--amber); transform-origin: left; transform: scaleX(calc(var(--hk, 0) * .5)); }
.corr__node, .corr__packet { position: absolute; top: 50%; border-radius: 50%; translate: -50% -50%; }
.corr__node { left: 50%; width: 18px; height: 18px; border: 2px solid var(--bone); background: var(--well); }
.corr__packet { left: calc(var(--hk, 0) * 50%); width: 10px; height: 10px; background: var(--amber); box-shadow: 0 0 0 3px var(--well); z-index: 1; }
.corr__note { position: absolute; left: 50%; bottom: 1.1rem; translate: -50% 0; margin: 0; text-align: center; white-space: nowrap; font-size: .72rem; letter-spacing: .06em; color: var(--mist); }
.corr__note b { display: block; color: var(--bone); font-weight: 600; }
.corr__caption { grid-column: 1 / -1; margin: .2rem 0 0; font-size: .74rem; letter-spacing: .08em; color: var(--amber); }

@media (prefers-reduced-motion: no-preference) {
  .cover__plane--plate  { transform: scale(calc(1.04 + var(--sc-p, 0) * .06)); }
  .cover__plane--clouds { transform: translateY(calc(var(--sc-p, 0) * -5%)) scale(calc(1 + var(--sc-p, 0) * .28)); opacity: calc(1 - var(--sc-p, 0) * .5); }
  .cover__plane--wisps  { transform: translateY(calc(var(--sc-p, 0) * -16%)) scale(calc(1 + var(--sc-p, 0) * .7)); opacity: calc(1 - var(--sc-p, 0) * .9); }
}

@media (max-width: 860px) {
  .cover__copy { width: auto; right: var(--sc-gutter); top: 5.4rem; }
  .cover__title { font-size: clamp(2.2rem, min(11vw, 7.4vh), 3.4rem); }
  html[lang="es"] .cover__title { font-size: clamp(1.9rem, min(8.4vw, 6.2vh), 3rem); font-stretch: 110%; }
  .cover__lede { font-size: clamp(.92rem, 2.3vh, 1rem); margin-top: .9rem; }
  .cover__actions { margin-top: 1.3rem; }
  .cover__slogan { display: none; }
  .cover__scrim { background: linear-gradient(color-mix(in oklab, var(--well) 92%, transparent) 0%, color-mix(in oklab, var(--well) 72%, transparent) 30%, color-mix(in oklab, var(--well) 55%, transparent) 60%, transparent 82%); }
  .corr__note { display: none; }
}

/* ------------------------------------------------------- chapters ----- */
.ch { position: relative; padding-block: var(--sc-section); }
.ch--well { background: var(--well); }
.ch--cord { background: var(--cord); }
figure { margin: 0; }
figure img { width: 100%; height: auto; }

/* promise */
.promise__grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 6vw, 7rem); align-items: end; }
.promise__text .body { margin-top: 2rem; }
.promise__fig img { aspect-ratio: 3 / 4; object-fit: cover; box-shadow: var(--sc-e3); }
@media (max-width: 860px) { .promise__grid { grid-template-columns: 1fr; } .promise__fig { max-width: 26rem; } }

/* proofs: a register, not three cards */
.proofs__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-strong); }
.proof { border-bottom: 1px solid var(--hair); }
.proof__wipe {
  display: grid; grid-template-columns: minmax(6rem, 1fr) minmax(14rem, 2.2fr) 3.4fr; gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 4vw, 3.4rem) 0; align-items: baseline;
}
.proof__n { font-size: clamp(2.6rem, 1.6rem + 3vw, 4.6rem); font-weight: 300; line-height: 1; color: var(--mist); font-variant-numeric: tabular-nums; padding-bottom: .1em; }
.proof__t { font-size: clamp(1.35rem, 1.1rem + .9vw, 2rem); line-height: 1.1; letter-spacing: -0.015em; }
@media (max-width: 860px) {
  .proof__wipe { grid-template-columns: 1fr; gap: .8rem; }
}

/* services rail */
.svc { padding-block: 0; }
.svc__stage { height: 100svh; display: flex; align-items: center; overflow: hidden; }
.svc__rail { gap: clamp(1.5rem, 3vw, 3rem); padding-inline: var(--sc-gutter) calc(var(--sc-gutter) + 4vw); align-items: stretch; }
.svc__lead { flex: 0 0 min(30rem, 80vw); display: flex; flex-direction: column; justify-content: space-between; padding-block: .5rem; }
.svc__legend { display: flex; justify-content: space-between; max-width: 22rem; margin: 2rem 0 0; padding-top: .8rem; border-top: 1px solid var(--hair-strong); font-family: var(--sc-font-display); font-stretch: 112%; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.svc__fig { flex: 0 0 min(40rem, 82vw); }
.svc__fig img { height: min(62vh, 30rem); width: 100%; object-fit: cover; box-shadow: var(--sc-e3); }
.svc__item {
  flex: 0 0 min(21rem, 78vw); display: flex; flex-direction: column; gap: 1rem;
  padding: 1.8rem 1.6rem 1.6rem; color: inherit; text-decoration: none;
  background: var(--cord); border-top: 1px solid var(--hair-strong); box-shadow: var(--sc-edge), var(--sc-e2);
  transition: background 180ms var(--sc-ease-out);
}
.svc__item:hover { background: var(--raised); }
.svc__item:hover .svc__map i:nth-child(2) { border-color: var(--amber); }
.svc__letter { font-size: 3.4rem; line-height: 1; font-weight: 300; color: var(--mist); }
.svc__name { font-size: 1.45rem; line-height: 1.1; letter-spacing: -0.01em; }
.svc__item .body { font-size: 1.02rem; flex: 1; }
.svc__go { font-family: var(--sc-font-display); font-weight: 500; font-size: .9rem; color: var(--bone); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: .35em; }
.svc__item:hover .svc__go { text-decoration-color: var(--amber); }
/* mini corridor: world, zaldara, latam. Stroke weight is the claim. */
.svc__map { position: relative; height: 14px; margin: .4rem 0 .2rem; }
.svc__map::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--hair-strong); }
.svc__map::after { content: ""; position: absolute; top: 5px; height: 3px; background: var(--bone); left: var(--a, 30%); right: var(--b, 30%); }
.svc__map i { position: absolute; top: 7px; width: 9px; height: 9px; border-radius: 50%; translate: -50% -50%; background: var(--cord); border: 1px solid var(--bone); transition: border-color 160ms; z-index: 1; }
.svc__map i:nth-child(1) { left: 0; } .svc__map i:nth-child(2) { left: 50%; width: 13px; height: 13px; border-width: 2px; } .svc__map i:nth-child(3) { left: 100%; }
.svc__map--a { --a: 38%; --b: 38%; }
.svc__map--b { --a: 0%;  --b: 0%; }
.svc__map--c { --a: 50%; --b: 0%; }
.svc__map--d { --a: 30%; --b: 30%; }

/* Phones, and anyone with reduced motion: a sideways rail is the wrong shape.
   A swipe strip fights vertical scrolling on touch, so the services stack and
   read top to bottom like the rest of the page. The engine sets the act height
   and the rail transform inline, hence the !important. */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .svc { height: auto !important; padding-block: var(--sc-section); }
  .svc__stage { position: static; height: auto; overflow: visible !important; display: block; }
  .svc__rail {
    transform: none !important; flex-wrap: wrap; gap: 1.5rem;
    max-width: var(--sc-maxw); margin-inline: auto; padding-inline: var(--sc-gutter);
  }
  .svc__lead, .svc__fig { flex: 1 1 100%; }
  .svc__fig img { height: auto; aspect-ratio: 16 / 9; }
  .svc__item { flex: 1 1 calc(50% - 1.5rem); }
}
@media (max-width: 860px) {
  .svc__item { flex-basis: 100%; }
  .svc__legend { margin-top: 1.5rem; }
}

/* who: an index the reader finds themselves in */
.who__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 7rem); align-items: start; }
.who__head { position: sticky; top: 12vh; }
.who__fig { margin-top: 2.5rem; }
.who__fig img { aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--sc-e2); }
.who__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair-strong); }
.who__row {
  display: grid; grid-template-columns: 1fr; gap: .45rem; padding: 1.6rem .2rem 1.5rem;
  border-bottom: 1px solid var(--hair); color: inherit; text-decoration: none; position: relative;
  transition: background 180ms var(--sc-ease-out), padding 0s;
}
.who__row::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .who__row:hover::before { transform: scaleX(1); } }
.who__t { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.7rem); line-height: 1.15; letter-spacing: -0.01em; }
.who__d { font-family: var(--sc-font-text); color: var(--mist); max-width: 54ch; }
.who__go { font-family: var(--sc-font-display); font-stretch: 108%; font-size: .82rem; font-weight: 500; color: var(--bone); letter-spacing: .02em; margin-top: .3rem; }
@media (max-width: 860px) { .who__grid { grid-template-columns: 1fr; } .who__head { position: static; } }

/* steps: four nodes on one line */
.steps__h { max-width: 18ch; }
.steps__list { list-style: none; margin: clamp(2.5rem, 5vw, 4.5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.steps__list::before { content: ""; position: absolute; left: 0; right: 0; top: .55rem; height: 1px; background: var(--hair-strong); }
.step > div { position: relative; padding: 2.4rem 1.6rem 0 0; }
.step > div::before { content: ""; position: absolute; left: 0; top: .55rem; width: 11px; height: 11px; border-radius: 50%; translate: 0 -50%; background: var(--well); border: 1.5px solid var(--bone); }
.step__n { display: block; font-size: .78rem; font-weight: 500; letter-spacing: .12em; color: var(--mist); font-variant-numeric: tabular-nums; }
.step__t { font-size: 1.3rem; line-height: 1.15; margin: .5rem 0 .7rem; }
.steps__more { margin: 3rem 0 0; }
@media (max-width: 860px) {
  .steps__list { grid-template-columns: 1fr; }
  .steps__list::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .step > div { padding: 0 0 2rem 2.2rem; }
  .step > div::before { top: .4rem; }
}

/* silence */
.silence { height: 55vh; background: var(--well); display: grid; place-items: center; }
.silence__node { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--hair-strong); }

/* ------------------------------------------------------- the peak ----- */
.custody, .custody-intro { background: var(--well); }
.custody-intro { padding-block: clamp(3rem, 8vw, 7rem) clamp(1rem, 3vw, 2.5rem); }
.custody__stage {
  height: 100svh; display: grid; grid-template-rows: 1fr auto;
  padding: clamp(2.5rem, 8vh, 5rem) var(--sc-gutter) clamp(2rem, 6vh, 4rem); gap: 1.5rem;
  max-width: calc(var(--sc-maxw) + 4rem); margin-inline: auto;
}
.custody__head { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem clamp(2rem, 5vw, 5rem); align-items: end; }
.custody__corr { display: grid; grid-template-columns: minmax(13rem, 1fr) 2.2fr minmax(13rem, 1fr); align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.ent { padding: 1.4rem 1.4rem 1.3rem; border: 1px solid var(--hair); background: color-mix(in oklab, var(--cord) 60%, var(--well)); transition: border-color 300ms var(--sc-ease-out), background 300ms var(--sc-ease-out); }
.ent__where { margin: 0 0 .5rem; font-family: var(--sc-font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mist); }
.ent__name { font-size: 1.3rem; line-height: 1.15; }
.ent__facts { list-style: none; margin: .9rem 0 0; padding: 0; font-size: .95rem; color: var(--mist); line-height: 1.5; }
.ent__facts li + li { margin-top: .25rem; }
.custody__stage[data-state="you"] .ent--us,
.custody__stage[data-state="moving1"] .ent--us { border-color: var(--bone); background: var(--cord); }
.custody__stage[data-state="settled"] .ent--cr { border-color: var(--jade); background: var(--cord); }

.xline { position: relative; height: 80px; --k: 0; }
.xline__base { position: absolute; left: 0; right: 0; top: 50%; height: 3px; translate: 0 -50%; background: var(--hair-strong); }
.xline__fill { position: absolute; left: 0; top: 50%; height: 3px; width: 100%; translate: 0 -50%; background: var(--amber); transform-origin: left; transform: scaleX(var(--k)); transition: background 300ms; }
.xline__node { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; translate: -50% -50%; border-radius: 50%; border: 3px solid var(--bone); background: var(--well); transition: transform 360ms var(--sc-ease-out), border-color 300ms; }
.xline__packet { position: absolute; left: calc(var(--k) * 100%); top: 50%; width: 26px; height: 26px; translate: -50% -50%; border-radius: 50%; background: var(--bone); box-shadow: 0 0 0 7px var(--well); transition: background 200ms, border-color 200ms, width 240ms var(--sc-ease-out), height 240ms var(--sc-ease-out); z-index: 2; border: 3px solid transparent; }
.custody__stage[data-state^="moving"] .xline__packet { background: var(--amber); }
.custody__stage[data-state="held"] .xline__packet { background: var(--well); border-color: var(--bone); width: 34px; height: 34px; box-shadow: none; }
.custody__stage[data-state="held"] .xline__node { transform: scale(1.18); }
.custody__stage[data-state="settled"] .xline__packet { background: var(--jade); }
.custody__stage[data-state="settled"] .xline__fill { background: var(--jade); }

/* The state label travels with the line, not in a row of its own, so it can
   never be pushed onto the boxes when the screen is short. */
.custody__state {
  position: absolute; left: 50%; top: calc(50% + 3.4rem); translate: -50% 0; margin: 0;
  white-space: nowrap; text-align: center; font-family: var(--sc-font-mono);
  font-size: clamp(.9rem, .8rem + .4vw, 1.15rem); letter-spacing: .06em; color: var(--bone);
}
.ent__name { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.7rem); }
.custody__stage[data-state^="moving"] .custody__state { color: var(--amber); }
.custody__stage[data-state="settled"] .custody__state { color: var(--jade); }

.custody__record { position: relative; padding-top: 1.1rem; font-size: .95rem; color: var(--mist); display: grid; grid-template-columns: 1.4fr 1fr; gap: .5rem 3rem; align-items: start; }
.custody__record p { margin: 0; }
.custody__record b { display: block; color: var(--bone); font-family: var(--sc-font-display); font-stretch: 108%; font-weight: 600; }
.custody__bar { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--bone); transform-origin: left; transform: scaleX(var(--rec, 0)); }
.custody__final { color: var(--bone); opacity: var(--fin, 0); transition: opacity 300ms; font-style: italic; }

@media (max-width: 860px) {
  .custody-intro { padding-block: var(--sc-section) 1rem; }
  .custody__head { grid-template-columns: 1fr; }
  .custody__stage { padding: 1.25rem var(--sc-gutter) 1.25rem; grid-template-rows: minmax(0, 1fr) auto; gap: 1rem; }
  /* the boxes hold the ends; the line between them gets every spare pixel */
  .custody__corr { grid-template-columns: 1fr; grid-template-rows: auto minmax(18vh, 1fr) auto; gap: 1rem; align-items: stretch; min-height: 0; }
  .ent { padding: .9rem 1rem; }
  .ent__name { font-size: 1.2rem; }
  .ent__facts { font-size: .86rem; margin-top: .5rem; }
  /* The line runs down the left, in line with the boxes; the label rides
     beside the node with the full remaining width to itself. */
  .xline { height: auto; min-height: 18vh; --lx: 2rem; }
  .xline__base { left: var(--lx); right: auto; top: 0; bottom: 0; width: 2px; height: auto; translate: -50% 0; }
  .xline__fill { left: var(--lx); top: 0; width: 2px; height: 100%; translate: -50% 0; transform-origin: top; transform: scaleY(var(--k)); }
  .xline__node { left: var(--lx); width: 52px; height: 52px; }
  .xline__packet { left: var(--lx); top: calc(var(--k) * 100%); }
  .custody__state {
    left: calc(var(--lx) + 2.4rem); right: 0; top: 50%; translate: 0 -50%;
    white-space: normal; text-align: left; font-size: .88rem; line-height: 1.45;
  }
  .custody__record { grid-template-columns: 1fr; gap: .35rem; padding-top: .8rem; font-size: .82rem; line-height: 1.45; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .custody__corr { grid-template-rows: auto minmax(14vh, 1fr) auto; }
  .xline { min-height: 14vh; }
  .ent__facts { margin-top: .3rem; line-height: 1.35; }
}

/* ----------------------------------------------------------- close ---- */
.close__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.close__text .body { margin-top: 1.6rem; }
.close__media { position: relative; padding-bottom: 4rem; }
.close__fig img { aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--sc-e2); }
.record {
  position: relative; margin: -6rem 0 0 -3rem; width: min(25rem, 92%);
  background: var(--well); border: 1px solid var(--hair-strong); padding: 1.6rem 1.6rem 1.5rem;
  box-shadow: var(--sc-edge), var(--sc-e3);
}
.record__h { margin: 0 0 1rem; font-family: var(--sc-font-display); font-stretch: 112%; font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.record__lines { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.record__lines li { display: flex; justify-content: space-between; align-items: center; padding: .62rem 0; border-top: 1px solid var(--hair); font-size: 1rem; }
.record__lines i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--hair-strong); position: relative; transition: background 240ms var(--sc-ease-out), border-color 240ms; transition-delay: calc(var(--i, 0) * 260ms); }
.record__lines i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--well); border-width: 0 2px 2px 0; rotate: 45deg; opacity: 0; transition: opacity 200ms; transition-delay: calc(var(--i, 0) * 260ms + 120ms); }
.record.is-recorded .record__lines i { background: var(--jade); border-color: var(--jade); }
.record.is-recorded .record__lines i::after { opacity: 1; }
.record__lines li:nth-child(1) i, .record__lines li:nth-child(1) i::after { --i: 0; }
.record__lines li:nth-child(2) i, .record__lines li:nth-child(2) i::after { --i: 1; }
.record__lines li:nth-child(3) i, .record__lines li:nth-child(3) i::after { --i: 2; }
.record__lines li:nth-child(4) i, .record__lines li:nth-child(4) i::after { --i: 3; }
.record__cta { width: 100%; }
@media (max-width: 860px) {
  .close__grid { grid-template-columns: 1fr; }
  .record { margin: -3rem 0 0 1rem; }
}

/* ---------------------------------------------------------- footer ---- */
.ftr { background: var(--well); padding: clamp(4rem, 8vw, 7rem) 0 2rem; border-top: 1px solid var(--hair); font-family: var(--sc-font-display); }
.ftr__top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; }
.ftr__brand img { width: 150px; height: auto; }
.ftr__slogan { margin: 1.2rem 0 0; font-stretch: 112%; font-weight: 600; font-size: 1.15rem; line-height: 1.25; max-width: 14ch; }
.ftr h3 { margin: 0 0 1rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); font-weight: 500; }
.ftr ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.ftr li + li { margin-top: .55rem; }
.ftr a { color: var(--bone); text-decoration: none; }
.ftr a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.ftr small { display: block; color: var(--mist); font-size: .78rem; }
.ftr__badges { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 3.5rem; }
.ftr__badges span { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .8rem; border: 1px solid var(--hair-strong); font-size: .78rem; letter-spacing: .04em; }
.ftr__badges span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--bone); }
.ftr__disc { margin-top: 1.6rem; padding: 1.4rem 1.6rem; background: color-mix(in oklab, var(--cord) 55%, var(--well)); font-family: var(--sc-font-text); font-size: .84rem; line-height: 1.6; color: color-mix(in oklab, var(--bone) 78%, var(--well)); }
.ftr__disc p { margin: 0; max-width: 110ch; }
.ftr__disc p + p { margin-top: .8rem; }
.ftr__copy { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; font-size: .76rem; color: var(--mist); }
.ftr__mark { width: 100%; height: auto; margin-top: 3.5rem; opacity: .08; }
@media (max-width: 860px) { .ftr__top { grid-template-columns: 1fr 1fr; } .ftr__brand { grid-column: 1 / -1; } }

/* ---------------------------------------------------------- cookie ---- */
.cookie {
  position: fixed; z-index: 70; right: 1rem; bottom: 1rem; width: min(26rem, calc(100vw - 2rem));
  background: var(--well); border: 1px solid var(--hair-strong); padding: 1.2rem 1.3rem; box-shadow: var(--sc-e3); font-size: .9rem; color: var(--mist);
}
.cookie p { margin: 0; }
.cookie__h { color: var(--bone); font-family: var(--sc-font-display); font-weight: 600; margin-bottom: .5rem !important; }
.cookie__row { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: 1rem; font-size: .85rem; }
@media (max-width: 600px) {
  .cookie { left: .75rem; right: .75rem; bottom: .75rem; width: auto; padding: .9rem 1rem; font-size: .8rem; line-height: 1.45; }
  .cookie__row { margin-top: .7rem; }
}
