/* Self-hosted Inter (variable) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('res/fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('res/fonts/inter-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Tokens ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --paper: #f3f1ec;
    --paper-2: #e8e5de;
    --white: #ffffff;
    --ink: #0e0e0e;
    --ink-2: #2f2f2f;
    --gray: #66635f;
    --gray-light: #a8a5a0;
    --line: rgba(14, 14, 14, 0.14);
    --line-inverse: rgba(243, 241, 236, 0.22);
    --accent: #006b7d;
    --accent-bright: #22d3ee;

    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Consolas, monospace;

    --header-height: 68px;
    --gutter: clamp(16px, 4vw, 48px);
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink-2);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

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

.dot {
    color: var(--accent);
    -webkit-text-stroke: 0;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(243, 241, 236, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    z-index: 1000;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header--scrolled {
    background: rgba(243, 241, 236, 0.97);
    border-bottom-color: var(--ink);
}

.header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo a {
    text-decoration: none;
}

.logo-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}

/* Brand mark is an upright accent cross. Protection of the Red Cross / Red Crescent / Red Crystal
   emblems and the Swiss flag is tied to specific colors (red on white, white on red) — never use
   those color combos here, but the teal/cyan accent cross itself is fine. */
.logo-mark {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    background: var(--accent);
    clip-path: polygon(33.33% 0, 66.66% 0, 66.66% 33.33%, 100% 33.33%, 100% 66.66%, 66.66% 66.66%, 66.66% 100%, 33.33% 100%, 33.33% 66.66%, 0 66.66%, 0 33.33%, 33.33% 33.33%);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav a {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    position: relative;
    padding: 4px 0;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
}

.nav-index {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--gray);
    transition: color 0.2s ease;
}

.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.nav a:hover::after,
.nav a.active::after {
    transform: scaleX(1);
}

.nav a.active .nav-index {
    color: var(--accent);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray);
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f9d55;
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(31, 157, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); }
}

.mobile-menu-btn {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--ink);
    color: var(--paper);
    border: 0;
    padding: 9px 14px;
    cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--ink);
    color: var(--paper);
    padding: 16px 28px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

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

.btn-link {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

/* ===== Hero ===== */
.hero {
    padding-top: calc(var(--header-height) + clamp(40px, 7vw, 96px));
    overflow: hidden;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: clamp(20px, 3vw, 40px);
}

.kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink);
}

.kicker::before {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero-mark {
    width: clamp(56px, 11vw, 160px);
    aspect-ratio: 1;
    flex-shrink: 0;
    background: var(--accent);
    clip-path: polygon(33.33% 0, 66.66% 0, 66.66% 33.33%, 100% 33.33%, 100% 66.66%, 66.66% 66.66%, 66.66% 100%, 33.33% 100%, 33.33% 66.66%, 0 66.66%, 0 33.33%, 33.33% 33.33%);
    transform-origin: top right;
}

.hero-title {
    font-size: clamp(3rem, 8.6vw, 8.75rem);
    font-weight: 850;
    line-height: 0.9;
    letter-spacing: -0.05em;
    color: var(--ink);
    margin-bottom: clamp(40px, 6vw, 80px);
}

.hero-line {
    display: block;
    animation: rise 0.9s var(--ease-out) both;
}

.hero-line + .hero-line {
    animation-delay: 0.12s;
}

/* Solid two-tone instead of outlined text: Inter's variable glyphs have overlapping contours that show through a stroke */
.hero-line--muted {
    color: #8a857e;
}

@keyframes rise {
    from {
        opacity: 0;
        translate: 0 0.35em;
    }
}

.hero-meta {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    gap: 32px;
    align-items: end;
    padding: 28px 0 40px;
    border-top: 1px solid var(--ink);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    font-weight: 500;
    color: var(--ink);
    min-height: 1.6em;
}

.hero-arrow {
    color: var(--accent);
}

.typewriter-text::after {
    content: '';
    display: inline-block;
    width: 0.55em;
    height: 2px;
    margin-left: 4px;
    background: var(--accent);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-location {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.8;
    color: var(--gray);
}

.hero-cta-group {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--ink);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: clamp(20px, 3vw, 36px) clamp(12px, 2vw, 28px) clamp(32px, 5vw, 64px);
    border-left: 1px solid var(--line);
}

.stat:first-child {
    border-left: 0;
    padding-left: 0;
}

.stat-number {
    font-size: clamp(2.4rem, 7vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.stat-plus {
    color: var(--accent);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
}

/* ===== Sections ===== */
.section {
    padding: clamp(72px, 10vw, 140px) 0;
    border-top: 1px solid var(--ink);
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 32px;
    margin-bottom: clamp(40px, 6vw, 80px);
}

.section-index {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-top: 0.7em;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink);
}

.section-index span {
    color: var(--accent);
}

.section-title {
    font-size: clamp(2.2rem, 5.4vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1;
    color: var(--ink);
    max-width: 16ch;
}

.section-subtitle {
    margin-top: 24px;
    max-width: 46ch;
    font-size: 1.1rem;
    color: var(--ink-2);
}

/* ===== Services ===== */
.service-list {
    border-top: 1px solid var(--ink);
}

/* Full-bleed band on hover: box-shadow paints past the container, clip-path keeps it horizontal */
.service {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 32px;
    padding: clamp(28px, 4vw, 48px) 0;
    border-bottom: 1px solid var(--ink);
    box-shadow: 0 0 0 100vmax transparent;
    clip-path: inset(0 -100vmax);
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.service-num {
    padding-top: 0.6em;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
}

.service-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 32px;
    padding-right: 64px;
}

.service-title {
    font-size: clamp(1.6rem, 2.8vw, 2.6rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--ink);
    transition: color 0.35s ease;
}

.service-description {
    margin-bottom: 18px;
    color: var(--ink-2);
    transition: color 0.35s ease;
}

.service-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    row-gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
    transition: color 0.35s ease;
}

.service-tags li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: var(--accent);
}

.service-arrow {
    position: absolute;
    right: 0;
    top: clamp(28px, 4vw, 48px);
    font-size: 1.8rem;
    line-height: 1;
    color: var(--ink);
    transition: transform 0.35s var(--ease-out), color 0.35s ease;
}

@media (hover: hover) {
    .service:hover {
        background-color: var(--ink);
        box-shadow: 0 0 0 100vmax var(--ink);
    }

    .service:hover .service-title,
    .service:hover .service-description {
        color: var(--paper);
    }

    .service:hover .service-tags {
        color: var(--gray-light);
    }

    .service:hover .service-arrow {
        color: var(--accent);
        transform: rotate(-45deg);
    }
}

.services-cta {
    margin-top: 40px;
    font-size: 1.05rem;
    color: var(--ink-2);
}

.services-cta a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    transition: color 0.2s ease;
}

.services-cta a:hover {
    color: var(--accent);
}

/* ===== Customers ===== */
.client-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--ink);
    border-left: 1px solid var(--line);
}

.client {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(150px, 16vw, 210px);
    padding: 28px 28px 44px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition: background-color 0.3s ease;
}

.client-industry {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-align: center;
    color: var(--ink);
    transition: color 0.3s ease;
}

.client-name {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
}

@media (hover: hover) {
    .client:hover {
        background-color: var(--white);
    }

    .client:hover .client-industry {
        color: var(--accent);
    }
}

/* ===== About ===== */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 32px;
    align-items: start;
}

.about-photo {
    position: sticky;
    top: calc(var(--header-height) + 32px);
    margin: 0;
}

.about-photo-frame {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-2);
    border: 1px solid var(--ink);
}

.about-photo-frame::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 22%;
    aspect-ratio: 1;
    background: var(--accent);
}

.about-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.05);
    transition: filter 0.4s ease;
}

.about-photo:hover img {
    filter: none;
}

.about-initials {
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 850;
    letter-spacing: -0.05em;
    color: #c9c4bb;
}

.about-photo figcaption {
    display: flex;
    flex-direction: column;
    margin-top: 14px;
}

.about-role {
    font-weight: 700;
    color: var(--ink);
}

.about-role-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray);
}

.about-text p {
    max-width: 62ch;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-text .lead {
    max-width: 34em;
    margin-bottom: 36px;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.pull-quote {
    max-width: 38em;
    margin: 0 0 32px;
    padding: 4px 0 4px 24px;
    border-left: 4px solid var(--accent);
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    font-weight: 600;
    line-height: 1.45;
    color: var(--ink);
}

.about-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--ink);
}

.block-title {
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray);
}

.skills-list ol {
    list-style: none;
    counter-reset: competency;
}

.skills-list li {
    counter-increment: competency;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
    color: var(--ink);
}

.skills-list li::before {
    content: counter(competency, decimal-leading-zero);
    padding-top: 0.2em;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--accent);
}

.stack-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.stack-row dt {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
}

.stack-row dd {
    font-size: 0.92rem;
    color: var(--ink-2);
}

/* ===== Contact (inverted) ===== */
/* Dark teal is only ~3:1 on ink, so dark sections switch to the bright cyan */
.contact,
.footer {
    --accent: var(--accent-bright);
}

.contact {
    background: var(--ink);
    color: #d9d6d0;
    border-top: 0;
}

.contact .section-index {
    color: var(--paper);
}

.contact-title {
    max-width: 12ch;
    font-size: clamp(2.6rem, 8vw, 8rem);
    font-weight: 850;
    letter-spacing: -0.05em;
    line-height: 0.92;
    color: var(--paper);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--line-inverse);
}

.contact-body {
    grid-column: 2;
}

.contact-body p {
    max-width: 42ch;
    margin-bottom: 40px;
    font-size: 1.2rem;
}

.contact-cta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 6px;
    border-bottom: 3px solid var(--accent);
    font-size: clamp(1.5rem, 3.4vw, 3rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--paper);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-cta-arrow {
    color: var(--accent);
    transition: transform 0.3s var(--ease-out);
}

.contact-cta:hover {
    color: var(--accent);
}

.contact-cta:hover .contact-cta-arrow {
    transform: translateX(8px);
}

.contact-form {
    display: grid;
    gap: 24px;
    max-width: 640px;
}

.contact-form label {
    display: grid;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-light);
}

.contact-form input,
.contact-form textarea {
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--line-inverse);
    background: transparent;
    font: inherit;
    font-size: 1.1rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--paper);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 0;
    border-bottom-color: var(--accent);
}

.contact-form .contact-cta {
    justify-self: start;
    background: none;
    border-width: 0 0 3px;
    cursor: pointer;
    font-family: inherit;
}

.contact-form .contact-form-status {
    margin: 0;
    font-size: 1rem;
}

.contact-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 40px;
}

.contact-links a,
.social-link,
.footer-legal-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-links a:hover,
.social-link:hover,
.footer-legal-link:hover {
    color: var(--paper);
}

/* ===== Footer (shared with legal pages) ===== */
.footer {
    background: var(--ink);
    color: var(--gray-light);
    padding-bottom: 28px;
    overflow: hidden;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px 0;
    border-top: 1px solid var(--line-inverse);
}

.footer-info p {
    font-size: 0.92rem;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-wordmark {
    margin: 8px 0 28px;
    font-size: clamp(5rem, 25vw, 23rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.78;
    color: var(--paper);
    white-space: nowrap;
    user-select: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--line-inverse);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-bottom .footer-legal-link {
    font-size: inherit;
}

/* ===== Legal pages ===== */
.legal-page {
    min-height: 100vh;
    padding: calc(var(--header-height) + clamp(40px, 6vw, 80px)) 0 clamp(72px, 9vw, 120px);
}

.breadcrumb {
    margin-bottom: 20px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

.legal-page h1 {
    margin-bottom: clamp(32px, 5vw, 64px);
    font-size: clamp(2.8rem, 8vw, 7rem);
    font-weight: 850;
    letter-spacing: -0.05em;
    line-height: 0.92;
    color: var(--ink);
}

.last-updated {
    margin: -24px 0 40px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray);
}

.legal-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    column-gap: 32px;
    padding: 32px 0 40px;
    border-top: 1px solid var(--ink);
}

.legal-card > * {
    grid-column: 2;
}

.legal-card > h2 {
    grid-column: 1;
    grid-row: 1 / span 20;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.6;
    color: var(--ink);
}

.legal-card p,
.legal-card address,
.legal-card ul {
    max-width: 72ch;
    margin-bottom: 14px;
    font-style: normal;
    line-height: 1.8;
    color: var(--ink-2);
}

.legal-card ul {
    padding-left: 20px;
}

.legal-card li {
    margin-bottom: 6px;
}

.legal-card strong {
    color: var(--ink);
}

.legal-card a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
}

.legal-card a:hover {
    color: var(--accent);
}

.legal-card .notice {
    padding: 16px 20px;
    background: var(--paper-2);
    border-left: 3px solid var(--accent);
    font-size: 0.92rem;
}

/* ===== Motion ===== */
.js .reveal {
    opacity: 0;
    translate: 0 28px;
    transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out), background-color 0.35s ease, box-shadow 0.35s ease;
}

.js .reveal.is-visible {
    opacity: 1;
    translate: 0 0;
}

/* Cross shrinks into the corner as you scroll (no rotation: keep it upright, not an X) */
@supports (animation-timeline: scroll()) {
    .hero-mark {
        animation: mark-shrink linear both;
        animation-timeline: scroll(root);
        animation-range: 0 100vh;
    }

    @keyframes mark-shrink {
        to { scale: 0.3; }
    }
}

/* 3D multitool (res/js/knife.js). Replaces the hero cross; on wide screens it docks in a
   rail on the right that the sections keep free, so it never sits behind text.
   Opacity is driven from JS. */
#knife-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
}

@media (min-width: 1200px) {
    /* 240px rail: keep in sync with RAIL in knife.js. Services has its own knives per row, Contact has none */
    .knife-ready main > section:not(.hero):not(#skills):not(#contact) > .container {
        padding-right: calc(var(--gutter) + 240px);
    }
}

/* Services: knife.js puts a small knife between the number and the text of each service */
.service-knife {
    display: none;
}

.knife-ready .service-knife {
    display: block;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    width: calc(100% - 2.5em);
    height: clamp(100px, 11vw, 160px);
}

/* Number and knife share the first column */
.knife-ready .service-num {
    grid-column: 1;
    grid-row: 1;
}

.knife-ready .service-main {
    grid-column: 2;
    grid-row: 1;
}

@media (max-width: 768px) {
    .knife-ready .service-num,
    .knife-ready .service-knife,
    .knife-ready .service-main {
        grid-column: 1;
        grid-row: auto;
    }

    .knife-ready .service-knife {
        justify-self: stretch;
        width: auto;
        height: 100px;
    }
}

/* Tablet/phone: knife.js inserts an empty slot at the head of each section (and above the
   About pull quote); the knife lies there and opens that section's tool */
.knife-slot {
    display: none;
}

@media (max-width: 1199px) {
    .knife-ready .knife-slot {
        display: block;
        grid-column: 1 / -1;
        height: clamp(96px, 13vw, 140px);
    }
}

.hero-mark {
    transition: opacity 0.8s var(--ease-out);
}

.knife-pending .hero-mark,
.knife-ready .hero-mark {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-mark {
        animation: none !important;
    }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
    .status {
        display: none;
    }

    .hero-meta {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .hero-cta-group {
        grid-column: 1 / -1;
    }

    .service-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        padding: 24px var(--gutter);
        background: var(--paper);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: opacity 0.3s ease, transform 0.3s var(--ease-out), visibility 0.3s;
    }

    .nav.mobile-active {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
    }

    .nav li {
        border-bottom: 1px solid var(--ink);
    }

    .nav a {
        display: flex;
        width: 100%;
        gap: 16px;
        padding: 18px 0;
        font-size: 2.2rem;
        font-weight: 800;
        letter-spacing: -0.03em;
    }

    .nav a::after {
        display: none;
    }

    .nav-index {
        font-size: 0.8rem;
        color: var(--accent);
    }

    .hero-meta {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .section-head,
    .service,
    .about-grid,
    .contact-grid,
    .legal-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .section-head {
        gap: 12px;
    }

    .section-index {
        padding-top: 0;
    }

    .service {
        gap: 10px;
    }

    .service-num {
        padding-top: 0;
    }

    .service-main {
        padding-right: 0;
    }

    .service-arrow {
        font-size: 1.4rem;
    }

    .client-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-photo {
        position: static;
        max-width: 260px;
    }

    .about-columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .contact-body,
    .legal-card > *,
    .legal-card > h2 {
        grid-column: auto;
        grid-row: auto;
    }

    .legal-card > h2 {
        margin-bottom: 14px;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .kicker {
        font-size: 0.66rem;
        letter-spacing: 0.08em;
    }

    .kicker::before {
        width: 20px;
    }

    .stat {
        padding-left: 10px;
        padding-right: 6px;
    }

    .stat:first-child {
        padding-left: 0;
    }

    .stat-label {
        font-size: 0.6rem;
        letter-spacing: 0.05em;
    }

    .client {
        min-height: 128px;
        padding: 20px 16px 40px;
    }

    .client-industry {
        font-size: 1rem;
    }

    .client-name {
        left: 12px;
        right: 12px;
        bottom: 10px;
        font-size: 0.6rem;
    }

    .stack-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .nav a {
        font-size: 1.9rem;
    }
}
