:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-tertiary: #eef1f5;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #8a97a8;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: rgba(37, 99, 235, 0.08);
    --accent-2: #8b5cf6;
    --accent-2-soft: rgba(139, 92, 246, 0.1);
    --accent-3: #f59e0b;
    --accent-3-soft: rgba(245, 158, 11, 0.1);
    --accent-4: #ec4899;
    --accent-4-soft: rgba(236, 72, 153, 0.1);
    --accent-5: #14b8a6;
    --accent-5-soft: rgba(20, 184, 166, 0.1);
    --border-color: #e4e8ee;
    --success: #16a34a;
    --danger: #dc2626;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.10);
    --radius: 14px;
    --maxw: 1180px;
}

[data-theme="dark"] {
    --bg-primary: #0b1120;
    --bg-secondary: #0f172a;
    --bg-tertiary: #172033;
    --text-primary: #f1f5f9;
    --text-secondary: #b3c0d4;
    --text-tertiary: #7c8aa1;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-soft: rgba(96, 165, 250, 0.12);
    --accent-2: #a78bfa;
    --accent-2-soft: rgba(167, 139, 250, 0.14);
    --accent-3: #fbbf24;
    --accent-3-soft: rgba(251, 191, 36, 0.14);
    --accent-4: #f472b6;
    --accent-4-soft: rgba(244, 114, 182, 0.14);
    --accent-5: #2dd4bf;
    --accent-5-soft: rgba(45, 212, 191, 0.14);
    --border-color: #22304a;
    --success: #34d399;
    --danger: #f87171;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Sora', 'Inter', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary);
}

a { color: inherit; }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- Header ---------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
    border-bottom: 1px solid transparent;
    backdrop-filter: saturate(180%) blur(14px);
    transition: border-color 0.3s ease, background 0.3s ease;
}

header.scrolled {
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

nav {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Keeps the logo off the first nav link if the row ever gets cramped. */
    gap: 1.25rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-mark {
    height: 64px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.logo-text { white-space: nowrap; }

.logo-mark-dark { display: none; }

[data-theme="dark"] .logo-mark-light { display: none; }
[data-theme="dark"] .logo-mark-dark { display: block; }

.logo-accent { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
    padding: 0.55rem 1.1rem;
    background: var(--accent);
    color: #fff !important;
    border-radius: 9px;
    font-weight: 600 !important;
}

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

.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.theme-toggle:hover { border-color: var(--accent); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 11rem 0 6rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -260px;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 680px;
    background:
        radial-gradient(ellipse 45% 55% at 30% 35%, var(--accent-soft) 0%, transparent 70%),
        radial-gradient(ellipse 45% 55% at 68% 30%, var(--accent-2-soft) 0%, transparent 70%),
        radial-gradient(ellipse 40% 45% at 50% 60%, var(--accent-4-soft) 0%, transparent 72%);
    pointer-events: none;
}

.hero-content { position: relative; max-width: 780px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

/* Positioning statement: sits under the eyebrow, above the H1 */
.hero .eyebrow { margin-bottom: 1rem; }

.hero p.hero-positioning {
    font-size: clamp(1.12rem, 2.3vw, 1.5rem);
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-secondary);
    max-width: 720px;
    margin-bottom: 1.3rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5.4vw, 3.9rem);
    font-weight: 700;
    margin-bottom: 1.4rem;
}

.hero h1 .accent {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: clamp(1.05rem, 1.8vw, 1.22rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin-bottom: 2.25rem;
}

.cta-buttons {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 2.75rem;
}

.btn {
    padding: 0.9rem 1.6rem;
    border-radius: 11px;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-tertiary);
}

.trust-row {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.trust-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.trust-row span::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.trust-row span:nth-child(2)::before { background: var(--accent-2); }
.trust-row span:nth-child(3)::before { background: var(--accent-4); }
.trust-row span:nth-child(4)::before { background: var(--accent-5); }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }

.section {
    padding: 6rem 0;
}

.section.alt { background: var(--bg-secondary); }

.section-header {
    max-width: 640px;
    margin-bottom: 3.25rem;
}

.section-header.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.85rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.8vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.08rem;
}

/* ---------- Framework (ESM layers + pillars) ---------- */
.esm-layers {
    display: grid;
    gap: 1.25rem;
}

.esm-layer {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.75rem 1.9rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.esm-layer:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.esm-layer:nth-child(2) { border-left-color: var(--accent-2); }
.esm-layer:nth-child(3) { border-left-color: var(--accent-4); }

.esm-mark {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
}

.esm-layer:nth-child(2) .esm-mark { color: var(--accent-2); background: var(--accent-2-soft); }
.esm-layer:nth-child(3) .esm-mark { color: var(--accent-4); background: var(--accent-4-soft); }

.esm-layer-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.esm-layer-head h3 {
    font-size: 1.18rem;
    font-weight: 600;
}

.esm-q {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border: 1px solid var(--border-color);
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
}

.esm-layer-body p {
    color: var(--text-secondary);
    font-size: 0.96rem;
}

.esm-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.esm-pillar {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.6rem 1.75rem;
}

.pillar-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-3-soft);
    color: var(--accent-3);
}

.esm-pillar:nth-child(2) .pillar-icon { background: var(--accent-5-soft); color: var(--accent-5); }

.pillar-icon svg { width: 20px; height: 20px; }

.esm-pillar h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.esm-pillar p {
    color: var(--text-secondary);
    font-size: 0.94rem;
}

/* ---------- Capabilities ---------- */
.cap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 2rem 3rem;
}

.cap-item {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
}

.cap-num {
    flex-shrink: 0;
    font-family: 'Sora', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--accent);
    padding-top: 0.2rem;
}

.cap-item:nth-child(2) .cap-num { color: var(--accent-2); }
.cap-item:nth-child(3) .cap-num { color: var(--accent-3); }
.cap-item:nth-child(4) .cap-num { color: var(--accent-4); }
.cap-item:nth-child(5) .cap-num { color: var(--accent-5); }
.cap-item:nth-child(6) .cap-num { color: var(--accent-2); }

.cap-item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.cap-item p {
    color: var(--text-secondary);
    font-size: 0.94rem;
}

.note {
    margin: 2rem auto 0;
    max-width: 640px;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-align: center;
}

/* ---------- Process ---------- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}

.process-step {
    position: relative;
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.step-number {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
}

.process-step h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.process-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- Principles / why me ---------- */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem 2.5rem;
}

.principle {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.principle .check {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.principle .check svg { width: 16px; height: 16px; }

.principle h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.principle p {
    color: var(--text-secondary);
    font-size: 0.94rem;
}

/* ---------- Contact ---------- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3.5rem;
    align-items: start;
}

.contact-info h2 { margin-bottom: 1.1rem; }

.contact-info > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2.25rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-method .c-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-method .c-icon svg { width: 19px; height: 19px; }

.contact-method h4 {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.contact-method a,
.contact-method span.val {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

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

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 500;
}

.status-dot {
    width: 9px;
    height: 9px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent);
}

.contact-form-wrapper {
    background: var(--bg-primary);
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.section.alt .contact-form-wrapper { background: var(--bg-primary); }

/* ---------- Contact (centered lead form) ---------- */
.contact-lead {
    max-width: 620px;
    margin: 0 auto;
}

.contact-lead-head {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-lead-head .section-label { text-align: center; }

.contact-lead-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-top: 0.5rem;
}

/* ---------- Lead capture form ---------- */
.lead-form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.form-sub {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: -0.4rem;
    margin-bottom: 0.4rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-row label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-row label .opt {
    font-weight: 400;
    color: var(--text-tertiary);
}

.lead-form input,
.lead-form textarea,
.lead-form select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    font-family: inherit;
    /* 16px minimum: anything smaller makes iOS Safari zoom in on focus. */
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-form input::placeholder,
.lead-form textarea::placeholder { color: var(--text-tertiary); }

.lead-form input:focus,
.lead-form textarea:focus,
.lead-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.lead-form textarea { resize: vertical; min-height: 84px; }

/* Native select styled to match, with a custom chevron */
.lead-form select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a97a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
}

/* Placeholder look while nothing is chosen (value is empty on a required select) */
.lead-form select:invalid { color: var(--text-tertiary); }

.form-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.field-error {
    font-size: 0.8rem;
    color: var(--danger);
    display: none;
}

.field-error.show { display: block; }

.lead-form input.field-invalid {
    border-color: var(--danger);
}

.lead-form input.field-invalid:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent);
}

.form-submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.35rem;
}

.form-submit:disabled { opacity: 0.7; cursor: default; }

.form-submit svg { width: 1.15rem; height: 1.15rem; }

.contact-lead > .availability-badge {
    display: flex;
    width: fit-content;
    margin: 1.5rem auto 0;
}

.form-status {
    font-size: 0.9rem;
    margin: 0;
    min-height: 1.2em;
}

.form-status.ok { color: var(--success); }
.form-status.warn { color: var(--text-secondary); }
.form-status-link { color: inherit; text-decoration: underline; }
.form-status-link:hover { color: var(--text-primary); }

.form-alt {
    font-size: 0.86rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 0.25rem;
}

.form-alt a { color: var(--accent); text-decoration: none; }
.form-alt a:hover { text-decoration: underline; }

/* Honeypot: kept in the layout but off-screen (bots skip display:none). */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ---------- Contact CTA band ---------- */
.cta-band {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 3rem 2rem;
}

.cta-band .section-label { text-align: center; }

.cta-band-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0.6rem auto 1.75rem;
    max-width: 460px;
}

.cta-band .availability-badge {
    display: flex;
    width: fit-content;
    margin: 1.75rem auto 0;
}

/* ---------- Contact modal (native <dialog>) ---------- */
.contact-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: min(560px, 94vw);
    max-height: 90dvh;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

.contact-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.contact-dialog[open] {
    display: flex;
    flex-direction: column;
    animation: lf-modal-in 0.25s ease;
}

@keyframes lf-modal-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(0.99); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

body.modal-open { overflow: hidden; }

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.modal-close:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.modal-close svg { width: 18px; height: 18px; }

.modal-head {
    flex-shrink: 0;
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.modal-head .section-label { text-align: center; }

.modal-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-top: 0.4rem;
}

.modal-sub {
    color: var(--text-secondary);
    font-size: 0.98rem;
    margin-top: 0.5rem;
}

/* Inside the modal the form scrolls; the dialog itself is the card */
.contact-dialog .lead-form {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 2rem 2rem;
    border: none;
    box-shadow: none;
    background: transparent;
}

/* ---------- Footer ---------- */
footer {
    background: var(--bg-primary);
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--accent); }

.copyright {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ---------- Scroll animation ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gentle staggered entrance for the hero on load */
@keyframes lf-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-content > * { animation: lf-rise 0.6s ease both; }
.hero-content > .eyebrow      { animation-delay: 0.05s; }
.hero-content > p.hero-positioning { animation-delay: 0.09s; }
.hero-content > h1            { animation-delay: 0.14s; }
.hero-content > p             { animation-delay: 0.20s; }
.hero-content > .cta-buttons  { animation-delay: 0.28s; }
.hero-content > .trust-row    { animation-delay: 0.36s; }

/* Subtle stagger as each grid reveals on scroll */
.process-steps .fade-in:nth-child(2),
.principles-grid .fade-in:nth-child(2),
.esm-layers .fade-in:nth-child(2),
.esm-pillars .fade-in:nth-child(2),
.cap-grid .fade-in:nth-child(2) { transition-delay: 0.06s; }
.process-steps .fade-in:nth-child(3),
.principles-grid .fade-in:nth-child(3),
.esm-layers .fade-in:nth-child(3),
.cap-grid .fade-in:nth-child(3) { transition-delay: 0.12s; }
.process-steps .fade-in:nth-child(4),
.principles-grid .fade-in:nth-child(4),
.cap-grid .fade-in:nth-child(4) { transition-delay: 0.18s; }
.principles-grid .fade-in:nth-child(5),
.cap-grid .fade-in:nth-child(5) { transition-delay: 0.24s; }
.cap-grid .fade-in:nth-child(6) { transition-delay: 0.30s; }

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .contact-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Six nav links need less air between them at the narrow end of the desktop range. */
@media (max-width: 1080px) {
    .nav-links { gap: 1.25rem; }
}

@media (max-width: 560px) {
    .form-grid-2 { grid-template-columns: 1fr; }

    /* Full-height sheet on phones: anchored to the top (no transform-centering)
       and sized with dvh so the on-screen keyboard can't hide fields or the
       submit button. The inner .lead-form still scrolls. */
    .contact-dialog {
        top: 0;
        left: 0;
        transform: none;
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }

    .contact-dialog[open] { animation: none; }
}

/* Six nav links stop fitting on one line well before the phone breakpoint (they need
   ~1050px), so the drawer takes over at tablet width. Layout tweaks stay on 720px. */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        /* Header height: the 64px logo mark plus 1.1rem padding top and bottom. */
        top: calc(64px + 2.2rem);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-140%);
        transition: transform 0.3s ease;
    }

    .nav-links.open { transform: translateY(0); }

    .nav-links li { width: 100%; }

    .nav-links a { display: block; padding: 0.6rem 0; }

    .nav-cta { text-align: center; }

    .nav-toggle { display: flex; }
}

@media (max-width: 720px) {
    .hero { padding: 8.5rem 0 4rem; }

    .cta-buttons { flex-direction: column; }

    .btn { width: 100%; justify-content: center; }

    .footer-content { flex-direction: column; text-align: center; }
}

/* ---- Proof / work cards -------------------------------------------------- */
/* Reuses the existing tokens rather than introducing a second palette: cards
   read as siblings of .cap-item, not as a bolted-on section. */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    margin-top: 44px;
}
.work-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 26px 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.work-card:hover,
.work-card:focus-visible {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.work-kicker {
    font-size: .72rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}
.work-card h3 {
    font-size: 1.12rem;
    line-height: 1.35;
    margin: 0;
    text-wrap: balance;
}
.work-card p {
    margin: 0;
    font-size: .95rem;
    line-height: 1.6;
    color: var(--text-secondary, inherit);
    opacity: .85;
}
.work-meta {
    margin-top: auto;
    padding-top: 12px;
    font-size: .8rem;
    opacity: .6;
    font-variant-numeric: tabular-nums;
}
/* The honesty line. Deliberately not styled as fine print — it is the point,
   not a disclaimer, and burying it would defeat the reason it is there. */
.work-note {
    margin-top: 30px;
    padding-left: 16px;
    border-left: 2px solid var(--accent);
    font-size: .93rem;
    line-height: 1.6;
    opacity: .82;
    max-width: 62ch;
}
@media (prefers-reduced-motion: reduce) {
    .work-card { transition: none; }
    .work-card:hover { transform: none; }
}
