/* ==========================================================================
   SDG — Sidewalk Developers Group
   Design system: dark editorial-engineering
   Fonts: Fraunces (display) · Instrument Sans (body) · JetBrains Mono (labels)
   ========================================================================== */

/* Fonts
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Fraunces';
    src: url('../fonts/Fraunces-Var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Instrument Sans';
    src: url('../fonts/InstrumentSans-Var.woff2') format('woff2');
    font-weight: 400 700;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Instrument Sans';
    src: url('../fonts/InstrumentSans-Italic-Var.woff2') format('woff2');
    font-weight: 400 700;
    font-display: swap;
    font-style: italic;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/JetBrainsMono-Var.woff2') format('woff2');
    font-weight: 400 600;
    font-display: swap;
    font-style: normal;
}

/* Tokens
   -------------------------------------------------------------------------- */
:root {
    /* Color */
    --bg: #0d0f12;
    --surface-1: #14171c;
    --surface-2: #1a1e24;
    --hairline: rgba(232, 236, 241, 0.08);
    --hairline-strong: rgba(232, 236, 241, 0.16);
    --text: #e8ecf1;
    --text-2: #9ba3ae;
    --text-muted: #7d8694;
    --accent: #7fa9d9;
    --accent-hover: #9bbee4;
    --accent-ink: #0d0f12;
    --accent-wash: rgba(127, 169, 217, 0.1);
    --error: #e08e8e;
    /* >=3:1 against surface-1 and bg — WCAG 1.4.11 non-text contrast */
    --border-input: rgba(232, 236, 241, 0.4);

    /* Type */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Instrument Sans', -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

    --size-display-xl: clamp(2.75rem, 1rem + 7.2vw, 6.75rem);
    --size-display: clamp(2rem, 1.2rem + 3vw, 3.375rem);
    --size-h3: clamp(1.375rem, 1rem + 1vw, 1.625rem);
    --size-body-lg: 1.1875rem;
    --size-body: 1rem;
    --size-small: 0.875rem;
    --size-mono: 0.75rem;

    /* Layout */
    --container: 1200px;
    --gutter: clamp(20px, 5vw, 64px);
    --section-pad: clamp(80px, 12vh, 160px);
    --header-h: 64px;

    /* Motion */
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --speed: 200ms;

    /* Z-scale. Header sits above the menu overlay so the brand and the
       open/close toggle stay visible while the mobile menu is open. */
    --z-texture: 1;
    --z-content: 2;
    --z-menu: 60;
    --z-header: 70;
}

/* Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    font-family: var(--font-body);
    font-size: var(--size-body);
    line-height: 1.65;
    letter-spacing: 0.002em;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(127, 169, 217, 0.28);
    color: var(--text);
}

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

ul,
ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

textarea {
    resize: vertical;
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Skip link */
.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--hairline-strong);
    transform: translateY(calc(-100% - 16px));
}
.skip-link:focus {
    transform: none;
}

main:focus {
    outline: none;
}

/* Fixed texture: drawing-sheet grid + noise, static, never animated */
.texture {
    position: fixed;
    inset: 0;
    z-index: var(--z-texture);
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"),
        repeating-linear-gradient(to right, rgba(232, 236, 241, 0.028) 0 1px, transparent 1px 72px),
        repeating-linear-gradient(to bottom, rgba(232, 236, 241, 0.028) 0 1px, transparent 1px 72px);
    background-size: 256px 256px, auto, auto;
}

main,
.header,
.footer {
    position: relative;
    z-index: var(--z-content);
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Shared type components
   -------------------------------------------------------------------------- */
.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.eyebrow__index {
    margin-right: 1.25em;
    color: var(--text-2);
}

.section {
    padding-block: var(--section-pad);
    border-top: 1px solid var(--hairline);
}

.section__head {
    max-width: 720px;
    margin-bottom: clamp(48px, 7vh, 88px);
}

.section__title {
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: var(--size-display);
    font-weight: 440;
    font-variation-settings: 'opsz' 96;
    line-height: 1.08;
    letter-spacing: -0.016em;
}

.section__intro {
    max-width: 58ch;
    margin-top: 16px;
    font-size: var(--size-body-lg);
    line-height: 1.6;
    color: var(--text-2);
}

/* Buttons + links
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    font-weight: 500;
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease),
        transform var(--speed) var(--ease);
}
.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    color: var(--accent-ink);
    background: var(--accent);
}
.btn--primary:hover {
    background: var(--accent-hover);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--hairline-strong);
    transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.link-arrow::after {
    content: '↓';
    color: var(--text-muted);
    transition: transform var(--speed) var(--ease), color var(--speed) var(--ease);
}
.link-arrow:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.link-arrow:hover::after {
    color: var(--accent);
    transform: translateY(2px);
}

/* Header
   -------------------------------------------------------------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    height: var(--header-h);
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background-color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.header.is-scrolled {
    background: var(--bg);
    border-bottom-color: var(--hairline);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 500;
    font-variation-settings: 'opsz' 28;
    letter-spacing: 0.01em;
    color: var(--text);
}

.header__brand-dot {
    width: 6px;
    height: 6px;
    margin-top: 0.55em;
    background: var(--accent);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
    transition: color var(--speed) var(--ease);
}
.nav__link:hover {
    color: var(--text);
}
.nav__link[aria-current='location'] {
    color: var(--accent);
    box-shadow: inset 0 -1px 0 0 currentColor;
}

.nav__cta {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 18px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    transition: background-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.nav__cta:hover {
    color: var(--accent-ink);
    background: var(--accent);
}

/* Hamburger (mobile) */
.nav__toggle {
    position: relative;
    z-index: calc(var(--z-menu) + 1);
    display: none;
    width: 44px;
    height: 44px;
}

.nav__toggle-line {
    position: absolute;
    left: 11px;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: transform var(--speed) var(--ease);
}
.nav__toggle-line:nth-child(1) {
    top: 18px;
}
.nav__toggle-line:nth-child(2) {
    top: 25px;
}
.nav__toggle[aria-expanded='true'] .nav__toggle-line:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
}
.nav__toggle[aria-expanded='true'] .nav__toggle-line:nth-child(2) {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile menu overlay */
.menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    display: flex;
    overflow-y: auto;
    background: var(--bg);
    opacity: 1;
    transition: opacity 250ms var(--ease);
}
.menu[hidden] {
    display: none;
}
.menu.is-closing {
    opacity: 0;
}

.menu__list {
    width: 100%;
    margin-block: auto;
    padding-inline: var(--gutter);
    padding-block: calc(var(--header-h) + 16px) 32px;
}

.menu__link {
    display: flex;
    align-items: baseline;
    gap: 20px;
    min-height: 56px;
    padding-block: 8px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 9vw, 3rem);
    font-weight: 440;
    font-variation-settings: 'opsz' 72;
    line-height: 1.15;
    letter-spacing: -0.016em;
    color: var(--text);
    border-bottom: 1px solid var(--hairline);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 350ms var(--ease), transform 350ms var(--ease);
    transition-delay: calc(var(--stagger-i, 0) * 60ms);
}
.menu.is-open .menu__link {
    opacity: 1;
    transform: none;
}
.menu__link--cta {
    color: var(--accent);
}

.menu__index {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

/* Hero
   -------------------------------------------------------------------------- */
.hero {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100dvh - var(--header-h));
    padding-block: clamp(48px, 8vh, 96px);
}
.hero:focus {
    outline: none;
}

.hero__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

.hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 24px;
    grid-column: 1 / -1;
    margin-bottom: clamp(32px, 6vh, 72px);
}
.hero__eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hairline);
}

.hero__title {
    grid-column: 1 / 10;
    max-width: 12ch;
    font-family: var(--font-display);
    font-size: var(--size-display-xl);
    font-weight: 420;
    font-variation-settings: 'opsz' 144;
    line-height: 1.02;
    letter-spacing: -0.022em;
}

.hero__aside {
    grid-column: 1 / 8;
    margin-top: clamp(32px, 5vh, 56px);
}

.hero__subhead {
    max-width: 52ch;
    font-size: var(--size-body-lg);
    line-height: 1.6;
    color: var(--text-2);
}

.hero__actions {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-top: 32px;
}

.hero__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    grid-column: 1 / -1;
    margin-top: clamp(48px, 9vh, 104px);
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
}

.hero__tools {
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px;
    row-gap: 8px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.hero__tools li:not(:last-child)::after {
    content: '·';
    margin-left: 12px;
    color: var(--hairline-strong);
}

.hero__scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.hero__scroll-cue::after {
    content: '';
    width: 1px;
    height: 28px;
    background: var(--hairline-strong);
}

/* Services — numbered editorial rows
   -------------------------------------------------------------------------- */
.service-row {
    display: grid;
    grid-template-columns: 96px 4fr 5fr 3fr;
    gap: 24px;
    align-items: start;
    padding-block: 40px;
    border-top: 1px solid var(--hairline);
}
.service-row:last-child {
    border-bottom: 1px solid var(--hairline);
}

/* Wonky hollow index numerals: fill on hover, never with accent */
.service-row__index {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
    font-weight: 400;
    font-variation-settings: 'opsz' 144, 'WONK' 1;
    line-height: 0.9;
    color: transparent;
    -webkit-text-stroke: 1px rgba(232, 236, 241, 0.28);
    transition: color 300ms var(--ease), -webkit-text-stroke-color 300ms var(--ease),
        transform 300ms var(--ease);
}
@supports not (-webkit-text-stroke: 1px black) {
    .service-row__index {
        color: rgba(232, 236, 241, 0.28);
    }
}

@media (hover: hover) {
    .service-row:hover .service-row__index {
        color: var(--text);
        -webkit-text-stroke-color: transparent;
        transform: translateX(-4px);
    }
}

.service-row__title {
    font-family: var(--font-display);
    font-size: var(--size-h3);
    font-weight: 480;
    font-variation-settings: 'opsz' 36;
    line-height: 1.25;
    letter-spacing: -0.008em;
}

.service-row__text {
    max-width: 48ch;
    color: var(--text-2);
}

.service-row__tags {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: right;
}

/* Work — alternating split case rows + drawing-sheet plates
   -------------------------------------------------------------------------- */
.case {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 48px;
    align-items: center;
}
.case + .case {
    margin-top: clamp(64px, 10vh, 112px);
}

.case__media {
    grid-column: 1 / 7;
}
.case__body {
    grid-column: 8 / 13;
}
.case--flip .case__media {
    grid-column: 7 / 13;
    order: 2;
}
.case--flip .case__body {
    grid-column: 1 / 6;
    order: 1;
}

/* Plate: surface panel + hairline + corner crop ticks + mono figure caption */
.plate__panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    padding: 24px;
    background: var(--surface-2);
    border: 1px solid var(--hairline);
    border-radius: 4px;
    transition: border-color var(--speed) var(--ease);
}
.plate__panel::before,
.plate__panel::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background:
        linear-gradient(to right, var(--hairline-strong) 0 1px, transparent 1px),
        linear-gradient(to bottom, var(--hairline-strong) 0 1px, transparent 1px);
}
.plate__panel::before {
    top: 8px;
    left: 8px;
}
.plate__panel::after {
    right: 8px;
    bottom: 8px;
    transform: rotate(180deg);
}

.plate__logo {
    width: auto;
    max-width: 60%;
    max-height: 50px;
}

.plate__callout {
    position: absolute;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.plate__callout--tr {
    top: 14px;
    right: 18px;
}
.plate__callout--bl {
    bottom: 14px;
    left: 18px;
}

/* Screenshot plates: the shot sits on a thin surface mat, like a mounted print */
.plate__panel--shot {
    display: block;
    padding: 10px;
}

.plate__shot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border: 1px solid var(--hairline);
    border-radius: 2px;
}

.plate__caption {
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.case__title {
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem);
    font-weight: 460;
    font-variation-settings: 'opsz' 72;
    line-height: 1.1;
    letter-spacing: -0.012em;
}

.case__link {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    color: inherit;
    transition: color var(--speed) var(--ease);
}
.case__link::after {
    content: '↗';
    font-size: 0.55em;
    color: var(--text-muted);
    transition: color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.case__link:hover {
    color: var(--accent);
}
.case__link:hover::after {
    color: var(--accent);
    transform: translate(2px, -2px);
}

.case__text {
    max-width: 44ch;
    margin-top: 16px;
    color: var(--text-2);
}

.case__tags {
    margin-top: 24px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* About + team
   -------------------------------------------------------------------------- */
.about__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
}

.about__mission {
    grid-column: 1 / 9;
}

.about__lead {
    font-family: var(--font-display);
    font-size: clamp(1.375rem, 1rem + 1.6vw, 2rem);
    font-weight: 420;
    font-variation-settings: 'opsz' 40;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.about__body {
    max-width: 58ch;
    margin-top: 24px;
    font-size: var(--size-body-lg);
    line-height: 1.6;
    color: var(--text-2);
}

.about__facts {
    grid-column: 10 / 13;
    align-self: start;
}

.about__fact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-block: 16px;
    border-top: 1px solid var(--hairline);
}
.about__fact:last-child {
    border-bottom: 1px solid var(--hairline);
}
.about__fact dt {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.about__fact dd {
    font-size: var(--size-small);
    color: var(--text-2);
}

/* Stack index — grouped capability rows, same sheet furniture as the roster */
.stack {
    margin-top: clamp(64px, 10vh, 104px);
}

.stack__list {
    margin-top: 32px;
}

.stack__row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 20px;
    align-items: baseline;
    padding-block: 16px;
    border-top: 1px solid var(--hairline);
}
.stack__row:last-child {
    border-bottom: 1px solid var(--hairline);
}

.stack__group {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stack__items {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    line-height: 2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.team {
    margin-top: clamp(64px, 10vh, 104px);
}

.team__label {
    font-family: var(--font-display);
    font-size: var(--size-h3);
    font-weight: 480;
    font-variation-settings: 'opsz' 36;
    letter-spacing: -0.008em;
}

/* Roster rows — extends the title-block motif instead of an equal-card grid */
.team__list {
    margin-top: 32px;
}

.team__row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 20px;
    align-items: center;
    padding-block: 16px;
    border-top: 1px solid var(--hairline);
}
.team__row:last-child {
    border-bottom: 1px solid var(--hairline);
}

.team__index {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.team__name {
    font-family: var(--font-body);
    font-size: var(--size-body);
    font-weight: 500;
    color: var(--text);
}

.team__link {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    transition: color var(--speed) var(--ease);
}
.team__link::after {
    content: '↗';
    font-size: 0.7em;
    color: var(--text-muted);
    transition: color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.team__link:hover {
    color: var(--accent);
}
.team__link:hover::after {
    color: var(--accent);
    transform: translate(1px, -1px);
}

.team__role {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: right;
}

/* Contact
   -------------------------------------------------------------------------- */
.contact__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 24px;
}

.contact__info {
    grid-column: 1 / 6;
}

.contact__form-col {
    grid-column: 7 / 13;
}

.socials {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 40px;
}

.socials__link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    color: var(--text-2);
    transition: color var(--speed) var(--ease);
}
.socials__link:hover {
    color: var(--text);
}

.socials__icon {
    flex-shrink: 0;
}

.socials__label {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Form */
.form__field {
    margin-bottom: 24px;
}

.form__label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
}

.form__input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    color: var(--text);
    background: var(--surface-1);
    border: 1px solid var(--border-input);
    border-radius: 2px;
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.form__input:hover {
    border-color: rgba(232, 236, 241, 0.55);
}
.form__input:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 6px rgba(127, 169, 217, 0.18);
}
.form__input[aria-invalid='true'] {
    border-color: var(--error);
}
.form__input[aria-invalid='true']:focus-visible {
    border-color: var(--error);
    box-shadow: 0 0 0 6px rgba(224, 142, 142, 0.15);
}

/* Errors show/hide instantly — never animated */
.form__error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: var(--size-small);
    color: var(--error);
}
.form__error[hidden] {
    display: none;
}
.form__error--submit {
    margin-bottom: 16px;
}

.form__error-icon {
    flex-shrink: 0;
}

.form__submit {
    width: 100%;
}
.form__submit[disabled] {
    opacity: 0.6;
    cursor: default;
}

/* Success panel */
.form-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    min-height: 320px;
    justify-content: center;
    padding: 32px;
    background: var(--surface-1);
    border: 1px solid var(--hairline);
    border-radius: 2px;
}
.form-success[hidden] {
    display: none;
}
.form-success:focus {
    outline: none;
}

.form-success__icon {
    color: var(--accent);
}

.form-success__text {
    font-size: var(--size-body-lg);
}

.form-success__reset {
    min-height: 44px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
    border-bottom: 1px solid var(--hairline-strong);
    transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.form-success__reset:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Footer — engineering title block
   -------------------------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--hairline);
    padding-block: 40px 32px;
}

.footer__block {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--hairline);
}

.footer__cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
}
.footer__cell:not(:first-child) {
    border-left: 1px solid var(--hairline);
}
.footer__cell--action {
    align-items: flex-start;
    justify-content: center;
}

.footer__key {
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.footer__value {
    font-size: var(--size-small);
    color: var(--text-2);
}

.footer__top {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
    transition: color var(--speed) var(--ease);
}
.footer__top:hover {
    color: var(--accent);
}

.footer__copyright {
    margin-top: 20px;
    font-size: var(--size-small);
    color: var(--text-muted);
}

/* Source-line scroll readout
   -------------------------------------------------------------------------- */
.readout {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: var(--z-content);
    pointer-events: none;
    font-family: var(--font-mono);
    font-size: var(--size-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: opacity var(--speed) var(--ease);
}
.readout.is-parked {
    opacity: 0;
}

/* Reveal system
   -------------------------------------------------------------------------- */
.js [data-reveal],
.js [data-load-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
    transition-delay: calc(min(var(--stagger-i, 0) * 80ms, 400ms));
}
.js [data-reveal].is-visible,
.js [data-load-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .nav__list {
        gap: 20px;
    }

    .hero__title {
        grid-column: 1 / -1;
    }
    .hero__aside {
        grid-column: 1 / -1;
    }

    .service-row {
        grid-template-columns: 64px 1fr;
        grid-template-areas:
            'index title'
            'index text'
            'index tags';
        row-gap: 12px;
    }
    .service-row__index {
        grid-area: index;
    }
    .service-row__title {
        grid-area: title;
    }
    .service-row__text {
        grid-area: text;
    }
    .service-row__tags {
        grid-area: tags;
        text-align: left;
    }

    .case {
        gap: 32px;
    }
    .case__media {
        grid-column: 1 / 7;
    }
    .case__body {
        grid-column: 7 / 13;
    }
    .case--flip .case__media {
        grid-column: 7 / 13;
    }
    .case--flip .case__body {
        grid-column: 1 / 7;
    }

    .about__mission {
        grid-column: 1 / -1;
    }
    .about__facts {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        margin-top: 16px;
    }
    .about__fact:last-child {
        border-bottom: none;
    }

    .contact__info {
        grid-column: 1 / -1;
    }
    .contact__form-col {
        grid-column: 1 / -1;
        margin-top: 48px;
    }

    .footer__block {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer__cell:nth-child(3) {
        border-left: none;
    }
    .footer__cell:nth-child(n + 3) {
        border-top: 1px solid var(--hairline);
    }

    .readout {
        display: none;
    }
}

@media (max-width: 767px) {
    .nav__list {
        display: none;
    }
    .js .nav__toggle:not([hidden]) {
        display: block;
    }
    /* With JS disabled the toggle stays hidden and the plain link list shows */
    .no-js .nav__list {
        display: flex;
        gap: 16px;
    }
    .no-js .nav__cta {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-block: 64px 56px;
    }
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .hero__actions .link-arrow {
        justify-content: center;
    }
    .hero__scroll-cue {
        display: none;
    }

    .service-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            'index'
            'title'
            'text'
            'tags';
        padding-block: 28px;
    }
    .service-row__index {
        font-size: 2rem;
    }

    .case__media,
    .case__body,
    .case--flip .case__media,
    .case--flip .case__body {
        grid-column: 1 / -1;
        order: initial;
    }
    .case + .case {
        margin-top: 64px;
    }
    .plate__panel {
        aspect-ratio: 4 / 3;
    }
    .plate__logo {
        max-height: 38px;
    }

    .about__facts {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .about__fact:last-child {
        border-bottom: 1px solid var(--hairline);
    }

    .team__row {
        grid-template-columns: 1fr auto;
    }
    .team__index {
        display: none;
    }

    .stack__row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .socials {
        margin-top: 32px;
    }
    .socials__link {
        min-height: 48px;
        width: 100%;
    }

    .footer__block {
        grid-template-columns: 1fr;
    }
    .footer__cell {
        border-left: none !important;
    }
    .footer__cell:not(:first-child) {
        border-top: 1px solid var(--hairline);
    }
    .footer__copyright {
        text-align: center;
    }
}

/* Reduced motion: everything visible, nothing moves
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .js [data-reveal],
    .js [data-load-reveal],
    .menu__link {
        opacity: 1;
        transform: none;
    }
}
