/* Contrail Studio · Idea 3 · ALTITUDE · mobile first. The scroll is the climb: six stitched bands, a fixed level strip, one trail on a flat field. */
:root {
  --chalk: #EEEAE2; --stratos: #22303F; --orange: #FF5A1F;
  --field: var(--chalk); --ink: var(--stratos); --accent: var(--orange);
  --margin: 24px; --strip: 44px; --colw: min(313px, calc(100vw - 77px));   /* replaced at runtime: 941 native px / device pixel ratio, capped at 470 */
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif; --mono: "Geist Mono", "SF Mono", Menlo, Consolas, monospace;
  --h1: 32px; --h1lh: 38px; --offer: 17px; --offerlh: 26px; --body: 16px; --bodylh: 22px; --monosz: 11px;
  --trail-w: clamp(1.5px, 0.46vw, 3px);
}
html[data-state="sky"] { --field: var(--stratos); --ink: var(--chalk); }

* { box-sizing: border-box; }
html { background: var(--field); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-weight: 400; font-size: var(--body); line-height: var(--bodylh); background: var(--field); color: var(--ink); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
h1, h2, p, figure, figcaption { margin: 0; }
.mono { font-family: var(--mono); font-weight: 400; font-size: var(--monosz); line-height: 16px; letter-spacing: 0.12em; text-transform: uppercase; font-variant-numeric: tabular-nums; }

/* the level strip: fixed at the right edge in its own flat band; readout on two lines; only the tick scale moves */
.strip { position: fixed; top: 0; right: 0; width: var(--strip); height: var(--vhpx, 100svh); z-index: 5; background: var(--field); color: var(--ink); border-left: 1px solid var(--ink); }
html.strip-off .strip { visibility: hidden; }
.ro { position: absolute; top: 18px; left: 0; right: 0; text-align: center; letter-spacing: 0.06em; }
.ro span { display: block; }
.ticks { position: absolute; top: 76px; height: calc(var(--vhpx, 100svh) - 100px); left: 0; right: 0; overflow: hidden; }
.scale { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.scale i { position: absolute; right: 10px; height: 1px; width: 8px; background: var(--ink); opacity: 0.5; }
.scale i.f { width: 20px; opacity: 1; }
.marker { position: absolute; left: 5px; right: 5px; top: 50%; height: 2px; background: var(--ink); }

.wrap { width: calc(100vw - var(--margin) - var(--strip)); margin-left: var(--margin); position: relative; }
.sec { position: relative; display: flow-root; }

/* top bar and hero copy */
.bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 20px 0 14px; border-bottom: 1px solid var(--ink); width: var(--colw); }
.wordmark img { width: 132px; height: auto; }
.log { text-align: right; }
.hero-copy { width: var(--colw); }
.h1 { font-weight: 300; font-size: var(--h1); line-height: var(--h1lh); letter-spacing: -0.01em; margin-top: 20px; max-width: 14ch; }
.offer { margin-top: 10px; font-size: var(--offer); line-height: var(--offerlh); max-width: 30ch; }
.btn { display: inline-block; margin-top: 16px; background: var(--accent); color: var(--stratos); font-family: var(--sans); font-size: 17px; line-height: 44px; height: 44px; padding: 0 18px; }

/* bands: a window in flow, the stitched column travelling inside it at 1.3x the band's own scroll.
   One band holds the screen at a time: every band after the ground is a viewport of field with its window centred. */
.band { min-height: var(--vhpx, 100svh); display: flex; flex-direction: column; justify-content: center; }
#b0 { min-height: 0; display: block; padding-top: 18px; padding-bottom: calc(var(--vhpx, 100svh) * 0.42); }
.side { display: none; }
.window { position: relative; width: var(--colw); overflow: hidden; height: 494px; background: var(--stratos); }
.window[data-code="F0"] { height: var(--win-F0, 494px); } .window[data-code="F1"] { height: var(--win-F1, 494px); } .window[data-code="F2"] { height: var(--win-F2, 494px); }
.window[data-code="F3"] { height: var(--win-F3, 494px); } .window[data-code="F4"] { height: var(--win-F4, 494px); } .window[data-code="F5"] { height: var(--win-F5, 494px); }
.col { position: relative; width: 100%; transform: translate3d(0, 0, 0); }
.window.live .col { will-change: transform; }
.col img { width: 100%; height: auto; }
.rule { position: absolute; left: 0; right: 0; height: 1px; background: var(--chalk); transform: scaleX(var(--d, 0)); transform-origin: left center; }
/* level copy on the plate's flat sky band, Chalk on the keyed Stratos sky; cut in hard.
   The wipe is on the two lines, not on the block, so the block's field is always under the type. */
.lvl { display: block; }
.lvl .mono, .lvl .t { clip-path: inset(0 100% 0 0); }
.lvl.on .mono, .lvl.on .t { clip-path: none; }
.lvl .mono { display: block; }
.lvl .t { display: block; margin-top: 6px; font-size: var(--body); line-height: var(--bodylh); }
/* the level copy sits in its own Stratos band on the plate's keyed sky: invisible where the sky is, a deliberate block if it ever meets concrete */
.onplate { position: absolute; left: 0; right: 0; padding: 10px 14px 12px; background: var(--stratos); color: var(--chalk); }

/* roof: looking down, each plate revealed by a rising wipe on its own entry */
.roof { padding-top: 48px; padding-bottom: var(--gut, 50vh); }
.tlabel { width: var(--colw); padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.rstack { display: grid; row-gap: 28px; padding-top: 20px; width: var(--colw); }
.rplate { position: relative; }
.rplate img { aspect-ratio: 4 / 5; width: 100%; height: auto; }
.rplate figcaption { padding-top: 10px; }
.wipe-up img { clip-path: inset(calc(100% - var(--w, 0%)) 0 0 0); }

/* sky: the field is Stratos, the type Chalk, the one trail on a flat field */
.sky { padding: var(--gut, 50vh) 0; }
.sky .inner { min-height: var(--vhpx, 100svh); }
.sky .h1 { margin-top: 0; }
.trail { display: block; position: relative; left: calc(-1 * var(--margin)); width: 100vw; height: 140px; margin-top: 56px; z-index: 6; overflow: visible; }
.trail polyline { stroke: var(--accent); stroke-width: var(--trail-w); stroke-linecap: butt; }
.sky .remark { margin-top: 56px; font-size: var(--offer); line-height: var(--offerlh); max-width: 30ch; }

/* end card: button in the lower half, the strip has left */
.end { min-height: var(--vhpx, 100svh); padding-top: var(--gut, 50vh); display: flex; flex-direction: column; justify-content: flex-end; }
.endcard { padding: 0 0 56px; }
.endcard .btn { margin-top: 0; }
.endcard .wm { width: 160px; height: auto; margin-top: 40px; }
.endcard .contact { margin-top: 16px; }

/* reduced motion: the climb's final states */
.reduced .col { transform: none !important; }
.reduced .lvl .mono, .reduced .lvl .t, .reduced .wipe-up img { clip-path: none !important; }
.reduced .rule { transform: none !important; }
.reduced .trail polyline { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }

/* short phones: tighter hero so the ground window starts within 300 px */
@media (max-width: 899px) and (max-height: 700px) { .bar { padding: 14px 0 10px; } .h1 { margin-top: 14px; } .offer { margin-top: 8px; } .btn { margin-top: 12px; } .band { padding-top: 16px; } }

/* desktop: the column at native width in the centre, copy in the left margin, the strip at the right edge */
@media (min-width: 900px) {
  :root { --h1: 44px; --h1lh: 52px; --offer: 18px; --offerlh: 28px; --body: 17px; --bodylh: 26px; --monosz: 12px; --colw: 470px; }
  .wrap { width: calc(100vw - var(--strip)); margin-left: 0; }
  .bar { width: auto; margin: 0 48px; padding: 32px 0 16px; }
  .wordmark img { width: 160px; }
  .grid, .hero-copy, .band, .roof, .sky .inner, .endcard { display: grid; grid-template-columns: 1fr var(--colw) 1fr; column-gap: 48px; align-items: start; }
  .hero-copy { width: auto; padding-top: 40px; }
  .hero-copy > * { grid-column: 1; justify-self: end; width: 360px; }
  .hero-copy .h1 { margin-top: 0; max-width: none; }
  .band { min-height: var(--vhpx, 100svh); align-content: center; }
  #b0 { min-height: 0; display: grid; padding-top: 24px; padding-bottom: calc(var(--vhpx, 100svh) * 0.42); }
  .side { display: block; grid-column: 1; justify-self: end; width: 360px; padding-top: 8px; }
  .side .lvl + .lvl { margin-top: 28px; }
  .window { grid-column: 2; }
  .onplate { display: none; }
  .roof { padding-top: 80px; }
  .tlabel { grid-column: 2; width: auto; }
  .rstack { grid-column: 2; width: auto; row-gap: 40px; }
  .sky .inner > * { grid-column: 2; justify-self: start; }
  .sky .inner .trail { grid-column: 1 / -1; left: 0; width: calc(100vw - var(--strip)); margin-left: 0; margin-top: 72px; }
  .sky .remark { margin-top: 72px; }
  .endcard { padding-bottom: 72px; }
  .endcard > * { grid-column: 2; justify-self: start; }
}
