/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: rgba(20, 20, 20, 0.9);
    --text-primary: #fafafa;
    --text-secondary: #e0e0e0;
    --text-muted: #c0c0c0;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent: #3b82f6;
    --accent-hover: #2563eb;

    /*
     * Logo sizing (measured from the live navbar):
     * - InterDisplay 700 @ 18px: glyph "D" bounding height ≈ 13px => 13/18 = 0.7222em
     * - Trimmed logo SVG bar thickness ratio ≈ 0.2725 of mark height
     * To enforce: (bar height) == (D glyph height)
     * => mark-height-em = 0.7222 / 0.2725 ≈ 2.650
     */
    --brand-wordmark-d-height-em: 0.7222;
    --brand-logo-bar-thickness-ratio: 0.2725;
    --brand-mark-height-em: calc(var(--brand-wordmark-d-height-em) / var(--brand-logo-bar-thickness-ratio));

    /*
     * Vertical alignment:
     * The bar is not vertically centered in the mark (waveform peaks sit above it).
     * Measured bar center ratio in the trimmed SVG: ~0.733 of mark height.
     * Shift wordmark down by (0.733 - 0.5) * markHeight so "D" aligns to bar.
     */
    --brand-logo-bar-center-ratio: 0.7331;
    --brand-logo-bar-center-offset-ratio: calc(var(--brand-logo-bar-center-ratio) - 0.5);
}

@supports (font-variation-settings: normal) {
    :root {
        font-family: "InterVariable", sans-serif;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    /* Make the wordmark feel like a continuation of the bar */
    gap: 0.15rem;
    text-decoration: none;
    color: var(--text-primary);
    /* Ensure the mark can scale relative to the wordmark size */
    font-size: 1.125rem;
}

.nav-logo-img {
    /*
     * NOTE: `assets/images/logo*.svg` is now trimmed (tight viewBox: 374x92).
     * The right-hand terminal bar thickness is ~12.5px in the SVG coordinate system
     * (≈13.6% of the mark’s full height). If you need “bar height == D cap-height”
     * next to the wordmark, scale this mark accordingly — trimming removes the
     * built-in whitespace that previously broke sizing/alignment.
     */
    /* Enforce: bar height == "D" glyph height (see :root logo sizing vars) */
    height: calc(var(--brand-mark-height-em) * 1em);
    width: auto;
    opacity: 0.95;
    vertical-align: middle;
    align-self: center;
}

.nav-logo-text {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    /* Nudge the “D” closer to the terminal bar for continuity */
    margin-left: -0.02em;
    /* Align wordmark vertically to the bar’s centerline (not the mark’s center) */
    transform: translateY(calc(var(--brand-logo-bar-center-offset-ratio) * var(--brand-mark-height-em) * 1em));
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    height: 8rem; /* Larger for hero section */
    width: auto;
    opacity: 0.95;
}

.hero-title {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #c0c0c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Section Styles */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Staff Section */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.staff-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.staff-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.staff-photo {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-photo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center;
}

.staff-photo img.staff-photo-img--top {
    /* Mark's headshot sits high in frame; bias crop toward the top */
    object-position: center 15%;
}

.staff-info {
    padding: 2rem;
}

.staff-name {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.staff-title {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.staff-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Approach Section */
.approach {
    background: var(--bg-primary);
}

.approach-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.approach-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.approach-text p {
    margin-bottom: 1.5rem;
}

.approach-text .lead-text {
    font-size: 1.375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.approach-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.approach-principles {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.principles-title {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.principles-list {
    list-style: none;
}

.principles-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.6;
}

.principles-list li:last-child {
    border-bottom: none;
}

.principles-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Contact Section */
.contact {
    background: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info-title {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-info-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-detail {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.contact-detail a {
    color: var(--accent);
    text-decoration: none;
}

.contact-detail a:hover {
    text-decoration: underline;
}

/* Form Styles */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.875rem;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    /* Let the brand lockup take the width it needs (like the header) */
    grid-template-columns: auto 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-brand {
    font-size: 1.125rem;
}

.footer-brand-link {
    display: inline-flex;
    align-items: center;
    /* Match header “continuation” feel */
    gap: 0.15rem;
    text-decoration: none;
    color: var(--text-primary);
    flex-wrap: nowrap;
}

.footer-logo-img {
    height: calc(var(--brand-mark-height-em) * 1em);
    width: auto;
    opacity: 0.9;
    vertical-align: middle;
    align-self: center;
}

.footer-brand-text {
    font-family: "InterDisplay", "Inter", sans-serif;
    font-weight: 700;
    font-size: 1em;
    line-height: 1;
    /* Match header: bar-to-D continuity + bar-center vertical alignment */
    margin-left: -0.02em;
    transform: translateY(calc(var(--brand-logo-bar-center-offset-ratio) * var(--brand-mark-height-em) * 1em));
    white-space: nowrap;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .approach-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-logo-img {
        height: 80px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .container {
        padding: 0 1.5rem;
    }

    section {
        padding: 4rem 0;
    }

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

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

    .staff-photo {
        height: 250px;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

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

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .container {
        padding: 0 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .hero-logo-img {
        height: 60px;
    }

    .staff-photo {
        height: 200px;
    }

    .staff-info {
        padding: 1.5rem;
    }

    .staff-name {
        font-size: 1.25rem;
    }
}
