/* ===================================
   General Lattice - Shared Styles
   Unified design system across all pages
   =================================== */

/* Font Faces */
@font-face {
    font-family: 'Avenir Next LT Pro';
    src: url('../fonts/AvenirNextLTProLight.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Avenir Next LT Pro';
    src: url('../fonts/AvenirNextLTProRegular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Avenir Next LT Pro';
    src: url('../fonts/AvenirNextLTProDemi.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Avenir Next LT Pro';
    src: url('../fonts/AvenirNextLTProBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Design Tokens */
:root {
    --black: #0a0a0a;
    --white: #fafafa;
    --gray-100: #e8e8e8;
    --gray-200: #c4c4c4;
    --gray-800: #2a2a2a;
    --accent: #004FDE;
    --accent-dark: #003BB0;
    --grid-color: rgba(0, 79, 222, 0.08);

    /* Spacing scale */
    --section-padding: 6rem;
    --section-gap: 1px;

    /* Border tokens */
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-light: 1px solid rgba(255, 255, 255, 0.1);

    /* Card tokens */
    --card-bg: rgba(255, 255, 255, 0.035);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-radius: 8px;
    --card-hover-border: rgba(255, 255, 255, 0.18);

    /* Section background tokens */
    --section-bg-default: transparent;
    --section-bg-raised: rgba(255, 255, 255, 0.02);
    --section-bg-accent: rgba(0, 79, 222, 0.03);
}

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

/* Base */
body {
    font-family: 'Avenir Next LT Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

/* Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* ===================================
   Buttons - Unified
   =================================== */
.btn {
    padding: 1rem 2rem;
    font-family: 'Avenir Next LT Pro', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    border-color: var(--white);
    transform: translateY(-2px);
}

.cta-group {
    display: flex;
    gap: 1rem;
}

/* ===================================
   Hero - Unified subpage pattern
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--black);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: right center;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.7) 50%, rgba(10, 10, 10, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: 'Avenir Next LT Pro', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--white);
}

.hero h1 .headline-plus {
    display: block;
    font-size: 2rem;
    line-height: 1.4;
    color: var(--accent);
}

.hero-subheader {
    font-size: 1.1rem;
    color: var(--gray-100);
    max-width: 600px;
    margin-bottom: 0.1rem;
    line-height: 1.7;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--gray-100);
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* ===================================
   Section Labels
   =================================== */
.section-label {
    font-family: 'Avenir Next LT Pro', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: inline-block;
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: 'Avenir Next LT Pro', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.section-header p,
.section-subheader {
    font-size: 1.05rem;
    color: var(--gray-100);
    line-height: 1.7;
}

/* ===================================
   Cards - Unified
   =================================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--card-hover-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

.cta-section h2 {
    font-family: 'Avenir Next LT Pro', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.05rem;
    color: var(--gray-100);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* ===================================
   Footer - Now managed by components/site-footer.js
   =================================== */

/* ===================================
   Utility
   =================================== */
.placeholder-text {
    color: var(--gray-200);
    font-style: italic;
}

.visual-placeholder {
    font-size: 0.7rem;
    color: var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 1;
}

/* ===================================
   Responsive - Shared breakpoints
   =================================== */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 1.85rem;
    }

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

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

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

    .hero {
        min-height: auto;
        padding: 10rem 0 4rem;
    }

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

    .hero-subheader {
        font-size: 0.95rem;
    }

    .cta-group {
        width: 100%;
    }

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

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

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