﻿/* =========================================================================
   VorminStijl: built on the pixel grid
   The logo is a 37x7 pixel grid. Everything follows an 8px module.
   --accent / --on-accent are set per request on <html> (random each visit).
   ========================================================================= */

@font-face {
    font-family: "Space Grotesk";
    src: url("/fonts/space-grotesk-var.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: "Instrument Sans";
    src: url("/fonts/instrument-sans-var.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --ink: #000;
    --paper: #fff;
    --surface: #f2f2f2;
    --line: #d6d6d6;
    --muted: #595959;
    --muted-dark: #a6a6a6;
    --error: #c4001a;
    --accent: #2b50ff;
    --on-accent: #fff;

    --display: "Space Grotesk", "Arial", system-ui, sans-serif;
    --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    --u: 8px;
    --gutter: clamp(16px, 4vw, 48px);
    --max: 1360px;
    --header-h: 72px;
    --section-y: clamp(72px, 10vw, 144px);

    --step--1: 0.875rem;
    --step-0: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
    --step-1: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
    --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
    --step-3: clamp(1.875rem, 1.3rem + 2.6vw, 3.5rem);
    --step-4: clamp(2rem, 1.3rem + 3.4vw, 4.25rem);
    --display-leading: 1.1;

    color-scheme: light;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: var(--step-0);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0;
    overflow-wrap: break-word;
    hyphens: auto;
    text-wrap: balance;
}

h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }

p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    box-shadow: 0 0 0 7px var(--accent);
}

.section--dark :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible,
.page-hero--dark :focus-visible,
.project-hero :focus-visible,
.nav.is-open :focus-visible,
.lightbox :focus-visible {
    outline-color: var(--paper);
}

main:focus { outline: none; }

.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 100;
    background: var(--accent);
    color: var(--on-accent);
    padding: 12px 16px;
    font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Text for screen readers and search engines only */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.plain-list { list-style: none; margin: 0; padding: 0; }

.text-link {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
}
.text-link:hover { text-decoration-color: currentColor; }

/* Square bullets: the pixel as list marker */
.square-list { list-style: none; padding: 0; margin: 0 0 1.5em; }
.square-list li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.square-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 10px;
    height: 10px;
    background: currentColor;
}

.pixel-logo { fill: currentColor; shape-rendering: crispEdges; overflow: visible; }

/* ---------- Buttons ---------- */

.button {
    --shadow: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 24px;
    border: 2px solid currentColor;
    background: transparent;
    color: inherit;
    font: 600 1rem/1.2 var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translate(-4px, -4px); box-shadow: 4px 4px 0 var(--shadow); }
.button:active { transform: none; box-shadow: none; }

.button--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); --shadow: var(--paper); }
.button--ghost { --shadow: currentColor; }

.hero .button, .section--dark .button, .site-footer .button, .page-hero--dark .button { --shadow: var(--paper); }
.hero .button--accent, .section--dark .button--accent, .site-footer .button--accent, .page-hero--dark .button--accent { --shadow: var(--paper); }
.button--ink { --shadow: var(--accent); }
.apps .button--ink, .section--accent .button--ink { --shadow: var(--paper); }

.button-row { display: flex; flex-wrap: wrap; gap: 16px; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: var(--step--1);
    font-weight: 600;
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-h);
    background: var(--paper);
    color: var(--ink);
    border-bottom: 2px solid var(--ink);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.is-home .site-header:not(.is-scrolled) {
    background: transparent;
    color: var(--paper);
    border-bottom-color: transparent;
}

.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand { display: block; padding: 8px 0; margin-right: auto; }
.brand .pixel-logo { height: clamp(22px, 1.6vw + 14px, 28px); width: auto; }

.nav__list {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__list a {
    position: relative;
    display: block;
    padding: 8px 0;
    font-weight: 600;
    text-decoration: none;
}

.nav__list a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}
.nav__list a:hover::after,
.nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.nav__toggle { display: none; }

/* Accent swap: two diagonal accent pixels that re-roll the accent colour */
.accent-swap {
    display: grid;
    grid-template-columns: repeat(2, 10px);
    grid-template-rows: repeat(2, 10px);
    padding: 12px;
    margin-right: -12px;
    background: none;
    border: 0;
    cursor: pointer;
}
.accent-swap span {
    background: var(--accent);
    transition: transform 0.3s cubic-bezier(.2, .9, .3, 1.4);
}
.accent-swap span:first-child { grid-area: 1 / 1; }
.accent-swap span:last-child { grid-area: 2 / 2; }
.accent-swap:hover span:first-child { transform: translateX(10px); }
.accent-swap:hover span:last-child { transform: translateX(-10px); }

@media (max-width: 819px) {
    .nav { order: 2; }
    .accent-swap { order: 1; margin-right: 0; }

    .nav__toggle {
        position: relative;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        gap: 12px;
        min-height: 44px;
        padding: 8px 0 8px 8px;
        background: none;
        border: 0;
        color: inherit;
        font: 600 1rem var(--text);
        cursor: pointer;
    }

    .nav__toggle-icon { display: grid; gap: 6px; width: 24px; }
    .nav__toggle-icon i { display: block; height: 3px; background: currentColor; transition: transform 0.25s ease; }
    .nav.is-open .nav__toggle { color: var(--paper); }
    .nav.is-open .nav__toggle-icon i:first-child { transform: translateY(4.5px) rotate(45deg); }
    .nav.is-open .nav__toggle-icon i:last-child { transform: translateY(-4.5px) rotate(-45deg); }

    .nav__list {
        position: fixed;
        inset: 0;
        z-index: 1;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: var(--header-h) var(--gutter) 48px;
        background: var(--ink);
        color: var(--paper);
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    }
    .nav.is-open .nav__list { visibility: visible; opacity: 1; transition: opacity 0.25s ease; }

    .nav__list a {
        font-family: var(--display);
        font-size: clamp(2rem, 10vw, 3.5rem);
        font-weight: 600;
        letter-spacing: -0.02em;
        line-height: 1.2;
    }
    .nav__list a::after { height: 6px; bottom: 0; }
    .nav__list a[aria-current="page"] { color: var(--accent); }
    .nav__list a[aria-current="page"]::after { transform: scaleX(0); }

    body.nav-open { overflow: hidden; }
    body.nav-open .brand { position: relative; z-index: 2; color: var(--paper); }
}

/* ---------- Hero (home) ---------- */

.hero {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    background: var(--ink);
    color: var(--paper);
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
}

.hero__content {
    display: grid;
    grid-template-columns: 1fr;
    align-content: end;
    gap: 32px;
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: clamp(48px, 9vh, 112px);
}

/* The wordmark as a signature above the title, not a billboard. */
.hero__mark {
    width: clamp(180px, 34vw, 400px);
    height: auto;
    color: var(--accent);
    margin-bottom: 8px;
}
.has-canvas .hero__mark { visibility: hidden; }

.hero__title {
    font-size: clamp(2rem, 9vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    hyphens: manual;
}
.hero__title span { display: block; }

.hero__side { max-width: 34rem; }
.hero__lead { font-size: var(--step-1); line-height: 1.5; margin-bottom: 32px; }

@media (min-width: 960px) {
    .hero__content {
        grid-template-columns: 1fr minmax(300px, 30rem);
        align-items: end;
        column-gap: 64px;
        row-gap: 40px;
    }
    .hero__mark { grid-column: 1 / -1; }
    .hero__title { font-size: clamp(3rem, 5.2vw, 4.75rem); }
    .hero__side { padding-bottom: 6px; }
}

@media (prefers-reduced-motion: no-preference) {
    .hero__title span,
    .hero__side {
        animation: rise 0.9s cubic-bezier(.2, .8, .2, 1) both;
    }
    /* The first span is the visually hidden company name */
    .hero__title span:nth-child(2) { animation-delay: 0.55s; }
    .hero__title span:nth-child(3) { animation-delay: 0.7s; }
    .hero__title span:nth-child(4) { animation-delay: 0.85s; }
    .hero__side { animation-delay: 1.05s; }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(0.4em); }
    to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section--flush-top { padding-top: 0; }
.section--dark { background: var(--ink); color: var(--paper); }
.section--accent { background: var(--accent); color: var(--on-accent); }

.section-head {
    display: grid;
    gap: 16px 64px;
    margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head p { font-size: var(--step-1); line-height: 1.45; max-width: 40ch; }

@media (min-width: 900px) {
    .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
}

.section--dark .section-head p,
.page-hero--dark .page-hero__lead { color: var(--muted-dark); }
.section--dark .section-head .text-link { color: var(--paper); }

.split { display: grid; gap: 32px 64px; }
@media (min-width: 900px) {
    .split { grid-template-columns: 5fr 7fr; }
}

.prose { font-size: var(--step-1); line-height: 1.5; }
.prose--page { font-size: var(--step-0); max-width: 72ch; }
.prose--page h2 { font-size: var(--step-2); margin: 1.6em 0 0.5em; }
.prose--page h2:first-child { margin-top: 0; }
.prose a { text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- Services ---------- */

.service-list { list-style: none; margin: 0; padding: 0; border-bottom: 2px solid var(--ink); }

.service a {
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 8px 48px;
    padding: 32px 0;
    border-top: 2px solid var(--ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Hover fill: a layer behind the row that bleeds past the edges, so the
   content itself never moves or rewraps. */
.service a::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 calc(-1 * min(24px, var(--gutter)));
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.service__title { font-size: var(--step-2); }
.service__text { color: var(--muted); margin: 0; transition: color 0.2s ease; }
.service .tag { justify-self: start; }

.service a:hover { color: var(--on-accent); }
.service a:hover::before { opacity: 1; }
.service a:hover .service__text { color: inherit; }
.service a:hover .tag { background: var(--on-accent); color: var(--accent); }

@media (min-width: 900px) {
    .service a { grid-template-columns: 5fr 6fr 2fr; align-items: center; padding: 40px 0; }
    .service .tag { justify-self: end; }
}

/* ---------- Cards / work grid ---------- */

.card-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 48px 24px;
}

@media (min-width: 1100px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .card-grid--featured > .card:first-child { grid-column: span 2; grid-row: span 2; }
    .card-grid--featured > .card:first-child .card__title { font-size: var(--step-2); }
}

.card__link { display: grid; gap: 16px; text-decoration: none; }

.card__media {
    display: block;
    aspect-ratio: 16 / 10;
    background: #000;
    outline: 4px solid transparent;
    outline-offset: 4px;
    transition: outline-color 0.15s ease;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--logo { background: var(--paper); display: grid; place-items: center; }
.card__media--logo img { width: auto; height: auto; max-width: 60%; object-fit: contain; }

.card-grid--featured > .card:first-child .card__media { aspect-ratio: auto; height: calc(100% - 0px); }
.card-grid--featured > .card:first-child .card__link { grid-template-rows: 1fr auto; height: 100%; }

.card__body { display: grid; gap: 4px; }
.card__title { font-family: var(--display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.2; }
.card__meta { font-size: var(--step--1); color: var(--muted-dark); }

.card__link:hover .card__media { outline-color: var(--accent); }
.card__link:hover .card__title { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* ---------- Web applications ---------- */

.apps { background: var(--accent); color: var(--on-accent); }

.apps__inner { display: grid; gap: 64px; align-items: center; }
.apps__text h2 { margin-bottom: 32px; }
.apps__text > p { font-size: var(--step-1); line-height: 1.45; }
.apps__text .square-list { font-weight: 600; margin-top: 32px; }

@media (min-width: 1000px) {
    .apps__inner { grid-template-columns: 6fr 5fr; gap: 80px; }
}

/* Live web-app scene: dashboard window + notification + API terminal, layered in 3D */
.app-stage {
    --mono: ui-monospace, "Cascadia Code", Consolas, "SFMono-Regular", monospace;
    --win: #0d0d0d;
    --win-line: #232323;
    --win-muted: #8c8c8c;
    position: relative;
    margin: 0;
    padding: 28px 0 40px;
    perspective: 1400px;
}

.app-tilt {
    position: relative;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
}

.app-win {
    background: var(--win);
    color: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
    font: 500 0.8125rem/1.3 var(--text);
}

.app-win__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 2px solid var(--win-line); }
.app-win__bar i { width: 9px; height: 9px; background: #3a3a3a; }
.app-win__url {
    margin-left: 10px;
    padding: 3px 10px;
    background: #1a1a1a;
    color: var(--win-muted);
    font: 500 0.75rem/1.3 var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-win__body { display: grid; grid-template-columns: 52px 1fr; }
.app-win__side { display: grid; align-content: start; justify-items: center; gap: 14px; padding: 16px 0; border-right: 2px solid var(--win-line); }
.app-win__side b { width: 24px; height: 24px; background: var(--accent); margin-bottom: 6px; }
.app-win__side i { width: 18px; height: 18px; border: 2px solid #3a3a3a; }
.app-win__side i.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 25%, transparent); }

.app-win__main { display: grid; gap: 16px; padding: 16px; min-width: 0; }
.app-win__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-win__title { font: 600 1rem/1.2 var(--display); letter-spacing: -0.01em; }

.app-live { display: inline-flex; align-items: center; gap: 6px; color: var(--win-muted); font: 600 0.75rem/1 var(--text); }
.app-live i { width: 8px; height: 8px; background: var(--accent); }

.app-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { display: grid; gap: 4px; padding: 10px 12px; background: #161616; border-top: 3px solid var(--accent); min-width: 0; }
.kpi__label { color: var(--win-muted); font-size: 0.6875rem; }
.kpi__value { font: 700 clamp(0.95rem, 0.8rem + 0.6vw, 1.25rem)/1.1 var(--display); letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }

.app-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 128px;
    padding: 8px 0 6px;
    border-bottom: 2px solid var(--win-line);
    background: repeating-linear-gradient(to top, transparent 0 31px, #1c1c1c 31px 32px);
}
.app-chart__col {
    flex: 1;
    height: calc(var(--h, 1) * 10px);
    background: repeating-linear-gradient(to top, var(--accent) 0 8px, transparent 8px 10px);
    opacity: 0.5;
    transition: height 0.6s cubic-bezier(.2, .8, .2, 1), opacity 0.6s ease;
}
.app-chart__col.is-new { opacity: 1; }

.app-rows { display: grid; gap: 8px; }
.app-row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px; }
.app-row b { width: 18px; height: 18px; background: #2c2c2c; }
.app-row span { height: 8px; background: #262626; }
.app-row:nth-child(2) span { width: 75%; }
.app-row:nth-child(3) span { width: 55%; }
.app-row em { font: 600 0.6875rem/1 var(--text); font-style: normal; padding: 4px 8px; background: #1e1e1e; color: var(--win-muted); }
.app-row em.is-done { background: var(--accent); color: var(--on-accent); }

/* Floating notification */
.app-toast {
    position: absolute;
    top: 0;
    right: -8px;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 280px;
    padding: 12px 16px 12px 12px;
    background: var(--paper);
    color: var(--ink);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
    transform: translateZ(40px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.2, .9, .3, 1.3);
}
.app-toast.is-hidden { opacity: 0; transform: translateZ(40px) translateY(-12px) scale(0.96); }
.app-toast__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; background: var(--accent); }
.app-toast__icon::before { content: ""; width: 12px; height: 6px; border: solid var(--on-accent); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
.app-toast strong { display: block; font: 600 0.875rem/1.25 var(--text); }
.app-toast small { display: block; color: var(--muted); font-size: 0.75rem; line-height: 1.3; }

/* Floating API terminal */
.app-term {
    position: absolute;
    left: -8px;
    bottom: 0;
    width: min(330px, 78%);
    background: var(--ink);
    color: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 rgb(0 0 0 / 0.35);
    font: 500 0.75rem/1.5 var(--mono);
    transform: translateZ(60px);
}
.app-term__bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--win-line); color: var(--win-muted); }
.app-term__bar::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.app-term ol { list-style: none; margin: 0; padding: 8px 10px; display: grid; gap: 2px; min-height: calc(4 * 1.5em + 6px); }
.app-term li { display: flex; gap: 8px; white-space: nowrap; overflow: hidden; }
.app-term li span:first-child { color: var(--win-muted); width: 3.2em; flex: none; }
.app-term li b { color: var(--paper); }
.app-term li i { font-style: normal; color: var(--win-muted); margin-left: auto; }
.app-term li.is-new { animation: term-in 0.35s ease both; }
@keyframes term-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (min-width: 640px) {
    .app-stage { padding: 36px 0 56px; }
    .app-toast { right: -24px; }
    .app-term { left: -24px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-tilt { transform: none !important; }
}

/* ---------- Process ---------- */

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 48px 32px;
}

.step { counter-increment: step; display: grid; gap: 12px; align-content: start; }
.step::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font: 700 1.5rem var(--display);
}
.step p { color: var(--muted); }

/* ---------- CTA ---------- */

.cta { padding-block: var(--section-y); border-top: 2px solid var(--ink); }
.cta__inner { display: grid; gap: 32px 64px; align-items: end; }
.cta__title { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.025em; line-height: var(--display-leading); }
.cta__side p { font-size: var(--step-1); line-height: 1.45; margin-bottom: 32px; }

@media (min-width: 1000px) {
    .cta__inner { grid-template-columns: 7fr 4fr; }
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero { padding: calc(var(--header-h) + clamp(56px, 10vw, 128px)) 0 clamp(48px, 7vw, 96px); }
.page-hero--dark { background: var(--ink); color: var(--paper); }
.page-hero__title { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.025em; line-height: var(--display-leading); max-width: 16ch; }
.page-hero__lead { font-size: var(--step-1); line-height: 1.45; margin-top: 32px; max-width: 46ch; }

.status-page { min-height: 80vh; display: flex; align-items: center; }
.status-page__code { font: 700 clamp(4rem, 18vw, 12rem)/1 var(--display); color: var(--accent); margin-bottom: 24px; letter-spacing: -0.04em; }
.status-page .button-row { margin-top: 40px; }

/* ---------- Werk filters ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }

.filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 16px;
    border: 2px solid #3a3a3a;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease;
}
.filter span { font-size: var(--step--1); color: var(--muted-dark); font-weight: 500; }
.filter:hover { border-color: var(--paper); }
.filter[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter[aria-current="page"] span { color: inherit; }

.notice {
    max-width: 60rem;
    padding: clamp(24px, 5vw, 56px);
    border: 4px solid var(--accent);
}
.notice h2 { font-size: var(--step-2); margin-bottom: 24px; }
.notice p { font-size: var(--step-1); line-height: 1.5; color: var(--muted-dark); margin-bottom: 32px; }

/* ---------- Project detail ---------- */

.project-hero {
    background: var(--ink);
    color: var(--paper);
    padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(48px, 6vw, 80px);
}
.project-hero__inner { display: grid; gap: 48px; align-items: start; }
.project-hero__title { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.025em; line-height: var(--display-leading); margin: 24px 0; }
.project-hero__lead { font-size: var(--step-1); line-height: 1.45; }
.project-hero__text > p:not(.project-hero__lead) { color: var(--muted-dark); }

@media (min-width: 960px) {
    .project-hero__inner { grid-template-columns: 5fr 7fr; gap: 64px; }
    .project-hero__media { position: sticky; top: calc(var(--header-h) + 24px); }
}

.back-link { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; text-decoration: none; padding: 8px 0; }
.back-link::before { content: ""; width: 10px; height: 10px; background: var(--accent); }
.back-link:hover { text-decoration: underline; text-underline-offset: 5px; }

.project-facts { display: grid; gap: 20px; margin: 40px 0 0; padding-top: 24px; border-top: 2px solid #333; }
.project-facts dt { font-size: var(--step--1); color: var(--muted-dark); }
.project-facts dd { margin: 4px 0 0; font-weight: 600; }
.project-facts a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 24px;
}

.gallery-item {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: zoom-in;
    outline-offset: 4px;
}
.gallery-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: opacity 0.2s ease; }
.gallery-item:hover img { opacity: 0.85; }
.gallery-item--logo { background: var(--paper); aspect-ratio: 16 / 10; display: grid; place-items: center; }
.gallery-item--logo img { width: auto; max-width: 50%; aspect-ratio: auto; object-fit: contain; }

/* Lightbox */
.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 16px;
    border: 0;
    background: rgb(0 0 0 / 0.96);
    color: var(--paper);
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; place-items: center; gap: 16px; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.9); }
.lightbox img { max-width: min(100%, 1200px); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; }
.lightbox img.is-logo { background: var(--paper); padding: 48px; }
.lightbox__controls { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; }
.lightbox__controls button {
    min-height: 44px;
    padding: 8px 16px;
    background: none;
    border: 2px solid #444;
    color: inherit;
    font: 600 1rem var(--text);
    cursor: pointer;
}
.lightbox__controls button:hover { border-color: var(--accent); }
.lightbox__controls span { min-width: 5ch; text-align: center; color: var(--muted-dark); }

.project-nav { background: var(--ink); color: var(--paper); border-top: 2px solid #222; }
.project-nav__inner { display: grid; grid-template-columns: 1fr 1fr; }
.project-nav__link { display: grid; gap: 4px; padding: 40px 0; text-decoration: none; }
.project-nav__link span { font-size: var(--step--1); color: var(--muted-dark); }
.project-nav__link strong { font: 600 var(--step-2)/1.1 var(--display); letter-spacing: -0.02em; }
.project-nav__link:hover strong { color: var(--accent); }
.project-nav__link--next { text-align: right; padding-left: 24px; border-left: 2px solid #222; }

/* ---------- About ---------- */

.pillars__title { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.025em; line-height: var(--display-leading); max-width: 14ch; margin-bottom: clamp(48px, 7vw, 96px); }
.pillar-grid { display: grid; gap: 48px 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pillar { display: grid; gap: 16px; align-content: start; }
.pillar__icon { width: 48px; height: 48px; fill: var(--accent); shape-rendering: crispEdges; margin-bottom: 8px; }
.pillar h3 { font-size: var(--step-2); }
.pillar p { color: var(--muted-dark); }

.service-defs { margin: 0; display: grid; }
.service-defs div { padding: 24px 0; border-top: 2px solid var(--ink); display: grid; gap: 8px; }
.service-defs div:last-child { border-bottom: 2px solid var(--ink); }
.service-defs dt { font: 600 var(--step-1)/1.2 var(--display); letter-spacing: -0.01em; }
.service-defs dd { margin: 0; color: var(--muted); }

@media (min-width: 700px) {
    .service-defs div { grid-template-columns: 2fr 3fr; gap: 32px; }
}

/* ---------- Contact ---------- */

.contact { display: grid; gap: 64px; }
@media (min-width: 960px) {
    .contact { grid-template-columns: 4fr 7fr; gap: 96px; }
}

.contact__details h2 { font-size: var(--step-2); margin-bottom: 24px; }
.contact__list li { display: grid; gap: 2px; padding: 16px 0; border-top: 2px solid var(--ink); }
.contact__list span { font-size: var(--step--1); color: var(--muted); }
.contact__list a { font-weight: 600; font-size: var(--step-1); text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; overflow-wrap: anywhere; }

.form { display: grid; gap: 24px; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; gap: 24px; }
@media (min-width: 640px) {
    .field-row { grid-template-columns: 1fr 1fr; }
}

.field label, .field legend { font-weight: 600; padding: 0; }
.field small { font-weight: 400; color: var(--muted); font-size: var(--step--1); }

.field input, .field textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    appearance: none;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; }
.field .input-validation-error { border-color: var(--error); box-shadow: inset 4px 0 0 var(--error); }
.field__error { color: var(--error); font-size: var(--step--1); font-weight: 600; }
.field__error:empty { display: none; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 2px solid var(--ink);
    font-weight: 600;
    cursor: pointer;
}
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.choice input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.choice input:hover + span { box-shadow: 4px 4px 0 var(--ink); }

.form__privacy { font-size: var(--step--1); color: var(--muted); }
.form__privacy a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.form .button { justify-self: start; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { padding: 24px; margin-bottom: 24px; border: 2px solid var(--ink); }
.form-status--ok { border: 4px solid var(--accent); padding: clamp(24px, 4vw, 48px); }
.form-status--ok h2 { font-size: var(--step-2); margin-bottom: 16px; }
.form-status--ok p { margin-bottom: 32px; }
.form-status--error { border-color: var(--error); color: var(--error); font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--paper); padding-top: clamp(64px, 8vw, 112px); overflow: hidden; }

.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 56px;
    border-bottom: 2px solid #262626;
}
.site-footer__slogan { font: 700 var(--step-3)/1.1 var(--display); letter-spacing: -0.03em; margin: 0; max-width: 14ch; }

.site-footer__grid { display: grid; gap: 40px 32px; padding: 56px 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer__heading { font: 600 var(--step--1)/1.4 var(--text); letter-spacing: 0; color: var(--muted-dark); margin-bottom: 16px; }
.site-footer .plain-list li { margin-bottom: 8px; }
.site-footer .plain-list a { text-decoration: none; font-weight: 600; }
.site-footer .plain-list a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }

.site-footer__address { font-style: normal; margin-bottom: 16px; line-height: 1.6; }

.site-footer__accent { display: flex; align-items: center; gap: 12px; font-weight: 600; margin-bottom: 8px; }
.swatch { width: 20px; height: 20px; background: var(--accent); }
.site-footer__note { font-size: var(--step--1); color: var(--muted-dark); max-width: 30ch; }

/* Nerd alert: the live accent colour as a real line of CSS, click to copy */
.code-copy {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin: 4px 0 12px;
    padding: 8px 12px;
    background: #141414;
    border: 2px solid #2a2a2a;
    color: var(--paper);
    font: 500 0.9375rem/1.4 ui-monospace, "Cascadia Code", Consolas, "SFMono-Regular", monospace;
    text-align: left;
    cursor: copy;
    transition: border-color 0.15s ease;
}
.code-copy:hover, .code-copy.is-copied { border-color: var(--accent); }
.code-copy code { font: inherit; }
.code-copy__prop { color: var(--muted-dark); }
.code-copy [data-accent-hex] { color: var(--paper); font-weight: 700; }
.code-copy__status { font: 600 var(--step--1)/1.4 var(--text); color: var(--paper); }
.code-copy__status::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--accent); }
.code-copy__status:empty { display: none; }

.site-footer__logo { width: clamp(140px, 18vw, 220px); height: auto; color: var(--accent); margin-top: 8px; }

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding: 32px 0 40px;
    font-size: var(--step--1);
    color: var(--muted-dark);
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { color: var(--muted-dark); }

/* ---------- Accent swap transition ---------- */

html.accent-changing * { transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, fill 0.35s ease, outline-color 0.35s ease !important; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .button:hover { transform: none; }
}
