/* Stratum (Version 2): a product page for a desktop app. Shared parts live in site.css.
   Dark showcase bands (band-ink) open and hold the middle of the page in every theme:
   hero      the log plot lies back and stands up as you scroll, then a strip of facts
   workflow  a sticky screen that crossfades and zooms while the six steps of a job pass,
             with a rail that fills as you go
   interpret the crossplot grows into place, the cement bond plot slides in, two screens in parallax
   where     three places it runs, in big type
   access    how to ask for a password */

/* Stratum's bar stays dark in every theme, like the bands it opens on */
.st-ln { --nav-bg: color-mix(in srgb, var(--ink-band) 92%, transparent); background: var(--nav-bg); }

/* ── Hero ───────────────────────────────────────────────────────── */
.st-hero { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); overflow: clip; }
.st-hero .t-hero { margin-top: 4px; }
.st-hero .t-lead { max-width: 720px; margin: 22px auto 0; }
.st-hero .btns { justify-content: center; margin-top: 34px; }
.st-nowrap { white-space: nowrap; }
.st-in { animation: st-rise 1.1s var(--ease-out) var(--d, 0s) both; }
@keyframes st-rise { from { opacity: 0; transform: translateY(24px); } }

.st-lid { margin-top: clamp(40px, 4vw, 60px); }
.st-lid-fig { width: min(100% - 2 * var(--gutter), 1360px); margin: 0 auto; }
.st-lid-screen {
    overflow: hidden;
    border-radius: clamp(10px, 1.2vw, 18px);
    background: #0B0F14;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 80px 140px -70px rgba(0,0,0,0.95);
    transform-origin: 50% 70%;
    transform: perspective(2400px) rotateX(calc((1 - var(--p, 1)) * 28deg)) scale(calc(0.88 + 0.12 * var(--p, 1)));
}
.st-lid-screen img { width: 100%; }
.st-lid-fig figcaption {
    max-width: 620px; margin: 22px auto 0; text-align: center;
    font-size: 14px; line-height: 1.43; color: var(--fg-3);
}

/* a strip of facts under the plot */
.st-specs {
    list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: clamp(56px, 7vw, 96px);
    border-top: 1px solid var(--line);
}
.st-specs li {
    display: flex; align-items: center; justify-content: center; min-height: 64px;
    padding: 16px 12px 4px; text-align: center;
    font-size: clamp(15px, 1.3vw, 17px); font-weight: 600; letter-spacing: -0.01em; color: var(--fg);
}
@media (max-width: 899px) {
    .st-specs li:nth-child(even) { border-left: 1px solid var(--line); }
    .st-specs li:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 14px; }
}
@media (min-width: 900px) {
    .st-specs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .st-specs li { padding-top: 22px; }
    .st-specs li + li { border-left: 1px solid var(--line); }
}

/* ── 01 The workflow ────────────────────────────────────────────── */
.st-wf-head { display: grid; gap: 20px 64px; align-items: end; }
@media (min-width: 900px) { .st-wf-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.st-wf-head .t-display { max-width: 10em; }

.st-story { margin-top: clamp(40px, 5vw, 64px); --story-h: 500px; }
.st-frames .screen { margin: 0; }
.st-steps { list-style: none; }
.st-num { display: block; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--accent); font-variant-numeric: tabular-nums; }
.st-steps .t-2 { margin-top: 8px; }
.st-steps p { margin-top: 14px; max-width: 30em; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.42; color: var(--fg-2); }
.story-inline.screen { margin: 24px 0 0; }

/* close-ups: each frame zooms in on the part of the screen its step is about */
.st-zoom img { transform-origin: var(--o, 50% 50%); }
.st-zoom--start   { --z: 1.7;  --o: 60% 20%; }   /* Start a job and its three cards */
.st-zoom--library { --z: 3.22; --o: 0 47.3%; }   /* the library: five LAS files with depths and samples, edges between entries */
.st-zoom--vdl     { --z: 1.7;  --o: 100% 46%; }  /* cement bond and the VDL image track */
.st-zoom--tracks  { --z: 1.6;  --o: 50% 58%; }   /* the curves themselves */
.st-zoom--report  { --z: 1.45; --o: 55% 12%; }   /* the sections list and the top of the A4 page */
.story-inline.st-zoom img { transform: scale(var(--z)); }
.st-frames .st-zoom img { transform: scale(1); transition: transform 1.6s var(--ease-out) .1s; }
.st-frames .st-zoom.is-on img { transform: scale(var(--z)); }

@media (min-width: 900px) {
    .st-story .story-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(40px, 5vw, 80px); }
    /* the text keeps to the page grid; only the picture reaches a little past it */
    .st-story .story-media { order: 2; margin-right: calc(-1 * clamp(0px, (100vw - var(--w-wide)) / 2 - 40px, 80px)); }
    /* the rail runs from the first dot to the last, and its lit part ends at the lit dot */
    .st-steps { --i: 0; position: relative; padding-left: 40px; }
    .st-steps::before, .st-steps::after {
        content: ""; position: absolute; left: 5px; width: 1px;
        top: 53vh; bottom: 61vh;            /* centre of the first and last step (22vh + 31vh, 30vh + 31vh) */
        background: var(--line-2);
    }
    .st-steps::after { background: var(--accent); transform-origin: 50% 0; transform: scaleY(calc(var(--i) / 5)); transition: transform .5s var(--ease-out); }
    .st-story[data-active="data"] .st-steps { --i: 1; }
    .st-story[data-active="plot"] .st-steps { --i: 2; }
    .st-story[data-active="clean"] .st-steps { --i: 3; }
    .st-story[data-active="interpret"] .st-steps { --i: 4; }
    .st-story[data-active="report"] .st-steps { --i: 5; }
    .st-steps .story-step { position: relative; }
    .st-steps .story-step::before {
        content: ""; position: absolute; z-index: 1; left: -40px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px;
        border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-2);
        transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
    }
    .st-steps .story-step.is-on::before { background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
}

/* ── 02 Interpretation ──────────────────────────────────────────── */
.st-interp-lede { margin-top: clamp(24px, 3vw, 36px); text-align: center; }
.st-interp-lede .t-intro { color: var(--fg); }

.st-oh { margin-top: clamp(72px, 9vw, 128px); }
.st-oh-media { width: min(100% - 2 * var(--gutter), var(--w-wide)); margin-inline: auto; }
/* cropped to the plot and its colour scale */
.st-oh-shot img { transform: scale(1.6); transform-origin: 46.7% 45%; }
.st-oh-shot { margin: 0; box-shadow: 0 0 0 1px var(--line), 0 60px 120px -60px rgba(0,0,0,0.9); }
.st-block { display: grid; gap: 28px 64px; margin-top: clamp(48px, 6vw, 80px); }
@media (min-width: 900px) { .st-block { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.st-kind { color: var(--accent); }
.st-kind--cased { color: var(--gold); }
.st-block-head .t-1, .st-ch-copy .t-1 { margin-top: 2px; }

.st-chain { list-style: none; display: grid; gap: 0 40px; }
@media (min-width: 735px) { .st-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-chain li { display: grid; gap: 6px; align-content: start; padding: 20px 0 26px; border-top: 1px solid var(--line); }
.st-chain strong { font-size: 19px; line-height: 1.26; letter-spacing: -0.01em; }
.st-chain span { color: var(--fg-2); }

.st-ch { display: grid; gap: 40px; align-items: center; margin-top: clamp(96px, 12vw, 176px); }
@media (min-width: 900px) { .st-ch { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(48px, 5vw, 80px); } }
.st-ch-shot { margin: 0; }
.st-tools { margin-top: 28px; }
.st-tools > div { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.st-tools dt { font-size: 19px; line-height: 1.26; font-weight: 600; letter-spacing: -0.01em; }
.st-tools dd { margin: 6px 0 0; color: var(--fg-2); }

.st-pair { display: grid; gap: 48px; margin-top: clamp(96px, 12vw, 176px); }
.st-pair figure { margin: 0; }
.st-pair figcaption { margin-top: 16px; max-width: 44ch; font-size: 15px; line-height: 1.45; color: var(--fg-3); }
@media (min-width: 900px) {
    .st-pair { grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
    /* the second screen sits lower and moves a little faster than the first */
    .st-pair .st-pair-b { margin-top: 140px; translate: 0 calc((0.5 - var(--p, 0.5)) * 160px); }
}

/* ── 03 Where it runs ───────────────────────────────────────────── */
.st-where-head { display: grid; gap: 20px 64px; align-items: end; }
@media (min-width: 900px) { .st-where-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.st-where-head .t-display { max-width: 9em; }
.st-runs { list-style: none; display: grid; margin-top: clamp(56px, 7vw, 96px); }
.st-runs li { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.st-runs p { margin-top: 12px; max-width: 34ch; color: var(--fg-2); }
@media (min-width: 900px) {
    .st-runs { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
    .st-runs li { padding: 36px 36px 8px 0; border-top: 0; }
    .st-runs li + li { padding-left: 36px; border-left: 1px solid var(--line); }
}
.st-data {
    margin-top: clamp(56px, 7vw, 96px);
    font-size: clamp(19px, 2vw, 24px); line-height: 1.38; font-weight: 600; letter-spacing: -0.014em;
    color: var(--fg-3); max-width: 920px;
}

/* ── Access ─────────────────────────────────────────────────────── */
.st-access { padding-top: clamp(56px, 7vw, 96px); }
.st-access::before {
    content: ""; display: block; height: 1px; background: var(--line);
    width: min(100% - 2 * var(--gutter), var(--w-wide)); margin: 0 auto clamp(56px, 7vw, 96px);
}
.st-access .t-lead { max-width: 680px; margin-inline: auto; }
.st-access .btns { margin-top: 34px; }

/* ── Phone: full app screens are too small to read at this width, so each shows a close-up ── */
@media (max-width: 734px) {
    .pc { aspect-ratio: var(--pc-ar, 4 / 5); }
    .pc img, .st-oh-shot.pc img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pc-pos, 50% 50%); transform: none; }
    /* a zoomed corner instead, where any side crop would slice a panel of text */
    .pcz img { transform: scale(var(--pz, 2)); transform-origin: var(--po, 100% 100%); }
}

@media (prefers-reduced-motion: reduce) {
    .st-in { animation: none; }
    .st-lid-screen { transform: none !important; }
    .st-frames .st-zoom img { transition: none; }
    .st-pair .st-pair-b { translate: none !important; }
}
