/* =========================================================
   Tivaro Digital
   Graphite + paper + ice blue. Blueprint linework, editorial type.
   ========================================================= */

@property --n {
    syntax: '<integer>';
    inherits: false;
    initial-value: 0;
}

:root {
    /* Graphite (dark) */
    --bg: #0b0b0c;
    --bg-2: #101012;
    --surface: #141416;
    --surface-2: #1a1a1d;
    --surface-3: #232327;
    --input: #0f0f11;
    --line: #26262a;
    --line-2: #35353b;
    --text: #f4f3ef;
    --text-2: #c9c8c2;
    --muted: #92918b;
    --dim: #64635f;
    --ink-contrast: var(--bg);

    /* Ice blue: the blueprint ink */
    --blue: #8fd0ff;
    --blue-hover: #b6e1ff;
    --blue-deep: #1b6cb0;
    --blue-soft: rgba(143, 208, 255, 0.09);
    --blue-line: rgba(143, 208, 255, 0.32);
    --on-blue: #051320;
    --crop: var(--blue);

    /* Paper (light sections) */
    --paper: #f1efe9;
    --paper-ink: #0e0e10;

    --green: #4ade80;
    --amber: #fbbf24;
    --red: #f87171;
    --violet: #a78bfa;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03);

    --display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
    --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'Geist Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

    --container: 1240px;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 72px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    color-scheme: dark;
}

/* Light "paper" sections re-theme everything inside them. */
.section-paper {
    --bg-2: #e9e6de;
    --surface: #f8f7f3;
    --surface-2: #fbfaf7;
    --surface-3: #e5e2d9;
    --input: #ffffff;
    --line: #d6d2c7;
    --line-2: #c3beb1;
    --text: #0e0e10;
    --text-2: #33322e;
    --muted: #66645e;
    --dim: #8c897f;
    --ink-contrast: var(--paper);
    --blue: #1b6cb0;
    --blue-hover: #155a94;
    --blue-soft: rgba(27, 108, 176, 0.08);
    --blue-line: rgba(27, 108, 176, 0.3);
    --on-blue: #ffffff;
    --crop: #0e0e10;
    --shadow: 0 30px 60px -34px rgba(20, 18, 10, 0.35);
    color-scheme: light;
    background: var(--paper);
    color: var(--text);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection {
    background: var(--blue);
    color: var(--on-blue);
}

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

img {
    display: block;
    height: auto;
}

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

p a:not(.btn):not(.link-arrow),
.legal a,
.hint a,
.prose a,
.alert a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: var(--blue-line);
    text-underline-offset: 3px;
}

p a:not(.btn):not(.link-arrow):hover,
.legal a:hover,
.hint a:hover {
    text-decoration-color: var(--blue);
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--display);
    color: var(--text);
    margin: 0 0 0.5em;
    font-weight: 700;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.6rem, 6.4vw, 6.2rem);
    line-height: 0.95;
    letter-spacing: -0.032em;
    word-spacing: 0.04em;
}

h2 {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 1;
    letter-spacing: -0.028em;
    word-spacing: 0.04em;
}

h3 {
    font-size: 1.2rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1em;
}

code {
    font-family: var(--mono);
    font-size: 0.86em;
    background: var(--surface-3);
    padding: 2px 6px;
    border-radius: 4px;
}

.icon {
    flex-shrink: 0;
}

.mono {
    font-family: var(--mono);
    font-weight: 500;
}

.serif {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--blue);
    padding-right: 0.04em;
}

h1 .serif,
h2 .serif {
    font-size: 1.06em;
    line-height: 0.9;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 400;
    background: var(--blue);
    color: var(--on-blue);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

.narrow {
    max-width: 880px;
}

.center {
    text-align: center;
}

p.center {
    margin: 48px 0 0;
}

.muted {
    color: var(--muted);
}

.hint {
    color: var(--muted);
    font-size: 0.86rem;
    margin: 6px 0 0;
}

.hint .icon {
    vertical-align: -2px;
    color: var(--blue);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 22px;
}

.eyebrow-idx {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--blue);
}

.eyebrow-idx::after {
    content: '';
    width: 28px;
    height: 1px;
    background: currentColor;
}

.center .eyebrow,
.section-head.center .eyebrow {
    justify-content: center;
}

.lead {
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    color: var(--text-2);
    max-width: 58ch;
    line-height: 1.6;
}

.center .lead {
    margin-inline: auto;
}

.hide-sm {
    display: inline;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.82rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.3s, transform 0.2s;
}

.btn .icon {
    transition: transform 0.3s var(--ease);
}

.btn:hover .icon:last-child:not(:first-child) {
    transform: translateX(3px);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--blue);
    color: var(--on-blue);
}

.btn-primary:hover {
    background: var(--blue-hover);
    box-shadow: 0 12px 34px -10px var(--blue);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line-2);
}

.btn-ghost:hover {
    background: var(--surface-2);
    border-color: var(--text);
}

.btn-dark {
    background: #0e0e10;
    color: #f4f3ef;
}

.btn-dark:hover {
    background: #000;
}

.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: rgba(248, 113, 113, 0.35);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.1);
}

.btn[disabled] {
    opacity: 0.45;
    pointer-events: none;
}

.btn-lg {
    padding: 1.02rem 1.5rem;
    font-size: 1.02rem;
}

.btn-sm {
    padding: 0.55rem 0.9rem;
    font-size: 0.86rem;
}

.btn-block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
    border-bottom: 1px solid var(--blue);
    padding-bottom: 2px;
}

.link-arrow .icon {
    color: var(--blue);
    transition: transform 0.3s var(--ease);
}

.link-arrow:hover .icon {
    transform: translateX(4px);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(11, 11, 12, 0.72);
    backdrop-filter: blur(14px) saturate(1.3);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, background-color 0.3s;
}

.site-header.scrolled {
    border-bottom-color: var(--line);
    background: rgba(11, 11, 12, 0.88);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.14rem;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: block;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-nav ul {
    display: flex;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav ul a {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-weight: 500;
    font-size: 0.93rem;
    transition: color 0.2s;
}

.nav-idx {
    font-size: 0.62rem;
    color: var(--dim);
    transition: color 0.2s;
}

.main-nav ul a:hover,
.main-nav ul a.active {
    color: var(--text);
}

.main-nav ul a:hover .nav-idx,
.main-nav ul a.active .nav-idx {
    color: var(--blue);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle-bars {
    display: grid;
    gap: 6px;
    width: 18px;
}

.nav-toggle-bars span {
    display: block;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s;
}

.nav-open .nav-toggle-bars span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.nav-open .nav-toggle-bars span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Intro (home, once per visit) ---------- */

.intro {
    display: none;
}

html.is-intro .intro {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: var(--bg);
    animation: intro-out 0.85s cubic-bezier(0.76, 0, 0.24, 1) 1.7s forwards;
}

.intro-mark {
    overflow: visible;
}

.intro-draw {
    fill: transparent;
    stroke: var(--blue);
    stroke-width: 0.7;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

html.is-intro .intro-draw {
    animation: draw 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.1s forwards, fill-ink 0.35s ease 1.15s forwards;
}

html.is-intro rect.intro-draw {
    animation: draw 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.1s forwards, fill-blue 0.35s ease 1.1s forwards;
}

html.is-intro path.intro-draw {
    animation-delay: 0.35s, 1.15s;
}

html.is-intro circle.intro-draw {
    animation-delay: 0.65s, 1.15s;
}

.intro-count {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

.intro-n {
    counter-reset: n var(--n);
}

html.is-intro .intro-n {
    animation: count 1.25s cubic-bezier(0.3, 0, 0.2, 1) 0.1s forwards;
}

.intro-n::after {
    content: counter(n) '%';
    color: var(--text);
}

.intro-bar {
    width: 180px;
    height: 1px;
    background: var(--line-2);
    overflow: hidden;
}

.intro-bar span {
    display: block;
    height: 100%;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
}

html.is-intro .intro-bar span {
    animation: bar 1.25s cubic-bezier(0.3, 0, 0.2, 1) 0.1s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fill-blue {
    to {
        fill: var(--blue);
    }
}

@keyframes fill-ink {
    to {
        fill: var(--bg);
        stroke: var(--bg);
    }
}

@keyframes count {
    to {
        --n: 100;
    }
}

@keyframes bar {
    to {
        transform: none;
    }
}

@keyframes intro-out {
    to {
        transform: translateY(-100%);
        visibility: hidden;
    }
}

/* ---------- Blueprint helpers ---------- */

[data-spotlight] {
    --mx: 72%;
    --my: 18%;
}

.bp-grid {
    --grid: rgba(255, 255, 255, 0.045);
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center top;
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%);
    mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.bp-grid-bright {
    --grid: rgba(143, 208, 255, 0.28);
    -webkit-mask-image: radial-gradient(280px circle at var(--mx) var(--my), #000, transparent 72%);
    mask-image: radial-gradient(280px circle at var(--mx) var(--my), #000, transparent 72%);
}

/* Printer's crop marks on the corners */
.crop {
    position: relative;
}

.crop::before {
    content: '';
    position: absolute;
    inset: -9px;
    pointer-events: none;
    background:
        linear-gradient(var(--crop) 0 0) top left / 14px 1px,
        linear-gradient(var(--crop) 0 0) top left / 1px 14px,
        linear-gradient(var(--crop) 0 0) top right / 14px 1px,
        linear-gradient(var(--crop) 0 0) top right / 1px 14px,
        linear-gradient(var(--crop) 0 0) bottom left / 14px 1px,
        linear-gradient(var(--crop) 0 0) bottom left / 1px 14px,
        linear-gradient(var(--crop) 0 0) bottom right / 14px 1px,
        linear-gradient(var(--crop) 0 0) bottom right / 1px 14px;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* ---------- Home hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 3vw, 40px) 0 clamp(72px, 9vw, 120px);
}

.hero > .container {
    position: relative;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: clamp(28px, 4.5vw, 60px);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.hero-avail {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.pulse-dot {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid currentColor;
    color: var(--blue);
    opacity: 0;
    animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

.hero-title {
    font-size: clamp(2.6rem, 8.8vw, 8.8rem);
    line-height: 0.92;
    letter-spacing: -0.038em;
    word-spacing: 0.05em;
    margin: 0;
}

.hero-title .line {
    display: block;
    overflow: hidden;
    padding: 0 0.12em 0.09em 0;
    margin-bottom: -0.09em;
}

.hero-title .line > span {
    display: block;
    transform: translateY(112%);
    animation: line-up 1.15s var(--ease) forwards;
    animation-delay: calc(0.1s + var(--i) * 0.09s);
}

.hero-title .serif {
    font-size: 1.04em;
}

@keyframes line-up {
    to {
        transform: none;
    }
}

.hero-meta,
.hero-foot,
.hero .build {
    opacity: 0;
    animation: fade-up 0.9s var(--ease) forwards;
}

.hero-meta {
    animation-delay: 0.05s;
}

.hero-foot {
    animation-delay: 0.45s;
}

.hero .build {
    animation-delay: 0.65s;
}

html.is-intro .hero-title .line > span {
    animation-delay: calc(1.95s + var(--i) * 0.09s);
}

html.is-intro .hero-meta {
    animation-delay: 1.9s;
}

html.is-intro .hero-foot {
    animation-delay: 2.25s;
}

html.is-intro .hero .build {
    animation-delay: 2.45s;
}

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

.hero-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px 48px;
    align-items: end;
    margin-top: clamp(28px, 4vw, 48px);
}

.hero-foot .lead {
    margin: 0;
    max-width: 50ch;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Drag to build ---------- */

.build {
    margin: clamp(48px, 7vw, 88px) 0 0;
}

.build-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.build-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue);
}

.build-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: var(--surface);
    box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.build-stage {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000;
    user-select: none;
}

.build-live {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.build-blueprint {
    position: absolute;
    inset: 0;
    background-color: #06111b;
    background-image:
        linear-gradient(rgba(143, 208, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 208, 255, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(143, 208, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(143, 208, 255, 0.055) 1px, transparent 1px);
    background-size: 10% 16%, 10% 16%, 2.5% 4%, 2.5% 4%;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
    font-family: var(--mono);
}

.bp-box {
    position: absolute;
    border: 1px solid rgba(143, 208, 255, 0.78);
    background: rgba(143, 208, 255, 0.05);
}

.bp-media {
    border: 1px dashed rgba(143, 208, 255, 0.3);
    background: transparent;
}

.bp-cross {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bp-cross path,
.w-hero path {
    fill: none;
    stroke: rgba(143, 208, 255, 0.16);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.bp-bar {
    background: rgba(143, 208, 255, 0.1);
}

.bp-logo {
    border-radius: 50%;
}

.bp-button {
    border-radius: 3px;
}

.bp-text {
    background: linear-gradient(rgba(143, 208, 255, 0.22), rgba(143, 208, 255, 0.22)) left center / 88% 26% no-repeat, rgba(143, 208, 255, 0.04);
}

.bp-lines {
    position: absolute;
    inset: 12% 4% 12% 3%;
    display: grid;
    gap: 14%;
}

.bp-lines i {
    display: block;
    background: rgba(143, 208, 255, 0.2);
}

.bp-lines i:last-child {
    width: 92%;
}

.bp-label {
    position: absolute;
    left: -1px;
    bottom: calc(100% + 4px);
    padding: 2px 5px;
    font-size: clamp(7px, 0.7vw, 10.5px);
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c4e6ff;
    background: #0a1b2a;
    border: 1px solid rgba(143, 208, 255, 0.35);
    white-space: nowrap;
}

.bp-label-below {
    top: calc(100% + 4px);
    bottom: auto;
}

.bp-label-inside {
    top: 50%;
    bottom: auto;
    left: 1%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
}

.bp-label-right {
    left: auto;
    right: -1px;
}

.bp-media > .bp-label {
    top: auto;
    bottom: 2.5%;
    left: auto;
    right: 1.5%;
    background: transparent;
    border-style: dashed;
}

.bp-dim {
    position: absolute;
    color: var(--blue);
}

.bp-dim-x {
    height: 0;
    border-top: 1px solid rgba(143, 208, 255, 0.55);
}

.bp-dim-y {
    width: 0;
    border-left: 1px solid rgba(143, 208, 255, 0.55);
}

.bp-dim::before,
.bp-dim::after {
    content: '';
    position: absolute;
    background: rgba(143, 208, 255, 0.7);
}

.bp-dim-x::before,
.bp-dim-x::after {
    top: -5px;
    width: 1px;
    height: 9px;
}

.bp-dim-x::before {
    left: 0;
}

.bp-dim-x::after {
    right: 0;
}

.bp-dim-y::before,
.bp-dim-y::after {
    left: -5px;
    width: 9px;
    height: 1px;
}

.bp-dim-y::before {
    top: 0;
}

.bp-dim-y::after {
    bottom: 0;
}

.bp-dim span {
    position: absolute;
    font-size: clamp(7px, 0.68vw, 10px);
    background: #06111b;
    padding: 0 5px;
    white-space: nowrap;
}

.bp-dim-x span {
    left: 50%;
    top: -0.75em;
    transform: translateX(-50%);
}

.bp-dim-y span {
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.build-side {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.build-head .build-hint {
    color: var(--muted);
}

.build-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    z-index: 4;
    width: 2px;
    margin-left: -1px;
    background: var(--blue);
    box-shadow: 0 0 24px rgba(143, 208, 255, 0.7);
    pointer-events: none;
}

.build-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--on-blue);
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.25s var(--ease);
}

.build-stage:hover .build-grip {
    transform: translate(-50%, -50%) scale(1.08);
}

.build-stage:has(.build-range:focus-visible) .build-grip {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.build-range {
    position: absolute;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    touch-action: pan-y;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.build figcaption {
    margin-top: 14px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* ---------- Device frames ---------- */

.browser {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow);
}

.browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 34px;
    padding: 0 12px;
    background: #17171a;
    border-bottom: 1px solid #26262a;
}

.browser-dots {
    display: inline-flex;
    gap: 6px;
}

.browser-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3a3a40;
}

.browser-url {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    padding: 3px 14px;
    min-width: 36%;
    max-width: 70%;
    border-radius: 4px;
    background: #0e0e10;
    color: #92918b;
    font-family: var(--mono);
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browser-url .icon {
    color: var(--green);
}

.browser img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
}

.phone {
    margin: 0;
    position: relative;
    border: 6px solid #1d1d21;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow), 0 0 0 1px #2c2c31;
}

.phone-notch {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 32%;
    height: 12px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #000;
    z-index: 2;
}

.phone img {
    width: 100%;
    aspect-ratio: 500 / 1080;
    object-fit: cover;
    object-position: top;
}

.tilt {
    transition: transform 0.5s var(--ease);
    transform-style: preserve-3d;
    will-change: transform;
}

.tilt.is-tilting {
    transition: transform 0.12s linear;
}

/* ---------- Ticker ---------- */

.ticker {
    overflow: hidden;
    border-block: 1px solid var(--line);
    padding: clamp(16px, 2vw, 26px) 0;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 40s linear infinite;
}

.ticker-set {
    display: flex;
    align-items: center;
    gap: clamp(22px, 3vw, 48px);
    padding-right: clamp(22px, 3vw, 48px);
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.6rem, 7.4vw, 7rem);
    line-height: 1;
    letter-spacing: -0.03em;
    word-spacing: 0.06em;
    white-space: nowrap;
}

.ticker .outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--text);
}

.ticker-star {
    color: var(--blue);
    font-size: 0.5em;
}

@keyframes ticker {
    to {
        transform: translateX(-50%);
    }
}

/* ---------- Sections ---------- */

.section {
    position: relative;
    padding: clamp(84px, 11vw, 152px) 0;
}

.section.pt-0 {
    padding-top: 0;
}

.section-head {
    max-width: 920px;
    margin-bottom: clamp(40px, 6vw, 72px);
}

.section-head.center {
    margin-inline: auto;
    text-align: center;
}

.section-head .lead {
    margin: 22px 0 0;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 44px) 0 clamp(64px, 9vw, 120px);
}

.page-hero > .container {
    position: relative;
}

.page-hero-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: clamp(36px, 6vw, 80px);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.page-hero-meta span:first-child {
    color: var(--blue);
}

.page-title {
    max-width: 15ch;
    margin: 0;
}

.page-hero.compact .page-title {
    font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.page-hero-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px 48px;
    align-items: end;
    margin-top: clamp(28px, 4vw, 48px);
}

.page-hero-foot .lead {
    margin: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-actions.center {
    justify-content: center;
    margin-top: 32px;
}

.page-hero.thanks {
    padding: clamp(72px, 12vw, 160px) 0;
}

.page-hero.thanks .page-title {
    max-width: none;
}

.page-hero.thanks .lead {
    margin: 24px auto 0;
}

.hero-glow {
    position: absolute;
    top: -320px;
    left: 50%;
    width: min(1100px, 140vw);
    height: 700px;
    transform: translateX(-40%);
    background: radial-gradient(closest-side, rgba(143, 208, 255, 0.16), transparent);
    pointer-events: none;
}

/* ---------- Manifesto ---------- */

.statement {
    font-size: clamp(2.1rem, 4.8vw, 4.6rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    max-width: 20ch;
    margin: 0 0 clamp(40px, 6vw, 80px);
}

.manifesto-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(32px, 6vw, 96px);
    align-items: end;
    padding-top: clamp(28px, 4vw, 44px);
    border-top: 1px solid var(--line);
}

.manifesto-grid .lead {
    margin: 0;
}

.figures {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.figures div {
    padding: 20px 22px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.figures dt {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.figures dd {
    margin: 10px 0 0;
    font-family: var(--display);
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* ---------- Process ---------- */

.process-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(36px, 7vw, 110px);
    align-items: start;
}

.process-sticky {
    position: sticky;
    top: calc(var(--header-h) + 44px);
}

.process-sticky h2 {
    font-size: clamp(2.2rem, 4.4vw, 4rem);
}

.process-nav {
    list-style: none;
    padding: 0;
    margin: 36px 0 32px;
    border-top: 1px solid var(--line);
}

.process-nav a {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 1.04rem;
    transition: color 0.3s, padding 0.4s var(--ease);
}

.process-nav .mono {
    font-size: 0.72rem;
    transition: color 0.3s;
}

.process-nav li.active a,
.process-nav a:hover {
    color: var(--text);
}

.process-nav li.active a {
    padding-left: 14px;
}

.process-nav li.active .mono {
    color: var(--blue);
}

.process-steps {
    display: grid;
    gap: clamp(64px, 9vw, 130px);
}

.process-step {
    display: grid;
    gap: 28px;
    transition: opacity 0.6s;
}

.js .process-step:not(.active) {
    opacity: 0.38;
}

.process-visual {
    display: grid;
    place-items: center;
    min-height: 380px;
    padding: clamp(20px, 4vw, 44px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--surface);
}

.process-copy .mono {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    margin: 0;
}

.process-copy h3 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    letter-spacing: -0.035em;
    margin: 10px 0;
}

.process-copy p:last-child {
    color: var(--text-2);
    max-width: 52ch;
    margin: 0;
}

/* Mock UIs */

.mock {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line-2);
    background: var(--bg-2);
    font-size: 0.86rem;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75);
}

.mock-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.mock-field {
    margin-bottom: 14px;
}

.mock-label {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.mock-input {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: var(--input);
}

.mock-input .icon {
    margin-left: auto;
    color: var(--muted);
}

.mock-caret {
    width: 1px;
    height: 1.1em;
    background: var(--blue);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.mock-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mock-chips span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid var(--line-2);
    border-radius: 4px;
    font-size: 0.76rem;
    color: var(--muted);
}

.mock-chips .on {
    border-color: var(--blue);
    color: var(--text);
    background: var(--blue-soft);
}

.mock-chips .on .icon {
    color: var(--blue);
}

.mock-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    background: var(--blue);
    color: var(--on-blue);
    font-weight: 600;
    font-size: 0.8rem;
}

.mock-build {
    display: grid;
    grid-template-columns: 0.9fr 1.2fr;
    gap: 12px;
    padding: 14px;
}

.mock-wire {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    align-content: start;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(143, 208, 255, 0.22);
    background: #06111b;
}

.mock-wire span {
    border: 1px solid rgba(143, 208, 255, 0.6);
    border-radius: 2px;
}

.w-nav {
    grid-column: 1 / -1;
    height: 12px;
}

.w-hero {
    position: relative;
    grid-column: 1 / -1;
    height: 74px;
    border-style: dashed !important;
}

.w-hero svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.w-card {
    height: 36px;
}

.mock-code {
    margin: 0;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--input);
    font-size: 0.66rem;
    line-height: 1.75;
    color: var(--text-2);
    white-space: pre;
    overflow: hidden;
}

.mock-code code {
    padding: 0;
    background: none;
    font-size: inherit;
    border-radius: 0;
}

.mock-code .t {
    color: #8fd0ff;
}

.mock-code .a {
    color: #c7b9ff;
}

.mock-code .s {
    color: #9be3b0;
}

.mock-code .c {
    color: var(--dim);
}

.mock-preview {
    padding: 0;
    overflow: hidden;
}

.mock-site {
    position: relative;
    height: 130px;
    margin: 14px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #1e2a36, #101419);
    overflow: hidden;
}

.mock-site i {
    display: block;
    height: 8px;
    width: 55%;
    margin-bottom: 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.14);
}

.mock-site i:first-child {
    height: 16px;
    width: 70%;
    background: rgba(143, 208, 255, 0.4);
}

.mock-site span {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 34%;
    height: 54%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
}

.mock-decide {
    padding: 2px 14px 16px;
}

.mock-decide p {
    margin: 0 0 10px;
    font-weight: 600;
}

.mock-decide div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mock-cursor {
    position: absolute;
    left: 30%;
    bottom: 10px;
    width: 20px;
    fill: #fff;
    stroke: #000;
    stroke-width: 1.2;
    animation: cursor 3.4s var(--ease) infinite;
}

@keyframes cursor {
    0%,
    100% {
        transform: translate(60px, 30px);
    }
    45%,
    60% {
        transform: translate(0, 0);
    }
    52% {
        transform: translate(0, 0) scale(0.85);
    }
}

.mock-launch .mock-url {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--input);
    font-family: var(--mono);
    font-size: 0.8rem;
}

.mock-url > .icon {
    color: var(--green);
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6ee7a0;
}

.live-pill .pulse-dot {
    background: var(--green);
}

.live-pill .pulse-dot::after {
    color: var(--green);
}

.mock-rows {
    margin: 12px 0 14px;
}

.mock-rows div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line-2);
    color: var(--text-2);
    font-size: 0.82rem;
}

.mock-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
}

.mock-choice span {
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
}

.mock-choice .on {
    background: var(--blue);
    color: var(--on-blue);
    font-weight: 600;
}

.mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 4px;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 0.76rem;
    font-weight: 500;
    white-space: nowrap;
}

.mini-primary {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--on-blue);
    font-weight: 700;
}

/* ---------- Client brand takeover ---------- */

.takeover {
    --brand-bg: #0d1520;
    --brand-accent: #8fd0ff;
    --brand-font: var(--display);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(84px, 11vw, 152px) 0;
    background: var(--brand-bg);
    color: #fff;
}

.takeover-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 55% 50% at 85% 0%, color-mix(in srgb, var(--brand-accent) 22%, transparent), transparent 70%),
        radial-gradient(ellipse 45% 55% at 0% 100%, color-mix(in srgb, var(--brand-accent) 10%, transparent), transparent 70%);
}

.takeover .eyebrow {
    color: rgba(255, 255, 255, 0.6);
}

.takeover .eyebrow-idx {
    color: var(--brand-accent);
}

.takeover-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: clamp(36px, 5vw, 64px);
}

.takeover-top .eyebrow {
    margin: 0;
}

.takeover-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 12px;
    border: 1px dashed rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.75);
}

.takeover-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

.takeover-media {
    position: relative;
    padding: 0 clamp(24px, 4vw, 56px) clamp(56px, 7vw, 90px) 0;
    perspective: 1400px;
}

.takeover-photo {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.takeover-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.tilt-glare {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.22), transparent 55%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.tilt.is-tilting .tilt-glare {
    opacity: 1;
}

.takeover-media .flip {
    position: absolute;
    right: 0;
    bottom: 0;
    width: clamp(130px, 15vw, 200px);
}

.flip {
    margin: 0;
    cursor: pointer;
    outline-offset: 6px;
}

.flip-media {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 4px var(--brand-bg, #0b0b0c);
}

.flip-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.flip-front {
    z-index: 2;
}

.flip-back {
    z-index: 1;
    opacity: 0;
    transform: translateX(-100%);
}

.flip:hover .flip-front,
.flip:focus-visible .flip-front,
.flip.is-flipped .flip-front {
    transform: translateX(100%);
    opacity: 0;
}

.flip:hover .flip-back,
.flip:focus-visible .flip-back,
.flip.is-flipped .flip-back {
    transform: none;
    opacity: 1;
}

.flip figcaption {
    margin-top: 10px;
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--muted);
}

.takeover .flip figcaption {
    color: rgba(255, 255, 255, 0.65);
}

.takeover-logo {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
}

.takeover-tagline {
    margin: 0 0 12px;
    font-family: var(--brand-font), var(--font);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--brand-accent);
}

.takeover-title {
    margin: 0 0 18px;
    font-family: var(--brand-font), var(--display);
    font-weight: 800;
    font-size: clamp(2.6rem, 5.6vw, 5.2rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
    color: #fff;
}

.takeover-summary {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.06rem;
    max-width: 52ch;
}

.takeover-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    list-style: none;
    padding: 0;
    margin: 26px 0;
}

.takeover-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--brand-font), var(--font);
    font-weight: 600;
    font-size: 0.93rem;
}

.takeover-features .icon {
    color: var(--brand-accent);
}

.takeover-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 0 30px;
    border-block: 1px solid rgba(255, 255, 255, 0.14);
}

.takeover-stats div {
    display: flex;
    flex-direction: column-reverse;
    gap: 6px;
    padding: 18px 0;
}

.takeover-stats div + div {
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.takeover-stats dt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.takeover-stats dd {
    margin: 0;
    font-family: var(--brand-font), var(--display);
    font-weight: 800;
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.btn-brand {
    background: var(--brand-accent);
    color: #021019;
    font-family: var(--brand-font), var(--font);
    font-weight: 700;
    border-radius: 10px;
}

.btn-brand:hover {
    filter: brightness(1.1);
    box-shadow: 0 14px 34px -12px var(--brand-accent);
}

.btn-brand-ghost {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
    border-radius: 10px;
    font-family: var(--brand-font), var(--font);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 0.86rem;
}

.btn-brand-ghost:hover {
    background: #fff;
    color: #000;
}

/* ---------- Work ---------- */

.work-list {
    display: grid;
    gap: clamp(48px, 7vw, 96px);
}

.work-row {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding-top: clamp(28px, 4vw, 48px);
    border-top: 1px solid var(--line);
}

.work-row-media {
    display: block;
    perspective: 1400px;
}

.work-row-meta {
    display: flex;
    gap: 14px;
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.work-row-meta span {
    color: var(--blue);
}

.work-row-body h3 {
    margin: 16px 0 14px;
    font-size: clamp(2.2rem, 4.6vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.032em;
}

.work-row-body h3 a {
    transition: color 0.3s;
}

.work-row-body h3 a:hover {
    color: var(--blue);
}

.work-row-body > p {
    color: var(--text-2);
}

.work-placeholder {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--dim);
}

.work-next {
    padding: clamp(32px, 5vw, 64px);
    border-radius: var(--radius);
    border: 1px dashed var(--line-2);
}

.work-next .mono {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}

.work-next h3 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.03em;
    margin: 14px 0;
}

.work-next p:not(.mono) {
    color: var(--text-2);
    margin-bottom: 24px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 20px 0 24px;
}

.tags li {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--line-2);
    color: var(--text-2);
    font-family: var(--mono);
    font-size: 0.74rem;
}

.tags.large li {
    padding: 8px 14px;
    font-size: 0.86rem;
}

/* ---------- Index list (services) ---------- */

.index-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--line);
}

.index-list a {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 64px minmax(0, 1.1fr) minmax(0, 1fr) 44px;
    gap: 24px;
    align-items: center;
    padding: clamp(22px, 2.8vw, 34px) 14px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    transition: color 0.4s;
}

.index-list a::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--text);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1);
}

.index-list a:hover::before,
.index-list a:focus-visible::before {
    transform: scaleY(1);
}

.index-list a:hover,
.index-list a:focus-visible {
    color: var(--ink-contrast);
}

.index-num {
    font-size: 0.74rem;
    color: var(--blue);
}

.index-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.7rem, 3.4vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.028em;
}

.index-text {
    color: var(--muted);
    transition: color 0.4s;
}

.index-list a:hover .index-text,
.index-list a:hover .index-num {
    color: inherit;
    opacity: 0.75;
}

.index-arrow {
    justify-self: end;
    transition: transform 0.5s var(--ease);
}

.index-list a:hover .index-arrow {
    transform: rotate(45deg);
}

/* ---------- Spec sheet ---------- */

.spec-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(40px, 7vw, 110px);
    align-items: center;
}

.spec-layout h2 {
    font-size: clamp(2.2rem, 4.4vw, 4rem);
}

.spec-layout .lead {
    margin-bottom: 30px;
}

.spec-sheet {
    padding: clamp(20px, 3vw, 34px);
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.spec-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line-2);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
}

.spec-sheet dl {
    margin: 0;
}

.spec-sheet dl div {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
}

.spec-sheet dt {
    display: flex;
    align-items: baseline;
    flex: 1;
    gap: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.spec-sheet dt::after {
    content: '';
    flex: 1;
    min-width: 20px;
    border-bottom: 1px dotted var(--line-2);
    transform: translateY(-4px);
}

.spec-sheet dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-2);
    text-align: right;
}

/* ---------- Pricing ---------- */

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 24px 24px 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.price-card.featured {
    --text: #f4f3ef;
    --text-2: #c9c8c2;
    --muted: #9a9993;
    --line: #2a2a2e;
    --line-2: #3a3a40;
    --surface-2: #1a1a1d;
    --blue: #8fd0ff;
    --blue-hover: #b6e1ff;
    --on-blue: #051320;
    background: #0e0e10;
    border-color: #0e0e10;
    color: var(--text);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}

.price-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 22px;
    margin-bottom: 28px;
    font-size: 0.72rem;
    color: var(--muted);
}

.price-flag {
    padding: 3px 9px;
    border-radius: 3px;
    background: var(--blue);
    color: var(--on-blue);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.price-card h3 {
    font-size: 1.55rem;
    letter-spacing: -0.035em;
    margin-bottom: 6px;
}

.price-tagline {
    color: var(--muted);
    font-size: 0.93rem;
    min-height: 3em;
    margin: 0;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 24px 0 4px;
}

.price-from,
.price-per {
    color: var(--muted);
    font-size: 0.9rem;
}

.price-amount {
    font-family: var(--display);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.price-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 0.74rem;
    color: var(--muted);
}

.price-card .btn {
    margin-top: auto;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 22px 0 26px;
    display: grid;
    gap: 10px;
}

.check-list li {
    display: flex;
    gap: 10px;
    color: var(--text-2);
    font-size: 0.94rem;
    line-height: 1.5;
}

.check-list .icon {
    color: var(--blue);
    margin-top: 4px;
}

.check-list.two-col {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    margin: 0;
}

.included-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
    margin-top: 24px;
    padding: 18px 22px;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
}

.included-strip p {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}

.included-strip ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.included-strip li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
    font-size: 0.93rem;
}

.included-strip .icon {
    color: var(--blue);
}

.extras-strip {
    margin-top: 10px;
    border-style: solid;
    background: var(--surface);
}

.extras-strip .icon {
    color: var(--muted);
}

.included-strip .extras-note {
    flex-basis: 100%;
    font-family: var(--font);
    font-size: 0.88rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}

.price-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 780px;
    margin: 24px 0 0;
    color: var(--text-2);
    font-size: 0.94rem;
}

.price-note .icon {
    color: var(--blue);
    margin-top: 3px;
}

.section-head + .price-note {
    margin: -16px 0 32px;
}

.spec-subhead {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line-2);
    color: var(--muted);
}

.spec-extras dd {
    color: var(--blue);
}

/* ---------- Aftercare ---------- */

.aftercare-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.aftercare-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(28px, 4vw, 48px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.aftercare-card > .mono {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.aftercare-card h3 {
    font-size: clamp(2rem, 3.4vw, 3rem);
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 18px 0 8px;
}

.aftercare-price {
    color: var(--muted);
    margin: 0;
}

.aftercare-price strong {
    font-family: var(--display);
    font-size: 1.5rem;
    color: var(--text);
    letter-spacing: -0.03em;
}

.aftercare-card .check-list {
    margin: 26px 0 30px;
}

.aftercare-card .btn {
    margin-top: auto;
}

.aftercare-care {
    --text: #051320;
    --text-2: #0d2b42;
    --muted: #1d4767;
    --blue: #051320;
    --line: rgba(5, 19, 32, 0.2);
    background: #8fd0ff;
    border-color: #8fd0ff;
    color: var(--text);
}

/* ---------- Testimonials ---------- */

.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.testimonial {
    margin: 0;
    padding: clamp(24px, 3vw, 36px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.testimonial blockquote {
    margin: 0 0 24px;
}

.testimonial blockquote p {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    line-height: 1.25;
}

.testimonial figcaption strong {
    display: block;
}

.testimonial figcaption span {
    color: var(--muted);
    font-size: 0.9rem;
}

/* ---------- FAQ ---------- */

.faq-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(36px, 7vw, 110px);
    align-items: start;
}

.faq-aside {
    position: sticky;
    top: calc(var(--header-h) + 36px);
}

.faq-aside h2 {
    font-size: clamp(2.2rem, 4.4vw, 4rem);
}

.faq-aside .lead {
    margin-top: 18px;
}

.faq-list {
    border-top: 1px solid var(--line);
}

.faq {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 34px;
    gap: 12px;
    align-items: center;
    padding: 22px 0;
    font-weight: 600;
    font-size: 1.07rem;
    cursor: pointer;
    list-style: none;
}

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

.faq-idx {
    color: var(--blue);
    font-size: 0.74rem;
}

.faq-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    transition: transform 0.35s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
}

.faq summary:hover .faq-toggle {
    border-color: var(--text);
}

.faq[open] .faq-toggle {
    transform: rotate(45deg);
    background: var(--text);
    border-color: var(--text);
    color: var(--ink-contrast);
}

.faq-body p {
    margin: 0;
    padding: 0 46px 26px 56px;
    color: var(--text-2);
    max-width: 70ch;
}

/* ---------- Steps ---------- */

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
}

.steps.three {
    grid-template-columns: repeat(3, 1fr);
}

.step {
    padding: 26px 28px 8px 0;
}

.step + .step {
    padding-left: 28px;
    border-left: 1px solid var(--line);
}

.step-num {
    font-size: 0.74rem;
    color: var(--blue);
}

.step h3 {
    font-size: 1.4rem;
    margin: 44px 0 10px;
}

.step p {
    color: var(--text-2);
    font-size: 0.97rem;
    margin: 0;
}

/* ---------- Cards ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card-grid.four {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.card h3 {
    margin: 22px 0 8px;
}

.card p {
    color: var(--muted);
    margin: 0;
    font-size: 0.95rem;
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--blue-line);
    background: var(--blue-soft);
    color: var(--blue);
    flex-shrink: 0;
}

.card-icon.sm {
    width: 36px;
    height: 36px;
}

/* ---------- Services page ---------- */

.service-list {
    display: grid;
}

.service-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(20px, 4vw, 56px);
    padding: clamp(36px, 5vw, 60px) 0;
    border-top: 1px solid var(--line);
}

.service-row:last-child {
    border-bottom: 1px solid var(--line);
}

.service-num {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.6rem, 4.4vw, 4rem);
    line-height: 0.85;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px var(--blue);
}

.service-row h2 {
    font-size: clamp(1.9rem, 3.2vw, 2.8rem);
}

.service-row-copy p {
    color: var(--text-2);
    margin: 0;
}

/* ---------- Estimator ---------- */

.estimator {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 24px;
    align-items: start;
}

.estimator-form {
    display: grid;
    gap: 32px;
    padding: clamp(22px, 4vw, 38px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

fieldset {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}

legend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin-bottom: 14px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
}

legend .mono {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--blue);
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.option-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-bottom: 18px;
}

.option-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.option-card input,
.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--input);
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.option-body strong {
    font-size: 0.95rem;
}

.option-body span {
    color: var(--muted);
    font-size: 0.84rem;
}

.option-card:hover .option-body {
    border-color: var(--text-2);
}

.option-card input:checked + .option-body {
    border-color: var(--blue);
    background: var(--blue-soft);
    box-shadow: inset 0 0 0 1px var(--blue);
}

.option-card input:focus-visible + .option-body,
.chip input:focus-visible + span {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    position: relative;
    cursor: pointer;
}

.chip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 4px;
    border: 1px solid var(--line-2);
    background: var(--input);
    color: var(--text-2);
    font-size: 0.89rem;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.chip em {
    font-style: normal;
    font-family: var(--mono);
    color: var(--muted);
    font-size: 0.76rem;
}

.chip:hover span {
    border-color: var(--text-2);
}

.chip input:checked + span {
    border-color: var(--blue);
    background: var(--blue-soft);
    color: var(--text);
}

.chip input:checked + span::before {
    content: '✓';
    color: var(--blue);
    font-weight: 700;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

input[type='range'] {
    flex: 1;
    accent-color: var(--blue);
}

.range-row output {
    min-width: 84px;
    font-family: var(--mono);
    font-weight: 500;
    text-align: right;
}

.estimate-card {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--blue-line);
    background: radial-gradient(ellipse at top right, rgba(143, 208, 255, 0.12), transparent 60%), var(--surface);
}

.estimate-card > .mono {
    margin: 0 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
}

.estimate-total {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.estimate-monthly {
    color: var(--blue);
    font-weight: 600;
    margin: 0 0 18px;
}

.estimate-lines {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    font-size: 0.9rem;
    color: var(--muted);
}

.estimate-lines li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line-2);
}

.estimate-lines li span:last-child {
    color: var(--text-2);
    font-family: var(--mono);
    font-size: 0.82rem;
    white-space: nowrap;
}

.estimate-card .hint {
    margin-top: 14px;
}

/* ---------- How it works ---------- */

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--line);
}

.timeline-item {
    display: grid;
    grid-template-columns: minmax(90px, 0.45fr) minmax(0, 1.55fr);
    gap: 24px;
    padding: clamp(28px, 4vw, 48px) 0;
    border-bottom: 1px solid var(--line);
}

.timeline-num {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(3.2rem, 7.6vw, 6.6rem);
    line-height: 0.8;
    letter-spacing: -0.035em;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-2);
    transition: -webkit-text-stroke-color 0.8s;
}

.timeline-item.in .timeline-num {
    -webkit-text-stroke-color: var(--blue);
}

.timeline-item h3 {
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    letter-spacing: -0.028em;
    margin: 0 0 10px;
}

.timeline-item p {
    color: var(--text-2);
    max-width: 56ch;
    font-size: 1.05rem;
    margin: 0;
}

.portal-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 7vw, 110px);
    align-items: center;
}

.portal-showcase h2 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.portal-mock {
    --text: #f4f3ef;
    --text-2: #c9c8c2;
    --muted: #92918b;
    --line: #26262a;
    --line-2: #35353b;
    --surface: #141416;
    --surface-2: #1a1a1d;
    --blue: #8fd0ff;
    --on-blue: #051320;
    --crop: #0e0e10;
    padding: 26px;
    border-radius: var(--radius);
    background: #141416;
    color: var(--text);
    box-shadow: 0 50px 90px -40px rgba(20, 18, 10, 0.5);
}

.portal-mock-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.portal-mock .mock-site {
    margin: 22px 0;
}

.portal-mock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ---------- About ---------- */

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 7vw, 110px);
    align-items: start;
}

.about-copy > .mono {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
}

.about-lede {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.6rem, 2.8vw, 2.4rem) !important;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--text) !important;
}

.about-copy p {
    color: var(--text-2);
    font-size: 1.08rem;
}

.about-values {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--line);
}

.about-values li {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.about-values .mono {
    font-size: 0.74rem;
    color: var(--blue);
    padding-top: 6px;
}

.about-values h3 {
    margin: 0 0 4px;
    font-size: 1.35rem;
}

.about-values p {
    color: var(--muted);
    margin: 0;
}

/* ---------- Case study ---------- */

.case-hero {
    --brand-bg: #0d1520;
    --brand-accent: #8fd0ff;
    --brand-font: var(--display);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: min(88vh, 860px);
    padding: 28px 0 clamp(48px, 7vw, 96px);
    background: var(--brand-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.case-hero > .container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    gap: 64px;
}

.case-hero-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--brand-bg) 60%, transparent) 0%, color-mix(in srgb, var(--brand-bg) 25%, transparent) 40%, var(--brand-bg) 100%),
        linear-gradient(90deg, color-mix(in srgb, var(--brand-bg) 85%, transparent), transparent 75%);
}

.case-crumbs {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

.case-crumbs a,
.case-crumbs span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.case-crumbs span {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px dashed rgba(255, 255, 255, 0.32);
    background: rgba(0, 0, 0, 0.25);
}

.case-crumbs a:hover {
    color: #fff;
}

.case-hero-copy {
    max-width: 780px;
}

.facts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 0 clamp(48px, 7vw, 88px);
    border-block: 1px solid var(--line);
}

.facts div {
    padding: 18px 20px 18px 0;
}

.facts div + div {
    padding-left: 20px;
    border-left: 1px solid var(--line);
}

.facts dt {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.facts dd {
    margin: 6px 0 0;
    font-weight: 600;
}

.case-build .build {
    margin: 0;
}

.case-media {
    position: relative;
    padding-right: clamp(0px, 5vw, 70px);
}

.case-phone {
    position: absolute;
    right: 0;
    bottom: -56px;
    width: clamp(110px, 15vw, 200px);
}

.case-story {
    max-width: 1040px;
}

.case-block {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
    padding: 44px 0;
    border-top: 1px solid var(--line);
}

.case-block:first-child {
    border-top: 0;
    padding-top: 0;
}

.case-block h2 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    letter-spacing: -0.035em;
}

.case-block h2 .mono {
    font-size: 0.72rem;
    letter-spacing: 0;
    color: var(--blue);
}

.prose p,
.prose li {
    color: var(--text-2);
    font-size: 1.05rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

.prose ul {
    padding-left: 1.2em;
    margin: 0 0 1em;
}

.prose.small p {
    font-size: 0.92rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.feature {
    position: relative;
    padding: 28px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s;
}

.feature:hover {
    background: var(--surface);
}

.feature-num {
    position: absolute;
    top: 26px;
    right: 26px;
    font-size: 0.72rem;
    color: var(--muted);
}

.feature h3 {
    margin: 22px 0 8px;
}

.feature p {
    color: var(--muted);
    font-size: 0.94rem;
    margin: 0;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 28px;
    align-items: start;
}

.gallery-item {
    margin: 0;
}

.gallery-item > figcaption,
.gallery-item figcaption {
    color: var(--muted);
    font-size: 0.92rem;
    margin-top: 14px;
}

.gallery-phone .phone,
.gallery-flip .flip {
    max-width: 260px;
    margin: 0 auto;
}

.gallery-phone figcaption {
    text-align: center;
}

.tech-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}

.tech-row .eyebrow,
.tech-row .tags {
    margin: 0;
}

/* ---------- Forms ---------- */

.form-layout {
    display: grid;
    grid-template-columns: 1.55fr 0.8fr;
    gap: 28px;
    align-items: start;
}

.planner {
    display: grid;
    gap: 36px;
    padding: clamp(22px, 4vw, 42px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.planner legend {
    font-size: 1.25rem;
    margin-bottom: 18px;
}

.planner legend span {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 3px;
    border: 1px solid var(--blue-line);
    background: var(--blue-soft);
    color: var(--blue);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.field {
    min-width: 0;
}

.field.full {
    grid-column: 1 / -1;
}

.field label,
.field > span:first-child,
.field-label,
.label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-2);
    margin: 0 0 7px;
}

.field-label {
    margin-bottom: 10px;
}

.chip-grid + .field-grid,
.option-grid + .field-grid {
    margin-top: 6px;
}

.field-grid + .field-label {
    margin-top: 18px;
}

.req {
    color: var(--blue);
    margin-left: 3px;
}

.opt {
    color: var(--muted);
    font-weight: 400;
}

input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='color']),
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--input);
    color: var(--text);
    font: inherit;
    font-size: 0.97rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
    color: var(--dim);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

[aria-invalid='true'] {
    border-color: var(--red) !important;
}

input[type='checkbox'],
input[type='radio'] {
    accent-color: var(--blue);
    width: 17px;
    height: 17px;
}

.select-wrap {
    position: relative;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.select-wrap .icon {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--muted);
}

.field-error {
    color: var(--red);
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
}

.form-submit .hint {
    margin: 0;
}

.alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-2);
    background: var(--surface-2);
}

.alert p {
    margin: 0;
}

.alert ul {
    margin: 6px 0 0;
    padding-left: 18px;
    color: var(--text-2);
}

.alert .icon {
    margin-top: 2px;
}

.alert-error {
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.08);
}

.alert-error .icon {
    color: var(--red);
}

.alert-ok {
    border-color: rgba(74, 222, 128, 0.3);
    background: rgba(74, 222, 128, 0.07);
}

.alert-ok .icon {
    color: var(--green);
}

.alert-info {
    border-color: var(--blue-line);
    background: var(--blue-soft);
}

.alert-info .icon {
    color: var(--blue);
}

.form-aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    display: grid;
    gap: 14px;
}

.aside-card {
    padding: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.aside-card h2 {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.mini-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 18px;
}

.mini-steps li {
    display: flex;
    gap: 14px;
}

.mini-steps li > span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--blue-line);
    background: var(--blue-soft);
    color: var(--blue);
    font-family: var(--mono);
    font-size: 0.76rem;
    flex-shrink: 0;
}

.mini-steps p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 2px 0 0;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    word-break: break-word;
}

.contact-list .icon {
    color: var(--blue);
}

.contact-list a:hover {
    color: var(--blue);
}

.thanks-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 32px;
    border-radius: 50%;
    border: 1px solid var(--blue-line);
    background: var(--blue-soft);
    color: var(--blue);
}

.ref {
    color: var(--text);
    font-family: var(--mono);
}

/* Legal */

.legal h2 {
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    margin: 44px 0 12px;
}

.legal h2:first-child {
    margin-top: 0;
}

.legal p,
.legal li {
    color: var(--text-2);
}

.legal ul {
    padding-left: 1.2em;
    display: grid;
    gap: 8px;
}

/* ---------- Footer ---------- */

.site-footer {
    position: relative;
    overflow: hidden;
    padding-top: clamp(84px, 11vw, 150px);
    border-top: 1px solid var(--line);
}

.footer-cta h2 {
    font-size: clamp(2.8rem, 7.6vw, 7rem);
    line-height: 0.95;
    letter-spacing: -0.035em;
    max-width: 13ch;
    margin: 0;
}

.footer-cta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 36px;
    padding-bottom: clamp(56px, 8vw, 96px);
    border-bottom: 1px solid var(--line);
}

.footer-cta-row p {
    color: var(--text-2);
    max-width: 40ch;
    margin: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding: 56px 0 24px;
}

.footer-grid h3 {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 18px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.footer-grid a {
    color: var(--text-2);
    transition: color 0.2s;
}

.footer-grid a:hover {
    color: var(--blue);
}

.footer-brand p {
    color: var(--muted);
    max-width: 36ch;
    margin: 18px 0;
    font-size: 0.95rem;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.92rem;
}

.footer-contact li {
    color: var(--text-2);
    word-break: break-word;
}

.footer-wordmark {
    overflow: hidden;
    line-height: 0.76;
    margin-top: clamp(32px, 5vw, 64px);
    text-align: center;
    pointer-events: none;
    user-select: none;
}

.footer-wordmark span {
    display: inline-block;
    font-family: var(--display);
    font-weight: 800;
    font-size: 28vw;
    letter-spacing: -0.05em;
    background: linear-gradient(180deg, #2a2a2f 0%, rgba(42, 42, 47, 0.25) 70%, rgba(42, 42, 47, 0) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform: translateY(0.08em);
}

.footer-bottom {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding-top: 22px;
    padding-bottom: 30px;
    border-top: 1px solid var(--line);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    margin-left: 18px;
}

.footer-bottom a:hover {
    color: var(--text);
}

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid;
    line-height: 1.5;
}

.badge-blue {
    color: #9dd6ff;
    background: rgba(143, 208, 255, 0.1);
    border-color: rgba(143, 208, 255, 0.26);
}

.badge-green {
    color: #6ee7a0;
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.25);
}

.badge-amber {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
}

.badge-red {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.3);
}

.badge-violet {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.09);
    border-color: rgba(167, 139, 250, 0.28);
}

.badge-grey {
    color: #aaa9a3;
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line-2);
}

/* ---------- Client area ---------- */

.client-header {
    height: 66px;
    border-bottom: 1px solid var(--line);
    background: rgba(11, 11, 12, 0.9);
}

.client-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 4px;
    border: 1px solid var(--line-2);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.client-footer {
    border-top: 1px solid var(--line);
    padding: 24px 0 40px;
    color: var(--dim);
    font-size: 0.86rem;
}

.client-footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.client-footer p {
    margin: 0;
}

.client-footer a {
    color: var(--muted);
}

.portal {
    padding: clamp(32px, 5vw, 56px) 0 80px;
}

.portal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.portal-head h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 0;
}

.portal-head .eyebrow {
    margin-bottom: 14px;
}

.portal .alert {
    margin-bottom: 20px;
}

.portal-card {
    padding: clamp(20px, 3vw, 28px);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    margin-bottom: 18px;
}

.portal-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}

.portal-card h2 .icon {
    color: var(--blue);
}

.portal-message {
    color: var(--text-2);
    font-size: 1.04rem;
    margin: 24px 0 0;
}

.portal-status .btn {
    margin-top: 18px;
}

.portal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}

.stepper {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.stepper-step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.stepper-step i {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--line-2);
    background: var(--surface);
    color: var(--on-blue);
}

.stepper-step::before {
    content: '';
    position: absolute;
    top: 12px;
    right: 50%;
    left: -50%;
    height: 2px;
    background: var(--line-2);
}

.stepper-step:first-child::before {
    display: none;
}

.stepper-step.done i {
    background: var(--blue);
    border-color: var(--blue);
}

.stepper-step.done,
.stepper-step.current {
    color: var(--text);
}

.stepper-step.done::before,
.stepper-step.current::before {
    background: var(--blue);
}

.stepper-step.current i {
    border-color: var(--blue);
    box-shadow: 0 0 0 5px rgba(143, 208, 255, 0.16);
}

.stepper-step.current {
    font-weight: 600;
}

.stepper.mini .stepper-step {
    font-size: 0.72rem;
}

.portal-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.portal-card-head h2 {
    margin: 0;
}

.device-toggle {
    display: inline-flex;
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--input);
}

.device-toggle button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 30px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.device-toggle button.active {
    background: var(--surface-3);
    color: var(--text);
}

.preview-stage {
    display: flex;
    justify-content: center;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--input);
    overflow: hidden;
}

.preview-frame {
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: #fff;
    transition: width 0.35s ease;
}

.preview-frame iframe {
    display: block;
    width: 100%;
    height: min(680px, 70vh);
    border: 0;
    background: #fff;
}

.preview-stage[data-device='tablet'] .preview-frame {
    width: min(820px, 100%);
}

.preview-stage[data-device='mobile'] .preview-frame {
    width: min(390px, 100%);
}

.preview-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 14px 0 0;
}

.preview-foot .hint {
    margin: 0;
}

.decision > .muted {
    margin-top: -6px;
}

.decision-options {
    display: grid;
    gap: 8px;
}

.decision-option {
    border-radius: var(--radius);
    border: 1px solid var(--line-2);
    background: var(--surface-2);
    transition: border-color 0.2s;
}

.decision-option[open] {
    border-color: var(--blue-line);
}

.decision-option summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

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

.decision-option summary strong {
    display: block;
}

.decision-option summary em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.88rem;
}

.decision-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--surface-3);
    color: var(--muted);
    flex-shrink: 0;
}

.decision-option.approve .decision-icon {
    background: var(--blue-soft);
    color: var(--blue);
}

.decision-form {
    display: grid;
    gap: 16px;
    padding: 4px 18px 20px;
}

.decision-form legend {
    font-size: 0.98rem;
}

.decision-form .btn {
    justify-self: start;
}

.decision-form .hint {
    margin: -6px 0 0;
}

.message-form {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.feed {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: grid;
    gap: 8px;
}

.feed-item {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.feed-item.from-client {
    border-color: var(--blue-line);
    background: rgba(143, 208, 255, 0.05);
}

.feed-item.from-system {
    background: transparent;
    border-style: dashed;
}

.feed-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
}

.feed-meta time {
    margin-left: auto;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.74rem;
}

.feed-body {
    margin-top: 6px;
}

.feed-body p {
    color: var(--text-2);
    margin: 0 0 0.6em;
    font-size: 0.95rem;
}

.feed-body p:last-child {
    margin: 0;
}

.kv {
    margin: 0;
}

.kv div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line-2);
    font-size: 0.93rem;
}

.kv div:last-child {
    border-bottom: 0;
}

.kv dt {
    color: var(--muted);
}

.kv dd {
    margin: 0;
    text-align: right;
    font-weight: 500;
    word-break: break-word;
}

.kv + .prose {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.invoice-mini {
    list-style: none;
    padding: 0;
    margin: 0;
}

.invoice-mini a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.invoice-mini li:last-child a {
    border-bottom: 0;
}

.invoice-mini a:hover strong {
    color: var(--blue);
}

.invoice-mini span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.invoice-mini span:last-child {
    align-items: flex-end;
}

.invoice-mini em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.82rem;
}

/* ---------- Invoice (a light, printable document) ---------- */

.invoice-body main {
    padding: 32px 0 72px;
}

.invoice-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.invoice-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.invoice {
    position: relative;
    padding: clamp(24px, 5vw, 56px);
    border-radius: var(--radius);
    background: #fff;
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.55;
    box-shadow: var(--shadow);
}

.invoice h1,
.invoice h2 {
    color: #111827;
}

.invoice-head {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e5e7eb;
}

.invoice-brand {
    display: flex;
    gap: 14px;
}

.invoice-brand strong {
    display: block;
    font-size: 1.15rem;
    font-family: var(--display);
    letter-spacing: -0.02em;
}

.invoice-brand span,
.invoice-parties span {
    display: block;
    color: #4b5563;
    font-size: 0.88rem;
}

.pre {
    white-space: pre-line;
}

.invoice-title h1 {
    font-size: 2.2rem;
    letter-spacing: -0.04em;
    margin: 0 0 12px;
    text-align: right;
}

.invoice-title dl {
    margin: 0;
    display: grid;
    gap: 4px;
    min-width: 220px;
}

.invoice-title dl div {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.invoice-title dt {
    color: #6b7280;
}

.invoice-title dd {
    margin: 0;
    font-weight: 600;
}

.invoice-parties {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 28px 0 32px;
}

.invoice-parties h2,
.invoice-pay h2 {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 8px;
}

.invoice-parties p {
    margin: 0;
}

.invoice-items {
    width: 100%;
    border-collapse: collapse;
}

.invoice-items th {
    text-align: left;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 2px solid #111827;
    padding: 10px 8px;
}

.invoice-items td {
    padding: 14px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.invoice .num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.invoice-totals {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.invoice-totals dl {
    margin: 0;
    min-width: 280px;
}

.invoice-totals div {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 7px 8px;
    font-variant-numeric: tabular-nums;
}

.invoice-totals dt {
    color: #4b5563;
}

.invoice-totals dd {
    margin: 0;
}

.invoice-totals .grand {
    border-top: 2px solid #111827;
    margin-top: 6px;
    padding-top: 12px;
    font-size: 1.18rem;
    font-weight: 800;
}

.invoice-totals .grand dt {
    color: #111827;
}

.invoice-pay {
    margin-top: 32px;
    padding: 22px 24px;
    border-radius: var(--radius-sm);
    background: #f1f8fe;
    border: 1px solid #cfe6f8;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.invoice-pay h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0b5c94;
}

.invoice-pay dl {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 32px;
    margin: 6px 0 0;
}

.invoice-pay dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.invoice-pay dt {
    color: #4b5563;
}

.invoice-pay dd {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.invoice-pay .ref dd {
    color: #0b5c94;
}

.invoice-pay p {
    margin: 14px 0 0;
    color: #374151;
}

.invoice-thanks {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 28px 0 0;
    color: #15803d;
    font-weight: 600;
}

.invoice-notes {
    margin-top: 24px;
    color: #374151;
}

.invoice-foot {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.85rem;
}

.invoice-foot p {
    margin: 2px 0;
}

.invoice-stamp {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) rotate(-7deg);
    padding: 4px 16px;
    border: 3px solid;
    border-radius: 6px;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.85;
}

.stamp-paid {
    color: #16a34a;
}

.stamp-overdue {
    color: #dc2626;
}

.stamp-void,
.stamp-draft {
    color: #6b7280;
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.9s ease, transform 0.9s var(--ease);
}

.js .reveal.in {
    opacity: 1;
    transform: none;
}

/* If site.js never loads, show everything anyway. */
.js:not(.reveal-ready) .reveal {
    animation: reveal-fallback 0.01s 2.5s forwards;
}

@keyframes reveal-fallback {
    to {
        opacity: 1;
        transform: none;
    }
}

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

    .js .reveal,
    .hero-meta,
    .hero-foot,
    .hero .build {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }

    .hero-title .line > span {
        transform: none;
        animation: none;
    }

    .ticker-track,
    .pulse-dot::after,
    .mock-caret,
    .mock-cursor {
        animation: none;
    }

    .js .process-step:not(.active) {
        opacity: 1;
    }

    .tilt,
    .index-list a::before,
    .flip-media img {
        transition: none;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .steps,
    .card-grid.four {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps .step:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .steps .step:nth-child(n + 3) {
        border-top: 1px solid var(--line);
        margin-top: 8px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 960px) {
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 16px var(--gutter) 24px;
        background: rgba(11, 11, 12, 0.98);
        border-bottom: 1px solid var(--line);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    }

    .nav-open .main-nav {
        opacity: 1;
        transform: none;
        visibility: visible;
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav ul a {
        padding: 14px 4px;
        font-size: 1.3rem;
        font-family: var(--display);
        font-weight: 600;
        letter-spacing: -0.02em;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
    }

    .nav-cta {
        margin-top: 8px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .hero-foot,
    .page-hero-foot,
    .manifesto-grid,
    .process-grid,
    .takeover-grid,
    .work-row,
    .spec-layout,
    .faq-layout,
    .estimator,
    .form-layout,
    .portal-grid,
    .portal-showcase,
    .about-grid,
    .case-block {
        grid-template-columns: minmax(0, 1fr);
    }

    .process-sticky,
    .faq-aside,
    .estimate-card,
    .form-aside {
        position: static;
    }

    .process-nav {
        display: none;
    }

    .process-sticky .link-arrow {
        display: none;
    }

    .js .process-step:not(.active) {
        opacity: 1;
    }

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

    .service-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .index-list a {
        grid-template-columns: 44px minmax(0, 1fr) 30px;
        gap: 8px 16px;
    }

    .index-text {
        grid-column: 2;
        grid-row: 2;
    }

    .index-arrow {
        grid-column: 3;
        grid-row: 1;
    }

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

    .facts div:nth-child(3) {
        padding-left: 0;
        border-left: 0;
    }

    .facts div:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .case-block {
        gap: 12px;
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 64px;
    }

    .hide-sm {
        display: none;
    }

    .steps,
    .steps.three,
    .card-grid,
    .card-grid.four,
    .aftercare-grid,
    .gallery,
    .field-grid,
    .check-list.two-col,
    .invoice-parties,
    .invoice-pay dl,
    .takeover-features {
        grid-template-columns: minmax(0, 1fr);
    }

    .step,
    .step + .step {
        padding: 22px 0 6px;
        border-left: 0;
    }

    .step + .step {
        border-top: 1px solid var(--line);
    }

    .step h3 {
        margin-top: 18px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px 20px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .hero-cta .btn,
    .hero-actions .btn,
    .form-submit .btn {
        width: 100%;
    }

    .bp-label,
    .bp-dim span {
        display: none;
    }

    .build-grip {
        width: 38px;
        height: 38px;
    }

    .build-head .build-hint {
        display: none;
    }

    .process-visual {
        min-height: 0;
        padding: 16px;
    }

    .mock-build {
        grid-template-columns: 1fr;
    }

    .takeover-media {
        padding-right: 40px;
    }

    .takeover-stats div + div {
        padding-left: 12px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .faq summary {
        grid-template-columns: 32px minmax(0, 1fr) 30px;
        font-size: 1rem;
    }

    .faq-body p {
        padding: 0 0 22px 44px;
    }

    .stepper-step {
        font-size: 0.68rem;
    }

    .invoice-title h1 {
        text-align: left;
    }

    .invoice-items th:nth-child(2),
    .invoice-items td:nth-child(2),
    .invoice-items th:nth-child(3),
    .invoice-items td:nth-child(3) {
        display: none;
    }

    .footer-bottom a {
        margin: 0 18px 0 0;
    }
}

/* ---------- Print ---------- */

@media print {
    @page {
        margin: 14mm;
    }

    body {
        background: #fff !important;
        color: #111827;
    }

    .no-print,
    .client-header,
    .client-footer,
    .site-header,
    .site-footer {
        display: none !important;
    }

    .invoice-body main {
        padding: 0;
    }

    .invoice-page {
        max-width: none;
        padding: 0;
    }

    .invoice {
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }
}
