/* ==========================================================================
   RAM CONSTRUCT — styles.css
   1. Font  2. Tokens  3. Base  4. Layout  5. Buttons & links  6. Header
   7. Hero  8. Intro  9. Project pathways  10. Process  11. Work gallery
   12. CTA  13. Contact  14. Footer  15. Mobile bar  16. Motion  17. Legal page
   ========================================================================== */

/* 1. Font — Archivo variable (wght 100–900, wdth 62–125), SIL OFL, self-hosted */
@font-face {
    font-family: "Archivo";
    src: url("fonts/archivo-variable-latin.woff2") format("woff2-variations"),
         url("fonts/archivo-variable-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 62% 125%;
    font-style: normal;
    font-display: swap;
}

/* 2. Tokens */
:root {
    /* palette: concrete, graphite and iron oxide */
    --plaster: #E7E8E6;
    --plaster-deep: #DADCD9;
    --ink: #141618;
    --graphite: #1E2124;
    --graphite-2: #272B2F;
    --steel: #585D62;
    --steel-light: #A7ACB1;
    --oxide: #B4441F;
    --oxide-hover: #963616;
    --oxide-text: #963616; /* small oxide text on light surfaces (AA) */
    --oxide-bright: #E4744B;
    --line: rgba(20, 22, 24, 0.14);
    --line-strong: rgba(20, 22, 24, 0.85);
    --line-dark: rgba(239, 236, 230, 0.14);

    /* type */
    --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
    --wide: 125%;
    --semi-wide: 112%;
    --fs-display: clamp(2.5rem, 11.5vw, 8.25rem);
    --fs-h2: clamp(2rem, 4.6vw, 3.9rem);
    --fs-h3: clamp(1.15rem, 1.6vw, 1.35rem);
    --fs-lead: clamp(1.1rem, 1.5vw, 1.3rem);
    --fs-body: 1.0625rem;
    --fs-small: 0.875rem;
    --fs-label: 0.75rem;

    /* spacing & layout */
    --container: 1320px;
    --gutter: clamp(1.25rem, 4vw, 3rem);
    --section: clamp(4.5rem, 10vw, 9rem);
    --header-h: 76px;
    --radius: 0;

    /* motion */
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --t-fast: 180ms;
    --t-slow: 700ms;
}

/* 3. Base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: 1.6;
    color: var(--ink);
    background: var(--plaster);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Page-margin rules at the container edges — the drawing-sheet frame */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(var(--line), var(--line)) no-repeat
            max(calc(var(--gutter) / 2), calc(50% - var(--container) / 2 + var(--gutter) / 2)) 0 / 1px 100%,
        linear-gradient(var(--line), var(--line)) no-repeat
            min(calc(100% - var(--gutter) / 2), calc(50% + var(--container) / 2 - var(--gutter) / 2)) 0 / 1px 100%;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

h1, h2, h3 {
    font-weight: 800;
    font-stretch: var(--wide);
    line-height: 1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

p { max-width: 62ch; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1rem;
    background: var(--ink);
    color: var(--plaster);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

/* 4. Layout */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 1.5rem 3rem;
    align-items: end;
    margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-title { font-size: var(--fs-h2); }

.section-intro {
    color: var(--steel);
    font-size: var(--fs-lead);
    line-height: 1.5;
}

/* 5. Buttons & links */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 56px;
    padding: 0.9rem 1.6rem;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    font-stretch: var(--semi-wide);
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease),
                border-color var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--oxide); color: #fff; }
.btn-primary:hover { background: var(--oxide-hover); }

.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--plaster); }

.btn-outline-light { border-color: var(--plaster); color: var(--plaster); }
.btn-outline-light:hover { background: var(--plaster); color: var(--ink); }

.btn-small { min-height: 44px; padding: 0.55rem 1.1rem; font-size: 0.9375rem; }
.btn-large { min-height: 64px; padding: 1rem 2rem; font-size: 1.0625rem; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-stretch: var(--semi-wide);
    text-decoration: none;
    border-bottom: 2px solid var(--oxide);
    padding-bottom: 0.25rem;
}
.text-link .icon { transition: transform var(--t-fast) var(--ease); }
.text-link:hover .icon { transform: translateX(4px); }

/* 6. Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(231, 232, 230, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark { width: 42px; height: 42px; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-ram {
    font-size: 1.45rem;
    font-weight: 850;
    font-stretch: var(--wide);
    letter-spacing: 0.02em;
}

.brand-construct {
    margin-top: 0.2rem;
    font-size: 0.6rem;
    font-weight: 600;
    font-stretch: var(--semi-wide);
    letter-spacing: 0.42em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-list a {
    position: relative;
    display: inline-block;
    padding-block: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-stretch: var(--semi-wide);
    text-decoration: none;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0.2rem;
    height: 2px;
    background: var(--oxide);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-fast) var(--ease);
}
.nav-list a:hover::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.5rem 0.25rem;
    background: none;
    border: 0;
    font: inherit;
    font-weight: 700;
    font-stretch: var(--semi-wide);
    font-size: 0.9375rem;
    color: var(--ink);
    cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform var(--t-fast) var(--ease);
}
.nav-toggle-bars { position: relative; transform: translateY(-4px); }
.nav-toggle-bars::before {
    content: "";
    position: absolute;
    top: 8px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(-8px) rotate(-90deg); }

/* 7. Hero */
.hero {
    padding-top: clamp(3rem, 7vw, 6rem);
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
}

.hero-title {
    font-size: var(--fs-display);
    line-height: 0.92;
    letter-spacing: -0.035em;
    font-weight: 850;
}
.hero-title .line { display: block; }
.accent-stop { color: var(--oxide); }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
    margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-lead {
    font-size: var(--fs-lead);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.hero-note {
    margin-top: 1rem;
    font-size: var(--fs-small);
    color: var(--steel);
}

/* structural elevation drawing */
.elevation { width: 100%; height: auto; overflow: visible; }
.elevation .gridline {
    stroke: var(--steel-light);
    stroke-width: 1;
    stroke-dasharray: 10 5 2 5;
}
.elevation .bubble { fill: var(--plaster); stroke: var(--ink); stroke-width: 1.5; }
.elevation .bubble-text {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    text-anchor: middle;
    fill: var(--ink);
}
.elevation .level-line { stroke: var(--steel-light); stroke-width: 1; stroke-dasharray: 4 6; }
.elevation .level-text {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    fill: var(--steel);
}
.elevation .hatch-line { stroke: var(--steel-light); stroke-width: 1.2; }
.elevation .draw { fill: none; stroke-linecap: square; }
.elevation .member { stroke: var(--ink); stroke-width: 9; }
.elevation .slab { stroke: var(--ink); stroke-width: 12; }
.elevation .ground { stroke: var(--ink); stroke-width: 3; }
.elevation .brace { stroke: var(--ink); stroke-width: 3; }
.elevation .brace-accent { stroke: var(--oxide); stroke-width: 8; }
.elevation .dim-line,
.elevation .dim-ext { stroke: var(--steel); stroke-width: 1; }
.elevation .dim-tick { stroke: var(--ink); stroke-width: 2; }

/* title block — quick-contact strip styled as a drawing title block */
.title-block {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: clamp(2.5rem, 5vw, 4rem);
    border: 1.5px solid var(--line-strong);
}

.tb-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    min-width: 0;
}
.tb-cell + .tb-cell { border-left: 1px solid var(--line-strong); }

.tb-label {
    font-size: var(--fs-label);
    font-weight: 600;
    font-stretch: var(--semi-wide);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--steel);
}

.tb-value {
    font-weight: 700;
    font-stretch: var(--semi-wide);
    font-size: 1rem;
    text-decoration: none;
}
a.tb-value { display: inline-flex; align-items: center; min-height: 44px; margin-block: -0.6rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a.tb-value:hover { color: var(--oxide-text); }

/* 8. Intro */
.intro { border-top: 1px solid var(--line); }

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 2.5rem clamp(2rem, 6vw, 6rem);
    align-items: start;
}

.intro-title { font-size: var(--fs-h2); }

.intro-body {
    display: grid;
    gap: 1.25rem;
    justify-items: start;
    padding-top: 0.5rem;
    font-size: 1.125rem;
}
.intro-body p { color: var(--steel); }
.intro-body p:first-child { color: var(--ink); }

/* 9. Project pathways */
.project {
    background: var(--plaster-deep);
}

.pathways { border-top: 1.5px solid var(--line-strong); }

.pathway { border-bottom: 1px solid var(--line-strong); }

.pathway-link {
    position: relative;
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding: clamp(1.75rem, 3vw, 2.5rem) 0;
    text-decoration: none;
    isolation: isolate;
}

/* ink wipe on hover */
.pathway-link::before {
    content: "";
    position: absolute;
    inset: 0 calc(var(--gutter) * -0.5);
    z-index: -1;
    background: var(--ink);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 320ms var(--ease);
}
.pathway-link:hover::before,
.pathway-link:focus-visible::before { transform: scaleY(1); }
.pathway-link:hover,
.pathway-link:focus-visible { color: var(--plaster); }
.pathway-link:hover .pathway-text,
.pathway-link:focus-visible .pathway-text { color: var(--steel-light); }
.pathway-link:hover .pathway-index,
.pathway-link:focus-visible .pathway-index { color: var(--oxide-bright); }

.pathway-index {
    font-size: 1rem;
    font-weight: 700;
    font-stretch: var(--semi-wide);
    letter-spacing: 0.1em;
    color: var(--oxide-text);
    font-variant-numeric: tabular-nums;
    align-self: start;
    padding-top: clamp(0.5rem, 1.1vw, 0.95rem);
    transition: color var(--t-fast) var(--ease);
}

.pathway-main { display: grid; gap: 0.5rem; }

.pathway-title {
    font-size: clamp(1.5rem, 3.2vw, 2.6rem);
    font-weight: 800;
    font-stretch: var(--wide);
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.pathway-text {
    color: var(--steel);
    max-width: 52ch;
    transition: color var(--t-fast) var(--ease);
}

.pathway-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-stretch: var(--semi-wide);
    font-size: 0.9375rem;
    white-space: nowrap;
}
.pathway-action .icon { transition: transform var(--t-fast) var(--ease); }
.pathway-link:hover .pathway-action .icon { transform: translateX(5px); }

/* 10. Process */
.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    counter-reset: step;
}

/* dimension line joining the steps */
.steps::before {
    content: "";
    position: absolute;
    top: 22px;
    left: 22px;
    right: 0;
    height: 1px;
    background: var(--line-strong);
}

.step { position: relative; padding-right: 1rem; }

.step-ref {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1.75rem;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: var(--plaster);
    font-weight: 700;
    font-size: 1.05rem;
}
.step:first-child .step-ref { background: var(--ink); color: var(--plaster); }

.step-title {
    font-size: var(--fs-h3);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.step p { color: var(--steel); }

/* 11. Work gallery */
.work-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.work-item { grid-column: span 4; }
.work-item-wide { grid-column: span 8; }
.work-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--plaster-deep);
}
.work-item-wide img { aspect-ratio: auto; height: 100%; }
.work-item figcaption {
    margin-top: 0.6rem;
    font-size: var(--fs-small);
    color: var(--steel);
}

/* 12. CTA */
.cta {
    position: relative;
    padding-block: var(--section);
    background: var(--graphite);
    color: var(--plaster);
    overflow: hidden;
}

.cta-inner { position: relative; }

.cta-title {
    font-size: clamp(2.4rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    max-width: 14ch;
}

.cta-text {
    margin-block: 1.75rem 2.5rem;
    font-size: var(--fs-lead);
    color: var(--steel-light);
}

.cta .btn-primary:focus-visible,
.cta .btn-outline-light:focus-visible { outline-color: var(--oxide-bright); }

/* 13. Contact */
.contact .section-title { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1.5px solid var(--line-strong);
}

.contact-route {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: clamp(1.75rem, 4vw, 3rem);
    text-decoration: none;
    transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.contact-route + .contact-route { border-left: 1.5px solid var(--line-strong); }

.contact-route-primary { background: var(--ink); color: var(--plaster); }
.contact-route-primary:hover { background: var(--graphite-2); }
.contact-route:not(.contact-route-primary):hover { background: var(--plaster-deep); }
.contact-route-primary:focus-visible { outline-offset: -6px; outline-color: var(--oxide-bright); }

.contact-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--fs-label);
    font-weight: 700;
    font-stretch: var(--semi-wide);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.contact-route-primary .contact-label { color: var(--oxide-bright); }
.contact-route:not(.contact-route-primary) .contact-label { color: var(--oxide-text); }

.contact-number {
    font-size: clamp(1.75rem, 3.4vw, 3rem);
    font-weight: 800;
    font-stretch: var(--wide);
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.contact-hint { color: var(--steel); max-width: 40ch; }
.contact-route-primary .contact-hint { color: var(--steel-light); }

.contact-go {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.25rem;
    font-weight: 700;
    font-stretch: var(--semi-wide);
}
.contact-go .icon { transition: transform var(--t-fast) var(--ease); }
.contact-route:hover .contact-go .icon { transform: translateX(5px); }

/* 14. Footer */
.site-footer {
    background: var(--ink);
    color: var(--plaster);
    padding-block: 3.5rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem 3rem;
    align-items: center;
}

.brand-footer {
    color: var(--plaster);
    --mark-bg: var(--plaster);
    --mark-fg: var(--ink);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 2rem;
    font-size: 0.9375rem;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-underline-offset: 0.2em;
}
.footer-links a:hover { color: var(--oxide-bright); }
.footer-label { color: var(--steel-light); margin-right: 0.35rem; }

.footer-legal { font-size: var(--fs-small); color: var(--steel-light); }

.site-footer :focus-visible { outline-color: var(--oxide-bright); }

/* 15. Mobile bar */
.mobile-bar { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .title-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tb-cell:nth-child(3) { border-left: 0; }
    .tb-cell:nth-child(n + 3) { border-top: 1px solid var(--line-strong); }
    .footer-inner { grid-template-columns: 1fr auto; }
    .footer-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}

@media (max-width: 860px) {
    :root { --header-h: 64px; }

    .nav-toggle { display: inline-flex; }

    body { padding-bottom: 68px; }
    body.legal-page { padding-bottom: 0; }

    /* sticky WhatsApp | Call bar */
    .mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        display: grid;
        grid-template-columns: 1.4fr 1fr;
        padding-bottom: env(safe-area-inset-bottom, 0);
        background: var(--ink);
        box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
    }
    .mobile-bar-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        min-height: 60px;
        font-weight: 700;
        font-stretch: var(--semi-wide);
        font-size: 1rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        text-decoration: none;
    }
    .mobile-bar-wa { background: var(--oxide); color: #fff; }
    .mobile-bar-call { color: var(--plaster); }
    .mobile-bar-btn:focus-visible { outline-color: #fff; outline-offset: -5px; }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem var(--gutter) 1.5rem;
        background: var(--plaster);
        border-bottom: 1.5px solid var(--line-strong);
    }
    .site-nav.is-open { display: flex; }

    .nav-list { flex-direction: column; gap: 0; }
    .nav-list li { border-bottom: 1px solid var(--line); }
    .nav-list a {
        display: block;
        padding-block: 1rem;
        font-size: 1.25rem;
        font-weight: 700;
        font-stretch: var(--wide);
    }
    .nav-list a::after { display: none; }
    .nav-cta { margin-top: 1.25rem; min-height: 52px; }

    .section-head,
    .intro-grid,
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { max-width: 40rem; }
    .hero-drawing { max-width: 640px; }

    .steps { grid-template-columns: 1fr; gap: 2.25rem; }
    .steps::before {
        top: 22px;
        bottom: 22px;
        left: 22px;
        right: auto;
        width: 1px;
        height: auto;
    }
    .step {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 1.25rem;
        padding-right: 0;
    }
    .step-ref { grid-row: span 2; margin-bottom: 0; }

    .contact-grid { grid-template-columns: 1fr; }
    .contact-route + .contact-route { border-left: 0; border-top: 1.5px solid var(--line-strong); }

    .work-item,
    .work-item-wide { grid-column: span 6; }
}

@media (max-width: 767px) {
    body::before { display: none; }

    .brand-mark { width: 36px; height: 36px; }
    .brand-ram { font-size: 1.25rem; }
    .brand-construct { font-size: 0.52rem; letter-spacing: 0.38em; }

    .hero-lead { margin-bottom: 1.5rem; }
    .hero .btn-row .btn { flex: 1 1 100%; }

    .title-block { grid-template-columns: 1fr; }
    .tb-cell + .tb-cell { border-left: 0; border-top: 1px solid var(--line-strong); }
    .tb-cell { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.85rem 1rem; }
    .tb-cell:first-child { display: none; }
    .tb-cell:nth-child(2) { border-top: 0; }

    .pathway-link {
        grid-template-columns: 2.5rem minmax(0, 1fr);
        gap: 0.5rem 1rem;
        align-items: start;
    }
    .pathway-index { padding-top: 0.35rem; }
    .pathway-action { grid-column: 2; margin-top: 0.5rem; color: var(--oxide-text); }
    .pathway-link:hover .pathway-action,
    .pathway-link:focus-visible .pathway-action { color: var(--oxide-bright); }

    .cta .btn-row .btn { flex: 1 1 100%; }

    .work-item,
    .work-item-wide { grid-column: 1 / -1; }

    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; gap: 0; grid-row: auto; }

}

@media (max-width: 400px) {
    .contact-number { font-size: 1.75rem; }
}

/* 16. Motion — CSS-only, progressive; disabled for reduced-motion users */
@media (prefers-reduced-motion: no-preference) {
    .js .hero-title .line {
        animation: rise var(--t-slow) var(--ease) both;
    }
    .js .hero-title .line:nth-child(2) { animation-delay: 90ms; }
    .js .hero-copy { animation: fade 800ms var(--ease) 250ms both; }

    .js .elevation .draw {
        stroke-dasharray: 1;
        stroke-dashoffset: 1;
        animation: draw 1100ms var(--ease) forwards;
    }
    .js .elevation .member:nth-of-type(2) { animation-delay: 80ms; }
    .js .elevation .member:nth-of-type(3) { animation-delay: 160ms; }
    .js .elevation .member:nth-of-type(4) { animation-delay: 240ms; }
    .js .elevation .slab { animation-delay: 450ms; }
    .js .elevation .ground { animation-delay: 0ms; }
    .js .elevation .brace { animation-delay: 750ms; }
    .js .elevation .brace-accent { animation-delay: 1000ms; animation-duration: 800ms; }
    .js .elevation .grid-refs,
    .js .elevation .levels,
    .js .elevation .dims,
    .js .elevation .ground-hatch { animation: fade 900ms var(--ease) 200ms both; }

    .js .reveal {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity 700ms var(--ease), transform 700ms var(--ease);
    }
    .js .reveal.is-visible { opacity: 1; transform: none; }

    @keyframes rise {
        from { opacity: 0; transform: translateY(0.35em); }
        to { opacity: 1; transform: none; }
    }
    @keyframes fade {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    @keyframes draw {
        to { stroke-dashoffset: 0; }
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* 17. Legal page */
.legal {
    padding-block: clamp(3rem, 8vw, 6rem) var(--section);
}
.legal-inner { max-width: 50rem; }
.legal h1 {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    margin-bottom: 1rem;
}
.legal-updated { color: var(--steel); margin-bottom: 3rem; }
.legal h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-stretch: var(--semi-wide);
    letter-spacing: -0.01em;
    margin: 2.75rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.legal p + p,
.legal p + ul,
.legal ul + p { margin-top: 1rem; }
.legal ul { list-style: square; padding-left: 1.25rem; }
.legal li + li { margin-top: 0.5rem; }
.legal p a,
.legal li a { color: var(--oxide-hover); text-underline-offset: 0.2em; }
.legal p a:hover,
.legal li a:hover { color: var(--ink); }
.legal .btn-row { margin-top: 3rem; }
