/* ==========================================================================
   Playd — site styles

   The design is a logbook, not a landing page: true black (the app is OLED
   black), one typeface pushed to its width extremes, hairline rules that
   separate real data, square panels. Colour is reserved for status — the
   six game states — and for the one live element, the Now Playing island.
   No gradients, no glass, no glows.

   Type: Archivo (variable weight + width). JetBrains Mono appears only
   where the content is machine data: timers, URLs, versions.
   ========================================================================== */

/* ---------- fonts (self-hosted, latin subset) ---------- */
@font-face {
    font-family: "Archivo";
    src: url("../fonts/archivo-var-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62.5% 125%;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/jetbrainsmono-var-latin.woff2") format("woff2");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ---------- tokens ---------- */
:root {
    --black: #000000;
    --surface: #0b0b0c;
    --surface-2: #141416;

    --bone: #f3f1ec;
    --dim: #9a978f;
    --faint: #7c7a72;

    --rule: rgba(243, 241, 236, 0.15);
    --rule-soft: rgba(243, 241, 236, 0.08);
    --rule-strong: rgba(243, 241, 236, 0.34);

    /* the app's accent, kept for live/interactive states */
    --accent: #6b4ff5;
    --live: #a291ff;

    /* the app's status vocabulary, lifted for legibility on black */
    --blue: #4c9dff;
    --green: #4bd07c;
    --orange: #ffa14a;
    --yellow: #ffd75e;
    --purple: #c08cff;
    --pink: #ff6f9d;
    --gray: #a3a19a;

    --maxw: 1240px;
    --gutter: clamp(20px, 4.2vw, 48px);
    --pad: clamp(72px, 9vw, 128px);

    --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
    --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

/* ---------- base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background: var(--black);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--black);
    color: var(--bone);
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
svg {
    max-width: 100%;
}

img {
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
}

p,
h1,
h2,
h3,
h4,
figure,
dl,
dd {
    margin: 0;
}

::selection {
    background: var(--live);
    color: #000;
}

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

.page {
    overflow-x: clip;
}

.wrap {
    width: 100%;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    background: var(--bone);
    color: #000;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    transform: translateY(-200%);
}

.skip:focus {
    transform: none;
}

/* ---------- typography ---------- */
.display {
    font-weight: 780;
    font-stretch: 118%;
    letter-spacing: -0.035em;
    line-height: 0.94;
    text-wrap: balance;
}

.display--xl {
    font-size: clamp(2.9rem, 6.3vw, 6rem);
}

.display--lg {
    font-size: clamp(2.1rem, 4.3vw, 3.7rem);
    line-height: 0.98;
    letter-spacing: -0.032em;
}

.display--md {
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    line-height: 1.06;
    letter-spacing: -0.026em;
}

.lede {
    max-width: 56ch;
    color: var(--dim);
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    line-height: 1.62;
    text-wrap: pretty;
}

.small {
    font-size: 0.875rem;
    color: var(--dim);
}

.mono {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}

.violet {
    color: var(--live);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.violet:hover {
    color: var(--bone);
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--bone);
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 560;
    letter-spacing: -0.005em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
        color 0.16s var(--ease);
}

.btn svg {
    flex: none;
}

.btn:hover {
    border-color: var(--bone);
    background: rgba(243, 241, 236, 0.06);
}

.btn--primary {
    background: var(--bone);
    border-color: var(--bone);
    color: #000;
    font-weight: 640;
}

.btn--primary:hover {
    background: #ffffff;
    border-color: #ffffff;
}

.btn--sm {
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.8125rem;
}

/* ---------- nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: var(--black);
    border-bottom: 1px solid var(--rule-soft);
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: 30px;
    height: 66px;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 1.125rem;
    font-weight: 730;
    font-stretch: 112%;
    letter-spacing: -0.025em;
    line-height: 1;
}

.nav__brand img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}

.nav__link {
    position: relative;
    padding: 6px 0;
    font-size: 0.875rem;
    font-weight: 480;
    color: var(--dim);
    transition: color 0.15s var(--ease);
}

.nav__link:hover,
.nav__link[aria-current="page"] {
    color: var(--bone);
}

.nav__link[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--bone);
}

.nav__cta {
    margin-left: 4px;
}

.nav__burger {
    display: none;
    width: 30px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.nav__burger span {
    display: block;
    width: 20px;
    height: 1.5px;
    margin: 5px auto;
    background: var(--bone);
    transition: transform 0.2s var(--ease), opacity 0.2s;
}

.nav.is-menu-open .nav__burger span:first-child {
    transform: translateY(3.25px) rotate(45deg);
}

.nav.is-menu-open .nav__burger span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
}

.nav__sheet {
    display: none;
    position: fixed;
    inset: 66px 0 0;
    z-index: 55;
    background: var(--black);
    padding: 12px var(--gutter) 40px;
    overflow-y: auto;
}

.nav.is-menu-open .nav__sheet {
    display: flex;
    flex-direction: column;
}

.nav__sheet > a {
    padding: 18px 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 1.75rem;
    font-weight: 700;
    font-stretch: 114%;
    letter-spacing: -0.03em;
}

.nav__sheet > a:last-child {
    margin-top: 26px;
    padding: 0;
    border: 0;
    font-size: 0.9375rem;
    font-stretch: 100%;
    letter-spacing: 0;
}

/* ---------- story: hero + tour share one sticky phone ---------- */
.story {
    position: relative;
    padding-top: clamp(64px, 7vw, 100px);
    padding-bottom: var(--pad);
}

.story__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 382px);
    column-gap: clamp(32px, 6vw, 96px);
    align-items: start;
}

.story__intro {
    grid-column: 1;
    grid-row: 1;
    padding-top: 6px;
}

.hero__title {
    max-width: 13ch;
}

.hero__lede {
    margin-top: clamp(22px, 2.4vw, 30px);
    max-width: 46ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: clamp(26px, 3vw, 36px);
}

.hero__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    justify-content: start;
    gap: 0;
    margin-top: clamp(34px, 4.4vw, 56px);
    border-top: 1px solid var(--rule);
}

.hero__facts > div {
    padding: 15px 30px 0 0;
}

.hero__facts > div + div {
    padding-left: 30px;
    border-left: 1px solid var(--rule-soft);
}

.hero__facts dt {
    font-size: 0.75rem;
    color: var(--faint);
    line-height: 1.4;
}

.hero__facts dd {
    margin-top: 3px;
    font-size: 0.875rem;
    font-weight: 560;
    color: var(--bone);
    line-height: 1.4;
}

/* ---------- phone ---------- */
.phone {
    position: relative;
    width: min(340px, 100%);
    padding: 9px;
    border: 1px solid var(--rule-strong);
    border-radius: 46px;
    background: var(--black);
}

.phone__screen {
    position: relative;
    border-radius: 37px;
    overflow: hidden;
    background: #000;
}

/* a real status-bar band: the live island lives here, above the capture */
.phone__bar {
    position: relative;
    height: 54px;
}

/* the capture's own status bar is cropped so it doesn't compete */
.phone__shots {
    position: relative;
    aspect-ratio: 640 / 1327;
    overflow: hidden;
}

.phone__shot {
    position: absolute;
    top: -4.82%;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.45s var(--ease);
}

.phone__shot.is-active {
    opacity: 1;
}

/* the Live Activity pill that overlays the screenshot's island */
.island {
    position: absolute;
    top: 7px;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34%;
    height: 31px;
    overflow: hidden;
    border-radius: 999px;
    background: #000;
    transform: translateX(-50%);
    transition: width 0.55s var(--ease), height 0.55s var(--ease);
}

.island__hidden {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    height: 100%;
    padding: 0 10px;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.island.is-live {
    width: 74%;
    height: 46px;
}

.island.is-live .island__hidden {
    opacity: 1;
}

.island__cover {
    display: grid;
    place-items: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
}

.island__title {
    min-width: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.island__timer {
    flex: none;
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-variant-numeric: tabular-nums;
    color: var(--dim);
    letter-spacing: 0;
    white-space: nowrap;
}

/* ---------- status rail ---------- */
.rail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    margin-top: clamp(40px, 5.4vw, 74px);
    padding: 17px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--dim);
    white-space: nowrap;
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.dot--blue { color: var(--blue); }
.dot--green { color: var(--green); }
.dot--orange { color: var(--orange); }
.dot--yellow { color: var(--yellow); }
.dot--purple { color: var(--purple); }
.dot--pink { color: var(--pink); }
.dot--gray { color: var(--gray); }

.rail__note {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--faint);
    white-space: nowrap;
}

/* ---------- sections ---------- */
.section {
    padding-block: var(--pad);
    scroll-margin-top: 80px;
}

.section--tight {
    padding-block: calc(var(--pad) * 0.62);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: clamp(20px, 4vw, 64px);
    align-items: end;
    margin-bottom: clamp(38px, 5vw, 64px);
}

.section-head .lede {
    padding-bottom: 6px;
}

.section-head:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
}

/* ---------- tour stops ---------- */
.story__rail {
    grid-column: 1;
    grid-row: 2;
}

.story__head {
    grid-column: 1;
    grid-row: 3;
    margin-top: clamp(58px, 8vw, 104px);
    padding-top: clamp(38px, 4.6vw, 62px);
    border-top: 1px solid var(--rule);
    scroll-margin-top: 96px;
}

.story__head .lede {
    max-width: 44ch;
    margin-top: clamp(16px, 1.8vw, 22px);
}

.tour__stops {
    grid-column: 1;
    grid-row: 4;
    display: flex;
    flex-direction: column;
    /* The phone is taller than the last stop. This tail lets it stay pinned
       through the final screen before the whole instrument scrolls away. */
    padding-bottom: clamp(180px, 28vh, 280px);
}

.stop {
    display: flex;
    align-items: center;
    min-height: 50vh;
    border-top: 1px solid var(--rule-soft);
}

.stop:first-child {
    border-top-color: var(--rule);
}

.stop__body {
    width: 100%;
    max-width: 54ch;
    padding: 40px 0;
}

.stop__title {
    color: var(--faint);
    font-size: clamp(1.55rem, 2.5vw, 2.2rem);
    font-weight: 760;
    font-stretch: 114%;
    letter-spacing: -0.03em;
    line-height: 1.02;
    transition: color 0.35s var(--ease);
}

.stop.is-active .stop__title {
    color: var(--bone);
}

.stop__text {
    margin-top: 14px;
    color: var(--dim);
    font-size: 1rem;
    line-height: 1.62;
}

.stop__shot {
    display: none;
}

.tour__stage {
    position: sticky;
    top: 96px;
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* Height-aware width: the phone is ~2.0734× its content width plus 74px of
   chrome, and the stage keeps ~57px for the progress rail. This keeps the
   whole instrument in view from 768px-tall laptops up to 5K displays. */
.tour__stage .phone {
    width: clamp(220px, calc((100vh - 251px) / 2.0734 + 20px), 330px);
    max-width: 100%;
}

/* short laptop viewports: sit closer to the nav so the rail stays visible */
@media (max-height: 860px) and (min-width: 901px) {
    .tour__stage {
        top: 84px;
        gap: 14px;
    }
}

.tour__rail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rail__seg {
    width: 26px;
    height: 3px;
    padding: 0;
    border: 0;
    background: var(--rule-strong);
    cursor: pointer;
    transition: width 0.25s var(--ease), background 0.25s var(--ease);
}

.rail__seg:hover {
    background: var(--dim);
}

.rail__seg.is-active {
    width: 46px;
    background: var(--bone);
}

.rail__label {
    margin: 0;
    font-family: var(--font);
    font-size: 0.75rem;
    letter-spacing: 0.01em;
    color: var(--dim);
}

/* ---------- feature spreads (home) ---------- */
.spreads {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(24px, 3vw, 48px);
}

.spread {
    grid-column: span 4;
    padding: clamp(22px, 2.6vw, 32px) 0 clamp(34px, 4vw, 52px);
    border-top: 1px solid var(--rule);
    min-width: 0;
}

.spread--3 { grid-column: span 3; }
.spread--5 { grid-column: span 5; }
.spread--6 { grid-column: span 6; }
.spread--7 { grid-column: span 7; }
.spread--8 { grid-column: span 8; }

.spread__title {
    max-width: 30ch;
    font-size: 1.125rem;
    font-weight: 660;
    letter-spacing: -0.017em;
    line-height: 1.3;
    text-wrap: pretty;
}

.spread--7 .spread__title,
.spread--8 .spread__title {
    max-width: 22ch;
    font-size: clamp(1.5rem, 2.2vw, 1.95rem);
    font-weight: 730;
    font-stretch: 114%;
    letter-spacing: -0.028em;
    line-height: 1.08;
}

.spread__text {
    margin-top: 12px;
    max-width: 46ch;
    color: var(--dim);
    font-size: 0.9375rem;
    line-height: 1.64;
    text-wrap: pretty;
}

.spread__specimen {
    margin-top: 22px;
}

/* ---------- specimens ---------- */
.spec {
    border: 1px solid var(--rule-soft);
    background: var(--surface);
    padding: 4px 16px;
}

.spec--pad {
    padding: 18px;
}

.spec__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid var(--rule-soft);
}

.spec__row:first-child {
    border-top: 0;
}

.spec__cover {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--rule-soft);
    background: var(--surface-2);
    color: var(--dim);
    font-size: 0.6875rem;
    font-weight: 620;
    letter-spacing: 0.02em;
}

.spec__main {
    flex: 1;
    min-width: 0;
}

.spec__title {
    display: block;
    font-size: 0.875rem;
    font-weight: 580;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.spec__sub {
    display: block;
    margin-top: 1px;
    font-size: 0.75rem;
    color: var(--faint);
    line-height: 1.4;
}

.spec__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: none;
    font-size: 0.75rem;
    color: var(--dim);
    white-space: nowrap;
}

.spec__status .dot {
    width: 6px;
    height: 6px;
}

/* session receipt */
.receipt {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 9px 22px;
    align-items: baseline;
}

.receipt__label {
    font-size: 0.75rem;
    color: var(--faint);
    line-height: 1.4;
}

.receipt__value {
    font-size: 0.875rem;
    color: var(--bone);
    text-align: right;
    line-height: 1.4;
}

.receipt__big {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    grid-column: 1 / -1;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 2rem;
    font-weight: 730;
    font-stretch: 112%;
    letter-spacing: -0.035em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.receipt__big small {
    font-size: 0.75rem;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0;
    color: var(--faint);
}

/* figures + meter */
.figure {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: clamp(2.5rem, 3.6vw, 3.4rem);
    font-weight: 760;
    font-stretch: 112%;
    letter-spacing: -0.045em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.figure small {
    font-size: 0.75rem;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0;
    color: var(--dim);
}

.figure--green { color: var(--green); }
.figure--pink { color: var(--pink); }

.meter {
    height: 2px;
    margin-top: 14px;
    background: var(--rule-soft);
}

.meter span {
    display: block;
    height: 100%;
    width: var(--v, 0%);
    background: var(--green);
}

.micro {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--faint);
}

/* time to beat */
.hltb {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--rule);
}

.hltb > div {
    padding: 12px 14px 0 0;
    border-right: 1px solid var(--rule-soft);
}

.hltb > div:last-child {
    border-right: 0;
    padding-right: 0;
}

.hltb b {
    display: block;
    font-size: 1.65rem;
    font-weight: 730;
    font-stretch: 112%;
    letter-spacing: -0.035em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.hltb small {
    display: block;
    margin-top: 3px;
    font-size: 0.75rem;
    color: var(--faint);
}

/* siri bubble */
.bubble {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 540;
    line-height: 1.45;
}

.bubble + .spec__status,
.bubble + .status {
    margin-top: 12px;
}

/* ---------- legacy tile grid (features page) ---------- */
.tiles {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(24px, 3vw, 44px);
}

.tile {
    grid-column: span 4;
    min-width: 0;
    padding: 22px 0 34px;
    border-top: 1px solid var(--rule);
}

.tile--w4 { grid-column: span 4; }
.tile--w6 { grid-column: span 6; }
.tile--w8 { grid-column: span 8; }
.tile--w12 { grid-column: span 12; }

.tile__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tile__glyph {
    flex: none;
    margin-top: 2px;
    color: var(--faint);
}

.tile__glyph svg {
    width: 18px;
    height: 18px;
}

.h3 {
    font-size: 1.0625rem;
    font-weight: 640;
    letter-spacing: -0.015em;
    line-height: 1.32;
    text-wrap: pretty;
}

.tile__text {
    margin-top: 12px;
    max-width: 50ch;
    color: var(--dim);
    font-size: 0.9375rem;
    line-height: 1.64;
    text-wrap: pretty;
}

.frag {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.frag--stack {
    display: block;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 9px;
    border: 1px solid var(--rule);
    border-radius: 2px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--dim);
}

.chip svg {
    flex: none;
}

.chip--blue { border-color: rgba(76, 157, 255, 0.4); color: #9cc7ff; }
.chip--green { border-color: rgba(75, 208, 124, 0.4); color: #98e5b5; }
.chip--orange { border-color: rgba(255, 161, 74, 0.42); color: #ffc28c; }
.chip--yellow { border-color: rgba(255, 215, 94, 0.4); color: #ffe69b; }
.chip--purple { border-color: rgba(192, 140, 255, 0.4); color: #d9bdff; }
.chip--violet { border-color: rgba(162, 145, 255, 0.45); color: var(--live); }
.chip--pink { border-color: rgba(255, 111, 157, 0.42); color: #ffa9c3; }

.tile__figure {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 18px;
    font-size: clamp(2.2rem, 3.6vw, 3rem);
    font-weight: 760;
    font-stretch: 112%;
    letter-spacing: -0.045em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tile__figure small {
    font-size: 0.75rem;
    font-weight: 500;
    font-stretch: 100%;
    letter-spacing: 0;
    color: var(--dim);
}

.tile__figure--green { color: var(--green); }
.tile__figure--pink { color: var(--pink); }

.frag-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--rule-soft);
}

.frag-row:first-child {
    border-top: 0;
}

.frag-cover {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--rule-soft);
    background: var(--surface-2);
    color: var(--dim);
    font-size: 0.6875rem;
    font-weight: 620;
    letter-spacing: 0.02em;
}

.frag-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 580;
    line-height: 1.3;
}

.frag-sub {
    display: block;
    margin-top: 1px;
    font-size: 0.75rem;
    color: var(--faint);
    line-height: 1.4;
}

.frag-row__meta {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--faint);
    white-space: nowrap;
}

.frag-row .chip {
    margin-left: auto;
}

.stars {
    display: inline-flex;
    gap: 2px;
    color: var(--yellow);
    vertical-align: middle;
}

/* ---------- ledger ---------- */
.ledger {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(40px, 6vw, 96px);
    border-top: 1px solid var(--rule);
}

.ledger__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 0;
    border-bottom: 1px solid var(--rule-soft);
}

.ledger__label {
    font-size: 0.9375rem;
    color: var(--dim);
}

.ledger__value {
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
    font-weight: 740;
    font-stretch: 112%;
    letter-spacing: -0.045em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ledger__value em {
    font-style: normal;
    font-size: 0.6em;
    color: var(--dim);
    letter-spacing: -0.02em;
}

/* ---------- install ---------- */
.install {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(36px, 6vw, 84px);
    align-items: start;
}

.install__card,
.install__qr {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.install__qr-label,
.install__note {
    max-width: 36ch;
    color: var(--dim);
    font-size: 0.875rem;
    line-height: 1.6;
}

.install__intro {
    margin-top: 12px;
    max-width: 52ch;
    color: var(--dim);
    font-size: 0.9375rem;
    line-height: 1.64;
}

.install__cta {
    margin-top: 24px;
}

/* QR card (shared by install blocks, page heads, links page) */
.qr-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: min(300px, 100%);
}

.qr-card__frame {
    position: relative;
    overflow: hidden;
    padding: 16px;
    background: #fff;
}

.qr-card__frame svg {
    display: block;
    width: 100%;
    height: auto;
}

.qr-card__foot {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qr-card__foot img {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.qr-card__name {
    display: block;
    font-size: 0.875rem;
    font-weight: 580;
    line-height: 1.35;
}

.qr-card__url {
    display: block;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--dim);
    line-height: 1.4;
}

.qr-card__action {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--dim);
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.qr-card__action:hover {
    color: var(--bone);
    border-color: var(--rule-strong);
}

/* one-time scan sweep */
.qr-card.is-scanning .qr-card__frame::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--live);
    animation: qr-scan 1.5s var(--ease) 0.2s 1 both;
}

@keyframes qr-scan {
    0% { top: 8%; opacity: 0; }
    15% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 92%; opacity: 0; }
}

/* steps */
.steps {
    margin-top: 28px;
    border-top: 1px solid var(--rule);
}

.step {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule-soft);
}

.step__num {
    padding-top: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.step__title {
    font-size: 1.0625rem;
    font-weight: 620;
    letter-spacing: -0.012em;
    line-height: 1.35;
}

.step__text {
    margin-top: 6px;
    max-width: 58ch;
    color: var(--dim);
    font-size: 0.9375rem;
    line-height: 1.62;
}

.reqs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.note {
    display: flex;
    gap: 11px;
    margin-top: 26px;
    padding-top: 16px;
    border-top: 1px solid var(--rule-soft);
    max-width: 60ch;
    color: var(--faint);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.note b {
    color: var(--dim);
    font-weight: 600;
}

.note .mono {
    color: var(--dim);
}

/* ---------- link rows ---------- */
.link-rows {
    border-top: 1px solid var(--rule);
}

.link-row,
.link-item__row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 19px 0;
    border-bottom: 1px solid var(--rule-soft);
    transition: background 0.15s var(--ease);
}

.link-row:hover,
.link-item__row:hover {
    background: rgba(243, 241, 236, 0.03);
}

.link-row__glyph {
    flex: none;
    width: 20px;
    color: var(--faint);
}

.link-row__title {
    display: block;
    font-size: 1rem;
    font-weight: 580;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.link-row__desc {
    display: block;
    margin-top: 2px;
    font-size: 0.8125rem;
    color: var(--dim);
    line-height: 1.45;
}

.link-row__go {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
    margin-left: auto;
    color: var(--dim);
    font-size: 0.8125rem;
    transition: color 0.15s var(--ease);
}

.link-row:hover .link-row__go {
    color: var(--bone);
}

.link-row__url {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--faint);
}

.link-item__main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.link-item__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 8px 0;
    border: 0;
    background: none;
    color: var(--dim);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.15s var(--ease);
}

.link-item__toggle:hover,
.link-item__toggle[aria-expanded="true"] {
    color: var(--bone);
}

.link-item__panel {
    display: none;
}

.link-item__panel.is-open {
    display: flex;
    align-items: flex-start;
    gap: clamp(20px, 3vw, 36px);
    padding: 6px 0 30px;
}

.link-item__qr {
    flex: none;
    width: 196px;
    padding: 14px;
    background: #fff;
}

.link-item__qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.link-item__hint {
    max-width: 48ch;
    color: var(--dim);
    font-size: 0.875rem;
    line-height: 1.62;
}

/* ---------- FAQ ---------- */
.faq {
    border-top: 1px solid var(--rule);
}

.faq details {
    border-bottom: 1px solid var(--rule-soft);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 19px 0;
    list-style: none;
    cursor: pointer;
    font-size: 1.0625rem;
    font-weight: 560;
    letter-spacing: -0.01em;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: none;
    color: var(--faint);
    font-size: 1.375rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.2s var(--ease), color 0.2s;
}

.faq details[open] summary::after {
    content: "−";
    color: var(--dim);
}

.faq__answer {
    max-width: 68ch;
    padding: 0 0 24px;
    color: var(--dim);
    font-size: 0.9375rem;
    line-height: 1.66;
}

/* ---------- page head ---------- */
.phead {
    padding-top: clamp(66px, 8vw, 104px);
    padding-bottom: clamp(40px, 5vw, 64px);
}

.phead__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}

.phead .display--xl {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
}

.phead .lede {
    margin-top: 20px;
}

.phead .reqs {
    margin-top: 26px;
}

/* URL field */
.studio__link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 440px;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    transition: border-color 0.15s var(--ease);
}

.studio__link:hover {
    border-color: var(--rule-strong);
}

.studio__link code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--mono);
    font-size: 0.8125rem;
    color: var(--dim);
}

.studio__link button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--faint);
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.15s;
}

.studio__link button:hover {
    color: var(--bone);
}

/* ---------- QR studio ---------- */
.studio {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

.studio__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid var(--rule-soft);
    background: var(--surface);
}

.studio__qr {
    width: var(--qr-size, 260px);
    max-width: 100%;
    padding: 16px;
    background: #fff;
}

.studio__qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.segmented {
    display: inline-flex;
    border: 1px solid var(--rule);
}

.segmented button {
    padding: 8px 15px;
    border: 0;
    border-left: 1px solid var(--rule-soft);
    background: none;
    color: var(--dim);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.segmented button:first-child {
    border-left: 0;
}

.segmented button:hover {
    color: var(--bone);
}

.segmented button[aria-pressed="true"] {
    background: var(--bone);
    color: #000;
}

.studio__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

/* ---------- CTA band ---------- */
.band {
    padding-block: clamp(30px, 4.6vw, 52px);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}

.band__grid {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.band__grid .tile__text {
    max-width: 46ch;
}

.band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: none;
}

/* ---------- footer ---------- */
main > .section:last-child {
    padding-bottom: 0;
}

.foot {
    padding-top: clamp(44px, 6vw, 72px);
    padding-bottom: 30px;
}

.foot__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.55fr));
    gap: 32px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--rule-soft);
}

.foot__brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 1.125rem;
    font-weight: 720;
    font-stretch: 112%;
    letter-spacing: -0.025em;
    line-height: 1;
}

.foot__brand img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.foot__tag {
    max-width: 38ch;
    margin-top: 14px;
    color: var(--dim);
    font-size: 0.875rem;
    line-height: 1.6;
}

.foot__col h4 {
    margin-bottom: 12px;
    font-size: 0.75rem;
    font-weight: 560;
    color: var(--faint);
    letter-spacing: 0.01em;
}

.foot__col a {
    display: block;
    padding: 5px 0;
    color: var(--dim);
    font-size: 0.875rem;
    transition: color 0.15s;
}

.foot__col a:hover {
    color: var(--bone);
}

.foot__base {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    padding-top: 20px;
    color: var(--faint);
    font-size: 0.75rem;
}

/* ---------- intro motion (one sequence, once) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .hero__title {
        animation: hero-rise 0.85s var(--ease) both;
    }

    .hero__lede {
        animation: intro-up 0.7s var(--ease) 0.1s both;
    }

    .hero__actions,
    .hero__facts {
        animation: intro-up 0.7s var(--ease) 0.18s both;
    }

    .tour__stage {
        animation: intro-up 0.9s var(--ease) 0.06s both;
    }

    .rail {
        animation: intro-up 0.7s var(--ease) 0.3s both;
    }
}

@keyframes hero-rise {
    from {
        clip-path: inset(0 0 105% 0);
        transform: translateY(26px);
    }
    to {
        /* Extend past the border box so descenders (g, y, p) survive the tight
           0.94 line-height. With fill-mode "both", this is the resting state. */
        clip-path: inset(0 0 -0.25em 0);
        transform: none;
    }
}

@keyframes intro-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
    .story__grid {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
        column-gap: 48px;
    }

    .spread--7 { grid-column: span 6; }
    .spread--5 { grid-column: span 6; }
    .spread--8 { grid-column: span 7; }
    .spread--3 { grid-column: span 5; }
}

@media (max-width: 900px) {
    .nav__links,
    .nav__cta {
        display: none;
    }

    .nav__burger {
        display: block;
    }

    .story {
        padding-top: 52px;
    }

    .story__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .story__intro,
    .tour__stage,
    .story__rail,
    .story__head,
    .tour__stops {
        grid-column: 1;
        grid-row: auto;
    }

    .hero__title {
        max-width: 14ch;
    }

    .tour__stage {
        position: static;
        margin-top: 44px;
    }

    .tour__stage .phone {
        width: min(330px, 82vw);
    }

    .tour__stops {
        padding-bottom: 0;
    }

    .hero__facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .hero__facts > div {
        padding-right: 16px;
    }

    .hero__facts > div + div {
        padding-left: 16px;
    }

    .rail {
        gap: 10px 22px;
    }

    .rail__note {
        margin-left: 0;
        flex-basis: 100%;
    }

    .section-head {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        align-items: start;
    }

    .story__head {
        margin-top: 56px;
        padding-top: 34px;
        scroll-margin-top: 80px;
    }

    .stop {
        min-height: 0;
    }

    .stop__body {
        padding: 30px 0 40px;
    }

    .stop__title {
        color: var(--bone);
    }

    .stop__shot {
        display: block;
        width: min(250px, 66%);
        height: auto;
        margin-top: 26px;
        border: 1px solid var(--rule);
        border-radius: 22px;
    }

    .spreads {
        column-gap: 24px;
    }

    .spread,
    .spread--3,
    .spread--5,
    .spread--6,
    .spread--7,
    .spread--8 {
        grid-column: span 6;
    }

    .tiles {
        column-gap: 24px;
    }

    .tile,
    .tile--w4 {
        grid-column: span 6;
    }

    .tile--w8,
    .tile--w12 {
        grid-column: span 12;
    }

    .ledger {
        grid-template-columns: minmax(0, 1fr);
    }

    .install,
    .studio,
    .phead__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .phead {
        padding-top: 48px;
    }

    .band__grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .foot__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .foot__brand-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 1rem;
    }

    .hero__title {
        max-width: 100%;
        font-size: clamp(2.5rem, 12.4vw, 3.4rem);
    }

    .hero__actions .btn {
        flex: 1 1 auto;
    }

    .hero__facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero__facts > div {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 20px;
        padding: 9px 0;
        border-bottom: 1px solid var(--rule-soft);
    }

    .hero__facts > div + div {
        padding-left: 0;
        border-left: 0;
    }

    .hero__facts dd {
        margin-top: 0;
    }

    .rail {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 14px;
        scrollbar-width: none;
    }

    .rail::-webkit-scrollbar {
        display: none;
    }

    .rail__note {
        display: none;
    }

    .spread,
    .spread--3,
    .spread--5,
    .spread--6,
    .spread--7,
    .spread--8,
    .tile,
    .tile--w4,
    .tile--w8,
    .tile--w12 {
        grid-column: span 12;
    }

    .ledger__value {
        font-size: 1.9rem;
    }

    .step {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
    }

    .link-row__url {
        display: none;
    }

    .link-item__toggle span {
        display: none;
    }

    .link-item__panel.is-open {
        flex-direction: column;
    }

    .link-item__qr {
        width: 170px;
    }

    .foot__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 26px;
    }

    .band__actions .btn {
        flex: 1 1 auto;
    }
}

/* ---------- print: the QR alone, on white ---------- */
@media print {
    body * {
        visibility: hidden;
    }

    #qr,
    #qr .studio__qr,
    #qr .studio__qr * {
        visibility: visible;
    }

    #qr {
        position: absolute;
        inset: 0;
        padding: 0;
    }

    #qr .studio__preview {
        display: block;
        padding: 0;
        border: 0;
        background: #fff;
    }

    #qr .studio__qr {
        width: 110mm;
        margin: 20mm;
        padding: 0;
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
