.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding-block: var(--space-4);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.header__wordmark {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.0625rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    width: 100%;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.nav-toggle__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.nav-toggle__input:checked ~ .nav {
    display: flex;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: var(--tap-target);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    /* A tap on the label must toggle the menu, not select the word. */
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--color-ink);
    content: "";
}

.nav-toggle__bars {
    position: relative;
}

.nav-toggle__bars::before {
    position: absolute;
    top: -6px;
}

.nav-toggle__bars::after {
    position: absolute;
    top: 6px;
}

.nav-toggle__input:focus-visible ~ .nav-toggle {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto;
        gap: var(--space-6);
    }
}

.dropdown summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
    min-height: var(--tap-target);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

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

.dropdown summary::after {
    content: "▾";
    font-size: 0.75em;
}

.dropdown__panel {
    display: grid;
    gap: var(--space-2);
    padding-block: var(--space-2);
}

@media (min-width: 768px) {
    .dropdown {
        position: relative;
    }

    .dropdown__panel {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 20;
        width: 320px;
        padding: var(--space-4);
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-card);
        box-shadow: 0 12px 32px rgb(22 32 44 / 12%);
    }
}

.dropdown__item {
    display: grid;
    gap: 2px;
    padding: var(--space-2);
    border-radius: var(--radius-control);
    text-decoration: none;
}

.dropdown__item:hover {
    background: var(--color-bg);
}

.dropdown__title {
    font-weight: 600;
    color: var(--color-text);
}

.dropdown__note {
    font-size: var(--text-small);
    color: var(--color-text-muted);
}

.dropdown__all {
    padding: var(--space-2);
    font-size: var(--text-small);
    color: var(--color-accent);
    text-decoration: none;
}

/* Direct children only: dropdown items lay themselves out. */
.nav > a {
    text-decoration: none;
    min-height: var(--tap-target);
    display: inline-flex;
    align-items: center;
}

/* Sections that have no page yet. */
.nav__pending {
    color: var(--color-text-disabled);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-target);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-control);
    font-weight: 600;
    text-decoration: none;
}

.button--dark {
    background: var(--color-ink);
    color: var(--color-bg);
}

.button--dark:hover {
    background: var(--color-accent);
    color: var(--color-bg);
}

/* Reserved for the single primary call to action (spec 8.2). */
.button--primary {
    background: var(--color-accent);
    color: #fff;
}

.button--primary:hover {
    background: var(--color-accent-hover);
    color: #fff;
}

.button--secondary {
    border: 1.5px solid var(--color-ink);
}

.footer {
    margin-top: var(--space-24);
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-16);
    font-size: var(--text-small);
    color: var(--color-text-secondary);
}

.footer__inner {
    display: grid;
    gap: var(--space-8);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .footer__inner {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer__column {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer__column a {
    text-decoration: none;
}

.footer__heading {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.footer__statement {
    margin: var(--space-4) 0 var(--space-2);
}

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

.section {
    padding-block: var(--space-16);
}

.kicker {
    font-size: var(--text-small);
    text-transform: uppercase;
    letter-spacing: var(--tracking-kicker);
    font-weight: 600;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-2);
}

.breadcrumb {
    font-size: var(--text-small);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    padding: 0;
    margin: var(--space-8) 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-chip);
    font-size: var(--text-small);
    text-decoration: none;
    background: var(--color-surface);
}

.chip--active {
    background: var(--color-ink);
    border-color: var(--color-ink);
    color: var(--color-bg);
}

.grid {
    display: grid;
    gap: var(--space-8);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.metrics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
    margin: var(--space-6) 0 0;
}

.metric__value {
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: 600;
}

.metric__label {
    margin: 0;
    font-size: var(--text-small);
    color: var(--color-text-muted);
}

.quote {
    margin: var(--space-12) 0;
    padding-left: var(--space-6);
    border-left: 2px solid var(--color-accent);
    font-size: var(--text-h3);
}

.quote footer {
    font-size: var(--text-small);
    color: var(--color-text-muted);
}

.hero {
    padding-block: var(--space-24) var(--space-16);
}

.hero__headline {
    max-width: 18ch;
    text-wrap: pretty;
}

.hero__subline {
    margin-top: var(--space-6);
    max-width: 52ch;
    color: var(--color-text-secondary);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-8);
}

.kicker--accent {
    color: var(--color-accent);
    letter-spacing: 0.18em;
}

.kicker--on-dark {
    color: var(--color-accent-tint);
}

.trust {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    flex-wrap: wrap;
    padding-block: var(--space-12);
    border-block: 1px solid var(--color-border);
}

.trust__logos-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    flex: 1;
    min-width: 320px;
}

.trust__logos {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-12);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Muted so the marks read as one row and never outshout the page. Colour on
   hover, per the design. */
.client-logo {
    width: auto;
    filter: grayscale(1);
    opacity: 0.55;
    transition: opacity 0.2s, filter 0.2s;
}

.client-logo:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Optical sizing: set per logo in the CMS, because a wordmark and a square
   mark of the same pixel height do not read as the same size. */
.client-logo--sm {
    height: 24px;
}

.client-logo--md {
    height: 30px;
}

.client-logo--lg {
    height: 38px;
}

.placeholder--logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 44px;
    border-radius: var(--radius-control);
}

.intro {
    padding-block: var(--space-16);
}

/* The eyebrow belongs tight above what it labels, not in a column of its own. */
.intro .kicker {
    margin-bottom: var(--space-4);
}

.intro__lede {
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    max-width: 34ch;
    margin: 0 0 var(--space-8);
    text-wrap: pretty;
}

/* Two columns so the block fills the width while each line stays short. */
.intro__body p {
    margin: 0;
    max-width: none;
}

@media (min-width: 1024px) {
    .intro__body {
        columns: 2;
        column-gap: var(--space-16);
    }
}

.services {
    padding-bottom: var(--space-16);
}

.service {
    border-radius: var(--radius-card);
    padding: var(--space-8);
    text-decoration: none;
    display: block;
}

.service--lead {
    background: var(--color-ink);
    color: var(--color-bg);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-8);
    margin-bottom: var(--space-6);
}

.service__body {
    max-width: 56ch;
}

.service--lead .service__description {
    color: var(--color-on-dark-text);
}

.service__link {
    color: var(--color-accent-tint);
    font-weight: 600;
    text-decoration: none;
}

.services__row {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .services__row {
        grid-template-columns: 1fr 1fr;
    }
}

.service--half {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.service--half:hover {
    border-color: var(--color-accent);
}

.chips--on-dark {
    margin: var(--space-4) 0 0;
}

.chip--on-dark {
    background: transparent;
    border-color: var(--color-on-dark-border);
    color: var(--color-bg);
}

.testimonials {
    padding-block: var(--space-16);
}

.testimonials h2 {
    margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
    .grid--2 {
        grid-template-columns: 1fr 1fr;
    }

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

.testimonial {
    margin: 0;
    padding: var(--space-8);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
}

.testimonial .quote {
    margin: var(--space-6) 0 0;
    padding: 0;
    border: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.testimonial .quote p {
    margin: 0;
}

.testimonial__author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.testimonial__photo {
    flex: 0 0 auto;
    border-radius: 50%;
}

.testimonial__name {
    display: block;
    font-weight: 600;
    font-size: var(--text-small);
}

.testimonial__meta {
    display: block;
    font-size: var(--text-small);
    color: var(--color-text-muted);
}

.steps-band {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-16);
}

.steps-band h2 {
    margin-bottom: var(--space-12);
}

.step__title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-accent);
    margin: 0 0 var(--space-2);
}

.step__description {
    margin: 0;
    font-size: var(--text-small);
    color: var(--color-text-secondary);
}

.cta-band {
    background: var(--color-ink);
    color: var(--color-bg);
    padding-block: var(--space-16);
}

.cta-band__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
}

.cta-band__line {
    margin: var(--space-2) 0 0;
    color: var(--color-on-dark-text);
}

.footer {
    margin-top: 0;
}

.hero--service {
    padding-block: var(--space-12) var(--space-12);
}

.hero--service .kicker a {
    color: inherit;
}

.lead {
    font-size: var(--text-h3);
    color: var(--color-text-secondary);
}

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

.services-hub {
    display: grid;
    gap: var(--space-6);
    padding-bottom: var(--space-16);
}

.hub-block {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    padding: var(--space-8);
}

.hub-block--lead {
    background: var(--color-ink);
    color: var(--color-bg);
    border-color: var(--color-ink);
    padding: var(--space-12);
}

.outcomes {
    list-style: none;
    padding: 0;
    margin: var(--space-6) 0;
    display: grid;
    gap: var(--space-2);
}

.outcomes li::before {
    content: "→ ";
    color: var(--color-accent);
}

.outcomes--on-dark li::before {
    color: var(--color-accent-tint);
}

.service__link--light {
    color: var(--color-accent);
}

.panel {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    padding: var(--space-8);
}

.panel--dark {
    background: var(--color-ink);
    color: var(--color-bg);
    border-color: var(--color-ink);
    padding: var(--space-12);
}

.panel__note {
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

.feature h3 {
    margin-bottom: var(--space-2);
}

.feature__description {
    color: var(--color-text-secondary);
    margin: 0;
}

.feature--card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    padding: var(--space-6);
}

@media (min-width: 1024px) {
    .grid--5 {
        grid-template-columns: repeat(5, 1fr);
    }
}

.table-scroll {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-small);
    text-align: left;
}

.table th,
.table td {
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-4);
    vertical-align: top;
}

.table thead th {
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: var(--tracking-kicker);
    font-size: 0.75rem;
}

.qualifiers {
    list-style: none;
    padding: 0;
    margin: var(--space-8) 0 var(--space-2);
    display: grid;
    gap: var(--space-2);
    color: var(--color-text-secondary);
}

.quote-note {
    font-weight: 600;
}

.facts {
    display: grid;
    gap: var(--space-4);
    margin: var(--space-6) 0 0;
}

@media (min-width: 768px) {
    .facts {
        grid-template-columns: repeat(5, 1fr);
    }
}

.fact dt {
    font-size: var(--text-small);
    color: var(--color-accent-tint);
    margin-bottom: var(--space-1);
}

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

.faq {
    padding-block: var(--space-16);
}

.faq__item {
    border-bottom: 1px solid var(--color-border);
    padding-block: var(--space-4);
}

.faq__item summary {
    cursor: pointer;
    font-weight: 600;
    min-height: var(--tap-target);
    display: flex;
    align-items: center;
}

.faq__answer {
    color: var(--color-text-secondary);
}

.engineers-band {
    background: var(--color-surface);
    border-block: 1px solid var(--color-border);
    padding-block: var(--space-16);
}

.steps {
    margin-top: var(--space-12);
}

.founder__photo,
.placeholder--photo {
    border-radius: var(--radius-card);
}

.placeholder--photo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.founder__links {
    color: var(--color-text-secondary);
}

.refusals {
    list-style: none;
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

.refusals li::before {
    content: "× ";
    color: var(--color-accent);
    font-weight: 600;
}

.community__photos {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr 1fr;
    margin-block: var(--space-8);
}

.contact-booking {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    padding-block: var(--space-8);
    border-block: 1px solid var(--color-border);
}

.contact-booking h2,
.contact-booking p {
    margin-bottom: var(--space-2);
}

.contact-booking .button {
    flex: 0 0 auto;
}

.contact-grid {
    align-items: start;
}

.contact-grid > div > h2 {
    margin-bottom: var(--space-6);
}

.form {
    display: grid;
    gap: var(--space-4);
}

.field {
    display: grid;
    gap: var(--space-2);
}

.field label {
    font-weight: 600;
    font-size: var(--text-small);
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
    width: 100%;
    min-height: var(--tap-target);
    padding: var(--space-3);
    border: 1px solid var(--color-border-input);
    border-radius: var(--radius-control);
    background: var(--color-surface);
    font: inherit;
    color: inherit;
}

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

.field--error input,
.field--error textarea,
.field--error select {
    border-color: #b3261e;
}

.field__error {
    color: #b3261e;
    font-size: var(--text-small);
    margin: 0;
}

.field__help {
    color: var(--color-text-muted);
    font-size: var(--text-small);
    margin: 0;
}

.field input[type="checkbox"] {
    min-height: auto;
    width: auto;
}

.notice--success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: var(--color-success-text);
    border-radius: var(--radius-control);
    padding: var(--space-6);
}

.contact-aside {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    padding: var(--space-8);
}

.contact-aside h2 {
    font-size: var(--text-h3);
    margin-top: var(--space-8);
}

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

.contact-direct {
    list-style: none;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}

.form__privacy {
    margin: var(--space-2) 0;
    color: var(--color-text-secondary);
    font-size: var(--text-small);
}

.field--inline {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--space-3);
}

.field--inline label {
    font-weight: 400;
    font-size: var(--text-body);
}

.field--inline .field__error {
    grid-column: 1 / -1;
}

.form__submit {
    justify-self: start;
}

.stack {
    background: var(--color-ink);
    color: var(--color-bg);
    padding-block: var(--space-16);
}

.stack__inner {
    display: grid;
    gap: var(--space-12);
    align-items: start;
}

@media (min-width: 1024px) {
    .stack__inner {
        grid-template-columns: 1fr 1.4fr;
        gap: var(--space-16);
    }
}

.stack__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.stack__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.stack__chips label {
    cursor: pointer;
}

.stack__radio:focus-visible + label {
    outline: 2px solid var(--color-accent-tint);
    outline-offset: 2px;
}

.stack__note {
    display: none;
    margin-top: var(--space-6);
    color: var(--color-on-dark-text);
    max-width: 52ch;
}

.stack__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: var(--space-3);
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    aspect-ratio: 1;
    padding: var(--space-2);
    border: 1px solid var(--color-on-dark-border);
    border-radius: var(--radius-card);
    text-align: center;
    transition: opacity 150ms ease, border-color 150ms ease;
}

.tile--empty {
    border-style: dashed;
}

.tile__icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.tile__name {
    font-size: 0.75rem;
    color: var(--color-on-dark-text);
    line-height: 1.2;
}

/* Selecting a category dims everything outside it. One rule per group, because
   CSS cannot match a checked radio against a data attribute. */
.stack:has(#stack-frontend:checked) .tile:not([data-group="frontend"]),
.stack:has(#stack-backend:checked) .tile:not([data-group="backend"]),
.stack:has(#stack-data-storage:checked) .tile:not([data-group="data-storage"]),
.stack:has(#stack-cloud-devops:checked) .tile:not([data-group="cloud-devops"]),
.stack:has(#stack-ai-ml:checked) .tile:not([data-group="ai-ml"]),
.stack:has(#stack-testing:checked) .tile:not([data-group="testing"]) {
    opacity: 0.3;
}

.stack:has(#stack-frontend:checked) .tile[data-group="frontend"],
.stack:has(#stack-backend:checked) .tile[data-group="backend"],
.stack:has(#stack-data-storage:checked) .tile[data-group="data-storage"],
.stack:has(#stack-cloud-devops:checked) .tile[data-group="cloud-devops"],
.stack:has(#stack-ai-ml:checked) .tile[data-group="ai-ml"],
.stack:has(#stack-testing:checked) .tile[data-group="testing"] {
    border-color: var(--color-accent-tint);
}

.stack:has(#stack-frontend:checked) .stack__note[data-group="frontend"],
.stack:has(#stack-backend:checked) .stack__note[data-group="backend"],
.stack:has(#stack-data-storage:checked) .stack__note[data-group="data-storage"],
.stack:has(#stack-cloud-devops:checked) .stack__note[data-group="cloud-devops"],
.stack:has(#stack-ai-ml:checked) .stack__note[data-group="ai-ml"],
.stack:has(#stack-testing:checked) .stack__note[data-group="testing"] {
    display: block;
}

.stack__radio:checked + label {
    background: var(--color-bg);
    border-color: var(--color-bg);
    color: var(--color-ink);
}

.project {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.project:hover {
    border-color: var(--color-accent);
}

.project__name {
    font-size: var(--text-h3);
    margin: 0;
}

.project__description {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-small);
}

.project__stack {
    margin: 0;
}

.project__links {
    margin: auto 0 0;
    display: flex;
    gap: var(--space-4);
    font-size: var(--text-small);
    font-weight: 600;
}

.project__links a {
    color: var(--color-accent);
    text-decoration: none;
}

.legal__body {
    max-width: var(--measure);
}

.legal__body h2 {
    font-size: var(--text-h3);
    margin-top: var(--space-12);
    margin-bottom: var(--space-3);
}

.notice--error {
    background: #fdeceb;
    border: 1px solid #e6a6a1;
    color: #8c1d18;
    border-radius: var(--radius-control);
    padding: var(--space-4);
    margin: 0;
}
