/* ==========================================================================
   3PX site stylesheet - design direction "Workshop paper"
   Light, warm paper surfaces with dark ink bands (header, hero, services,
   contact, footer). A full-bleed photo opens the page; photos sit next to
   statements and share one warm monochrome treatment. Orange is the brand
   fill; text on light uses a darker orange. Change the look via the tokens
   in :root first; dark bands redefine the same tokens in .theme-ink.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    color-scheme: light;

    /* Color channels (primitives). Only for translucent variants:
       rgb(var(--rgb-accent) / 0.3). Everything else uses the colors below. */
    --rgb-accent: 245 156 26;
    --rgb-success: 63 185 80;
    --rgb-error: 220 60 50;
    /* Ink background as channels, for the scrim over the hero photo */
    --rgb-ink: 18 20 24;

    /* Photos: one shared treatment, so photos from different sources
       read as one set (warm monochrome). */
    --photo-filter: grayscale(1) sepia(0.2) contrast(1.05);

    /* Colors - light (paper) */
    --color-bg: #f5f3ee;
    --color-surface: #ebe8e1;
    --color-surface-2: #e2ded5;
    --color-border: #d9d4ca;
    --color-border-strong: #c4beb2;
    /* Form field borders need 3:1 against bg and surface (WCAG 1.4.11). */
    --color-border-input: #857e72;
    --color-text: #24262b;
    --color-text-muted: #595c63;
    --color-heading: #101216;
    /* Orange as a fill (buttons, markers); never as text on paper (1.96:1). */
    --color-accent: #f59c1a;
    --color-accent-hover: #ffb347;
    /* Orange as text, links and focus ring on paper (5.5:1). */
    --color-accent-text: #9a4d00;
    --color-accent-soft: rgb(var(--rgb-accent) / 0.16);
    --color-on-accent: #101216;
    --color-success-bg: rgb(var(--rgb-success) / 0.14);
    --color-success-border: rgb(var(--rgb-success) / 0.45);
    --color-success-text: #1d6b35;
    --color-error-bg: rgb(var(--rgb-error) / 0.1);
    --color-error-border: rgb(var(--rgb-error) / 0.45);
    --color-error-text: #b42318;

    /* Typography */
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
    --font-size-base: 1rem;
    --font-size-lead: clamp(1.125rem, 0.8vw + 0.9rem, 1.3125rem);
    --font-size-small: 0.875rem;
    --font-size-xs: 0.8125rem;
    --font-size-h1: clamp(2.5rem, 4.6vw + 1rem, 4.75rem);
    --font-size-h2: clamp(1.875rem, 2.6vw + 0.9rem, 3rem);
    --font-size-h3: 1.25rem;
    --font-size-display-s: clamp(1.25rem, 1vw + 0.95rem, 1.625rem);
    --line-height: 1.65;
    --line-height-tight: 1.05;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4.5rem;
    /* Vertical section padding: 7rem on wide screens, less on phones */
    --space-section: clamp(4rem, 9vw, 7rem);

    /* Layout */
    --container-width: 1180px;
    --measure: 40rem;
    --header-height: 4.5rem;
    --radius: 10px;
    --radius-small: 6px;
    --radius-pill: 999px;
    --transition: 200ms ease;
    --reveal-duration: 400ms;
    /* Entrances decelerate: fast start, soft landing */
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Dark ink bands. Redeclares every color token, because tokens resolved on
   :root do not recompute for a section. */
.theme-ink {
    color-scheme: dark;
    --color-bg: #121418;
    --color-surface: #1b1e23;
    --color-surface-2: #23272d;
    --color-border: #2c3038;
    --color-border-strong: #3a3f48;
    --color-border-input: #6f7784;
    --color-text: #d9dde2;
    --color-text-muted: #a0a8b1;
    --color-heading: #ffffff;
    --color-accent-text: #f59c1a;
    --color-accent-soft: rgb(var(--rgb-accent) / 0.14);
    --color-success-text: #7ee2a8;
    --color-error-text: #ff8f87;
    --color-error-bg: rgb(var(--rgb-error) / 0.16);
    color: var(--color-text);
    background: var(--color-bg);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    background: var(--color-bg);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

::selection {
    color: var(--color-on-accent);
    background: var(--color-accent);
}

h1, h2, h3 {
    margin: 0 0 var(--space-4);
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--line-height-tight);
    letter-spacing: -0.03em;
    color: var(--color-heading);
    text-wrap: balance;
}

h1 { font-size: var(--font-size-h1); }
h2, .h2 { font-size: var(--font-size-h2); letter-spacing: -0.025em; line-height: 1.1; }
h3, .h3 { font-size: var(--font-size-h3); letter-spacing: -0.01em; line-height: 1.3; }

p {
    margin: 0 0 var(--space-4);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-accent-text);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a:hover {
    color: var(--color-heading);
}

:focus-visible {
    outline: 2px solid var(--color-accent-text);
    outline-offset: 3px;
}

address {
    font-style: normal;
}

code, pre {
    font-family: var(--font-mono);
}

/* ---------- Utilities ---------- */
.container {
    width: min(100% - 2 * var(--space-5), var(--container-width));
    margin-inline: auto;
}

.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: var(--space-4);
    top: -100px;
    z-index: 100;
    padding: var(--space-2) var(--space-4);
    color: var(--color-on-accent);
    background: var(--color-accent);
    border-radius: var(--radius-small);
}

.skip-link:focus {
    top: var(--space-4);
}

/* Small mono label above headings, e.g. "About us". */
.eyebrow {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ---------- Header & navigation (always on ink) ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Fixed height: a header that shrinks on scroll moves the content below it. */
    min-height: var(--header-height);
    gap: var(--space-4);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-heading);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand:hover {
    color: var(--color-heading);
}

.brand img {
    width: 40px;
    height: auto;
}

.brand__accent {
    color: var(--color-accent-text);
}

/* Very narrow phones: show only "3PX", so the header stays on one line.
   The full name stays available to screen readers. */
@media (max-width: 359px) {
    .brand__suffix {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    /* 44 x 44 px touch target */
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: var(--space-2);
    color: var(--color-heading);
    background: none;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-small);
    cursor: pointer;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: color var(--transition), background-color var(--transition);
}

.site-nav a:hover {
    color: var(--color-heading);
    background: var(--color-surface-2);
}

.site-nav a.nav-cta {
    margin-left: var(--space-2);
    color: var(--color-on-accent);
    background: var(--color-accent);
}

.site-nav a.nav-cta:hover {
    background: var(--color-accent-hover);
}

@media (max-width: 860px) {
    .js .nav-toggle {
        display: inline-flex;
    }

    .js .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
    }

    .js .site-nav.is-open {
        display: block;
    }

    .js .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-1);
        width: min(100% - 2 * var(--space-5), var(--container-width));
        margin-inline: auto;
        padding-block: var(--space-3);
    }

    .js .site-nav a {
        padding: var(--space-3) var(--space-4);
        border-radius: var(--radius-small);
    }

    .js .site-nav a.nav-cta {
        margin-left: 0;
    }

    /* Without JavaScript the menu stays visible and simply wraps. */
    .no-js .site-header__inner {
        flex-wrap: wrap;
        padding-block: var(--space-2);
    }

    .no-js .site-nav__list {
        flex-wrap: wrap;
    }
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    padding-block: var(--space-section);
    scroll-margin-top: var(--header-height);
}

.section--tint {
    background: var(--color-surface);
}

/* Section head: label and heading on the left, an optional intro on the right. */
.section__head {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: var(--space-5) var(--space-7);
    margin-bottom: var(--space-8);
}

.section__head h2,
.section__head h1 {
    max-width: 18ch;
    margin-bottom: 0;
}

.section__intro {
    max-width: 30rem;
    margin: 0;
    color: var(--color-text-muted);
}

@media (max-width: 860px) {
    .section__head {
        grid-template-columns: minmax(0, 1fr);
        margin-bottom: var(--space-7);
    }
}

/* ---------- Photos ---------- */
/* Stock photos show where software like ours is used, not our team or our
   products. Each one carries a visible credit. */
.photo {
    margin: 0;
}

.photo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    filter: var(--photo-filter);
}

/* On ink, bright photos (windows, screens) would glare. */
.theme-ink .photo img {
    filter: var(--photo-filter) brightness(0.78);
}

/* ---------- Hero (full-bleed photo on ink) ---------- */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: min(100svh - var(--header-height), 52rem);
    padding-block: clamp(3rem, 6vw, 6rem) var(--space-5);
    overflow: hidden;
    scroll-margin-top: var(--header-height);
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
    margin: 0;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 22%;
    /* The code photo is low-key; lift it so the code reads on the right. */
    filter: var(--photo-filter) brightness(1.25);
}

/* Scrim: dark under the text on the left and the facts at the bottom,
   so text contrast does not depend on the photo. */
.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgb(var(--rgb-ink) / 0.96) 0%, rgb(var(--rgb-ink) / 0.7) 28%, rgb(var(--rgb-ink) / 0) 55%),
        linear-gradient(90deg, rgb(var(--rgb-ink) / 0.95) 0%, rgb(var(--rgb-ink) / 0.88) 42%, rgb(var(--rgb-ink) / 0.3) 72%, rgb(var(--rgb-ink) / 0.1) 100%);
}

.hero__inner {
    display: grid;
    gap: var(--space-7);
}

.hero h1 {
    max-width: 15ch;
    margin-bottom: var(--space-6);
}

.hero__lead {
    max-width: 36rem;
    margin-bottom: var(--space-6);
    font-size: var(--font-size-lead);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* The label sits on the photo; the muted color has too little margin there. */
.hero .eyebrow {
    color: var(--color-text);
}

/* Below 960px the text would cover the whole photo. Show the photo as its
   own band above the text instead, so it stays visible and the text sits
   on plain ink. */
@media (max-width: 960px) {
    .hero {
        display: block;
        min-height: 0;
        padding: 0 0 var(--space-6);
    }

    .hero__media {
        position: relative;
        inset: auto;
        z-index: auto;
    }

    .hero__media img {
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 55svh;
    }

    /* Fade the lower edge into the ink band. */
    .hero__media::after {
        background: linear-gradient(0deg, rgb(var(--rgb-ink) / 1) 0%, rgb(var(--rgb-ink) / 0) 35%);
    }

    .hero__inner {
        padding-top: var(--space-5);
    }
}

/* Key facts: a strip of what is true about the company, at the foot of the hero. */
.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 2fr);
    margin: 0;
    border-top: 1px solid var(--color-border-strong);
}

.facts__item {
    padding: var(--space-4) var(--space-5) 0 0;
}

.facts__item + .facts__item {
    padding-left: var(--space-5);
    border-left: 1px solid var(--color-border-strong);
}

.facts dt {
    margin-bottom: var(--space-1);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.facts dd {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--color-heading);
}

@media (max-width: 860px) {
    .facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facts__item,
    .facts__item + .facts__item {
        padding: var(--space-4) var(--space-4) var(--space-4) 0;
        border-left: 0;
        border-bottom: 1px solid var(--color-border-strong);
    }

    .facts__item:nth-child(even) {
        padding-left: var(--space-4);
        border-left: 1px solid var(--color-border-strong);
    }

    /* An odd last item (Services) takes the full row. */
    .facts__item:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .facts__item:last-child {
        border-bottom: 0;
    }
}

/* ---------- Split: photo next to a statement ---------- */
.split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: var(--space-7) var(--space-8);
}

.split__media img {
    aspect-ratio: 4 / 5;
}

/* The photo stays in view while the longer column scrolls past it. */
.split > .split__media {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));
}

/* Keep the stuck photo and its credit inside short laptop screens. */
.split > .split__media img {
    max-height: calc(100svh - var(--header-height) - 2 * var(--space-6) - 2rem);
}

.split h2 {
    max-width: 18ch;
    margin-bottom: var(--space-6);
}

@media (max-width: 860px) {
    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .split > .split__media {
        position: static;
    }

    .split__media img {
        aspect-ratio: 3 / 2;
    }
}

/* Services: the photo sits under the statement, cropped to the code. */
.split--services .split__media {
    margin-top: var(--space-7);
}

.split--services .split__media img {
    object-position: 75% 50%;
}

/* On phones the list comes first; the photo follows it. */
@media (max-width: 860px) {
    .split--services .split__aside {
        display: contents;
    }

    .split--services .split__media {
        order: 1;
        margin-top: 0;
    }
}

/* ---------- About ---------- */
.about__story > p {
    max-width: var(--measure);
    font-size: var(--font-size-lead);
}

.about__quote {
    margin: var(--space-7) 0 0;
    padding-left: var(--space-5);
    border-left: 3px solid var(--color-accent);
}

.about__quote blockquote {
    margin: 0 0 var(--space-3);
    font-family: var(--font-display);
    font-size: var(--font-size-display-s);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: -0.015em;
    color: var(--color-heading);
}

.about__quote figcaption {
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.about__aside {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-7);
}

@media (max-width: 600px) {
    .about__aside {
        grid-template-columns: minmax(0, 1fr);
    }
}

.about__aside h3 {
    margin-bottom: var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}


/* Timeline: year on the left, event on the right */
.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--color-heading);
}

.timeline li {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: var(--space-4);
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.timeline__year {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--color-accent-text);
}

/* Experience: plain ruled list, the value as text */
.experience {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid var(--color-heading);
}

.experience li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}

.experience__value {
    font-family: var(--font-mono);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

/* ---------- Services (numbered list, no cards) ---------- */
/* Statement and photo on the left (.split--services), the list on the right. */
.service-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--color-border-strong);
}

.service {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: var(--space-3) var(--space-4);
    padding-block: var(--space-6) var(--space-7);
    border-bottom: 1px solid var(--color-border-strong);
}

.service__body {
    grid-column: 2;
}

.service__index {
    padding-top: 0.35em;
    font-family: var(--font-mono);
    font-size: var(--font-size-small);
    color: var(--color-accent-text);
}

.service h3 {
    margin: 0;
    font-size: var(--font-size-display-s);
}

.service__body p {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

.service__body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .service {
        grid-template-columns: 3rem minmax(0, 1fr);
    }
}

/* ---------- References (logo wall with shared hairlines) ---------- */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--color-border-strong);
    border-left: 1px solid var(--color-border-strong);
}

.logo-grid li {
    border-right: 1px solid var(--color-border-strong);
    border-bottom: 1px solid var(--color-border-strong);
}

.logo-grid a {
    display: grid;
    place-items: center;
    height: 9rem;
    padding: var(--space-4) var(--space-6);
    transition: background-color var(--transition);
}

.logo-grid a:hover {
    background: var(--color-surface);
}

/* Logos are shown monochrome and dark on paper; "multiply" drops white
   backgrounds. Equal visual weight: every logo gets roughly the same area,
   so the height is --logo-size / sqrt(aspect ratio). --logo-ratio,
   --logo-opacity and --logo-brightness are set per logo in _References.cshtml. */
.logo-grid img {
    --logo-size: 7rem;
    height: calc(var(--logo-size) / sqrt(var(--logo-ratio, 3.5)));
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1) brightness(var(--logo-brightness, 1)) contrast(1.2);
    mix-blend-mode: multiply;
    opacity: var(--logo-opacity, 0.8);
    transition: opacity var(--transition);
}

.logo-grid a:hover img {
    opacity: 1;
}

/* After the base rules, so the phone values win. */
@media (max-width: 600px) {
    .logo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .logo-grid a {
        height: 6rem;
        padding: var(--space-3);
    }

    .logo-grid img {
        --logo-size: 4.5rem;
    }
}

/* ---------- Contact ---------- */
.contact {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: var(--space-7) var(--space-8);
}

@media (max-width: 860px) {
    .contact {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Target of the form submit, so the feedback is visible on phones as well. */
.contact__form {
    scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

/* Phone and mail first, large: they are what people come here for. */
.contact__direct {
    margin: 0 0 var(--space-7);
    border-top: 1px solid var(--color-border-strong);
}

.contact__direct div {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: var(--space-4);
    align-items: baseline;
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--color-border-strong);
}

.contact__direct dt {
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.contact__direct dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--font-size-display-s);
    font-weight: 500;
    overflow-wrap: anywhere;
}

/* Primary contact actions: at least 44px tall to tap. */
.contact__direct a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--color-heading);
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
}

.contact__direct a:hover {
    color: var(--color-accent-text);
}

/* Address and company register details: small, but complete. */
.contact__details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.contact__details p {
    margin: 0;
}

.contact__details strong {
    color: var(--color-heading);
    font-weight: 600;
}

@media (max-width: 480px) {
    .contact__details {
        grid-template-columns: minmax(0, 1fr);
    }
}

.panel {
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.form-field {
    margin-bottom: var(--space-5);
}

.form-field label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-small);
    font-weight: 500;
    color: var(--color-heading);
}

.form-field .required {
    color: var(--color-accent-text);
}

.form-hint {
    margin-bottom: var(--space-4);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font: inherit;
    color: var(--color-heading);
    background: var(--color-bg);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-small);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-field .input-validation-error {
    border-color: var(--color-error-text);
}

.field-validation-error {
    display: block;
    margin-top: var(--space-2);
    color: var(--color-error-text);
    font-size: var(--font-size-small);
}

.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-small);
}

.alert--success {
    color: var(--color-success-text);
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
}

.alert--error {
    color: var(--color-error-text);
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
}

/* ---------- Buttons ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font: inherit;
    font-weight: 600;
    color: var(--color-on-accent);
    text-decoration: none;
    background: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}

.button:hover {
    color: var(--color-on-accent);
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

/* The small lift is movement, so only without a reduced-motion preference. */
@media (prefers-reduced-motion: no-preference) {
    .button:hover {
        transform: translateY(-1px);
    }
}

.button--ghost {
    color: var(--color-heading);
    background: transparent;
    border-color: var(--color-heading);
}

.button--ghost:hover {
    color: var(--color-bg);
    background: var(--color-heading);
    border-color: var(--color-heading);
}

.button--block {
    width: 100%;
}

/* ---------- Plain pages (terms, error) ---------- */
.prose {
    max-width: 44rem;
}

.prose > * + * {
    margin-top: var(--space-7);
}

/* The Cookiebot declaration contains long cookie names and tables. */
.prose__embed {
    min-width: 0;
    overflow-wrap: anywhere;
    overflow-x: auto;
}

.text-error {
    color: var(--color-error-text);
}

/* ---------- Footer ---------- */
.site-footer {
    padding-block: var(--space-7);
    font-size: var(--font-size-small);
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4) var(--space-6);
}

.site-footer a {
    color: var(--color-text);
}

.site-footer a:hover {
    color: var(--color-accent-text);
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--color-heading);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.site-footer__brand img {
    width: 32px;
    height: auto;
}

.site-footer p {
    margin: 0;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
}

/* ---------- Scroll reveal (enabled by site.js) ----------
   Put data-reveal on a wrapper, not on elements with their own hover transform. */
@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity var(--reveal-duration) var(--ease-out), transform var(--reveal-duration) var(--ease-out);
        transition-delay: calc(var(--i, 0) * 40ms);
    }

    .js [data-reveal].is-visible {
        opacity: 1;
        transform: none;
    }
}
