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

:root {
    --color-bg: #0a0a0a;
    --color-surface: #141414;
    --color-border: #222;
    --color-text: #e8e8e8;
    --color-text-muted: #888;
    --color-accent: #c8f042;
    --color-error: #f04242;
    --color-success: #42f0a0;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container-max: 960px;
    --spacing-section: 8rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Layout === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* === Header === */
.header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.wordmark {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text);
}

/* === Hero === */
.hero {
    padding: var(--spacing-section) 0;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: 720px;
}

.hero-sub {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--color-text-muted);
    max-width: 600px;
    line-height: 1.8;
}

/* === What We Do === */
.what-we-do {
    padding-bottom: var(--spacing-section);
}

.what-we-do h2 {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
}

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

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

.card h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

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

/* === Philosophy === */
.philosophy {
    padding: var(--spacing-section) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.philosophy blockquote {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-text);
    max-width: 700px;
    font-style: normal;
}

.philosophy blockquote::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--color-accent);
    margin-bottom: 2rem;
    border-radius: 2px;
}

/* === CTA Section === */
.cta-section {
    padding: var(--spacing-section) 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.qi-intro {
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.0625rem;
}

.qi-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--color-accent);
    font-family: var(--font-family);
    font-size: 1.125rem;
    font-weight: 500;
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

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

/* === Modal === */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--color-text);
}

/* Thank you state (replaces form on success) */
.thank-you {
    text-align: center;
    padding: 2rem 0;
}

.thank-you h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.thank-you p {
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* === Form (inside modal) === */
.qi-form {
    text-align: left;
}

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

.form-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

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

/* Honeypot — hidden from humans */
.form-field-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: var(--color-accent);
    color: var(--color-bg);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s;
    min-width: 160px;
}

.submit-btn:hover {
    opacity: 0.9;
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-status {
    margin-top: 1.25rem;
    font-size: 0.9375rem;
    min-height: 1.5em;
}

.form-status.success {
    color: var(--color-success);
}

.form-status.error {
    color: var(--color-error);
}

/* === Footer === */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

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

/* === Responsive === */
@media (max-width: 640px) {
    :root {
        --spacing-section: 5rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

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

    .cta-section h2 {
        font-size: 1.5rem;
    }
}
