:root {
    --bg: #f4efe7;
    --paper: #fbf8f2;
    --paper-strong: #fffdf8;
    --ink: #292827;
    --muted: #70685f;
    --line: #d9cdbf;
    --accent: #9f7b4d;
    --accent-soft: #e0ccb1;
    --dark: #292827;
    --dark-muted: #a9a198;
    --radius: 28px;
    --shadow: 0 30px 90px rgba(41, 40, 39, 0.1);
    --container: min(1180px, calc(100vw - 48px));
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    background:
        radial-gradient(circle at 8% 5%, rgba(159, 123, 77, 0.13), transparent 26rem),
        linear-gradient(180deg, #f9f5ee 0%, var(--bg) 48%, #eee5d9 100%);
    color: var(--ink);
    font-family: "Inter", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    transform: translateY(-150%);
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--dark);
    color: white;
    text-decoration: none;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 100;
    width: var(--container);
    min-height: 58px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 0 22px;
    border: 1px solid rgba(217, 205, 191, 0.58);
    border-radius: 999px;
    background: rgba(251, 248, 242, 0.78);
    box-shadow: 0 16px 54px rgba(41, 40, 39, 0.07);
    backdrop-filter: blur(20px);
    transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
    background: rgba(251, 248, 242, 0.94);
    box-shadow: 0 18px 60px rgba(41, 40, 39, 0.11);
}

.brand {
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.2vw, 32px);
}

.site-nav a {
    color: var(--muted);
    font-size: 0.83rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--ink);
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.language-switch a,
.language-switch span {
    min-width: 28px;
    padding: 5px 7px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.language-switch span {
    background: var(--dark);
    color: white;
}

.menu-button {
    display: none;
}

.hero,
.section,
.site-footer {
    width: var(--container);
    margin-inline: auto;
}

.hero {
    min-height: min(900px, 100svh);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    align-items: center;
    gap: clamp(52px, 7vw, 100px);
    padding: 140px 0 80px;
}

.eyebrow,
.section-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.profile-copy h2,
.contact-section h2,
.case-hero h1 {
    font-family: "Newsreader", serif;
    font-weight: 500;
    letter-spacing: -0.055em;
}

.hero h1 {
    max-width: 740px;
    margin-top: 20px;
    font-size: clamp(4.1rem, 5.45vw, 6rem);
    line-height: 0.92;
}

.hero h1 span {
    display: block;
}

.hero-lead {
    max-width: 680px;
    margin-top: 34px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-actions,
.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 23px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.87rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--dark);
    color: white;
    box-shadow: 0 16px 38px rgba(41, 40, 39, 0.16);
}

.button-secondary {
    border-color: var(--line);
    background: rgba(251, 248, 242, 0.72);
    color: var(--ink);
}

.proof-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 32px;
    color: var(--muted);
    font-size: 0.78rem;
    list-style: none;
}

.proof-list li {
    position: relative;
    padding-left: 13px;
}

.proof-list li::before {
    content: "";
    position: absolute;
    top: 0.48em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.profile-map {
    min-height: 510px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(217, 205, 191, 0.64);
    border-radius: 38px;
    background: rgba(251, 248, 242, 0.66);
    box-shadow: var(--shadow);
}

.profile-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 28px;
    border-bottom: 1px solid rgba(217, 205, 191, 0.65);
}

.profile-map-header span {
    font-size: 0.78rem;
    font-weight: 700;
}

.profile-map-header small {
    color: var(--muted);
    font-size: 0.68rem;
}

.map-canvas {
    position: relative;
    flex: 1;
    min-height: 420px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    align-content: center;
    align-items: center;
    gap: 10px 16px;
    padding: clamp(30px, 4vw, 46px);
    background:
        linear-gradient(rgba(159, 123, 77, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(159, 123, 77, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
}

.map-connectors {
    position: absolute;
    z-index: 0;
    inset: 34px 42px;
    width: calc(100% - 84px);
    height: calc(100% - 68px);
    overflow: visible;
    pointer-events: none;
}

.map-connectors path {
    fill: none;
    stroke: rgba(159, 123, 77, 0.72);
    stroke-width: 1.6;
    stroke-dasharray: 7 9;
    vector-effect: non-scaling-stroke;
}

.map-node {
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border: 1px solid rgba(217, 205, 191, 0.95);
    border-radius: 17px;
    background: rgba(255, 253, 248, 0.96);
    box-shadow: 0 16px 44px rgba(41, 40, 39, 0.09);
}

.map-node span {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.map-node strong {
    font-size: 0.82rem;
}

.map-node-main {
    grid-column: 2;
    grid-row: 1;
    border-color: rgba(159, 123, 77, 0.72);
}

.map-node-left {
    grid-column: 1;
    grid-row: 2;
}

.map-node-right {
    grid-column: 3;
    grid-row: 2;
}

.map-node-bottom {
    grid-column: 2;
    grid-row: 3;
}

.section {
    padding: 105px 0;
    scroll-margin-top: 90px;
}

.section + .section {
    border-top: 1px solid rgba(217, 205, 191, 0.66);
}

.section-heading {
    max-width: 780px;
    margin-bottom: 54px;
}

.section-heading h2,
.profile-copy h2,
.contact-section h2 {
    margin-top: 16px;
    font-size: clamp(2.8rem, 4.6vw, 5rem);
    line-height: 0.98;
}

.section-heading > p:last-child {
    max-width: 660px;
    margin-top: 22px;
    color: var(--muted);
    line-height: 1.75;
}

.section-heading-row {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: end;
    gap: 60px;
}

.section-heading-row > p {
    margin: 0 0 5px;
}

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

.service-card {
    min-height: 390px;
    padding: 28px;
    border: 1px solid rgba(217, 205, 191, 0.8);
    border-radius: var(--radius);
    background: rgba(251, 248, 242, 0.72);
}

.card-number {
    display: inline-flex;
    margin-bottom: 70px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
}

.service-card h3,
.project-card h3,
.credential-card h3,
.collaboration-card h3,
.case-section h2 {
    font-family: "Newsreader", serif;
    font-weight: 500;
    letter-spacing: -0.035em;
}

.service-card h3 {
    font-size: 2rem;
}

.service-card > p {
    margin-top: 15px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.service-card ul {
    display: grid;
    gap: 9px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(217, 205, 191, 0.7);
    color: var(--muted);
    font-size: 0.78rem;
    list-style: none;
}

.service-card li::before {
    content: "—";
    margin-right: 8px;
    color: var(--accent);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    padding: 32px;
    overflow: hidden;
    border: 1px solid rgba(217, 205, 191, 0.8);
    border-radius: 32px;
    background: rgba(251, 248, 242, 0.76);
    color: var(--ink);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card-featured {
    background:
        radial-gradient(circle at 85% 90%, rgba(159, 123, 77, 0.23), transparent 32%),
        var(--dark);
    color: #f7f2e9;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(159, 123, 77, 0.65);
    box-shadow: var(--shadow);
}

.project-card:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(159, 123, 77, 0.65);
    box-shadow: var(--shadow);
    outline: none;
}

.project-topline {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--accent);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project-card-featured .project-topline {
    color: var(--accent-soft);
}

.project-card h3 {
    max-width: 560px;
    margin-top: 84px;
    font-size: clamp(2.5rem, 3.5vw, 4rem);
    line-height: 0.98;
}

.project-card > p {
    max-width: 610px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.75;
}

.project-card-featured > p,
.project-card-featured .project-facts dd {
    color: var(--dark-muted);
}

.project-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: auto;
    padding-top: 40px;
}

.project-facts div {
    min-width: 0;
}

.project-facts dt {
    color: var(--accent);
    font-size: 0.62rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.project-card-featured .project-facts dt {
    color: var(--accent-soft);
}

.project-facts dd {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.45;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    font-size: 0.8rem;
    font-weight: 700;
}

.work-notes {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px 50px;
    margin-top: 46px;
    padding: 30px 0 0;
    border-top: 1px solid rgba(217, 205, 191, 0.75);
}

.work-notes ul {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
}

.work-notes li {
    padding: 9px 12px;
    border: 1px solid rgba(217, 205, 191, 0.9);
    border-radius: 999px;
    background: rgba(251, 248, 242, 0.55);
    color: var(--muted);
    font-size: 0.72rem;
}

.work-notes > p:last-child {
    grid-column: 2;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.credential-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.credential-card {
    min-height: 190px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 26px;
    border: 1px solid rgba(217, 205, 191, 0.8);
    border-radius: var(--radius);
    background: rgba(251, 248, 242, 0.7);
}

.credential-mark {
    flex: 0 0 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #18202c;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

.credential-mark-text {
    background: #a81738;
}

.credential-card p {
    color: var(--muted);
    font-size: 0.68rem;
}

.credential-card h3 {
    margin-top: 10px;
    font-size: 1.45rem;
    line-height: 1.08;
}

.profile-section {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
    gap: clamp(60px, 9vw, 130px);
}

.profile-copy > p:not(.section-label) {
    max-width: 700px;
    margin-top: 24px;
    color: var(--muted);
    line-height: 1.8;
}

.collaboration-card {
    padding: 34px;
    border-radius: 30px;
    background: var(--dark);
    color: white;
    box-shadow: var(--shadow);
}

.collaboration-card .section-label {
    color: var(--accent-soft);
}

.collaboration-card h3 {
    margin-top: 48px;
    font-size: 2.5rem;
    line-height: 1;
}

.collaboration-card > p:last-child {
    margin-top: 24px;
    color: var(--dark-muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.contact-section {
    max-width: 950px;
    margin-left: max(24px, calc((100vw - min(1180px, calc(100vw - 48px))) / 2));
    padding-bottom: 130px;
}

.contact-section > p:not(.section-label) {
    max-width: 650px;
    margin-top: 24px;
    color: var(--muted);
    line-height: 1.75;
}

.site-footer {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(217, 205, 191, 0.75);
    color: var(--muted);
    font-size: 0.72rem;
}

/* Project pages */

.case-main {
    padding-top: 110px;
}

.breadcrumbs {
    width: var(--container);
    display: flex;
    gap: 8px;
    margin: 34px auto 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.breadcrumbs a {
    text-decoration: none;
}

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

.case-hero {
    width: var(--container);
    margin: 0 auto;
    padding: 64px 0 80px;
}

.case-hero h1 {
    max-width: 960px;
    margin-top: 18px;
    font-size: clamp(4rem, 7vw, 7.4rem);
    line-height: 0.9;
}

.case-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 18px;
    margin-top: 62px;
}

.case-summary-copy,
.case-summary-facts {
    padding: 30px;
    border: 1px solid rgba(217, 205, 191, 0.8);
    border-radius: 28px;
    background: rgba(251, 248, 242, 0.72);
}

.case-summary-copy h2 {
    font-family: "Newsreader", serif;
    font-size: 2rem;
    font-weight: 500;
}

.case-summary-copy p {
    margin-top: 18px;
    color: var(--muted);
    line-height: 1.75;
}

.case-summary-facts {
    display: grid;
    gap: 18px;
}

.case-summary-facts div {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(217, 205, 191, 0.72);
}

.case-summary-facts div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.case-summary-facts dt {
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.case-summary-facts dd {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.case-body {
    width: min(900px, calc(100vw - 48px));
    margin: 0 auto;
    padding-bottom: 120px;
}

.case-diagram {
    margin: 20px 0 90px;
    padding: 34px;
    border-radius: 30px;
    background: var(--dark);
    color: white;
}

.case-diagram-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--dark-muted);
    font-size: 0.68rem;
}

.diagram-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 24px;
    margin-top: 50px;
}

.diagram-node {
    position: relative;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid rgba(224, 204, 177, 0.35);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.diagram-node:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translate(50%, -50%);
    color: var(--accent-soft);
}

.diagram-node span {
    color: var(--accent-soft);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.diagram-node strong {
    font-size: 0.8rem;
    line-height: 1.4;
}

.case-section {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 50px;
    padding: 50px 0;
    border-top: 1px solid rgba(217, 205, 191, 0.8);
}

.case-section h2 {
    font-size: 1.7rem;
}

.case-section-copy {
    color: var(--muted);
    line-height: 1.8;
}

.case-section-copy p + p,
.case-section-copy ul,
.case-section-copy dl {
    margin-top: 18px;
}

.case-section-copy ul {
    display: grid;
    gap: 12px;
    padding-left: 20px;
}

.decision-list {
    display: grid;
    gap: 14px;
}

.decision-list div {
    padding: 18px;
    border: 1px solid rgba(217, 205, 191, 0.8);
    border-radius: 18px;
    background: rgba(251, 248, 242, 0.62);
}

.decision-list dt {
    color: var(--ink);
    font-weight: 700;
}

.decision-list dd {
    margin-top: 8px;
}

.case-navigation {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(217, 205, 191, 0.8);
}

.case-navigation a {
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 980px) {
    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 150px;
    }

    .profile-map {
        min-height: 470px;
    }

    .service-grid,
    .credential-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: 0;
    }

    .card-number {
        margin-bottom: 46px;
    }

    .section-heading-row,
    .profile-section,
    .case-summary {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: 470px;
    }

}

@media (max-width: 760px) {
    :root {
        --container: calc(100vw - 30px);
    }

    .site-header {
        top: 12px;
        min-height: 54px;
        padding: 0 16px;
    }

    .menu-button {
        position: relative;
        z-index: 2;
        width: 38px;
        height: 38px;
        display: grid;
        place-content: center;
        gap: 5px;
        border: 0;
        border-radius: 50%;
        background: transparent;
        cursor: pointer;
    }

    .menu-button span:not(.sr-only) {
        width: 18px;
        height: 1.5px;
        display: block;
        background: var(--ink);
        transition: transform 160ms ease;
    }

    .menu-button[aria-expanded="true"] span:first-child {
        transform: translateY(3.25px) rotate(45deg);
    }

    .menu-button[aria-expanded="true"] span:nth-child(2) {
        transform: translateY(-3.25px) rotate(-45deg);
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100svh;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 22px;
        padding: 80px 34px;
        background: rgba(251, 248, 242, 0.98);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        font-family: "Newsreader", serif;
        font-size: 2.35rem;
        line-height: 1;
    }

    .site-nav .language-switch {
        margin-top: 8px;
    }

    .site-nav .language-switch a,
    .site-nav .language-switch span {
        min-width: 42px;
        padding: 9px 11px;
        font-family: "Inter", sans-serif;
        font-size: 0.78rem;
    }

    .hero {
        gap: 50px;
        padding: 120px 0 70px;
    }

    .hero h1 {
        font-size: clamp(3.6rem, 17vw, 5.1rem);
    }

    .hero-lead {
        font-size: 0.97rem;
    }

    .hero-actions {
        align-items: stretch;
    }

    .hero-actions .button {
        flex: 1 1 150px;
    }

    .proof-list {
        display: grid;
    }

    .profile-map {
        min-height: 400px;
        border-radius: 28px;
    }

    .profile-map-header small {
        display: none;
    }

    .map-canvas {
        min-height: 340px;
        gap: 12px;
        padding: 22px;
    }

    .map-node {
        min-height: 96px;
        padding: 12px;
    }

    .map-connectors {
        display: none;
    }

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

    .map-node-left {
        grid-column: 1;
        grid-row: 1;
    }

    .map-node-main {
        grid-column: 2;
        grid-row: 1;
    }

    .map-node-right {
        grid-column: 1;
        grid-row: 2;
    }

    .map-node-bottom {
        grid-column: 2;
        grid-row: 2;
    }

    .section {
        padding: 76px 0;
    }

    .section-heading {
        margin-bottom: 38px;
    }

    .section-heading h2,
    .profile-copy h2,
    .contact-section h2 {
        font-size: clamp(2.7rem, 13vw, 4.1rem);
    }

    .service-card,
    .project-card {
        padding: 24px;
        border-radius: 24px;
    }

    .project-card {
        min-height: 0;
    }

    .project-card h3 {
        margin-top: 54px;
        font-size: 2.65rem;
    }

    .project-facts {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }

    .work-notes {
        grid-template-columns: 1fr;
    }

    .work-notes > p:last-child {
        grid-column: 1;
    }

    .credential-card {
        min-height: 0;
    }

    .collaboration-card {
        padding: 28px;
    }

    .contact-section {
        margin-left: 15px;
        padding-bottom: 90px;
    }

    .site-footer {
        min-height: 90px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .case-main {
        padding-top: 82px;
    }

    .case-hero {
        padding: 46px 0 62px;
    }

    .case-hero h1 {
        font-size: clamp(3.4rem, 16vw, 5.2rem);
    }

    .case-summary {
        margin-top: 44px;
    }

    .case-summary-copy,
    .case-summary-facts {
        padding: 24px;
    }

    .case-summary-facts div {
        grid-template-columns: 80px 1fr;
    }

    .case-body {
        width: var(--container);
    }

    .case-diagram {
        margin-bottom: 60px;
        padding: 24px;
    }

    .case-diagram-header {
        flex-direction: column;
    }

    .diagram-flow {
        grid-template-columns: 1fr;
        margin-top: 34px;
    }

    .diagram-node {
        min-height: 90px;
    }

    .diagram-node:not(:last-child)::after {
        top: auto;
        right: 50%;
        bottom: -21px;
        transform: translate(50%, 50%) rotate(90deg);
    }

    .case-section {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 38px 0;
    }
}

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

    .reveal-ready [data-reveal],
    .reveal-ready [data-stagger] > * {
        animation: none !important;
        opacity: 1 !important;
        translate: none !important;
    }
}

/* V2.1 — navegación de proyectos y contenido definitivo */

.reveal-ready [data-reveal],
.reveal-ready [data-stagger] > * {
    opacity: 0;
    translate: 0 22px;
}

.reveal-ready [data-reveal].is-visible,
.reveal-ready [data-stagger].is-visible > * {
    animation: reveal-in 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.reveal-ready [data-stagger].is-visible > *:nth-child(2) {
    animation-delay: 80ms;
}

.reveal-ready [data-stagger].is-visible > *:nth-child(3) {
    animation-delay: 160ms;
}

.reveal-ready [data-stagger].is-visible > *:nth-child(4) {
    animation-delay: 240ms;
}

.reveal-ready [data-stagger].is-visible > *:nth-child(5) {
    animation-delay: 320ms;
}

@keyframes reveal-in {
    to {
        opacity: 1;
        translate: none;
    }
}

.map-node {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.map-node:hover,
.map-node:focus-visible {
    z-index: 2;
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 14px 32px rgba(41, 40, 39, 0.12);
    outline: none;
}

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

.service-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.service-card-link:hover,
.service-card-link:focus-visible {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(41, 40, 39, 0.09);
    outline: none;
}

.inline-link {
    display: inline-block;
    margin-top: 28px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
}

.project-filter-panel {
    margin: -14px 0 28px;
    padding: 22px 24px 20px;
    border: 1px solid rgba(217, 205, 191, 0.8);
    border-radius: 24px;
    background: rgba(251, 248, 242, 0.52);
}

.project-filter-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.project-filter-heading > div > p {
    color: var(--ink);
    font-size: 0.83rem;
    font-weight: 700;
}

.project-filter-heading > div > span,
.project-filter-status {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.45;
}

.project-filter-status {
    flex: 0 0 auto;
    margin-top: 0;
    padding-top: 2px;
    text-align: right;
}

.project-toolbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(251, 248, 242, 0.72);
}

.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font: 600 0.78rem/1 "Inter", sans-serif;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-button:last-child {
    border-right: 0;
}

.filter-button [data-filter-count] {
    display: inline-grid;
    min-width: 22px;
    min-height: 22px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(41, 40, 39, 0.08);
    color: inherit;
    font-size: 0.66rem;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button.is-active {
    background: var(--dark);
    color: white;
    outline: none;
}

.filter-button:hover [data-filter-count],
.filter-button:focus-visible [data-filter-count],
.filter-button.is-active [data-filter-count] {
    background: rgba(255, 255, 255, 0.14);
}

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

.project-card[hidden],
.brief-project-card[hidden] {
    display: none;
}

.brief-projects {
    margin-top: 76px;
    padding-top: 46px;
    border-top: 1px solid var(--line);
}

.brief-projects[hidden] {
    display: none;
}

.brief-projects-heading {
    display: grid;
    grid-template-columns: minmax(180px, 0.35fr) 1fr;
    align-items: end;
    gap: 40px;
    margin-bottom: 28px;
}

.brief-projects-heading h3 {
    font-family: "Newsreader", serif;
    font-size: clamp(2.3rem, 4.1vw, 4.4rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    line-height: 0.95;
}

.brief-project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.brief-project-card {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(251, 248, 242, 0.58);
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.brief-project-card:hover,
.brief-project-card:focus-visible {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: var(--paper);
    outline: none;
}

.brief-project-card > span {
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brief-project-card h4 {
    margin-top: 42px;
    font-family: "Newsreader", serif;
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1;
}

.brief-project-card p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.65;
}

.brief-project-card strong {
    margin-top: auto;
    padding-top: 28px;
    font-size: 0.76rem;
}

.empty-filter-message {
    margin-top: 22px;
    color: var(--muted);
}

.credential-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.credential-card-link:hover,
.credential-card-link:focus-visible {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 20px 50px rgba(41, 40, 39, 0.08);
    outline: none;
}

.credential-card .inline-link {
    margin-top: 15px;
}

.operations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 32px;
}

.operations-list span,
.case-tags span {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(251, 248, 242, 0.45);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.case-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.case-status {
    margin-top: 24px;
    padding: 18px 20px;
    border-left: 3px solid var(--accent);
    background: rgba(224, 204, 177, 0.2);
    color: var(--muted);
    line-height: 1.7;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.metric-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(251, 248, 242, 0.55);
}

.metric-card strong {
    display: block;
    font-family: "Newsreader", serif;
    font-size: 2.4rem;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.metric-card span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.back-button {
    width: var(--container);
    display: flex;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.back-button:hover,
.back-button:focus-visible {
    color: var(--ink);
}

@media (max-width: 1050px) {
    .service-grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .service-grid-four,
    .project-grid-large,
    .brief-project-grid,
    .brief-projects-heading,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .project-toolbar {
        display: flex;
        flex-wrap: nowrap;
        margin-right: -24px;
        padding-right: 24px;
        border: 0;
        border-radius: 0;
        background: transparent;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .project-filter-panel {
        padding: 20px 18px;
        border-radius: 22px;
    }

    .project-filter-heading {
        display: block;
    }

    .project-filter-status {
        margin-top: 9px;
        text-align: left;
    }

    .project-toolbar::-webkit-scrollbar {
        display: none;
    }

    .filter-button {
        flex: 0 0 auto;
        min-width: 138px;
        border: 1px solid var(--line);
        border-right: 0;
    }

    .filter-button:first-child {
        border-radius: 14px 0 0 14px;
    }

    .filter-button:last-child {
        border-right: 1px solid var(--line);
        border-radius: 0 14px 14px 0;
    }

    .brief-projects {
        margin-top: 56px;
    }

    .brief-projects-heading {
        gap: 16px;
    }

    .brief-project-card {
        min-height: 230px;
    }

    .case-navigation {
        flex-direction: column;
        align-items: flex-start;
    }
}
