/* ==========================================================
   Thrivant — Landing Page Styles
   Color Palette: Clean Slate (Option B)
   Logo: G1 "The Apex"
   ========================================================== */

/* ---------- Design Tokens ---------- */
:root {
    --white: #ffffff;
    --bg: #f8fafc;
    --bg-alt: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --dark: #0f172a;
    --dark-surface: #1e293b;
    --border: #e2e8f0;
    --success: #059669;
    --error: #dc2626;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container: 1140px;
    --section-pad: 120px;
    --section-pad-mobile: 72px;
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    color: var(--text);
}

h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }

.section-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-label-light {
    color: var(--accent);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 20px;
}

.section-title-light {
    color: var(--white);
}

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

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    padding: 14px 28px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.875rem;
}

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

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

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

.btn-primary-light:hover {
    background: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

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

.btn-full {
    width: 100%;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.65rem;
    letter-spacing: 0.06em;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ---------- Hero ---------- */
.hero {
    padding: 160px 0 var(--section-pad);
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 720px;
}

.hero-title {
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- Services ---------- */
.services {
    padding: var(--section-pad) 0;
    background: var(--bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 32px;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.service-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.service-accent {
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

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

/* ---------- How We Work ---------- */
.process {
    padding: var(--section-pad) 0;
}

.process-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 64px;
    margin-top: 48px;
    align-items: start;
}

.process-lead {
    font-size: 1.1875rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 20px;
}

.process-narrative p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.process-principles {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.principle {
    padding-left: 24px;
    border-left: 2px solid var(--border);
}

.principle h4 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.principle p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ---------- Engagement (Dark) ---------- */
.engagement {
    padding: var(--section-pad) 0;
    background: var(--dark);
}

.engagement-content {
    max-width: 640px;
    margin-top: 32px;
}

.engagement-lead {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
}

.engagement-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 32px;
}

/* ---------- Contact ---------- */
.contact {
    padding: var(--section-pad) 0;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.contact-sub {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* --- Form --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.form-group label .required {
    color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    width: 100%;
}

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

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

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-group select option[value=""][disabled] {
    color: var(--text-tertiary);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

/* Form feedback */
.form-success {
    text-align: center;
    padding: 48px 24px;
}

.form-success-icon {
    margin-bottom: 20px;
}

.form-success h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.form-error p {
    font-size: 0.9375rem;
    color: var(--error);
}

.form-error a {
    color: var(--error);
    text-decoration: underline;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--dark);
    padding: 40px 0;
    border-top: 1px solid var(--dark-surface);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--white);
}

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

/* ---------- Scroll Animations ---------- */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    :root {
        --section-pad: 96px;
    }

    .services-grid {
        gap: 20px;
    }

    .process-content {
        gap: 48px;
    }

    .contact-layout {
        gap: 48px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: var(--section-pad-mobile);
    }

    /* Nav mobile */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 8px 0;
    }

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

    /* Nav toggle animation */
    .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(5px, -5px);
    }

    /* Hero mobile */
    .hero {
        padding: 120px 0 var(--section-pad);
        min-height: auto;
    }

    .hero-title {
        font-size: clamp(2.25rem, 8vw, 3.25rem);
    }

    /* Services mobile */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Process mobile */
    .process-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Contact mobile */
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer mobile */
    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

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

    .service-card {
        padding: 28px 24px;
    }
}
