/* The floor: a sample clinic's plan that stands up into 3D as you scroll (js/plan3d.js).
   Copied from Trinity's Process section (Trinity/site/css/plan3d.css, 2026-10-13) and adapted: no heading
   inside the panel (the line is on the screen above), a Skip link, and an honesty note.
   A tall track with a sticky 100svh panel. Everything inside the panel is absolutely placed, so nothing can
   be taller than the panel (no iPad scroll trap). Captions share one grid cell. */

.process { position: relative; z-index: 1; padding: 0; }
/* the drawing paper fades in and out of the aurora instead of meeting it at a hard edge */
/* one screen: the film plays by itself (js/plan3d.js autoplay), so there is no scroll track */
.process__track { position: relative; }
.process__panel { position: relative; height: 100svh; min-height: 30rem; overflow: hidden; background: var(--paper); }
.process__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.process__fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 4rem var(--gutter) 13rem; color: var(--ink); }
.process__fallback[hidden] { display: none; }
.process__fallback svg { width: 100%; height: 100%; font-family: var(--caps); }


/* the honest label: this is a made-up clinic, not anyone's practice */
.process__note {
  position: absolute; z-index: 2; margin: 0; pointer-events: none;
  bottom: calc(env(safe-area-inset-bottom) + clamp(1rem, 3svh, 1.75rem)); right: max(var(--gutter), env(safe-area-inset-right));
  font: 500 var(--step-caption)/1.3 var(--caps); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
}


.process__caps {
  position: absolute; z-index: 2;
  left: max(var(--gutter), env(safe-area-inset-left));
  bottom: calc(clamp(1.5rem, 6svh, 4rem) + env(safe-area-inset-bottom));
  width: min(30rem, 38vi); padding: clamp(1.1rem, 2.2vi, 1.6rem) clamp(1.2rem, 2.4vi, 1.8rem); border-radius: var(--radius);
}
/* the captions sit on frosted glass (.glass-panel in site.css), so the building blurs softly behind the words */
/* three stage tiles: always all visible, the current one lit in maroon, each one a button that goes there */
.process__hint { margin: 0 0 .75rem; font: 500 var(--step-caption)/1.4 var(--sans); color: var(--ink-2); }
.process__stages { display: grid; gap: .5rem; }
.stage {
  position: relative; display: grid; gap: .25rem; width: 100%; min-height: 72px; margin: 0; padding: .9rem 1rem .9rem 1.4rem;
  border: 0; border-radius: calc(var(--radius) * .75); cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  background: transparent; -webkit-tap-highlight-color: transparent; transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.stage__bar { position: absolute; left: .6rem; top: .95rem; bottom: .95rem; width: 3px; border-radius: 3px; background: var(--rule); transition: background-color .3s var(--ease); }
.stage__name { font: 500 clamp(1.6rem, 1.25rem + 1vi, 2.25rem)/1.02 var(--display); letter-spacing: -.01em; color: var(--ink-2); transition: color .3s var(--ease); }
.stage__line { font: 400 var(--step-body)/1.4 var(--sans); color: var(--ink-2); }
.stage.is-on { background: var(--surface); box-shadow: var(--glass-clear-light); }
.stage.is-on .stage__bar { background: var(--accent); }
.stage.is-on .stage__name { color: var(--ink); }
.stage:active { background: var(--veil-on-light); }
@media (hover: hover) and (pointer: fine) { .stage:not(.is-on):hover { background: var(--veil-on-light); } }
.process__line { display: none; margin: .75rem 0 0; font: 400 var(--step-lead)/1.45 var(--sans); color: var(--ink-2); }
.process__play { min-height: 44px; min-width: 6.5rem; margin-top: .75rem; padding: 0 1.1rem; font-size: var(--step-caption); }

/* tall shapes (portrait phones and tablets): captions at the bottom, the building above them */
@media (max-aspect-ratio: 23/20) { .process__note { bottom: calc(env(safe-area-inset-bottom) + .35rem); right: auto; left: max(var(--gutter), env(safe-area-inset-left)); font-size: .75rem; } }
@media (max-aspect-ratio: 23/20) {
  .process__caps { width: auto; right: max(var(--gutter), env(safe-area-inset-right)); }
  .process__stages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .stage { min-height: 56px; padding: 1.05rem .5rem .7rem; justify-items: center; text-align: center; }
  .stage__bar { left: 1rem; right: 1rem; top: .45rem; bottom: auto; width: auto; height: 3px; }
  .stage__name { font-size: clamp(1.25rem, 4.6vi, 1.75rem); }
  .stage__line { display: none; }
  .process__line { display: block; }
  .process__play { margin-top: .5rem; }
}

/* without scripts (or if main.js fails, see quality-boot.js): a plain section with the three steps in a column */
html:not(.js) .process__track { height: auto; }
html:not(.js) .process__panel { position: relative; height: auto; display: grid; gap: 2rem; padding: var(--section) var(--gutter); }
html:not(.js) .process__canvas, html:not(.js) .process__hint, html:not(.js) .process__play { display: none; }
html:not(.js) .process__caps, html:not(.js) .process__note { position: static; width: auto; }

@media (prefers-reduced-motion: reduce) {
  .stage, .stage__bar, .stage__name { transition: none; }
}
@media (prefers-contrast: more) {
  .stage__bar { background: var(--ink-2); }
}
