/* ==========================================================================
   VarsaAtelier
   Direction: the dark room. One night-blue ground, and in it lit things.
   Faces: Gambarino (display) and General Sans (text), loaded from Fontshare.

   How this file is organised (plain CSS, no build step, no framework):
     1  Tokens        colour, type, space, motion, stacking
     2  Base          reset, type, links, focus, utilities
     3  Components    button, text link, form field, toggle row, panel, print
                      Each is defined once, with every state: hover, focus, selected, invalid, disabled.
     4  Page chrome   sticky header and navigation, footer
     5  Sections      hero, about, spaces, expertise, process, awards, contact
     6  Motion        entrances and scroll effects, all behind prefers-reduced-motion
   Add a new section by composing the components above; avoid one-off rules.
   ========================================================================== */

/* ==========================================================================
   1  Tokens
   ========================================================================== */

:root {
    color-scheme: dark;

    /* Colour: one ground, one ink, one accent. The photographs carry the warmth.
       The accent marks the action, the lit (selected) state and focus, nothing else. */
    --bg: #0a0d14;
    --surface: #131824;
    --ink: #e9edf3;
    --muted: #8891a1;
    --accent: #5a9bfc;
    --accent-ink: #0a0d14;

    /* Type */
    --font-display: "Gambarino", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --font-text: "General Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    /* Six steps, each clearly larger than the one below, and the same order at every width:
       hero > head > title > lead > body > small. Sizes are fluid: the second figure is the 1440px value. */
    --step-small: clamp(0.875rem, 0.84rem + 0.1vw, 0.9375rem);   /* 14-15  labels, hints, states */
    --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);     /* 17-19  text, navigation, buttons, footer */
    --step-lead: clamp(1.375rem, 1.15rem + 0.65vw, 1.625rem);    /* 22-26  statements, hero sentence, wordmark */
    --step-title: clamp(1.625rem, 1.25rem + 1.5vw, 2.5rem);      /* 26-40  list rows (services), process verbs */
    --step-head: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);           /* 32-52  section headings */
    --step-hero: clamp(2.5rem, 1.3rem + 4.2vw, 4.75rem);         /* 40-76  the page title, once */

    /* Space: one pair of margins and one gutter for the whole page */
    --margin: clamp(1.25rem, 2.2vw, 2rem);
    --gutter: clamp(0.75rem, 1.4vw, 1.5rem);
    --gap-section: clamp(4.5rem, 4rem + 4.5vw, 10rem);
    --header-h: 5rem;
    --page-max: 1920px;
    --tap: 2.75rem; /* smallest comfortable touch target */

    /* Stacking: a short scale, nothing arbitrary */
    --z-sheet: 1;   /* the phone menu sheet, inside the header */
    --z-header: 40;
    --z-skip: 60;

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    --t-press: 140ms;
    --t-hover: 180ms;
    --t-ui: 240ms;
}

/* ==========================================================================
   2  Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h); /* anchors land below the sticky header */
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 var(--step-body) / 1.55 var(--font-text);
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
    margin: 0;
}

/* A component's own display value must never win over the hidden attribute. */
[hidden] {
    display: none !important;
}

ul, ol {
    padding: 0;
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.07em;
}

p {
    text-wrap: pretty;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

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

button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.wrap {
    width: 100%;
    max-width: var(--page-max);
    margin-inline: auto;
    padding-inline: var(--margin);
}

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

.skip {
    position: absolute;
    left: var(--margin);
    top: 0;
    z-index: var(--z-skip);
    padding: 0.75rem 1rem;
    background: var(--accent);
    color: var(--accent-ink);
    transform: translateY(-120%);
}

.skip:focus {
    transform: none;
}

/* Type roles */

.head {
    font: 400 var(--step-head) / 0.98 var(--font-display);
    letter-spacing: -0.02em;
    text-wrap: balance;
    hyphens: none;
}

.hero .head {
    font-size: var(--step-hero);
}

.statement {
    max-width: 38ch;
    font-size: var(--step-lead);
    line-height: 1.32;
}

/* ==========================================================================
   3  Components
   ========================================================================== */

/* ---- Button: one flat square shape; the page's one solid light element ---- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 0;
    background: var(--accent);
    color: var(--accent-ink);
    font: 500 var(--step-body) / 1 var(--font-text);
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}

.button:active {
    transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
    .button:hover {
        background: color-mix(in oklab, var(--accent) 82%, white);
    }
}

.button--block {
    width: 100%;
    min-height: 3.5rem;
}

/* ---- Text link: the secondary action (never a second button) ---- */

.text-link,
.link-button {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.3em;
    cursor: pointer;
    transition: text-decoration-color var(--t-hover) ease;
}

@media (hover: hover) and (pointer: fine) {
    .text-link:hover,
    .link-button:hover {
        text-decoration-color: transparent;
    }
}

/* ---- Form field: label above, a visible boundary, an inline error ----
   The field keeps a 1px boundary on purpose: a filled box on a filled card is about 1.1:1, which fails the
   3:1 contrast WCAG asks of a control's edge. Forms are the one place this skill's house rules allow a line. */

.field {
    margin-bottom: 1.25rem;
}

.field__label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: var(--step-small);
    font-weight: 500;
}

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

.field input,
.field textarea {
    display: block;
    width: 100%;
    min-height: 3rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--muted); /* taste-skill-ignore: control boundary, see note above */
    border-radius: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 var(--step-body) / 1.4 var(--font-text);
    transition: border-color var(--t-hover) ease;
}

.field textarea {
    min-height: 8rem;
    resize: vertical;
}

@media (hover: hover) and (pointer: fine) {
    .field input:hover,
    .field textarea:hover {
        border-color: var(--ink);
    }
}

.field input:focus-visible,
.field textarea:focus-visible {
    border-color: var(--ink);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.field [aria-invalid="true"] {
    border-color: var(--ink);
    outline: 2px solid var(--ink);
    outline-offset: 0;
}

.field__error {
    margin-top: 0.5rem;
    font-size: var(--step-small);
    font-weight: 500;
}

.form-status {
    margin-top: 1rem;
}

.form-status:empty {
    display: none;
}

.form-status.is-error {
    font-weight: 500;
}

.form-note {
    margin-top: 1rem;
    color: var(--muted);
    font-size: var(--step-small);
}

/* Honeypot for Formspree: hidden from people, visible to bots */
.hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

/* ---- Toggle row: a large line that switches a choice on (Expertise).
   States are separate on purpose: hover moves the line, selected turns it accent and says "Added". ---- */

.service {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: baseline;
    padding: 0.9rem var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    color: var(--ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--t-hover) ease;
}

.service input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.service__name {
    grid-column: 1 / span 6;
    font: 400 var(--step-title) / 1.1 var(--font-display);
    letter-spacing: -0.015em;
    text-wrap: balance;
    transition: color var(--t-hover) ease, transform var(--t-ui) var(--ease-out);
}

.service__note {
    grid-column: 7 / span 4;
    color: var(--muted);
    font-size: var(--step-body);
    transition: color var(--t-hover) ease;
}

.service__state {
    grid-column: 11 / span 2;
    justify-self: end;
    font-size: var(--step-small);
    font-weight: 500;
    transition: color var(--t-hover) ease;
}

.service__on {
    display: none;
}

.service:has(input:checked) {
    background: var(--surface);
}

@media (hover: hover) and (pointer: fine) {
    .service:hover {
        background: var(--surface);
    }

    .service:hover .service__name {
        transform: translateX(0.25em);
    }

    .service:hover .service__state {
        text-decoration: underline;
        text-underline-offset: 0.25em;
    }
}

.service input:checked ~ .service__name,
.service input:checked ~ .service__state {
    color: var(--accent);
}

.service input:checked ~ .service__note {
    color: var(--ink);
}

.service input:checked ~ .service__state .service__off {
    display: none;
}

.service input:checked ~ .service__state .service__on {
    display: inline;
}

.service:has(input:focus-visible) .service__name {
    outline: 2px solid var(--accent);
    outline-offset: 0.08em;
}

/* Below 1100px the note and state drop under the name so the large words are never squeezed. */
@media (max-width: 1099.98px) {
    .service {
        grid-template-columns: minmax(0, 1fr) auto;
        row-gap: 0.35rem;
        padding-block: 0.9rem;
    }

    /* name and state share the first line; the note sits under them */
    .service__name {
        grid-column: 1;
        grid-row: 1;
    }

    .service__state {
        grid-column: 2;
        grid-row: 1;
        padding-left: 1rem;
        white-space: nowrap;
    }

    .service__note {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ---- Panel: one tone step above the ground, separated by tone alone ---- */

.panel,
.card {
    padding: clamp(1.25rem, 2.6vw, 2.75rem);
    background: var(--surface);
}

/* ---- Print: a picture on a surface-coloured ground so the layout is whole before it loads ---- */

.print {
    overflow: clip;
    background: var(--surface);
}

.print img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   4  Page chrome
   ========================================================================== */

/* ---- Header: sticky, solid ground, current section underlined ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--bg);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    font: 400 var(--step-lead) / 1 var(--font-display);
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-between;
    gap: 2rem;
    margin-left: 2.5rem;
}

.nav__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2rem;
}

.nav__links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    font-size: var(--step-body);
    text-decoration: none;
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.4em;
}

@media (hover: hover) and (pointer: fine) {
    .nav__links a:hover {
        text-decoration: underline;
    }
}

/* The section the visitor is reading is underlined; scripts set aria-current. */
.nav__links a[aria-current="true"] {
    text-decoration: underline;
}

.menu-toggle,
.nav__contact {
    display: none;
}

/* Phone and small tablet: links live in a full-screen sheet opened by a text button. */
@media (max-width: 899.98px) {
    :root {
        --header-h: 4rem;
    }

    .nav {
        margin-left: 0;
    }

    .nav__action {
        display: none;
    }

    .js .nav {
        position: fixed;
        inset: 0;
        z-index: var(--z-sheet);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 2rem;
        margin: 0;
        padding: calc(var(--header-h) + 1.5rem) var(--margin) calc(2rem + env(safe-area-inset-bottom));
        overflow-y: auto;
        background: var(--bg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-0.5rem);
        transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui);
    }

    .js.is-menu-open .nav {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition-delay: 0s;
    }

    .js .nav__links {
        flex-direction: column;
        gap: 0.25rem;
    }

    .js .nav__links a {
        min-height: 3.5rem;
        font: 400 var(--step-head) / 1 var(--font-display);
        letter-spacing: -0.02em;
    }

    .js .nav__action {
        display: inline-flex;
        min-height: 3.5rem;
    }

    .js .nav__contact {
        display: flex;
        flex-direction: column;
        margin-top: auto;
    }

    .js .nav__contact a {
        display: inline-flex;
        align-items: center;
        min-height: 3rem;
        font-size: var(--step-body);
    }

    .js .menu-toggle {
        position: relative;
        z-index: calc(var(--z-sheet) + 1);
        display: inline-flex;
        align-items: center;
        min-height: var(--tap);
        padding: 0 0 0 1rem;
        border: 0;
        background: none;
        color: var(--ink);
        font: 500 var(--step-body) / 1 var(--font-text);
        cursor: pointer;
    }

    .js .wordmark {
        position: relative;
        z-index: calc(var(--z-sheet) + 1);
    }

    .is-menu-open {
        overflow: hidden;
    }

    /* Without JavaScript the links simply wrap under the wordmark. */
    html:not(.js) .bar {
        flex-wrap: wrap;
        padding-block: 0.75rem;
    }

    html:not(.js) .nav {
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 0.5rem 1.25rem;
    }
}

/* ---- Footer: one quiet line ---- */

.footer {
    padding-top: max(30svh, 6rem);
    padding-bottom: calc(1.875rem + env(safe-area-inset-bottom));
}

.footer__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--gutter);
    align-items: baseline;
    font-size: var(--step-body);
}

.footer__what,
.footer__legal {
    color: var(--muted);
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
}

.footer__legal {
    text-align: right;
}

@media (max-width: 899.98px) {
    .footer {
        padding-top: max(20svh, 5rem);
    }

    .footer__row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .footer__legal {
        text-align: left;
    }
}

/* ==========================================================================
   5  Sections
   ========================================================================== */

/* ---- Hero: two prints in darkness ---- */

.hero {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr auto;
    column-gap: var(--gutter);
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    padding-block: clamp(0.5rem, 2.5vh, 1.5rem) clamp(1.5rem, 4vh, 3rem);
}

.hero__prints {
    display: contents;
}

.print--large {
    grid-column: 6 / span 7;
    grid-row: 1 / span 3;
    align-self: start;
    justify-self: end;
    width: min(100%, calc((100svh - var(--header-h) - 3rem) * 0.8));
    aspect-ratio: 4 / 5;
}

.print--small {
    grid-column: 2 / span 2;
    grid-row: 2;
    align-self: center;
    justify-self: start;
    width: min(100%, 11rem);
    aspect-ratio: 1;
}

.print--small img {
    filter: brightness(0.7);
}

.hero__copy {
    grid-column: 1 / span 5;
    grid-row: 3;
    align-self: end;
    max-width: 38rem;
}

.hero__lead {
    max-width: 30ch;
    margin-top: clamp(1.25rem, 2.4vw, 2rem);
    font-size: var(--step-lead);
    line-height: 1.32;
}

.hero__action {
    display: none;
    margin-top: 1.75rem;
}

/* Hero at tablet and phone widths: its own composition, not the desktop squeezed */
@media (max-width: 899.98px) {
    .hero {
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding-block: 0.5rem 0;
    }

    .hero__prints {
        position: relative;
        display: block;
        order: 1;
        margin-bottom: 1.5rem;
    }

    .hero__copy {
        order: 2;
        align-self: stretch;
        max-width: none;
    }

    .print--large {
        width: max(8.5rem, min(78%, 34rem, calc((100svh - 25.5rem) * 0.8)));
        margin-left: auto;
        aspect-ratio: 4 / 5;
    }

    .print--small {
        position: absolute;
        left: 0;
        bottom: 9%;
        width: min(30%, 11rem);
    }

    .hero__action {
        display: inline-flex;
        margin-top: 1.25rem;
    }

    .hero__lead {
        max-width: 34ch;
        margin-top: 1rem;
    }
}

@media (max-width: 899.98px) and (min-width: 600px) {
    .hero__prints {
        margin-bottom: 2.5rem;
    }

    .print--large {
        width: max(8.5rem, min(62%, 30rem, calc((100svh - 25.5rem) * 0.8)));
    }
}

/* Landscape phones: copy and print sit side by side so the action stays in the first screen */
@media (max-width: 899.98px) and (max-height: 540px) and (orientation: landscape) {
    .hero {
        flex-direction: row;
        align-items: flex-end;
        gap: calc(var(--gutter) * 2);
        padding-bottom: 1rem;
    }

    .hero__copy {
        order: 1;
        flex: 1 1 0;
        min-width: 0;
        align-self: flex-end;
    }

    .hero__prints {
        order: 2;
        flex: none;
        margin-bottom: 0;
    }

    .print--large {
        width: calc((100svh - var(--header-h) - 2rem) * 0.8);
        margin-left: 0;
    }

    .print--small {
        width: 4.5rem;
        bottom: 6%;
    }

    .hero__lead {
        margin-top: 0.75rem;
    }

    .hero__action {
        margin-top: 1rem;
    }
}

/* Short landscape screens: keep the print inside the first screen */
@media (min-width: 900px) and (max-height: 640px) {
    .print--large {
        width: min(100%, calc((100svh - var(--header-h) - 1.5rem) * 0.8));
    }
}

/* ---- About: right-half statement, claims on the left ---- */

.about {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    padding-block: var(--gap-section);
}

.about__claims {
    grid-column: 1 / span 5;
    grid-row: 1;
    align-self: end;
    font-size: var(--step-lead);
    line-height: 1.5;
}

.about__text {
    grid-column: 7 / span 6;
    grid-row: 1;
}

.about__text .statement {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 34ch;
}

@media (max-width: 899.98px) {
    .about {
        display: block;
    }

    .about__text {
        margin-bottom: 2.5rem;
    }

    .about__claims {
        font-size: var(--step-body);
    }
}

/* ---- Spaces: a band of unequal panels ---- */

.spaces {
    padding-bottom: var(--gap-section);
}

.spaces .head {
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

.band {
    display: flex;
    width: 100%;
}

.band__item {
    flex: var(--grow, 1) 1 0;
    min-width: 0;
}

.band__item--barn { --grow: 3; }
.band__item--door { --grow: 4; }
.band__item--kitchen { --grow: 5; }

.band__item img {
    width: 100%;
    height: clamp(26rem, 68svh, 48rem);
    object-fit: cover;
    background: var(--surface);
}

.band__item--barn img { object-position: 50% 60%; }
.band__item--door img { object-position: 50% 40%; }
.band__item--kitchen img { object-position: 50% 50%; }

.band__item figcaption {
    padding: 1.25rem var(--gutter) 0;
}

.band__item:first-child figcaption {
    padding-left: var(--margin);
}

.band__item:last-child figcaption {
    padding-right: var(--margin);
}

.band__item h3 {
    font: 400 var(--step-lead) / 1.1 var(--font-display);
    letter-spacing: -0.01em;
}

.band__item p {
    max-width: 32ch;
    margin-top: 0.5rem;
    font-size: var(--step-body);
}

@media (hover: hover) and (pointer: fine) {
    .band__item {
        overflow: clip;
    }

    .band__item img {
        transition: transform 1500ms var(--ease-expo);
    }

    .band__item:hover img {
        transform: scale(1.03);
    }
}

@media (max-width: 899.98px) {
    .band {
        flex-direction: column;
        gap: 3rem;
        padding-inline: var(--margin);
    }

    .band__item {
        flex: none;
        width: 100%;
    }

    .band__item--door {
        width: 86%;
        margin-left: auto;
    }

    .band__item--kitchen {
        width: 92%;
    }

    .band__item img {
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .band__item--kitchen img {
        aspect-ratio: 1;
    }

    .band__item figcaption,
    .band__item:first-child figcaption,
    .band__item:last-child figcaption {
        padding-inline: 0;
    }
}

@media (min-width: 600px) and (max-width: 899.98px) {
    .band {
        gap: 4rem;
    }

    .band__item--barn {
        width: 64%;
    }

    .band__item--door {
        width: 72%;
    }

    .band__item--kitchen {
        width: 80%;
    }

    .band__item--kitchen img {
        aspect-ratio: 5 / 4;
    }
}

/* ---- Expertise: the toggle rows, with a summary and the way forward ---- */

.services {
    padding-bottom: var(--gap-section);
}

.services__head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: end;
    row-gap: 1rem;
    margin-bottom: clamp(2rem, 5vw, 4.5rem);
}

.services__head .head {
    grid-column: 1 / span 6;
}

.services__hint {
    grid-column: 7 / span 5;
    max-width: 32ch;
}

.services__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 2rem;
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.services__summary {
    font-size: var(--step-lead);
    line-height: 1.3;
}

@media (max-width: 1099.98px) {
    .services__head .head,
    .services__hint {
        grid-column: 1 / -1;
    }
}

/* ---- Process: a held heading while three stages pass ---- */

.process {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    padding-bottom: var(--gap-section);
}

.process__head {
    grid-column: 1 / span 5;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 12vh);
}

.process__note {
    max-width: 26ch;
    margin-top: clamp(1.25rem, 2.4vw, 2rem);
    font-size: var(--step-lead);
    line-height: 1.32;
}

.process__count {
    margin-top: 1.25rem;
    color: var(--muted);
}

.process__list {
    grid-column: 7 / span 6;
    display: flex;
    flex-direction: column;
    gap: var(--gutter);
}

/* Order is carried by size: each stage is a taller block than the one before. */
.stage {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 24svh;
    padding: clamp(1.25rem, 2.6vw, 2.5rem);
    background: var(--surface);
}

.stage:nth-child(2) { min-height: 30svh; }
.stage:nth-child(3) { min-height: 36svh; }

.stage__verb {
    font: 400 var(--step-title) / 1.05 var(--font-display);
    letter-spacing: -0.015em;
}

.stage p {
    max-width: 30ch;
    margin-top: 1rem;
    font-size: var(--step-lead);
    line-height: 1.32;
}

.js .stage {
    color: var(--muted);
    transition: color var(--t-ui) ease;
}

.js .stage.is-active {
    color: var(--ink);
}

@media (max-width: 899.98px) {
    .process {
        display: block;
    }

    .process__head {
        position: static;
        margin-bottom: 1.5rem;
    }

    .process__count {
        display: none;
    }

    .stage,
    .stage:nth-child(2),
    .stage:nth-child(3) {
        min-height: 0;
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .js .stage {
        color: var(--ink);
    }
}

/* ---- Awards: a scannable list, one row lit at a time ---- */

.awards {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    column-gap: var(--gutter);
    align-items: start;
    padding-bottom: var(--gap-section);
}

.awards .head {
    grid-column: 1 / span 5;
}

.awards__intro {
    grid-column: 1 / span 5;
    max-width: 22ch;
    margin-top: 1.25rem;
    font-size: var(--step-lead);
    line-height: 1.32;
}

.awards__list {
    grid-column: 7 / span 6;
    grid-row: 1 / span 2;
}

.award {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    column-gap: 1rem;
    align-items: baseline;
    padding-block: 0.55rem;
    font-size: var(--step-lead);
    line-height: 1.25;
}

.award__year {
    font-variant-numeric: tabular-nums;
}

.js .award {
    color: var(--muted);
    transition: color 400ms ease;
}

.js .award.is-lit,
.js .awards.is-static .award {
    color: var(--ink);
}

@media (max-width: 599.98px) {
    .awards {
        display: block;
    }

    .awards__list {
        margin-top: 1.5rem;
    }
}

/* Tablet: running text uses the width the page has set up instead of leaving a dead third. */
@media (min-width: 600px) and (max-width: 899.98px) {
    .about__text .statement,
    .process__note,
    .stage p {
        max-width: none;
    }
}

/* ---- Contact: details and a closing print on the left, the enquiry card on the right ---- */

.contact {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: start;
}

.contact__intro {
    grid-column: 1 / span 5;
}

.contact__line {
    margin-top: 1.5rem;
    font-size: var(--step-lead);
    line-height: 1.3;
}

.contact__details {
    margin-top: clamp(2rem, 5vw, 4rem);
}

.contact__details div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0 1rem;
    align-items: center;
    min-height: var(--tap);
}

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

.contact__details a {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    word-break: break-word;
}

.contact__print {
    width: min(100%, 24rem);
    margin-top: clamp(2rem, 5vw, 4rem);
    aspect-ratio: 1;
}

.contact__card {
    grid-column: 7 / span 6;
}

/* The services chosen above, shown where the enquiry is written */
.brief {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.brief__label {
    grid-column: 1 / -1;
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: var(--step-small);
    font-weight: 500;
}

.brief__value {
    line-height: 1.4;
}

.brief__change {
    font-size: var(--step-small);
}

/* After a successful send the form gives way to a confirmation */
.form-done:focus {
    outline: none;
}

.form-done__title {
    margin-bottom: 0.75rem;
    font: 400 var(--step-head) / 1 var(--font-display);
    letter-spacing: -0.02em;
}

.form-done p {
    font-size: var(--step-lead);
    line-height: 1.32;
    overflow-wrap: anywhere;
}

.form-done .link-button {
    margin-top: 1.5rem;
}

@media (max-width: 899.98px) {
    .contact {
        display: block;
    }

    .contact__card {
        margin-top: 2.5rem;
    }
}

/* ==========================================================================
   6  Motion
   ========================================================================== */

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

@keyframes rise {
    to { opacity: 1; transform: none; }
}

@keyframes print-open {
    to { clip-path: inset(0); }
}

@keyframes print-settle {
    to { transform: none; }
}

@keyframes fade-in {
    to { opacity: 1; }
}

@keyframes print-sink {
    to { transform: translateY(7%); }
}

.lines .line {
    display: block;
    overflow: clip;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
}

.lines [data-line] {
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    /* First paint carries the content; the sequence only adds arrival and is over by about 1.2s. */
    .js .hero [data-line] {
        transform: translateY(105%);
        animation: line-up 900ms var(--ease-expo) forwards;
        animation-delay: 120ms;
    }

    .js .hero .line:nth-child(2) [data-line] {
        animation-delay: 210ms;
    }

    .js .hero [data-load] {
        opacity: 0;
        transform: translateY(14px);
        animation: rise 560ms var(--ease-out) forwards;
        animation-delay: 420ms;
    }

    .js .hero .hero__action[data-load] {
        animation-delay: 500ms;
    }

    .js .print--large {
        clip-path: inset(0 0 100% 0);
        animation: print-open 1000ms var(--ease-in-out) 150ms forwards;
    }

    .js .print--large img {
        transform: scale(1.08);
        animation: print-settle 1100ms var(--ease-expo) 100ms forwards;
    }

    .js .print--small {
        opacity: 0;
        animation: fade-in 800ms ease 700ms forwards;
    }

    /* Entrances below the fold: parts arrive in reading order, once. */
    .js [data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo);
    }

    .js [data-reveal].is-in {
        opacity: 1;
        transform: none;
    }

    .js [data-reveal][data-d="1"] { transition-delay: 70ms; }
    .js [data-reveal][data-d="2"] { transition-delay: 140ms; }
    .js [data-reveal][data-d="3"] { transition-delay: 210ms; }
    .js [data-reveal][data-d="4"] { transition-delay: 280ms; }
    .js [data-reveal][data-d="5"] { transition-delay: 350ms; }
}

/* The hero picture recedes a little as the first screen leaves. Static where unsupported. */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
        .hero {
            view-timeline-name: --hero;
        }

        .print--large {
            animation: print-open 1000ms var(--ease-in-out) 150ms forwards, print-sink linear both;
            animation-timeline: auto, --hero;
            animation-range: normal, exit 0% exit 100%;
        }
    }
}
