/* ==========================================================================
   Corevida Grid — public site stylesheet
   Design system: "Tectonic Precision" (UI_designs/tectonic_precision/DESIGN.md)
   ========================================================================== */

:root {
    /* Brand */
    --primary: #005E7C;          /* Baltic Slate */
    --primary-deep: #00455C;
    --primary-ink: #001E2B;
    --secondary: #0094C6;        /* Structural Cyan */
    --secondary-soft: #C0E8FF;
    --tertiary: #B76D68;         /* Earth Terracotta */
    --tertiary-deep: #854440;
    --tertiary-soft: #FFDAD7;
    --ink: #18020C;              /* Deep Cherry Carbon */

    /* Grounds */
    --canvas: #F8FAFB;           /* Crisp Studio Sheet */
    --vellum: #F0F4F7;           /* Drafting Vellum */
    --sage: #E5FFDE;             /* Biophilic Sage */
    --white: #FFFFFF;

    /* Text */
    --text: #18020C;
    --text-muted: #40484D;
    --text-faint: #70787E;

    /* Lines & elevation */
    --line: rgba(24, 2, 12, 0.08);
    --line-strong: rgba(24, 2, 12, 0.16);
    --line-primary: rgba(0, 94, 124, 0.15);
    --shadow-3: 0 8px 30px rgba(0, 94, 124, 0.08);

    /* Type */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;

    /* Shape & space */
    --r-sm: 4px;
    --r-md: 8px;
    --gutter: 1rem;
    --margin: 1.25rem;
    --header-h: 72px;
}

@media (min-width: 768px) {
    :root { --gutter: 1.5rem; --margin: 3rem; --header-h: 80px; }
}
@media (min-width: 1200px) {
    :root { --gutter: 2rem; --margin: 5rem; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--canvas);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 24px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--primary); margin: 0; font-weight: 600; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

.ms { /* Material Symbols */
    font-family: 'Material Symbols Outlined';
    font-weight: normal; font-style: normal;
    font-size: 20px; line-height: 1;
    display: inline-block; letter-spacing: normal; text-transform: none;
    white-space: nowrap; direction: ltr;
    -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    flex-shrink: 0;
}
.ms-sm { font-size: 16px; }
.ms-lg { font-size: 28px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typography scale ---------- */
.h-xl { font-size: 36px; line-height: 44px; letter-spacing: -0.02em; }
.h-lg { font-size: 28px; line-height: 36px; letter-spacing: -0.015em; }
.h-md { font-size: 24px; line-height: 32px; letter-spacing: -0.01em; font-weight: 500; }
.h-sm { font-size: 20px; line-height: 28px; letter-spacing: -0.005em; font-weight: 500; }
@media (min-width: 768px) {
    .h-xl { font-size: 56px; line-height: 64px; letter-spacing: -0.03em; }
    .h-lg { font-size: 40px; line-height: 48px; letter-spacing: -0.02em; }
    .h-md { font-size: 28px; line-height: 36px; }
    .h-sm { font-size: 22px; line-height: 30px; }
}
.h-xl em, .h-lg em { font-style: italic; font-weight: 300; color: var(--secondary); }
.lead { font-size: 18px; line-height: 28px; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.small { font-size: 13px; line-height: 20px; }
.label {
    font-family: var(--font-display);
    font-size: 12px; line-height: 16px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
}
.label-sm {
    font-family: var(--font-display);
    font-size: 10px; line-height: 14px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--secondary); }
.eyebrow .ms { font-size: 16px; }
.quote { font-family: var(--font-display); font-style: italic; color: var(--primary); }
.prose p + p { margin-top: 1rem; }
.prose { color: var(--text-muted); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(1280px + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }
.section { padding: 56px 0; }
.section-tight { padding: 40px 0; }
@media (min-width: 768px) { .section { padding: 88px 0; } }
.bg-white { background: var(--white); }
.bg-vellum { background: var(--vellum); }
.bg-sage { background: var(--sage); }
.bg-primary { background: var(--primary); color: var(--white); }
.blueprint {
    background-image:
        linear-gradient(to right, rgba(0, 94, 124, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 94, 124, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
}
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.stack > * + * { margin-top: 1rem; }
.stack-sm > * + * { margin-top: .5rem; }
.stack-lg > * + * { margin-top: 1.5rem; }
.row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.between { justify-content: space-between; }

.grid { display: grid; gap: var(--gutter); }
.g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-2-sm { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .g-2 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .g-3 { grid-template-columns: repeat(3, 1fr); } .g-4 { grid-template-columns: repeat(4, 1fr); } }

/* 12-col splits */
.split { display: grid; gap: calc(var(--gutter) * 1.5); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1024px) {
    .split-5-7 { grid-template-columns: 5fr 7fr; }
    .split-7-5 { grid-template-columns: 7fr 5fr; }
    .split-8-4 { grid-template-columns: 8fr 4fr; align-items: end; }
    .split-4-8 { grid-template-columns: 4fr 8fr; align-items: start; }
    .split-6-6 { grid-template-columns: 1fr 1fr; }
}

.section-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }
@media (min-width: 768px) {
    .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
    .section-head > p { max-width: 380px; }
}
.section-head.center { align-items: center; text-align: center; flex-direction: column; }
.section-head.center > p { max-width: 640px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    padding: .75rem 1.25rem; border-radius: var(--r-sm); border: 1px solid transparent;
    cursor: pointer; transition: background .2s, color .2s, border-color .2s; line-height: 16px; text-align: center;
}
.btn .ms { font-size: 18px; transition: transform .2s; }
.btn:hover .ms-arrow { transform: translateX(3px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--secondary); border-color: var(--secondary); color: var(--white); }
.btn-outline { background: transparent; color: var(--primary); border-color: rgba(0, 94, 124, .3); }
.btn-outline:hover { background: rgba(0, 94, 124, .04); border-color: var(--primary); color: var(--primary); }
.btn-earth { background: var(--tertiary); border-color: var(--tertiary); color: var(--white); }
.btn-earth:hover { background: var(--tertiary-deep); border-color: var(--tertiary-deep); color: var(--white); }
.btn-light { background: var(--white); color: var(--primary); border-color: var(--white); }
.btn-light:hover { background: var(--sage); color: var(--primary); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.btn-ghost-light:hover { border-color: var(--white); color: var(--white); background: rgba(255, 255, 255, .06); }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow .ms { font-size: 16px; transition: transform .2s; }
.link-arrow:hover .ms { transform: translate(2px, -2px); }

/* ---------- Chips & badges ---------- */
.chip {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--vellum); color: var(--primary);
    border: 1px solid var(--line-primary); border-radius: 999px;
    padding: .3rem .75rem;
}
.chip-sage { background: var(--sage); border-color: rgba(0, 94, 124, .2); }
.chip-earth { background: var(--tertiary-soft); color: var(--tertiary-deep); border-color: rgba(183, 109, 104, .3); }
.chip-dark { background: rgba(255, 255, 255, .1); color: var(--secondary-soft); border-color: rgba(255, 255, 255, .2); }
.beacon { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary); display: inline-block; }
.beacon-pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badge {
    display: inline-block; background: var(--vellum); color: var(--primary);
    border: 1px solid var(--line-primary); border-radius: var(--r-sm); padding: .15rem .45rem;
}

/* ---------- Cards ---------- */
.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 1.5rem; position: relative;
}
.card-accent { border-top: 2px solid var(--secondary); }
.card-accent-primary { border-top: 2px solid var(--primary); }
.card-accent-earth { border-top: 2px solid var(--tertiary); }
.card-float { box-shadow: var(--shadow-3); border-color: rgba(0, 94, 124, .12); }
.card-hover { transition: box-shadow .25s, transform .25s, border-color .25s; }
.card-hover:hover { box-shadow: var(--shadow-3); border-color: rgba(0, 94, 124, .2); }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: var(--text-faint); margin-bottom: .75rem; }
.card-meta .ms { color: var(--secondary); font-size: 18px; }
.icon-box {
    width: 44px; height: 44px; border-radius: var(--r-sm);
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--vellum); color: var(--primary); border: 1px solid var(--line-primary);
}
.icon-box.earth { background: var(--tertiary-soft); color: var(--tertiary-deep); border-color: rgba(183, 109, 104, .25); }
.icon-box.sage { background: var(--sage); }

/* Metric tiles */
.metric .metric-value { font-family: var(--font-display); font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -.02em; color: var(--primary); }
@media (min-width: 768px) { .metric .metric-value { font-size: 36px; line-height: 44px; } }
.metric .metric-label { color: var(--text-muted); font-size: 13px; line-height: 20px; }

/* Media frames */
.media { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--vellum); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.media-hover:hover img { transform: scale(1.04); }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-16-10 { aspect-ratio: 16 / 10; }
.ratio-3-4 { aspect-ratio: 3 / 4; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.media-tall { height: 360px; }
@media (min-width: 1024px) { .media-tall { height: 480px; } }
.media-shade::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 69, 92, .75), transparent 55%); pointer-events: none; }
.media-caption { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1; color: var(--white); }
.media-caption .label-sm { color: var(--secondary-soft); }
.illus-tag {
    position: absolute; top: .75rem; right: .75rem; z-index: 2;
    font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    background: rgba(248, 250, 251, .88); color: var(--text-muted);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    padding: .2rem .5rem; border-radius: var(--r-sm);
}
.placeholder-visual {
    display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .5rem;
    background-color: var(--vellum); color: var(--primary);
    background-image:
        linear-gradient(to right, rgba(0, 94, 124, .08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 94, 124, .08) 1px, transparent 1px);
    background-size: 24px 24px;
}
.placeholder-visual .ms { font-size: 40px; opacity: .6; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: rgba(248, 250, 251, .85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 8px rgba(0, 69, 92, .06); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--primary); }
.brand img { height: 32px; width: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.brand-name span { font-family: var(--font-display); font-size: 9px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.brand:hover { color: var(--secondary); }
.brand-divider { display: none; width: 1px; height: 24px; background: var(--line-strong); }
.brand-tag { display: none; color: var(--text-faint); }
@media (min-width: 1360px) { .brand-divider, .brand-tag { display: block; } }

.main-nav { display: none; align-items: center; gap: 1.5rem; }
.main-nav a { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: .35rem 0; position: relative; }
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--secondary); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions .btn { display: none; }
.menu-toggle {
    width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line-primary); border-radius: var(--r-sm); background: var(--white); color: var(--primary); cursor: pointer;
}
@media (min-width: 640px) { .header-actions .btn { display: inline-flex; } }
@media (min-width: 1100px) { .main-nav { display: flex; } .menu-toggle { display: none; } }

/* Mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 30, 43, .45); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw);
    background: var(--white); padding: 1.25rem; display: flex; flex-direction: column; gap: 1.25rem;
    transform: translateX(100%); transition: transform .3s ease; overflow-y: auto;
    border-left: 1px solid rgba(0, 94, 124, .12);
}
.drawer.open .drawer-panel { transform: none; }
.drawer-nav a { display: flex; align-items: center; gap: .75rem; padding: .85rem .25rem; border-bottom: 1px solid var(--line); color: var(--text); font-family: var(--font-display); font-weight: 500; }
.drawer-nav a .ms { color: var(--secondary); }
.drawer-nav a.active { color: var(--primary); font-weight: 600; }

/* Mobile bottom tab bar */
.tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-faint); font-family: var(--font-display); font-size: 10px; font-weight: 600; letter-spacing: .04em; padding: .25rem 0; }
.tabbar a .ms { font-size: 22px; }
.tabbar a.active { color: var(--primary); }
.tabbar a.active .ms { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
@media (min-width: 768px) { .tabbar { display: none; } }
@media (max-width: 767px) { body { padding-bottom: 68px; } }

main { padding-top: var(--header-h); }
main [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Page hero ---------- */
.hero { position: relative; padding: 40px 0 48px; }
@media (min-width: 768px) { .hero { padding: 56px 0 72px; } }
.hero-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hero-meta .ref { color: var(--text-faint); display: none; }
@media (min-width: 640px) { .hero-meta .ref { display: block; } }
.hero h1 { margin-bottom: 1.25rem; }
.hero .lead { max-width: 680px; }
.hero-actions { margin-top: 1.75rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.breadcrumb { display: flex; gap: .4rem; align-items: center; color: var(--text-faint); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- Discipline cards ---------- */
.discipline { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.discipline .media { border-radius: 0; aspect-ratio: 16 / 10; }
.discipline-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.discipline-body p { color: var(--text-muted); font-size: 14px; line-height: 22px; flex: 1; }
.discipline-foot { display: flex; justify-content: space-between; align-items: center; padding-top: .75rem; border-top: 1px solid var(--line); color: var(--text-faint); }
.discipline-num { position: absolute; top: .75rem; left: .75rem; z-index: 2; background: var(--white); color: var(--primary); padding: .2rem .5rem; border-radius: var(--r-sm); }
@media (min-width: 1024px) {
    .disciplines-grid { grid-template-columns: repeat(6, 1fr); }
    .disciplines-grid > * { grid-column: span 2; }
    .disciplines-grid > *:nth-child(4) { grid-column: span 3; }
    .disciplines-grid > *:nth-child(5) { grid-column: span 3; }
    .disciplines-grid > *:nth-child(4):last-child { grid-column: span 6; }
}

/* ---------- Dark band ---------- */
.band-dark {
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
    color: var(--white); position: relative; overflow: hidden;
}
.band-dark::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 48px 48px;
}
.band-dark > * { position: relative; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--white); }
.band-dark .lead, .band-dark .muted, .band-dark p { color: rgba(255, 255, 255, .82); }
.band-dark .eyebrow { color: var(--secondary-soft); }
.glass-panel {
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--r-md); padding: 1.5rem;
}
.glass-panel .row-item { display: flex; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.glass-panel .row-item:last-child { border-bottom: 0; padding-bottom: 0; }
.glass-panel .row-item:first-child { padding-top: 0; }
.glass-panel .row-item .ms { color: var(--secondary-soft); }
.glass-panel strong { display: block; color: var(--white); font-family: var(--font-display); font-weight: 500; }
.glass-panel span.small { color: rgba(255, 255, 255, .72); }

.vision-quote { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 34px; letter-spacing: -.01em; color: var(--white); }
@media (min-width: 768px) { .vision-quote { font-size: 36px; line-height: 46px; } }

/* ---------- Process / lifecycle ---------- */
.stage {
    display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: center;
    padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
}
.stage + .stage { margin-top: 1rem; }
@media (min-width: 900px) { .stage { grid-template-columns: 96px 1fr 300px; gap: 2rem; padding: 2rem; } }
.stage-num { display: flex; flex-direction: row; align-items: center; gap: .75rem; }
@media (min-width: 900px) { .stage-num { flex-direction: column; align-items: flex-start; } }
.stage-num .num { font-family: var(--font-display); font-size: 44px; line-height: 1; font-weight: 300; color: var(--secondary); letter-spacing: -.03em; }
.stage .media { aspect-ratio: 16 / 10; }
.stage-points { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: 1rem; }
@media (min-width: 640px) { .stage-points { grid-template-columns: 1fr 1fr; } }
.stage-points div { background: var(--vellum); border-radius: var(--r-sm); padding: .75rem; }
.stage-points .label-sm { color: var(--tertiary-deep); display: block; margin-bottom: .2rem; }

/* Mini process strip */
.steps-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 768px) { .steps-strip { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .steps-strip { grid-template-columns: repeat(6, 1fr); } }
.steps-strip > div { background: var(--white); padding: 1rem; }
.steps-strip .num { font-family: var(--font-display); color: var(--secondary); font-weight: 600; }

/* ---------- Spec list / table ---------- */
.spec-list { list-style: none; }
.spec-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid rgba(24, 2, 12, .06); }
.spec-list li:last-child { border-bottom: 0; }
.spec-list li > span:first-child { color: var(--text-faint); }
.spec-list li > span:last-child { color: var(--text); text-align: right; font-weight: 500; }
.check-list { list-style: none; display: grid; gap: .6rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; color: var(--text-muted); }
.check-list li .ms { color: var(--secondary); font-size: 18px; margin-top: 3px; }
.check-list.two { grid-template-columns: 1fr; }
@media (min-width: 640px) { .check-list.two { grid-template-columns: 1fr 1fr; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.tech-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.tech-table th { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--primary); color: var(--primary); font-family: var(--font-display); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.tech-table td { padding: .9rem 1rem; border-bottom: 1px solid rgba(24, 2, 12, .05); color: var(--text-muted); vertical-align: top; font-size: 14px; }
.tech-table tr:nth-child(even) td { background: var(--canvas); }
.tech-table td:first-child { color: var(--text); font-weight: 600; }
.tech-table .hl { background: rgba(229, 255, 222, .5) !important; color: var(--primary); }

/* ---------- Service sections ---------- */
.service-block { padding: 2.5rem 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 60px); }
.service-block:first-of-type { border-top: 0; }
.service-block .split { align-items: start; }
.service-tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.service-tabs::-webkit-scrollbar { display: none; }
.service-tabs a { flex-shrink: 0; }
.service-tabs .chip:hover { background: var(--white); border-color: var(--primary); }
.sticky-tabs { position: sticky; top: var(--header-h); z-index: 20; background: rgba(248, 250, 251, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: .75rem 0; }

/* ---------- Team ---------- */
.team-card { padding: 0; overflow: hidden; }
.team-card .media { border-radius: 0; aspect-ratio: 4 / 5; }
.team-card .team-body { padding: 1.25rem 1.5rem 1.5rem; }
.team-card .team-role { color: var(--secondary); margin-top: .25rem; }
.team-card .team-bio { color: var(--text-muted); font-size: 14px; line-height: 22px; margin-top: .75rem; }
.team-links { display: flex; gap: .5rem; margin-top: 1rem; }
.team-links a { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-primary); border-radius: var(--r-sm); }

/* ---------- Projects ---------- */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filters a { color: var(--text-muted); }
.filters a.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.project-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project-card .media { border-radius: 0; aspect-ratio: 4 / 3; }
.project-card .project-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.project-card .project-body p { color: var(--text-muted); font-size: 14px; flex: 1; }
.project-meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--text-faint); }
.project-meta span { display: inline-flex; align-items: center; gap: .25rem; }
.project-meta .ms { font-size: 16px; }
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state .icon-box { width: 64px; height: 64px; margin-bottom: 1rem; }
.empty-state .icon-box .ms { font-size: 30px; }
.empty-state p { max-width: 520px; margin: .75rem auto 1.5rem; color: var(--text-muted); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery button { padding: 0; border: 0; cursor: zoom-in; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1 / 1; background: var(--vellum); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0, 20, 30, .92); display: none; align-items: center; justify-content: center; padding: 1rem; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 86vh; max-width: 92vw; border-radius: var(--r-sm); }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .12); color: var(--white); border: 1px solid rgba(255, 255, 255, .25); width: 44px; height: 44px; border-radius: var(--r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- FAQ ---------- */
.faq { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.faq + .faq { margin-top: .75rem; }
.faq summary { list-style: none; cursor: pointer; padding: 1.15rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: 17px; line-height: 24px; font-weight: 500; }
.faq summary .ms { color: var(--secondary); transition: transform .25s; }
.faq[open] summary .ms { transform: rotate(45deg); }
.faq[open] { border-color: rgba(0, 94, 124, .25); }
.faq .faq-body { padding: 0 1.25rem 1.25rem; color: var(--text-muted); }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label, .field .field-label { display: block; margin-bottom: .4rem; color: var(--text-muted); }
.field .opt { color: var(--text-faint); font-weight: 500; text-transform: none; letter-spacing: 0; }
.input, .select, .textarea {
    width: 100%; font: inherit; font-size: 15px; color: var(--text);
    background: var(--white); border: 1px solid rgba(24, 2, 12, .2); border-radius: var(--r-sm);
    padding: .7rem .85rem; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23005E7C' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.25rem; }
.textarea { min-height: 130px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0, 148, 198, .15); }
.input::placeholder, .textarea::placeholder { color: #9AA3A9; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: #BA1A1A; }
.field-error { color: #BA1A1A; font-size: 12px; margin-top: .3rem; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Toggle chips (checkbox / radio pills) */
.choice-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.choice > span {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem .85rem; border-radius: var(--r-sm);
    border: 1px solid rgba(0, 94, 124, .25); background: var(--white); color: var(--primary);
    font-size: 13px; font-weight: 500; transition: background .15s, color .15s, border-color .15s; user-select: none;
}
.choice > span .ms { font-size: 16px; }
.choice > input:checked + span { background: var(--primary); color: var(--white); border-color: var(--primary); }
.choice > input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 148, 198, .3); }
.choice:hover > span { border-color: var(--primary); }
.choice .ms-check { display: none; }
.choice input:checked + span .ms-check { display: inline-block; }
.choice input:checked + span .ms-add { display: none; }

.alert { display: flex; gap: .75rem; padding: 1rem 1.25rem; border-radius: var(--r-md); border: 1px solid; margin-bottom: 1.5rem; }
.alert-success { background: var(--sage); border-color: rgba(0, 94, 124, .2); color: var(--primary); }
.alert-error { background: #FFDAD6; border-color: rgba(186, 26, 26, .25); color: #93000A; }

/* Tabs */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; background: var(--vellum); border: 1px solid var(--line-primary); border-radius: var(--r-md); padding: .25rem; margin-bottom: 1.5rem; }
.tabs button { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border: 0; background: transparent; color: var(--text-muted); padding: .7rem .5rem; border-radius: var(--r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.tabs button.active { background: var(--white); color: var(--primary); box-shadow: 0 1px 3px rgba(0, 69, 92, .1); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Intake / dossier panel */
.dossier { background: var(--white); border: 1px solid rgba(0, 94, 124, .12); border-radius: var(--r-md); box-shadow: var(--shadow-3); overflow: hidden; }
.dossier-head { background: var(--primary); color: var(--white); padding: 1.25rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dossier-head h2, .dossier-head h3 { color: var(--white); }
.dossier-head .label-sm { color: var(--secondary-soft); }
.dossier-body { padding: 1.5rem; }
@media (min-width: 768px) { .dossier-body { padding: 2rem; } }
.dossier-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; margin-top: 1.5rem; border-top: 1px solid var(--line); }
.dossier-foot .small { color: var(--text-faint); display: inline-flex; gap: .4rem; align-items: center; }
.step-label { display: flex; align-items: center; gap: .5rem; color: var(--primary); margin-bottom: .75rem; }
.step-label b { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--vellum); border: 1px solid var(--line-primary); font-size: 11px; }

/* Contact desks */
.desk { display: flex; flex-direction: column; gap: .5rem; }
.desk-line { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .75rem; margin-top: .25rem; border-top: 1px solid var(--line); }
.desk-line a { font-family: var(--font-display); font-weight: 500; }
.icon-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line-primary); background: var(--vellum); color: var(--primary); }
.icon-btn:hover { background: var(--primary); color: var(--white); }
.map-frame { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--vellum); }
.map-frame iframe { width: 100%; height: 360px; border: 0; display: block; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .lead { max-width: 640px; margin: 1rem auto 0; }
.cta-band .hero-actions { justify-content: center; }

/* NestQuest feature */
.nq-logo { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 56px 0 24px; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; } }
.footer-grid h4 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); margin-bottom: 1rem; }
.footer-links { list-style: none; display: grid; gap: .5rem; }
.footer-links a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.footer-contact { list-style: none; display: grid; gap: .85rem; }
.footer-contact li { display: flex; gap: .6rem; color: var(--text-muted); font-size: 14px; line-height: 21px; }
.footer-contact .ms { color: var(--secondary); font-size: 18px; margin-top: 2px; }
.footer-contact a { color: var(--text-muted); }
.footer-tagline { font-family: var(--font-display); font-style: italic; color: var(--primary); font-size: 18px; margin: 1rem 0 .5rem; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); border: 1px solid var(--line-primary); color: var(--primary); }
.socials a:hover { background: var(--primary); color: var(--white); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.25rem; color: var(--text-faint); font-size: 13px; }
.footer-bottom a { color: var(--text-faint); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* Utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-secondary { color: var(--secondary); } .text-earth { color: var(--tertiary-deep); } .text-primary { color: var(--primary); } .text-faint { color: var(--text-faint); }
.text-center { text-align: center; }
.hide-sm { display: none; }
@media (min-width: 768px) { .hide-sm { display: initial; } }

/* Metric tiles: two per row on phones */
.metrics { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 1024px) { .metrics { grid-template-columns: repeat(4, 1fr); gap: var(--gutter); } }
@media (max-width: 639px) {
    .metrics .card { padding: 1rem; }
    .metrics .metric-value { font-size: 24px; line-height: 30px; }
    .metrics .metric-label { font-size: 12px; line-height: 17px; }
}
.metric .metric-value.metric-sm { font-size: 22px; line-height: 30px; }
@media (min-width: 768px) { .metric .metric-value.metric-sm { font-size: 26px; line-height: 34px; } }
@media (min-width: 1024px) { .order-last-lg { order: 2; } }
