/* ==========================================================================
   Kohler Architects — redesign concept
   Palette: deep navy ink · warm ivory paper · sage green accent
   Type: Fraunces (display) · Inter (text)
   ========================================================================== */

:root {
    --paper: #f5f3ec;
    --paper-2: #eceadf;
    --surface: #ffffff;
    --ink: #17253e;
    --ink-2: #3d4a63;
    --muted: #667288;
    --line: rgba(23, 37, 62, 0.14);
    --accent: #7c9a55;
    --accent-ink: #56753a;
    --accent-soft: rgba(124, 154, 85, 0.14);
    --navy: #14213a;
    --navy-2: #1b2f52;
    --on-navy: #f2f1ea;
    --on-navy-muted: #aeb9cd;
    --hero-overlay: linear-gradient(180deg, rgba(13, 21, 38, 0.42) 0%, rgba(13, 21, 38, 0.55) 55%, rgba(13, 21, 38, 0.82) 100%);
    --shadow: 0 18px 44px -18px rgba(23, 37, 62, 0.25);
    --radius: 14px;
    --header-h: 74px;
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
    --paper: #0e1524;
    --paper-2: #131c2f;
    --surface: #162036;
    --ink: #edeff0;
    --ink-2: #c7cdd8;
    --muted: #94a1b7;
    --line: rgba(237, 239, 240, 0.16);
    --accent: #a4c489;
    --accent-ink: #b9d3a2;
    --accent-soft: rgba(164, 196, 137, 0.14);
    --navy: #101a2e;
    --navy-2: #16233c;
    --on-navy: #f2f1ea;
    --on-navy-muted: #aeb9cd;
    --shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.55);
}

/* --- Reset & base ------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.35s ease, color 0.35s ease;
}

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

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

ul { list-style: none; }

button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

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

.container { width: min(1180px, 92%); margin-inline: auto; }

section { scroll-margin-top: calc(var(--header-h) + 12px); }

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }

.inline-link {
    color: var(--accent-ink);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

/* --- Typography --------------------------------------------------------- */

.section-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 1.1rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    max-width: 22ch;
    margin-bottom: 1.4rem;
}

.section-intro {
    color: var(--muted);
    max-width: 62ch;
    margin-bottom: 2.5rem;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
    display: inline-block;
    padding: 0.85rem 1.7rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.btn:active { transform: scale(0.97); }

.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-ink); transform: translateY(-2px); }

.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

/* --- Header ------------------------------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-h);
    padding-inline: clamp(1.2rem, 4vw, 3rem);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 0.8rem; }

.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark-tile { fill: var(--navy-2); }
.brand-mark-ring { stroke: #ffffff; }
.brand-mark-core { fill: #9cb87a; }

.brand-word {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #fff;
    transition: color 0.3s ease;
}

.site-header.is-scrolled .brand-word { color: var(--ink); }

.brand-word em {
    width: 1px;
    height: 1.05em;
    background: #9cb87a;
}

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

.nav-links { display: flex; align-items: center; gap: 1.7rem; }

.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: #fff;
    opacity: 0.92;
    transition: color 0.3s ease, opacity 0.2s ease;
    position: relative;
}

.site-header.is-scrolled .nav-links a { color: var(--ink); }

.nav-links a:hover { color: var(--accent-ink); opacity: 1; }
.site-header:not(.is-scrolled) .nav-links a:hover { color: #dce8c8; }

.nav-links a.nav-cta {
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 100%; bottom: -6px;
    height: 1px;
    background: var(--accent-ink);
    transition: right 0.3s ease;
}

.nav-links a:hover::after { right: 0; }
.nav-links a.nav-cta::after { display: none; }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    transition: color 0.3s ease, background-color 0.2s ease;
}

.site-header.is-scrolled .theme-toggle { color: var(--ink); }

.theme-toggle:hover { background: var(--accent-soft); color: var(--accent-ink); }

.theme-icon { width: 19px; height: 19px; }
.theme-icon.moon { display: none; }
[data-theme="dark"] .theme-icon.sun { display: none; }
[data-theme="dark"] .theme-icon.moon { display: block; }

.nav-toggle { display: none; }

/* --- Hero --------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: max(100svh, 620px);
    display: flex;
    align-items: flex-end;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url("images/itw-palo-alto-modern-farmhouse_1.jpg") center 38% / cover no-repeat;
    animation: heroDrift 26s ease-in-out infinite alternate;
}

@keyframes heroDrift {
    from { transform: scale(1); }
    to { transform: scale(1.07); }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--hero-overlay);
}

.hero-inner { padding-bottom: clamp(5rem, 12vh, 8rem); }

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #cfe0b8;
    margin-bottom: 1.4rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.3rem, 5.4vw, 4.4rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    max-width: 21ch;
    text-wrap: balance;
}

.hero-title em {
    font-style: italic;
    font-weight: 300;
    color: #c3d99b;
}

.hero-sub {
    max-width: 52ch;
    margin-top: 1.4rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.hero-scroll {
    position: absolute;
    right: clamp(1.2rem, 4vw, 3rem);
    bottom: 2.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.hero-scroll i {
    width: 1px;
    height: 54px;
    background: rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.hero-scroll i::after {
    content: "";
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: #cfe0b8;
    animation: scrollHint 2.2s ease-in-out infinite;
}

@keyframes scrollHint {
    0% { top: -50%; }
    100% { top: 110%; }
}

/* --- Stats strip ---------------------------------------------------------- */

.stats {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding-block: 2.6rem;
}

.stat { text-align: center; }

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    font-weight: 500;
    color: var(--ink);
    line-height: 1.1;
}

.stat-label {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

/* --- Split layout (Welcome) ------------------------------------------------ */

.split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: center;
}

.welcome-photo {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
}

.welcome-photo figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.8rem 1.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(transparent, rgba(13, 21, 38, 0.72));
}

.welcome-signatures {
    margin-top: 1.4rem;
    display: flex;
    justify-content: center;
    background: var(--navy-2);
    border-radius: var(--radius);
    padding: 1.6rem 2rem;
}

.welcome-signatures img { width: min(320px, 80%); }

.split-copy p { margin-bottom: 1.2rem; color: var(--ink-2); max-width: 60ch; }
.split-copy p:first-of-type { font-size: 1.13rem; color: var(--ink); }

/* --- Services --------------------------------------------------------------- */

.band-dark {
    background:
        radial-gradient(120% 90% at 85% -10%, rgba(156, 184, 122, 0.16) 0%, transparent 55%),
        var(--navy);
    color: var(--on-navy);
}

.band-dark .section-label { color: #b9d3a2; }
.band-dark .section-title { color: var(--on-navy); }
.band-dark .section-intro { color: var(--on-navy-muted); }

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
}

.service-card {
    border: 1px solid rgba(242, 241, 234, 0.16);
    border-radius: var(--radius);
    padding: 2.2rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.service-card:hover {
    border-color: rgba(156, 184, 122, 0.55);
    background: rgba(156, 184, 122, 0.07);
    transform: translateY(-4px);
}

.service-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(156, 184, 122, 0.55);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: #c3d99b;
    margin-bottom: 1.3rem;
}

.service-card h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--on-navy);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--on-navy-muted);
}

/* --- Portfolio ---------------------------------------------------------------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.4rem;
}

.filter-chip {
    padding: 0.55rem 1.15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--ink-2);
    background: transparent;
    transition: all 0.25s ease;
}

.filter-chip:hover { border-color: var(--accent); color: var(--accent-ink); }

.filter-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.3s ease;
}

.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-card.is-hidden { display: none; }

.project-thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--paper-2);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.project-card:hover .project-thumb img { transform: scale(1.05); }

.project-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
}

.project-info h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.02rem;
    line-height: 1.3;
}

.project-info span {
    flex: none;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

/* --- In the Works --------------------------------------------------------------- */

.in-works { background: var(--paper-2); }

/* --- Testimonials ------------------------------------------------------------------ */

.quote-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
    margin-top: 1.5rem;
}

.quote-card {
    position: relative;
    border: 1px solid rgba(242, 241, 234, 0.16);
    border-radius: var(--radius);
    padding: 2.4rem 1.9rem 1.9rem;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.quote-card:hover { border-color: rgba(156, 184, 122, 0.5); transform: translateY(-4px); }

.quote-mark {
    position: absolute;
    top: 0.6rem;
    left: 1.4rem;
    font-family: var(--font-display);
    font-size: 3.4rem;
    line-height: 1;
    color: rgba(156, 184, 122, 0.5);
}

.quote-card blockquote {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.08rem;
    line-height: 1.55;
    color: var(--on-navy);
}

.quote-card figcaption {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--on-navy-muted);
}

.stars { color: #c3d99b; letter-spacing: 0.2em; margin-right: 0.6rem; font-size: 0.9rem; }

.quote-more { margin-top: 2rem; color: var(--on-navy-muted); font-size: 0.9rem; }

/* --- Team ------------------------------------------------------------------------ */

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.team-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem 1.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.team-photo {
    width: 132px;
    height: 132px;
    margin-bottom: 1.3rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-soft);
    background: var(--paper-2);
}

.team-photo img { width: 100%; height: 100%; object-fit: cover; }

.team-card h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.25rem;
}

.team-card h3 small {
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--accent-ink);
    vertical-align: 0.35em;
    margin-left: 0.25rem;
}

.team-role {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

.team-cred {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.team-card p:not(.team-role):not(.team-cred) {
    font-size: 0.93rem;
    color: var(--ink-2);
    margin-top: 0.9rem;
}

.team-edu {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
    font-size: 0.82rem;
    font-style: italic;
    color: var(--muted);
}

.founder-note {
    margin-top: 3rem;
    border-radius: var(--radius);
    background: var(--navy-2);
    color: var(--on-navy);
    padding: clamp(2rem, 4vw, 3.2rem);
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(2rem, 5vw, 4rem);
}

.founder-note h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.4rem;
    margin-bottom: 0.9rem;
}

.founder-note p { color: var(--on-navy-muted); font-size: 0.97rem; }

.founder-timeline { display: grid; gap: 0; align-content: start; }

.founder-timeline div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(242, 241, 234, 0.14);
    font-size: 0.92rem;
}

.founder-timeline div:last-child { border-bottom: 0; }

.founder-timeline strong { font-weight: 500; color: var(--on-navy); }

.founder-timeline span { color: var(--on-navy-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- Areas ------------------------------------------------------------------------ */

.areas { background: var(--paper-2); }

.areas-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 5rem);
}

.area-group h3 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.15rem;
    margin: 1.6rem 0 0.4rem;
}

.area-group h3:first-child { margin-top: 0; }

.area-group p {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 2;
}

/* --- Contact ----------------------------------------------------------------------- */

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

.contact-copy > p { color: var(--ink-2); max-width: 54ch; }

.contact-details {
    margin-top: 2.2rem;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
}

.contact-line {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 1.2rem;
    align-items: baseline;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.contact-k {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

a.contact-line:hover .contact-k { color: var(--accent-ink); }

.contact-line span:last-child { font-weight: 500; }

.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.8rem;
}

.social-row a {
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.social-row a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.contact-media {
    display: grid;
    gap: 1.4rem;
}

.contact-media figure {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.contact-media figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0.75rem 1.1rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(transparent, rgba(13, 21, 38, 0.7));
}

/* --- Footer --------------------------------------------------------------------------- */

.footer {
    background: var(--navy);
    color: var(--on-navy);
    padding: 3.2rem 0 2.6rem;
}

.footer-inner {
    display: grid;
    gap: 1rem;
    justify-items: center;
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.footer .brand-mark { width: 34px; height: 34px; }

.footer p { font-size: 0.84rem; color: var(--on-navy-muted); max-width: 70ch; }

.footer-note { font-size: 0.74rem; opacity: 0.75; }

/* --- Lightbox --------------------------------------------------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(10, 15, 27, 0.94);
    backdrop-filter: blur(6px);
}

.lightbox[hidden] { display: none; }

.lightbox-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: min(1080px, 100%);
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 8px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
    animation: lightboxIn 0.35s ease;
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-stage figcaption {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.6rem;
    font-size: 2.2rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover { color: #fff; transform: rotate(90deg); }

.lightbox-nav {
    flex: none;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.6); }

/* --- To top --------------------------------------------------------------------------- */

.to-top {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 90;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--navy-2);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.to-top.is-visible { opacity: 1; transform: none; }

/* --- Reveal on scroll ------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
}

/* --- Focus visibility -------------------------------------------------------------------- */

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

/* --- Responsive ---------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .quote-grid { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; }
    .founder-note { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
}

@media (max-width: 880px) {
    .split, .contact-grid, .areas-grid { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; }
    .contact-media { grid-template-columns: 1fr 1fr; display: grid; }

    /* mobile nav drawer */
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        z-index: 120;
    }

    .nav-toggle span {
        width: 22px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
    }

    .site-header.is-scrolled .nav-toggle span,
    .site-header.menu-open .nav-toggle span { background: var(--ink); }
    .site-header.menu-open .nav-toggle span { background: var(--ink); }
    .site-header.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-header.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .site-header.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 84vw);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 2rem;
        padding: 6rem 2.2rem 3rem;
        background: var(--paper);
        box-shadow: -20px 0 60px rgba(13, 21, 38, 0.18);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
        z-index: 110;
    }

    .site-header.menu-open .site-nav { transform: none; }

    .nav-links { flex-direction: column; align-items: flex-start; gap: 1.4rem; }

    .nav-links a, .site-header.is-scrolled .nav-links a { color: var(--ink); font-size: 1.05rem; }

    .nav-links a.nav-cta { border: 0; padding: 0; }
}

@media (max-width: 560px) {
    .project-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .project-info { flex-direction: column; gap: 0.2rem; padding: 0.8rem 0.9rem; }
    .contact-media { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .brand-word { font-size: 0.8rem; letter-spacing: 0.18em; }
    .filter-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; scrollbar-width: none; }
    .filter-bar::-webkit-scrollbar { display: none; }
    .filter-chip { flex: none; }
}
