@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────────────────── */
:root {
    --bg:           #0a0a0a;
    --text-main:    #ededed;
    --text-muted:   #878787;
    --border:       #222222;
    --accent:       #ffffff;
    --transition-theme: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

:root.light {
    --bg:           #f5f5f3;
    --text-main:    #111111;
    --text-muted:   #666666;
    --border:       #d8d8d8;
    --accent:       #000000;
}

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

html {
    scroll-behavior: smooth;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: var(--transition-theme);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: var(--transition-theme);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1px;
    background-color: var(--text-main);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile-only nav link (Contact in dropdown) hidden on desktop */
.nav-link--mobile-only {
    display: none;
}

@media (max-width: 620px) {
    .nav-toggle {
        display: flex;
    }

    /* Hide desktop Contact btn, show hamburger */
    .header-actions .btn-small {
        display: none;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background-color: var(--bg);
        border-bottom: 1px solid var(--border);
        transition: var(--transition-theme);
    }

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

    .nav-link {
        width: 100%;
        padding: 1rem 2rem;
        border-top: 1px solid var(--border);
        font-size: 0.8rem;
    }

    .nav-link--mobile-only {
        display: block;
    }
}

/* ─── Logo ───────────────────────────────────────────────────────────────── */
.logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--text-main);
    text-decoration: none;
}

.logo span,
.logo .muted {
    color: var(--text-muted);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-small {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 0.45rem 1.1rem;
    border-radius: 4px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-small:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-primary {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: var(--text-main);
    color: var(--bg);
    text-decoration: none;
    padding: 0.85rem 1.75rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

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

.btn-ghost {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.85rem 1.75rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    padding: 9rem 0 7rem;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 2.5rem;
    max-width: 820px;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 300;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ─── Trust Bar ──────────────────────────────────────────────────────────── */
.trust-bar {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.trust-bar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.trust-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.trust-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
    white-space: nowrap;
    text-align: center;
    border-radius: 3px;
    user-select: none;
}

/* ─── Workflow Visualization ─────────────────────────────────────────────── */
.wp-section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--border);
}

#workflow-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.wp-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    fill: var(--text-muted);
    letter-spacing: 0.06em;
}

/* Bezier paths connecting nodes to processor */
.wp-path {
    fill: none;
    stroke: var(--border);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

/* Input nodes — muted, dashed border */
.wp-node rect {
    fill: var(--bg);
    stroke: var(--border);
    stroke-width: 1;
}

.wp-node text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    fill: var(--text-muted);
    letter-spacing: 0.04em;
}

/* Output nodes — more prominent, ordered */
.wp-node--out rect {
    stroke: var(--text-main);
    stroke-opacity: 0.3;
}

.wp-node--out text {
    fill: var(--text-main);
    opacity: 0.55;
}

/* Processor box */
.wp-proc-bg {
    fill: var(--bg);
}

.wp-proc-border {
    fill: none;
    stroke: var(--text-main);
    stroke-width: 1;
    stroke-opacity: 0.22;
}

.wp-proc-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    fill: var(--text-muted);
    letter-spacing: 0.10em;
}

.wp-proc-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    fill: var(--text-muted);
    letter-spacing: 0.05em;
    opacity: 0.45;
}

/* Bouncing scan line */
.wp-scan {
    stroke: var(--text-main);
    stroke-width: 0.75;
    stroke-opacity: 0.15;
}

/* Animated particles */
.wp-particle {
    fill: var(--text-main);
}

@media (max-width: 620px) {
    .wp-section {
        display: none;
    }
}

/* ─── Section Header ─────────────────────────────────────────────────────── */
.section-header {
    margin: 7rem 0 3.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

/* ─── Philosophy Grid ────────────────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    padding-bottom: 3.5rem;
}

.text-block h3 {
    font-size: 1.45rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}

.text-block p {
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.75;
    font-size: 0.97rem;
}

/* ─── Stat Strip ─────────────────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    border-top: 1px solid var(--border);
    padding: 3rem 0 5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.stat-value {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 300;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--text-main);
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    max-width: 180px;
    line-height: 1.5;
}

/* ─── Capabilities List ──────────────────────────────────────────────────── */
#capabilities {
    border-top: 1px solid var(--border);
}

.capability-list {
    list-style: none;
    padding-bottom: 2rem;
}

.capability-list li {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 4rem 240px 1fr;
    gap: 2rem;
    align-items: start;
    transition: opacity 0.2s ease;
}

.cap-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.18;
    line-height: 1.2;
    user-select: none;
}

.capability-list li:hover {
    opacity: 0.75;
}

.capability-list h4 {
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    padding-top: 0.1rem;
}

.capability-list p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 0.93rem;
    line-height: 1.7;
}

/* ─── Testimonials ───────────────────────────────────────────────────────── */
#proof {
    border-top: 1px solid var(--border);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding-bottom: 5rem;
}

.testimonial-card {
    border-top: 2px solid var(--text-main);
    padding-top: 2rem;
}

.testimonial-quote {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-main);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.testimonial-attribution {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* ─── Security Posture ───────────────────────────────────────────────────── */
#security {
    border-top: 1px solid var(--border);
}

.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding-bottom: 5rem;
}

.security-card {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2rem;
    transition: border-color 0.2s ease;
}

.security-card:hover {
    border-color: var(--text-muted);
}

.security-card-icon {
    font-size: 1.4rem;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1.25rem;
    line-height: 1;
}

.security-card h4 {
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
}

.security-card p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ─── Footer CTA ─────────────────────────────────────────────────────────── */
.cta {
    border-top: 1px solid var(--border);
    padding-bottom: 0;
}

.cta .section-header {
    margin-top: 5rem;
    margin-bottom: 3rem;
}

.cta h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.cta p {
    color: var(--text-muted);
    font-weight: 300;
    max-width: 480px;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ─── Contact Form ───────────────────────────────────────────────────────── */
.contact-form {
    margin-top: 3rem;
    max-width: 720px;
}

.form-row {
    margin-bottom: 1.75rem;
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.form-field label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-main);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    outline: none;
    transition: border-color 0.2s ease, color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--text-main);
}

.form-field input.invalid,
.form-field select.invalid,
.form-field textarea.invalid {
    border-color: #c0392b;
}

/* Select arrow */
.form-field 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 d='M1 1l5 5 5-5' stroke='%23878787' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-field select option {
    background-color: var(--bg);
    color: var(--text-main);
}

.form-field textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.65;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.form-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
}

.form-status.error {
    color: #c0392b;
}

/* Success state */
.contact-success {
    margin-top: 3rem;
    max-width: 480px;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.contact-success .success-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
}

.contact-success h3 {
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.contact-success p {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 0.97rem;
    max-width: 100%;
    margin-bottom: 0;
}

/* ─── Footer Bar ─────────────────────────────────────────────────────────── */
footer {
    margin-top: 6rem;
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* ─── Theme Toggle ───────────────────────────────────────────────────────── */
.btn-theme {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.btn-theme:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Hero entrance — CSS-driven, no JS needed */
.hero h1 {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.hero p {
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.hero .btn-primary {
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.40s both;
}

/* Scroll-reveal base state */
[data-anim] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-anim].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero h1,
    .hero p,
    .hero .btn-primary {
        animation: none;
    }

    [data-anim] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .capability-list li {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .cap-num {
        display: none;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .hero {
        padding: 6rem 0 5rem;
    }

    .section-header {
        margin-top: 5rem;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    .trust-logos {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}
