/* ============================================================
   VRYNN — Solarpunk night, read by instrument light
   Shared system. See DESIGN.md.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---------- Tokens ---------- */
:root {
    --bg-deep: #0a0c07;
    --bg-warm: #0f110a;
    --bg-card: #111410;
    --green-deep: #1B3A1F;
    --green-card: #142618;
    --green-light: #1e4424;
    --amber: #F5C842;
    --amber-dark: #E8B84B;
    --amber-glow: rgba(245, 200, 66, 0.15);
    --amber-glow-strong: rgba(245, 200, 66, 0.30);
    --cream: #F5F0E8;
    --text-body: #C4BFB0;
    --text-muted: #8a8578;

    /* Unlit segment: a value we have never measured. */
    --segment-ghost: rgba(245, 200, 66, 0.13);

    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    --radius: 8px;
    --radius-sm: 4px;
    --max-width: 1200px;
    --measure: 68ch;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --rule: 1px solid rgba(245, 240, 232, 0.09);
    --rule-amber: 1px solid rgba(245, 200, 66, 0.22);

    --band-y: clamp(72px, 10vw, 132px);
    --gut: clamp(20px, 4vw, 32px);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scrollbar-color: var(--green-light) var(--bg-deep);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-deep);
    color: var(--text-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
}

/* ---------- Browser surfaces, themed ---------- */
::selection { background: var(--amber); color: var(--bg-deep); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--green-light); border: 2px solid var(--bg-deep); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-deep); }

:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
    border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

input, textarea, select, button { font: inherit; color: inherit; caret-color: var(--amber); }

a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--amber-dark); }

img, svg { max-width: 100%; height: auto; display: block; }

/* ---------- Grain ---------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    mix-blend-mode: overlay;
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--amber);
    color: var(--bg-deep);
    padding: 12px 20px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gut); }
.band { padding-block: var(--band-y); position: relative; }
.band--warm { background: var(--bg-warm); }
.band--forest { background: linear-gradient(180deg, var(--bg-warm) 0%, var(--green-card) 55%, var(--bg-warm) 100%); }
.band + .band { border-top: var(--rule); }

/* Each region carries its own tint inside the one world. */
.band[data-layer="websites"] { --layer-tint: rgba(30, 68, 36, 0.20); }
.band[data-layer="seo"]      { --layer-tint: rgba(27, 58, 31, 0.28); }
.band[data-layer="ai"]       { --layer-tint: rgba(20, 38, 24, 0.42); }
.band[data-layer="care"]     { --layer-tint: rgba(17, 20, 16, 0.60); }
.band[data-layer] { background-image: linear-gradient(180deg, transparent, var(--layer-tint)); }

/* ---------- Typography ---------- */
.display {
    font-family: var(--font-serif);
    color: var(--cream);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.display--xl { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.display--l  { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.display--m  { font-size: clamp(1.65rem, 3vw, 2.3rem); }

.lede {
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    line-height: 1.62;
    color: var(--text-body);
    max-width: 58ch;
    text-wrap: pretty;
}
.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.1em; }
.prose h2 { font-family: var(--font-serif); color: var(--cream); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; letter-spacing: -0.02em; margin-top: 2.2em; margin-bottom: 0.5em; }
.prose h3 { color: var(--cream); font-size: 1.12rem; font-weight: 600; margin-top: 1.8em; margin-bottom: 0.4em; }
.prose ul, .prose ol { margin: 1em 0 1em 1.15em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { color: var(--cream); font-weight: 600; }

.meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.meta--amber { color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.97rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .28s var(--ease-out), color .28s var(--ease-out),
                border-color .28s var(--ease-out), box-shadow .28s var(--ease-out),
                transform .28s var(--ease-out);
}
.btn--primary {
    background: var(--amber);
    color: #14170e;
    box-shadow: 0 8px 26px -12px rgba(245, 200, 66, 0.55);
}
.btn--primary:hover { background: var(--amber-dark); color: #14170e; transform: translateY(-2px); box-shadow: 0 14px 34px -14px rgba(245, 200, 66, 0.7); }
.btn--ghost { border-color: rgba(245, 200, 66, 0.34); color: var(--amber); background: transparent; }
.btn--ghost:hover { border-color: var(--amber); background: rgba(245, 200, 66, 0.07); color: var(--amber); transform: translateY(-2px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ============================================================
   SEVEN-SEGMENT SYSTEM
   The mask is always fully drawn. Only which cells light changes.
   An unmeasured value renders entirely in ghost cells.
   ============================================================ */
.seg {
    /* Before the script builds the mask this element holds the plain number. */
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: flex-end;
    gap: var(--seg-gap, 0.14em);
    font-size: var(--seg-size, 46px);
    line-height: 1;
    vertical-align: baseline;
}
.seg__cell {
    position: relative;
    width: 0.62em;
    height: 1.1em;
    flex: none;
}
.seg__cell--punct { width: 0.26em; }
.seg__cell--wide { width: auto; }

.seg__cell i {
    position: absolute;
    background: var(--segment-ghost);
    transition: background-color .22s linear;
}
.seg__cell i.on {
    background: var(--amber);
    box-shadow: 0 0 0.5em -0.1em var(--amber-glow-strong);
}

/* segment geometry: a b c d e f g */
.seg__cell i.s-a { top: 0;              left: 0.12em; right: 0.12em; height: 0.11em; clip-path: polygon(0.07em 0, calc(100% - 0.07em) 0, 100% 100%, 0 100%); }
.seg__cell i.s-g { top: 50%;            left: 0.12em; right: 0.12em; height: 0.11em; transform: translateY(-50%); clip-path: polygon(0.055em 0, calc(100% - 0.055em) 0, 100% 50%, calc(100% - 0.055em) 100%, 0.055em 100%, 0 50%); }
.seg__cell i.s-d { bottom: 0;           left: 0.12em; right: 0.12em; height: 0.11em; clip-path: polygon(0 0, 100% 0, calc(100% - 0.07em) 100%, 0.07em 100%); }
.seg__cell i.s-f { top: 0.06em;         left: 0;      width: 0.11em; height: calc(50% - 0.10em); clip-path: polygon(0 0.07em, 100% 0, 100% 100%, 0 100%); }
.seg__cell i.s-b { top: 0.06em;         right: 0;     width: 0.11em; height: calc(50% - 0.10em); clip-path: polygon(0 0, 100% 0.07em, 100% 100%, 0 100%); }
.seg__cell i.s-e { bottom: 0.06em;      left: 0;      width: 0.11em; height: calc(50% - 0.10em); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 0.07em), 0 100%); }
.seg__cell i.s-c { bottom: 0.06em;      right: 0;     width: 0.11em; height: calc(50% - 0.10em); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 0.07em)); }

/* punctuation cells */
.seg__cell i.s-dot { bottom: 0.02em; left: 50%; width: 0.13em; height: 0.13em; transform: translateX(-50%); border-radius: 1px; }
.seg__cell i.s-colon-hi { top: 30%;  left: 50%; width: 0.13em; height: 0.13em; transform: translateX(-50%); border-radius: 1px; }
.seg__cell i.s-colon-lo { bottom: 22%; left: 50%; width: 0.13em; height: 0.13em; transform: translateX(-50%); border-radius: 1px; }

/* literal glyphs that the mask does not make (currency, %, letters) */
.seg__glyph {
    font-family: var(--font-mono);
    font-size: 0.44em;
    line-height: 1;
    color: var(--amber);
    align-self: center;
    letter-spacing: 0.02em;
    flex: none;
}
.seg__glyph--ghost { color: var(--segment-ghost); }

/* readout: mask + its unit label */
.readout { display: flex; flex-direction: column; gap: 10px; }
.readout__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.readout__note { font-size: 0.85rem; color: var(--text-muted); max-width: 34ch; line-height: 1.5; }
.readout--unmeasured .readout__label { color: rgba(138, 133, 120, 0.75); }

/* the panel a group of readouts sits in */
.panel {
    background: var(--bg-card);
    border: var(--rule);
    border-radius: var(--radius);
    padding: clamp(22px, 3.4vw, 34px);
}
.panel--seated { background: var(--green-card); border-color: rgba(245, 200, 66, 0.14); }

/* ---------- Nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(10, 12, 7, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: var(--rule);
}
.nav__inner {
    max-width: var(--max-width);
    margin-inline: auto;
    padding: 14px var(--gut);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.nav__logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--amber); }
.nav__logo svg { width: 30px; height: 30px; flex: none; }
.nav__logo span {
    font-family: var(--font-serif);
    font-size: 1.42rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--cream);
}
.nav__links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav__links a {
    display: block;
    padding: 9px 13px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-body);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color .22s var(--ease-out), background-color .22s var(--ease-out);
}
.nav__links a:hover { color: var(--cream); background: rgba(245, 240, 232, 0.05); }
.nav__links a[aria-current="page"] { color: var(--amber); }

.nav__cta { margin-left: 6px; }
.nav__cta a { background: var(--amber); color: #14170e !important; font-weight: 600; padding: 10px 18px; }
.nav__cta a:hover { background: var(--amber-dark); }

.lang {
    display: inline-flex;
    border: var(--rule-amber);
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
}
.lang a { padding: 6px 9px; text-decoration: none; color: var(--text-muted); border-radius: 0; }
.lang a[aria-current="true"] { background: rgba(245, 200, 66, 0.16); color: var(--amber); }
.lang a:hover { color: var(--cream); background: rgba(245, 240, 232, 0.06); }

.nav__toggle {
    display: none;
    background: none;
    border: var(--rule);
    border-radius: var(--radius-sm);
    width: 42px; height: 40px;
    cursor: pointer;
    align-items: center; justify-content: center;
    flex-direction: column; gap: 5px;
}
.nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--cream); transition: transform .3s var(--ease-out), opacity .2s linear; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 940px) {
    .nav__toggle { display: flex; }
    .nav__links {
        position: fixed;
        inset: 63px 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--bg-warm);
        border-bottom: var(--rule);
        padding: 14px var(--gut) 22px;
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .26s var(--ease-out), transform .26s var(--ease-out), visibility .26s;
        max-height: calc(100dvh - 63px);
        overflow-y: auto;
    }
    .nav__links.is-open { transform: none; opacity: 1; visibility: visible; }
    .nav__links a { padding: 13px 6px; font-size: 1rem; }
    .nav__cta { margin: 10px 0 0; }
    .nav__cta a { text-align: center; }
    .nav__lang-item { margin-top: 12px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(70px, 11vw, 132px) clamp(64px, 9vw, 108px); overflow: hidden; }
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 78% 62% at 50% 116%,
        rgba(245, 200, 66, 0.20) 0%,
        rgba(245, 200, 66, 0.07) 38%,
        rgba(245, 200, 66, 0.02) 58%,
        transparent 74%);
    pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(34px, 5vw, 68px); align-items: center; }
.hero__lines { margin-top: 26px; display: grid; gap: 4px; }
.hero__lines p { font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--text-body); }
.hero__lines p strong { color: var(--cream); font-weight: 600; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

/* the horizon rule: one continuous amber element */
.horizon {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 200, 66, 0.55) 22%, rgba(245, 200, 66, 0.55) 78%, transparent);
    margin-block: clamp(40px, 6vw, 70px);
}
.horizon::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 9px; height: 9px;
    transform: translate(-50%, -50%) rotate(45deg);
    background: var(--amber);
}

/* ---------- Plates (service bands) ---------- */
.plate { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 60px); align-items: start; }
.plate--flip > :first-child { order: 2; }
.plate__no { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.2em; color: var(--amber); text-transform: uppercase; margin-bottom: 14px; }
.plate__body { max-width: 60ch; }
.plate__body > * + * { margin-top: 1.05em; }
@media (max-width: 860px) {
    .plate { grid-template-columns: 1fr; }
    .plate--flip > :first-child { order: 0; }
}

/* specification list: every claim carries the clause that bears it */
.spec { list-style: none; display: grid; gap: 0; }
.spec li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: baseline;
    padding: 13px 0;
    border-bottom: var(--rule);
}
.spec li:first-child { border-top: var(--rule); }
.spec__k { color: var(--text-body); }
.spec__v { font-family: var(--font-mono); font-size: 0.86rem; color: var(--amber); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spec__v--muted { color: var(--text-muted); }

/* included / excluded */
.checks { list-style: none; display: grid; gap: 11px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; line-height: 1.55; }
.checks svg { width: 16px; height: 16px; margin-top: 5px; flex: none; }
.checks--yes svg { color: var(--amber); }
.checks--no { color: var(--text-muted); }
.checks--no svg { color: var(--text-muted); }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; }
.steps > li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: clamp(16px, 2.6vw, 30px);
    padding-block: clamp(22px, 3vw, 32px);
    border-top: var(--rule);
}
.steps > li:last-child { border-bottom: var(--rule); }
.steps > li::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--amber);
    letter-spacing: 0.06em;
    padding-top: 4px;
}
.steps h3 { font-family: var(--font-serif); color: var(--cream); font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 8px; }
.steps p { max-width: 62ch; }

/* ---------- Terms grid ---------- */
.terms { display: grid; grid-template-columns: repeat(var(--terms-cols, 4), minmax(0, 1fr)); border-top: var(--rule); border-left: var(--rule); }
.terms > div { border-right: var(--rule); border-bottom: var(--rule); padding: clamp(20px, 2.8vw, 28px); }
@media (max-width: 1080px) { .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .terms { grid-template-columns: 1fr; } }
.terms h3 { color: var(--cream); font-size: 1rem; font-weight: 600; margin-bottom: 7px; }
.terms p { font-size: 0.93rem; line-height: 1.62; }
.terms .meta { margin-bottom: 11px; display: block; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 0.88rem; font-weight: 500; color: var(--cream); }
.field .hint { font-size: 0.8rem; color: var(--text-muted); }
.field input, .field textarea, .field select {
    width: 100%;
    padding: 13px 15px;
    background: var(--bg-card);
    border: var(--rule);
    border-radius: var(--radius-sm);
    color: var(--cream);
    font-size: 0.97rem;
    transition: border-color .22s var(--ease-out), box-shadow .22s var(--ease-out);
}
.field input::placeholder, .field textarea::placeholder { color: #7d7869; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(245, 240, 232, 0.2); }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px rgba(245, 200, 66, 0.14);
}
.field textarea { min-height: 132px; resize: vertical; }
.field[data-invalid="true"] input, .field[data-invalid="true"] textarea { border-color: #d98b6a; }
.field .error { font-size: 0.82rem; color: #e5a184; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-warm); border-top: var(--rule); padding-block: clamp(48px, 6vw, 72px) 30px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px); }
.footer h2 { font-size: 0.76rem; font-family: var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 15px; font-weight: 500; }
.footer ul { list-style: none; display: grid; gap: 9px; }
.footer ul a { color: var(--text-body); text-decoration: none; font-size: 0.93rem; }
.footer ul a:hover { color: var(--amber); }
.footer__brand p { font-size: 0.93rem; max-width: 34ch; margin-top: 14px; }
.footer__logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.footer__logo svg { width: 26px; height: 26px; color: var(--amber); }
.footer__logo span { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; letter-spacing: 0.14em; color: var(--cream); }
.footer__bottom { margin-top: clamp(34px, 5vw, 54px); padding-top: 22px; border-top: var(--rule); display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between; }
.footer__bottom p { font-size: 0.83rem; color: var(--text-muted); }
@media (max-width: 780px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__brand { grid-column: 1 / -1; } }

/* ---------- Reveal ----------
   Scoped to .js: with no script the content is simply present, never a
   page of invisible text waiting for an observer that will not run. */
.js .reveal { opacity: 0; transform: translateY(22px); }
.reveal { transition: opacity .75s var(--ease-out), transform .75s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal-1 { transition-delay: .07s; }
.reveal-2 { transition-delay: .14s; }
.reveal-3 { transition-delay: .21s; }

/* ---------- Utilities ---------- */
.stack > * + * { margin-top: var(--stack, 1.1em); }
.center { text-align: center; margin-inline: auto; }
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
    white-space: nowrap; border: 0;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(24px, 3.4vw, 44px); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
    body::before, .nav, .footer__bottom, .btn { display: none; }
    body { background: #fff; color: #000; }
}

/* ============================================================
   PRICE TOTEM
   A roadside price sign: the entry number for each line of work,
   in a fixed mask that never reflows.
   ============================================================ */
.totem {
    background: var(--green-card);
    border: 1px solid rgba(245, 200, 66, 0.2);
    border-radius: var(--radius);
    padding: clamp(18px, 2.4vw, 26px);
    box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(245, 200, 66, 0.07);
}
.totem__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: var(--rule-amber);
}
.totem__head h2 { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); font-weight: 500; }
.totem__head span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; }

.totem__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: var(--rule);
    text-decoration: none;
}
.totem__row:last-of-type { border-bottom: 0; }
a.totem__row:hover .totem__name { color: var(--cream); }
a.totem__row:hover .seg__cell i.on { background: var(--amber-dark); }
.totem__name { color: var(--text-body); font-size: 0.95rem; transition: color .22s var(--ease-out); }
.totem__name small { display: block; color: var(--text-muted); font-size: 0.78rem; line-height: 1.4; margin-top: 2px; }
.totem__price { display: flex; align-items: center; gap: 8px; flex: none; }
.totem__unit { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.totem__foot { margin-top: 14px; padding-top: 14px; border-top: var(--rule); font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; }

/* ============================================================
   BOOKING DIALOG
   ============================================================ */
.booking { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--gut); }
.booking[hidden] { display: none; }
.booking__backdrop { position: absolute; inset: 0; background: rgba(4, 6, 3, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.booking__panel {
    position: relative;
    width: min(760px, 100%);
    max-height: min(760px, 92dvh);
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 40px 100px -40px #000;
}
.booking__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: var(--rule); }
.booking__head h2 { font-family: var(--font-serif); font-size: 1.35rem; color: var(--cream); font-weight: 600; }
.booking__close { background: none; border: 0; color: var(--text-muted); font-size: 1.9rem; line-height: 1; cursor: pointer; padding: 0 6px; border-radius: var(--radius-sm); }
.booking__close:hover { color: var(--cream); }
.booking__slot { flex: 1; min-height: 560px; }
@media (max-width: 640px) { .booking__slot { min-height: 68dvh; } }

/* ============================================================
   PROOF PANEL — what we can prove, and what we have not measured
   ============================================================ */
.proof { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: var(--rule); border-left: var(--rule); }
.proof > div { border-right: var(--rule); border-bottom: var(--rule); padding: clamp(20px, 2.6vw, 28px); display: flex; flex-direction: column; gap: 12px; }
.proof > div.is-unmeasured { background: rgba(245, 240, 232, 0.018); }

/* comparison rows */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: rgba(245, 240, 232, 0.09); border: var(--rule); border-radius: var(--radius); overflow: hidden; }
.compare > div { background: var(--bg-card); padding: clamp(20px, 2.8vw, 30px); }
.compare h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--cream); font-weight: 600; margin-bottom: 4px; }
.compare .meta { display: block; margin-bottom: 14px; }
.compare--pick { position: relative; }
.compare > div.compare--pick { background: var(--green-card); }
.compare__tag { position: absolute; top: 0; right: 0; background: var(--amber); color: #14170e; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 11px; font-weight: 500; }
.compare__price { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 18px; }

/* faq */
.faq { border-top: var(--rule); }
.faq details { border-bottom: var(--rule); }
.faq summary {
    cursor: pointer;
    padding: 20px 40px 20px 0;
    position: relative;
    font-weight: 600;
    color: var(--cream);
    font-size: 1.03rem;
    list-style: none;
    line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '';
    position: absolute; right: 8px; top: 27px;
    width: 11px; height: 11px;
    border-right: 1.5px solid var(--amber);
    border-bottom: 1.5px solid var(--amber);
    transform: rotate(45deg);
    transition: transform .3s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--amber); }
.faq__body { padding: 0 0 22px; max-width: 68ch; }
.faq__body p + p { margin-top: 0.9em; }

/* section heading block */
.lead-in { max-width: 62ch; margin-bottom: clamp(30px, 4vw, 52px); }
.lead-in .display { margin-bottom: 0.45em; }

/* ============================================================
   MOBILE HARDENING
   Findings from the mobile-first pass: a nowrap value column could
   push the page wider than the viewport, standalone links were under
   the 40px tap floor, and several mono labels sat below 12px.
   ============================================================ */

/* A value column must never be the reason the page scrolls sideways. */
.spec__v { overflow-wrap: anywhere; }
@media (max-width: 560px) {
    .spec li { grid-template-columns: 1fr; gap: 2px; }
    .spec__v { text-align: left; white-space: normal; }
}

/* Standalone links are tap targets; links inside a sentence are not. */
.footer ul a { display: inline-block; padding-block: 9px; }
.nav__links a { min-height: 40px; display: flex; align-items: center; }
.lang a { min-width: 40px; text-align: center; padding: 11px 10px; }
.totem__row { min-height: 52px; }
.faq summary { min-height: 48px; }

/* 12px is the floor for anything that carries meaning. */
.lang, .totem__unit, .readout__label, .totem__head h2, .totem__head span,
.compare__tag, .footer h2 { font-size: 0.75rem; }
.plate__no { font-size: 0.75rem; }
.meta { font-size: 0.75rem; }

/* ============================================================
   AUTHOR PROFILE
   ============================================================ */
.profile { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4.5vw, 64px); align-items: start; }
@media (max-width: 860px) {
    .profile { grid-template-columns: 1fr; }
    .portrait { position: relative; top: auto; }
}

.portrait {
    position: relative;
    /* The photograph follows the reading instead of leaving a dead column. */
    position: sticky;
    top: 92px;
    border: 1px solid rgba(245, 200, 66, 0.22);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    max-width: 420px;
}
.portrait img { width: 100%; display: block; }
/* The photograph ends; the page continues. */
.portrait::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 34%;
    background: linear-gradient(180deg, transparent, rgba(10, 12, 7, 0.72));
    pointer-events: none;
}
.portrait figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 1;
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
}

.profile__links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 20px; }
.profile__links a { font-size: 0.93rem; }

/* ============================================================
   DEFINITION BLOCK
   A self-contained answer to one question, phrased the way people
   ask it. Written to survive being lifted out of the page whole.
   ============================================================ */
.definition {
    border-left: 1px solid rgba(245, 200, 66, 0.4);
    padding: 4px 0 4px clamp(18px, 2.6vw, 28px);
    max-width: 64ch;
}
.definition h2 {
    font-family: var(--font-serif);
    color: var(--cream);
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: -0.015em;
    margin-bottom: 12px;
}
.definition p { font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.62; color: var(--text-body); }
.definition p + p { margin-top: 0.9em; }
