/* ==========================================================================
   AP Development: "Od koncepcji do kreacji"
   The page tells one story: things start as a blueprint (outline, grid,
   blueprint blue) and end as finished work (solid ink, real screenshots).
   ========================================================================== */

/* ---------- Fonts (self-hosted, GDPR compliant) ---------- */
@font-face {
    font-family: 'Inter Var';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(../fonts/inter-var-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter Var';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(../fonts/inter-var-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
    /* Color */
    --ink: #1a1a1a;          /* page */
    --surface: #222224;      /* raised: fields, dialogs */
    --surface-2: #29292c;    /* hover on raised */
    --line: #333336;         /* hairlines */
    --line-strong: #4a4a4f;  /* field borders */
    --paper: #f5f5f7;        /* primary text */
    --graphite: #a1a1a6;     /* secondary text (6.6:1 on ink) */
    --blueprint: #6b93ff;    /* the "concept" color (5.6:1 on ink) */
    --blueprint-wash: rgba(107, 147, 255, 0.12);
    --danger: #ff7a7a;
    --success: #7ee2a8;

    /* Type */
    --font: 'Inter Var', 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --fs-display: clamp(3.25rem, 11vw, 10rem);
    --fs-h2: clamp(2.5rem, 6vw, 5rem);
    --fs-statement: clamp(1.75rem, 4.2vw, 3.6rem);
    --fs-h3: clamp(1.375rem, 2vw, 1.75rem);
    --fs-lead: clamp(1.125rem, 1.6vw, 1.375rem);
    --fs-body: 1.0625rem;
    --fs-small: 0.875rem;

    /* Space & shape */
    --gutter: clamp(1rem, 4vw, 3rem);
    --wrap: 1240px;
    --section: clamp(6rem, 14vw, 11rem);
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 160ms;
    --t-med: 280ms;

    --nav-h: 72px;
    color-scheme: dark;
}

/* High-contrast preference from the a11y panel */
html.a11y-high-contrast {
    --graphite: #dcdce0;
    --line: #6a6a70;
    --line-strong: #8a8a90;
    --blueprint: #9db8ff;
}
html.a11y-high-contrast a { text-decoration: underline; }
html.a11y-large-text { font-size: 118.75%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--nav-h);
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: 1.6;
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--blueprint); color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--blueprint);
    outline-offset: 3px;
    border-radius: 4px;
}

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.i {
    width: 1.25em; height: 1.25em;
    fill: none; stroke: currentColor;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}

.wrap {
    width: min(var(--wrap), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.skip-link {
    position: fixed; top: 12px; left: 12px; z-index: 1000;
    padding: 12px 18px; border-radius: var(--r-sm);
    background: var(--paper); color: var(--ink); font-weight: 600; text-decoration: none;
    transform: translateY(-160%);
    transition: transform var(--t-med) var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Buttons ---------- */
.btn {
    --btn-h: 52px;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    min-height: var(--btn-h);
    padding: 0 1.6em;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 1rem; font-weight: 600; letter-spacing: -0.01em;
    text-decoration: none; white-space: nowrap;
    transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease;
    will-change: transform;
}
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--ghost { border-color: rgba(245, 245, 247, 0.28); color: var(--paper); background: transparent; }
.btn--ghost:hover { border-color: var(--paper); background: rgba(245, 245, 247, 0.06); }
.btn--small { --btn-h: 40px; padding: 0 1.1em; font-size: var(--fs-small); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.linklike {
    background: none; border: 0; padding: 0;
    color: inherit; font-size: inherit;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed; inset: 0 0 auto; z-index: 50;
    height: var(--nav-h);
    transition: background-color var(--t-med) ease, transform 420ms var(--ease-out), border-color var(--t-med) ease;
    border-bottom: 1px solid transparent;
}
.nav.is-solid {
    background: rgba(26, 26, 26, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
.nav.is-hidden:not(:focus-within) { transform: translateY(-100%); }

.nav__inner {
    height: 100%;
    display: flex; align-items: center; gap: 2rem;
}
.nav__logo { margin-right: auto; display: flex; align-items: center; min-height: 44px; }
.nav__logo img,
.footer__logo {
    height: 26px; width: auto;
    /* The logo file is dark; invert it for the dark page and rotate hue back so the globe stays blue */
    filter: invert(1) hue-rotate(180deg) brightness(1.15);
}
.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a:not(.btn) {
    font-size: var(--fs-small); font-weight: 500;
    color: var(--graphite); text-decoration: none;
    padding: 0.6rem 0;
    transition: color var(--t-fast) ease;
}
.nav__links a:not(.btn):hover { color: var(--paper); }

.lang { display: flex; gap: 2px; }
.lang__btn {
    min-width: 40px; min-height: 40px;
    background: none; border: 0; border-radius: 8px;
    font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
    color: var(--graphite);
    transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.lang__btn:hover { color: var(--paper); }
.lang__btn[aria-pressed="true"] { color: var(--paper); background: rgba(245, 245, 247, 0.08); }

.nav__toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 50%;
    color: var(--paper);
}
.nav__toggle .i { width: 24px; height: 24px; }

.mobile-menu {
    position: fixed; inset: 0; z-index: 45;
    padding: calc(var(--nav-h) + 2rem) var(--gutter) 2rem;
    background: var(--ink);
    display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu nav a {
    font-size: clamp(2.25rem, 10vw, 3.25rem); font-weight: 750; letter-spacing: -0.035em; line-height: 1.15;
    text-decoration: none; padding: 0.25rem 0;
}
.lang--mobile .lang__btn { min-width: 48px; min-height: 48px; font-size: 0.9375rem; }

@media (max-width: 899px) {
    .nav__links, .nav__inner > .lang { display: none; }
    .nav__toggle { display: inline-flex; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); position: relative; }

.section__head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section__title {
    font-size: var(--fs-h2); font-weight: 780; line-height: 1;
    letter-spacing: -0.04em;
    text-wrap: balance;
}
.section__lead {
    margin-top: 1.25rem;
    font-size: var(--fs-lead); line-height: 1.5; color: var(--graphite);
    max-width: 38em;
    text-wrap: pretty;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; }

.hero__stage {
    position: relative;
    padding-top: calc(var(--nav-h) + clamp(3rem, 10vh, 7rem));
    padding-bottom: 4rem;
}

/* Blueprint grid: the "concept" layer that dissolves as the headline gets inked */
.hero__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(107, 147, 255, 0.10) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(107, 147, 255, 0.10) 1px, transparent 1px),
        linear-gradient(to right, rgba(107, 147, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(107, 147, 255, 0.05) 1px, transparent 1px);
    background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
    background-position: -1px -1px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 35%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 30% 35%, #000 20%, transparent 75%);
    pointer-events: none;
}

.hero__copy { position: relative; z-index: 1; }

.hero__title {
    font-size: var(--fs-display);
    font-weight: 820;
    line-height: 0.9;
    letter-spacing: -0.055em;
    margin-left: -0.05em;
}
.hero__line { display: block; }
.hero__line + .hero__line { padding-left: 0.9em; }   /* the second line steps in, like a drafted indent */

.hero__meta {
    display: grid;
    gap: 1.25rem;
    max-width: 34rem;
    margin-top: clamp(2rem, 5vh, 3.5rem);
    margin-left: auto;
    margin-right: clamp(0rem, 6vw, 6rem);
}
.hero__sub { font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.015em; }
.hero__desc { color: var(--graphite); text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

/* Browser frame: the finished "creation" */
.hero__frame {
    position: relative; z-index: 2;
    width: min(var(--wrap), 100% - 2 * var(--gutter));
    margin: clamp(4rem, 10vh, 6rem) auto 0;
}
.frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: #0e0e0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
}
.frame__bar {
    position: relative; z-index: 2;
    display: flex; align-items: center; gap: 7px;
    height: 40px; padding: 0 16px;
    background: #202022;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.frame__bar > span { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3d; }
.frame__url {
    position: absolute; left: 50%; transform: translateX(-50%);
    padding: 3px 14px; border-radius: 7px;
    background: #2b2b2e; color: var(--graphite);
    font-size: 0.75rem; letter-spacing: 0.01em;
}
.frame__screen { aspect-ratio: 16 / 8; overflow: hidden; }

.hero__caption {
    margin-top: 1rem;
    font-size: var(--fs-small); color: var(--graphite);
}

/* --- Motion version: a sticky stage; the frame grows from below to fill the screen --- */
.motion .hero { height: 420vh; }
.motion .hero__stage {
    position: sticky; top: 0;
    height: 100vh; height: 100svh;
    overflow: hidden;
    padding-bottom: 0;
}
.motion .hero__frame {
    position: absolute; inset: 0;
    width: auto; margin: 0;
    transform-origin: 50% 0%;
    transform: translate3d(0, 86vh, 0) scale(0.72);
}
.motion .frame { height: 100%; display: flex; flex-direction: column; }
.motion .frame__screen { flex: 1; aspect-ratio: auto; min-height: 0; }
.motion .cl { clip-path: inset(0 100% 0 0); }
.motion .hero__caption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
    margin: 0;
    padding: 4rem var(--gutter) 1.75rem;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.85), transparent);
    color: var(--paper);
    font-size: var(--fs-lead); font-weight: 600; letter-spacing: -0.015em;
    opacity: 0;
}

/* The headline is drawn in outline first. The fill is painted over the stroke
   (paint-order) so a variable font's overlapping contours stay hidden. JS wraps
   each word in .w; its ::after holds a solid copy that is revealed via --ink. */
.motion .hero__title { --stroke: rgba(107, 147, 255, 0.95); }
.motion .hero__line {
    color: var(--ink);
    -webkit-text-stroke: 3px var(--stroke);
    paint-order: stroke fill;
}
.motion .hero__line .w {
    --ink: 100%;
    position: relative;
}
.motion .hero__line .w::after {
    content: attr(data-text);
    position: absolute;
    left: 0; top: 0;
    color: var(--paper);
    -webkit-text-stroke: 0;
    clip-path: inset(-0.2em var(--ink) -0.3em -0.1em);
    pointer-events: none;
}

/* --- Build: code editor + a page assembling from its wireframe (pure CSS, sharp at any size) --- */
.build {
    display: grid;
    grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
    background: #161618;
}
.build__code {
    background: #111113;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}
.build__tabs { display: flex; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.build__tabs span {
    padding: 0.55rem 1rem;
    font-size: 0.75rem; color: #7c7c83;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.build__tabs .is-active { color: var(--paper); background: #161618; box-shadow: inset 0 -2px 0 var(--blueprint); }
.build__code pre {
    margin: 0;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    font-size: clamp(0.6875rem, 1vw, 0.9375rem);
    line-height: 1.75;
    color: #c9c9ce;
    white-space: pre;
    counter-reset: ln;
}
.build__code code { font: inherit; }
.cl { display: block; }
.cl::before {
    counter-increment: ln; content: counter(ln);
    display: inline-block; width: 2.2em; margin-right: 0.9em;
    text-align: right; color: #4a4a50;
}
.build__code i { font-style: normal; }
.tk-t { color: #6b93ff; }
.tk-a { color: #c6a7ff; }
.tk-s { color: #9fe0b0; }
.tk-c { color: #6e6e75; }
.tk-k { color: #ffcf8a; }
.tk-n { color: #ffb3a1; }

.build__view {
    display: flex; flex-direction: column;
    gap: clamp(1rem, 3.5vh, 2.25rem);
    padding: clamp(1rem, 3vw, 2.5rem);
    overflow: hidden;
}
/* Each element is a dashed wireframe box; --b (0 → 1) fills it in */
.mk {
    --b: 1;
    --fill: var(--paper);
    position: relative;
    display: block;
    border: 1px dashed rgba(107, 147, 255, calc(0.6 * (1 - var(--b))));
    border-radius: 8px;
}
.mk::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: inherit;
    background: var(--fill);
    opacity: var(--b);
}
.motion .mk { --b: 0; }

.mk--nav {
    --fill: rgba(255, 255, 255, 0.025);
    display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem);
    height: 52px; padding: 0 1rem;
    border-radius: 12px;
}
.mk--nav > .mk { z-index: 1; }
.mk--logo { --fill: var(--blueprint); width: 28px; height: 28px; margin-right: auto; border-radius: 8px; }
.mk--link { --fill: #6a6a70; width: clamp(32px, 5vw, 64px); height: 8px; border-radius: 99px; }

.mk-hero {
    flex: 1; min-height: 0;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2.5rem);
    align-items: center;
}
.mk-hero__copy { display: grid; gap: clamp(0.6rem, 1.6vh, 1rem); }
.mk--h1 { height: clamp(18px, 4.5vh, 44px); width: 94%; border-radius: 8px; }
.mk--p { --fill: #5c5c62; height: 10px; width: 88%; border-radius: 99px; margin-top: 0.4rem; }
.mk--short { width: 62%; }
.mk--p.mk--short { margin-top: 0; }
.mk--btn { --fill: var(--blueprint); width: clamp(90px, 10vw, 140px); height: clamp(30px, 5vh, 44px); border-radius: 99px; margin-top: 0.6rem; }
.mk--img {
    --fill:
        radial-gradient(circle at 28% 30%, rgba(157, 184, 255, 0.95), transparent 42%),
        radial-gradient(circle at 74% 72%, rgba(198, 167, 255, 0.85), transparent 40%),
        radial-gradient(circle at 80% 18%, rgba(255, 207, 138, 0.55), transparent 30%),
        linear-gradient(135deg, #2a3768, #1b1d2b);
    height: 100%; min-height: 120px; max-height: 46vh;
    border-radius: 16px;
}
.mk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.75rem, 2vw, 1.25rem); }
.mk--card { --fill: #26262a; height: clamp(56px, 13vh, 120px); border-radius: 14px; }

/* Masks used for "rise from a slot" text entrances */
.wm {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding: 0.04em 0.06em 0.14em;
    margin: -0.04em -0.06em -0.14em;
}
.wm > .w { display: inline-block; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.statement {
    font-size: var(--fs-statement);
    font-weight: 650;
    line-height: 1.14;
    letter-spacing: -0.03em;
    max-width: 20em;
    text-wrap: pretty;
}

.about__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2.5rem, 7vw, 7rem);
    align-items: end;
    margin-top: clamp(4rem, 9vw, 8rem);
}

.about__portrait {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    aspect-ratio: 4 / 5;
    background: var(--surface);
}
.about__portrait picture { height: 100%; }
.about__portrait img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 30%;
}
.motion .about__portrait img { transform: scale(1.18); will-change: transform; }

.about__text { display: grid; gap: 1.25rem; max-width: 34rem; color: var(--graphite); }
.about__name {
    font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.02em; color: var(--paper);
}
.about__role {
    margin-top: -0.75rem;
    display: flex; align-items: center; min-height: 1.6em;
    color: var(--blueprint); font-weight: 500;
}
.caret {
    display: inline-block; width: 2px; height: 1.1em; margin-left: 3px;
    background: var(--blueprint);
    animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.stats {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1rem; padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column-reverse; gap: 0.25rem; }
.stat__num {
    font-size: clamp(2.75rem, 5vw, 4rem); font-weight: 780; line-height: 1;
    letter-spacing: -0.045em; color: var(--paper);
    font-variant-numeric: tabular-nums;
}
.stat__label { font-size: var(--fs-small); }

/* ==========================================================================
   COREPLAN: my own product. The one place on the page that leaves the
   blueprint blue for the product's own warm gold, so it reads as "mine".
   ========================================================================== */
.cp {
    --cp-gold: #d4a86a;
    --cp-gold-hi: #e2c08f;
    --cp-ink: #1c1408;
    background:
        radial-gradient(ellipse 70% 45% at 70% 0%, rgba(212, 168, 106, 0.10), transparent 70%),
        #141619;
    border-block: 1px solid rgba(212, 168, 106, 0.16);
    overflow: hidden;
}
html.a11y-high-contrast .cp { --cp-gold: #ecc78f; }

.cp__head {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: end;
}

.cp__eyebrow {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 6px 14px 6px 8px;
    border: 1px solid rgba(212, 168, 106, 0.4);
    border-radius: 999px;
    background: rgba(212, 168, 106, 0.08);
    color: var(--cp-gold);
    font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.01em;
}
.cp__eyebrow img { width: 22px; height: 22px; }

.cp__title {
    margin-top: 1.5rem;
    font-size: clamp(3.75rem, 12vw, 10rem);
    font-weight: 820; letter-spacing: -0.055em; line-height: 0.9;
    margin-left: -0.05em;
}
.cp__lead {
    margin-top: 1.75rem;
    max-width: 34em;
    font-size: var(--fs-lead); line-height: 1.5; color: var(--graphite);
    text-wrap: pretty;
}

.cp__aside { display: grid; gap: 2rem; }
.cp__facts {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212, 168, 106, 0.25);
}
.cp__facts > div { display: flex; flex-direction: column-reverse; gap: 0.2rem; }
.cp__facts dt { font-size: 0.8125rem; color: var(--graphite); }
.cp__facts dd {
    font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 720; letter-spacing: -0.03em; line-height: 1.15;
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cp__beta {
    display: inline-block; vertical-align: 0.25em;
    margin-left: 0.25em; padding: 1px 7px; border-radius: 999px;
    background: var(--cp-gold); color: var(--cp-ink);
    font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}

.cp__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cp__btn { background: var(--cp-gold); color: var(--cp-ink); }
.cp__btn:hover { background: var(--cp-gold-hi); }
.cp__btn .i { width: 1em; height: 1em; stroke-width: 2; }
.cp .btn:focus-visible, .cp a:focus-visible { outline-color: var(--cp-gold); }

/* Stage: the desktop app in a browser frame, the phone version leaning in front of it */
.cp__stage {
    position: relative;
    margin-top: clamp(3.5rem, 8vw, 6.5rem);
    padding-right: clamp(1.5rem, 7vw, 6rem);
}
.cp__stage::before {
    content: '';
    position: absolute; inset: 10% 5% -10%;
    background: radial-gradient(ellipse at center, rgba(212, 168, 106, 0.18), transparent 65%);
    filter: blur(40px);
    pointer-events: none;
}
.cp__frame { border-color: rgba(212, 168, 106, 0.18); }
.cp__frame picture, .cp__frame img { width: 100%; }

.cp__phone {
    position: absolute; right: 0; bottom: clamp(-3rem, -4vw, -1.5rem);
    width: clamp(120px, 21%, 250px);
    aspect-ratio: 780 / 1320;
    padding: clamp(4px, 0.6vw, 8px);
    border-radius: clamp(18px, 2.6vw, 36px);
    background: #0b0c0e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.cp__phone picture, .cp__phone img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: top;
    border-radius: clamp(14px, 2vw, 28px);
}

.cp__caption {
    margin-top: clamp(1.25rem, 3vw, 2rem);
    max-width: calc(100% - clamp(120px, 21%, 250px));
    font-size: var(--fs-small); color: var(--graphite);
}

/* What it does: five steps of one job, from quote to invoice */
.cp__features {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(1.5rem, 2.5vw, 2.5rem);
    margin-top: clamp(4rem, 9vw, 7rem);
}
.cp__feature {
    position: relative;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.cp__feature::before {
    content: '';
    position: absolute; top: -1px; left: 0;
    width: 2.5rem; height: 1px;
    background: var(--cp-gold);
    transition: width 600ms var(--ease-out);
}
.cp__feature:hover::before { width: 100%; }
.cp__num {
    display: block;
    font-size: var(--fs-small); font-weight: 600; color: var(--cp-gold);
    font-variant-numeric: tabular-nums;
}
.cp__feature h3 {
    margin-top: 0.9rem;
    font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25;
}
.cp__feature p { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--graphite); text-wrap: pretty; }

.nav__links a.nav__cp { display: inline-flex; align-items: center; gap: 0.45rem; }
.nav__links a.nav__cp::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: #d4a86a;
    box-shadow: 0 0 0 3px rgba(212, 168, 106, 0.18);
}

@media (max-width: 1023px) {
    .cp__head { grid-template-columns: 1fr; align-items: start; }
    .cp__aside { max-width: 34rem; }
    .cp__features { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.5rem; }
}
@media (max-width: 767px) {
    .cp__features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cp__stage { padding-right: 2.5rem; }
    .cp__phone { width: 31%; bottom: -2rem; }
    .cp__caption { max-width: 62%; }
    .cp__frame .frame__bar { height: 28px; }
    .cp__frame .frame__url { display: none; }
}
@media (max-width: 479px) {
    .cp__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; }
    .cp__features { grid-template-columns: 1fr; row-gap: 2rem; }
    .cp__actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   PROCESS: a build log; steps tick off as the page scrolls
   ========================================================================== */
.process__inner {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}
.process__head { margin-bottom: 0; }

.term {
    overflow: hidden;
    border-radius: var(--r-lg);
    background: #111113;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9);
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}
.term__bar {
    position: relative;
    display: flex; align-items: center; gap: 7px;
    height: 40px; padding: 0 16px;
    background: #1c1c1e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.term__bar > span { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3d; }
.term__title {
    position: absolute; left: 50%; transform: translateX(-50%);
    font-size: 0.75rem; color: #7c7c83; white-space: nowrap;
}
.term__body {
    padding: clamp(1.25rem, 3vw, 2rem);
    font-size: clamp(0.8125rem, 1.15vw, 1rem);
    line-height: 1.7;
}
.term__cmd { color: var(--paper); white-space: nowrap; overflow: hidden; }
.term__prompt { color: var(--blueprint); }
.term__typed { display: inline-block; vertical-align: bottom; }
.term__caret {
    display: inline-block; width: 0.6em; height: 1.15em; margin-left: 2px; vertical-align: text-bottom;
    background: var(--paper);
    animation: caret 1.05s steps(1) infinite;
}

.term__steps { display: grid; gap: 0.55rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.term__step {
    display: grid;
    grid-template-columns: 1.6em minmax(0, 1fr) auto;
    gap: 0.5rem;
    color: var(--graphite);
    transition: opacity var(--t-med) ease, color var(--t-med) ease;
}
.term__step strong { color: var(--paper); font-weight: 600; }
.term__step strong::after { content: ':'; }
.term__mark::before { content: '✓'; color: var(--success); }
.term__time { color: #6e6e75; font-size: 0.875em; }

/* Pending / running states only exist when motion drives them */
.motion .term__step:not(.is-done) { opacity: 0.38; }
.motion .term__step:not(.is-done) .term__mark::before { content: '○'; color: #6e6e75; }
.motion .term__step.is-running { opacity: 1; }
.motion .term__step.is-running .term__mark::before { content: '›'; color: var(--blueprint); }
.motion .term__step:not(.is-done) .term__time { visibility: hidden; }

.term__progress { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.term__bar-track { flex: 1; height: 6px; border-radius: 99px; background: #26262a; overflow: hidden; }
.term__bar-fill { height: 100%; width: 100%; border-radius: inherit; background: var(--blueprint); transform-origin: left; }
.term__pct { min-width: 4ch; text-align: right; color: var(--paper); font-variant-numeric: tabular-nums; }

.term__done { margin-top: 1rem; color: var(--success); }
.motion .term__done { opacity: 0; }

/* Pinned on wide screens with motion (class set by JS) */
.process.is-pinned { padding-block: 0; }
.process.is-pinned .process__pin {
    height: 100vh; height: 100svh;
    display: flex; align-items: center;
    padding-top: var(--nav-h);
}

/* ==========================================================================
   SERVICES: a spec sheet, one sheet of cells separated by hairlines
   ========================================================================== */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.service {
    --mx: 50%; --my: 50%;
    position: relative;
    display: flex; flex-direction: column;
    min-height: 340px;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    background: var(--ink);
    transition: background-color var(--t-med) ease;
    isolation: isolate;
}
/* Pointer-following light, only visible while hovering */
.service::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(107, 147, 255, 0.14), transparent 60%);
    opacity: 0;
    transition: opacity var(--t-med) ease;
}
.service:hover { background: #1d1d1f; }
.service:hover::before { opacity: 1; }

.service__icon {
    width: 32px; height: 32px;
    color: var(--graphite);
    stroke-width: 1.4;
    margin-bottom: 2.5rem;
    transition: color var(--t-med) ease;
}
.service:hover .service__icon { color: var(--blueprint); }

.service__title { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.service__desc { margin-top: 0.75rem; color: var(--graphite); max-width: 30ch; }
.service__price {
    margin-top: auto; padding-top: 2rem;
    font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 750; letter-spacing: -0.035em; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.service__link {
    margin-top: 1rem;
    align-self: flex-start;
    font-size: var(--fs-small); font-weight: 600;
    color: var(--blueprint);
    text-decoration: none;
}
/* The whole cell is the hit area */
.service__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.service__link:hover { text-decoration: underline; }
.service__link:focus-visible { outline: none; }
.service:has(.service__link:focus-visible) { outline: 2px solid var(--blueprint); outline-offset: -2px; }

.services__notice {
    margin-top: 2rem;
    font-size: var(--fs-small); color: var(--graphite);
    max-width: 60em;
}

/* ==========================================================================
   TECH STACK
   ========================================================================== */
.stack {
    overflow: hidden;
    padding-block: clamp(2rem, 5vw, 3.5rem);
    border-block: 1px solid var(--line);
}
.stack__track {
    display: flex; align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    width: max-content;
    padding-inline: var(--gutter);
    font-size: clamp(2.25rem, 6.5vw, 5.5rem);
    font-weight: 760; letter-spacing: -0.045em; line-height: 1;
    color: var(--graphite);
    white-space: nowrap;
}
.stack__track li { display: flex; align-items: center; gap: clamp(2rem, 5vw, 4.5rem); }
/* Registration marks between items, borrowed from print/blueprint drawings */
.stack__track li + li::before {
    content: '';
    width: 0.32em; height: 0.32em;
    background:
        linear-gradient(var(--blueprint), var(--blueprint)) center / 100% 2px no-repeat,
        linear-gradient(var(--blueprint), var(--blueprint)) center / 2px 100% no-repeat;
    flex-shrink: 0;
}

/* ==========================================================================
   PORTFOLIO
   ========================================================================== */
.work__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.work__track {
    width: min(var(--wrap), 100% - 2 * var(--gutter));
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}

.project__link { display: block; text-decoration: none; }
.project__media {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-md);
    aspect-ratio: 16 / 10;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.project__media picture { height: 100%; }
.project__media img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
    transition: transform 900ms var(--ease-out);
}
.project__link:hover .project__media img { transform: scale(1.035); }

.project__badge {
    /* top-right: screenshots usually carry the product's logo top-left */
    position: absolute; top: 14px; right: 14px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(26, 26, 26, 0.78);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid rgba(107, 147, 255, 0.5);
    color: var(--paper);
    font-size: 0.8125rem; font-weight: 600;
}

.project__body { padding-top: 1.5rem; display: grid; gap: 0.6rem; }
.project__title { font-size: var(--fs-h3); font-weight: 720; letter-spacing: -0.025em; line-height: 1.2; }
.project__desc { color: var(--graphite); max-width: 42ch; }
.project__cta {
    display: inline-flex; align-items: center; gap: 0.45em;
    margin-top: 0.25rem;
    font-size: var(--fs-small); font-weight: 600; color: var(--blueprint);
}
.project__cta .i { width: 1em; height: 1em; transition: transform var(--t-med) var(--ease-out); }
.project__link:hover .project__cta { text-decoration: underline; text-underline-offset: 0.2em; }
.project__link:hover .project__cta .i { transform: translate(2px, -2px); }
.project__link:focus-visible { outline: none; }
.project__link:focus-visible .project__media { outline: 2px solid var(--blueprint); outline-offset: 4px; }

/* Wide screens with motion: a pinned horizontal reel (class set by JS) */
.work.is-reel { padding-bottom: 0; }
.work.is-reel .work__pin {
    height: 100vh; height: 100svh;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: var(--nav-h);
}
.work.is-reel .work__pin { justify-content: flex-start; padding-bottom: 2.5rem; }
.work.is-reel .work__head { margin-top: clamp(1.5rem, 5vh, 3.5rem); margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }
.work.is-reel .section__title { font-size: clamp(2.25rem, 4.5vw, 4rem); }
.work.is-reel .section__lead { margin-top: 0.75rem; }
/* The reel takes whatever height is left; the image flexes, the text never gets cut */
.work.is-reel .work__viewport { flex: 1; min-height: 0; overflow: hidden; }
.work.is-reel .work__track {
    display: flex;
    height: 100%;
    width: max-content;
    gap: clamp(2rem, 4vw, 4rem);
    padding-left: max(var(--gutter), (100vw - var(--wrap)) / 2);
    padding-right: var(--gutter);
    margin: 0;
}
.work.is-reel .project { width: min(52vw, 760px); height: 100%; flex-shrink: 0; }
.work.is-reel .project__link { display: flex; flex-direction: column; height: 100%; }
.work.is-reel .project__media { flex: 1 1 auto; min-height: 140px; aspect-ratio: auto; }
.work.is-reel .project__body { flex: 0 0 auto; padding-top: 1.25rem; }
.work.is-reel .project__desc { max-width: 52ch; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact__title {
    font-size: clamp(2.75rem, 7.5vw, 7rem);
    font-weight: 800; line-height: 0.95; letter-spacing: -0.05em;
    max-width: 12em;
    text-wrap: balance;
}

.contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(3rem, 7vw, 7rem);
    margin-top: clamp(3.5rem, 7vw, 6rem);
    align-items: start;
}

.contact__lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--graphite); max-width: 24em; }

.contact__list { display: grid; gap: 1.75rem; margin-top: 2.5rem; }
.contact__list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact__list .i { width: 22px; height: 22px; margin-top: 2px; color: var(--blueprint); }
.contact__list h3 { font-size: var(--fs-small); font-weight: 500; color: var(--graphite); }
.contact__list a, .contact__list p { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { text-decoration: underline; }

/* Form */
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field { display: grid; gap: 0.5rem; }
.field label { font-size: var(--fs-small); font-weight: 500; color: var(--graphite); }
.field input:not([type="checkbox"]),
.field select,
.field textarea {
    width: 100%;
    min-height: 52px;
    padding: 0.8rem 1rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.field textarea { resize: vertical; min-height: 148px; line-height: 1.5; }
.field select {
    appearance: none;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
}
.field select option { background: var(--surface); color: var(--paper); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #5c5c62; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
    outline: none;
    border-color: var(--blueprint);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px rgba(107, 147, 255, 0.28);
}
.field [aria-invalid="true"] { border-color: var(--danger) !important; }

.field--check {
    grid-template-columns: auto 1fr; align-items: start; gap: 0.85rem;
    margin-block: 0.25rem 0.5rem;
}
.field--check input {
    width: 22px; height: 22px; margin: 1px 0 0;
    accent-color: var(--blueprint);
}
.field--check label { line-height: 1.5; }
.field--check a { color: var(--paper); }

.form__status { min-height: 1.5em; font-size: 0.9375rem; font-weight: 500; }
.form__status:empty { display: none; }
.form__legal { font-size: 0.8125rem; color: var(--graphite); }
/* Badge replaced by the required text notice under the form */
.grecaptcha-badge { visibility: hidden; }
.form__status.is-success { color: var(--success); }
.form__status.is-error { color: var(--danger); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.footer__inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1.25rem 2rem;
    font-size: var(--fs-small); color: var(--graphite);
}
.footer__logo { height: 22px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__links a, .footer__links .linklike { text-decoration: none; padding: 0.5rem 0; }
.footer__links a:hover, .footer__links .linklike:hover { color: var(--paper); text-decoration: underline; }

/* ==========================================================================
   COOKIE BANNER, DIALOGS, A11Y
   ========================================================================== */
.cookie {
    position: fixed; left: 20px; bottom: 20px; z-index: 60;
    width: min(420px, calc(100% - 40px));
    padding: 1.25rem;
    background: rgba(34, 34, 36, 0.92);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
    font-size: 0.9375rem;
    animation: rise 420ms var(--ease-out);
}
.cookie[hidden] { display: none; }
.cookie__actions { display: flex; gap: 0.5rem; margin-top: 1rem; justify-content: flex-end; flex-wrap: wrap; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.dialog {
    width: min(480px, calc(100% - 2rem));
    padding: 2rem;
    background: var(--surface);
    color: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
}
.dialog[open] { animation: pop 320ms var(--ease-out); }
.dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }

.dialog h2 { font-size: 1.5rem; font-weight: 720; letter-spacing: -0.025em; padding-right: 3rem; }
.dialog__lead { margin-top: 0.75rem; color: var(--graphite); font-size: 0.9375rem; }
.dialog__close {
    position: absolute; top: 1rem; right: 1rem;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 50%;
    color: var(--graphite);
}
.dialog__close:hover { color: var(--paper); background: rgba(255, 255, 255, 0.06); }
.dialog > .btn { margin-top: 1.75rem; }

.toggle-row {
    display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
    padding-block: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.toggle-row:first-of-type { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.toggle-row h3 { font-size: 1rem; font-weight: 600; }
.toggle-row p { margin-top: 0.25rem; font-size: var(--fs-small); color: var(--graphite); }

.switch {
    appearance: none;
    position: relative; flex-shrink: 0;
    width: 48px; height: 28px; margin: 0;
    border-radius: 999px;
    background: var(--line-strong);
    transition: background-color var(--t-med) ease;
    cursor: pointer;
}
.switch::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--paper);
    transition: transform var(--t-med) var(--ease-out);
}
.switch:checked { background: var(--blueprint); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: 0.55; cursor: not-allowed; }

.a11y-btn {
    position: fixed; right: 20px; bottom: 20px; z-index: 55;
    width: 52px; height: 52px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--paper);
    transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.a11y-btn:hover { background: var(--surface-2); border-color: var(--blueprint); }
.a11y-btn .i { width: 24px; height: 24px; }

.a11y-options { display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.a11y-option {
    display: flex; align-items: center; gap: 0.85rem;
    min-height: 56px; padding: 0 1.1rem;
    background: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    font-weight: 600; text-align: left;
    transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.a11y-option:hover { border-color: var(--graphite); }
.a11y-option[aria-pressed="true"] { border-color: var(--blueprint); background: var(--blueprint-wash); }
.a11y-option[aria-pressed="true"]::after {
    content: ''; margin-left: auto;
    width: 10px; height: 10px; border-radius: 50%; background: var(--blueprint);
}

/* ==========================================================================
   LEGAL PAGES (imprint.php, privacy.php)
   ========================================================================== */
.nav__back { display: inline-flex; align-items: center; gap: 0.5em; }
.nav__back .i { width: 1em; height: 1em; }

.legal {
    padding-top: calc(var(--nav-h) + clamp(3rem, 9vw, 7rem));
    padding-bottom: var(--section);
    min-height: 80vh;
}
.legal__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
}
.legal__grid.has-toc { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); }

.legal__title {
    font-size: clamp(2.5rem, 6.5vw, 5.5rem);
    font-weight: 800; line-height: 0.95; letter-spacing: -0.05em;
    /* German compounds (Datenschutzerklärung) must break inside the text column */
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
    margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
    text-wrap: balance;
    animation: legal-rise 900ms var(--ease-out) both;
}
@keyframes legal-rise { from { opacity: 0; transform: translateY(24px); } }

/* Contents list: the policy is a numbered document, so its sections are listed in order */
.legal__toc { position: sticky; top: calc(var(--nav-h) + 2rem); align-self: start; }
.legal__toc[hidden] { display: none; }
.legal__toc-title { font-size: var(--fs-small); font-weight: 600; color: var(--paper); margin-bottom: 0.85rem; }
.legal__toc ol { display: grid; gap: 0.25rem; padding: 0; margin: 0; list-style: none; border-left: 1px solid var(--line); }
.legal__toc a {
    display: block;
    padding: 0.45rem 0 0.45rem 1rem; margin-left: -1px;
    border-left: 1px solid transparent;
    font-size: var(--fs-small); color: var(--graphite); text-decoration: none;
    transition: color var(--t-fast) ease, border-color var(--t-fast) ease;
}
.legal__toc a:hover { color: var(--paper); }
.legal__toc a[aria-current="true"] { color: var(--paper); border-left-color: var(--blueprint); }

.legal__body { max-width: 44rem; color: var(--graphite); }
.legal__body h2 {
    margin-top: clamp(2.75rem, 5vw, 3.5rem);
    font-size: var(--fs-h3); font-weight: 720; letter-spacing: -0.025em; line-height: 1.25;
    color: var(--paper);
    scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body h3 { margin-top: 1.75rem; font-size: 1.125rem; font-weight: 650; color: var(--paper); }
.legal__body p { margin-top: 0.85rem; line-height: 1.7; }
.legal__body strong { color: var(--paper); font-weight: 600; }
.legal__body a { color: var(--blueprint); }
.legal__body a:hover { text-decoration-thickness: 2px; }
.legal__note {
    margin-top: 1.5rem !important;
    padding: 1rem 1.25rem;
    border-left: 2px solid var(--blueprint);
    background: var(--blueprint-wash);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--paper);
}

@media (max-width: 899px) {
    /* On narrow screens the title leads; the contents list would only push it down */
    .legal__grid.has-toc { grid-template-columns: minmax(0, 1fr); }
    .legal__toc { display: none; }
}
@media (max-width: 899px) {
    .nav__inner > .lang--legal { display: flex; }
}
@media (max-width: 479px) {
    .nav__back span { display: none; }
    .nav__back { width: 44px; padding: 0; }
}

/* Page transition: fade out before leaving for another page */
body { transition: opacity 260ms ease; }
body.is-leaving { opacity: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1023px) {
    .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
    .process__inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
    .hero__line + .hero__line { padding-left: 0.5em; }
    .hero__meta { margin-left: 0; margin-right: 0; }
    .hero__actions .btn { flex: 1 1 auto; }
    .motion .hero { height: 340vh; }
    .build { grid-template-columns: minmax(0, 1fr); }
    .build__code { display: none; }
    .frame__screen { aspect-ratio: auto; }
    .build__view .mk-hero { flex: none; }
    .mk-hero { grid-template-columns: minmax(0, 1fr); align-content: start; }
    .mk--img { height: clamp(140px, 24vh, 220px); min-height: 0; }
    .mk--link:nth-child(n+3) { display: none; }
    .term__time { display: none; }
    .term__step { grid-template-columns: 1.6em minmax(0, 1fr); }
    .term__flag { display: none; }
    .motion .hero__frame { transform: translate3d(0, 94vh, 0) scale(0.9); }
    .motion .hero__caption { font-size: 1rem; padding-bottom: 1.25rem; }
    .frame__bar { height: 32px; }
    .frame__url { display: none; }

    .about__grid { grid-template-columns: 1fr; }
    .about__portrait { max-width: 420px; aspect-ratio: 1; }

    .services__grid { grid-template-columns: 1fr; }
    .service { min-height: 0; }
    .service__icon { margin-bottom: 1.5rem; }

    .work__track { grid-template-columns: 1fr; }

    .contact__grid { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }

    .footer__inner { flex-direction: column; align-items: flex-start; }

    .cookie { left: 12px; bottom: 12px; width: calc(100% - 24px - 64px); }
    .a11y-btn { right: 12px; bottom: 12px; }
}

@media (max-width: 420px) {
    .cookie { width: calc(100% - 24px); bottom: 76px; }
}

/* ==========================================================================
   REDUCED MOTION (system setting or a11y panel)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
html.a11y-no-animations *,
html.a11y-no-animations *::before,
html.a11y-no-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}
