/**
 * Roots Development Group - Main Stylesheet
 * Design tokens and base styles
 */

:root {
    /* Color Palette - Dark Theme */
    --color-bg-primary: #0a0f0a;
    --color-bg-secondary: #111a11;
    --color-bg-tertiary: #1a2a1a;
    --color-bg-card: rgba(26, 42, 26, 0.6);

    /* Brand Colors */
    --color-gold: #c4a35a;
    --color-gold-light: #d4b86a;
    --color-gold-dark: #a08040;
    --color-brown: #8b6914;
    --color-brown-dark: #5a4510;

    /* Nature Palette */
    --color-green-deep: #1a3a2a;
    --color-green-forest: #2d5a3d;
    --color-green-moss: #4a7a5a;
    --color-blue-water: #3a6a7a;
    --color-blue-clear: #5a9aaa;

    /* Text Colors */
    --color-text-primary: #f5f5f0;
    --color-text-secondary: rgba(245, 245, 240, 0.8);
    --color-text-muted: rgba(245, 245, 240, 0.6);
    --color-text-accent: var(--color-gold);

    /* Bioluminescence Glow */
    --glow-gold: 0 0 20px rgba(196, 163, 90, 0.3);
    --glow-green: 0 0 20px rgba(74, 122, 90, 0.3);
    --glow-subtle: 0 0 40px rgba(196, 163, 90, 0.1);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-accent: 'Cormorant Garamond', Georgia, serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Layout */
    --container-max: 1400px;
    --container-narrow: 900px;
    --section-padding: var(--space-5xl);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    --transition-smooth: 600ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ============================================
   BASE RESET
   ============================================ */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
}

h2 {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
}

.lead {
    font-size: var(--text-xl);
    line-height: 1.7;
    color: var(--color-text-primary);
}

.highlight {
    font-size: var(--text-2xl);
    font-family: var(--font-accent);
    color: var(--color-gold);
    font-style: italic;
    margin: var(--space-xl) 0;
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-gold-light);
}

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

em {
    font-style: italic;
    color: var(--color-gold);
}

/* ============================================
   LAYOUT
   ============================================ */

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

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: 1600px;
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section--dark {
    background-color: var(--color-bg-secondary);
}

.section--darker {
    background-color: var(--color-bg-tertiary);
}

.section--gradient {
    background: linear-gradient(
        180deg,
        var(--color-bg-primary) 0%,
        var(--color-bg-secondary) 50%,
        var(--color-bg-primary) 100%
    );
}

.section--featured {
    position: relative;
    overflow: hidden;
}

.section--cta {
    text-align: center;
    background: linear-gradient(
        135deg,
        var(--color-green-deep) 0%,
        var(--color-bg-secondary) 100%
    );
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-3xl);
}

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
}

.section-title {
    margin-bottom: var(--space-lg);
}

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

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-brown) 100%);
    color: var(--color-bg-primary);
}

.btn--primary:hover {
    box-shadow: var(--glow-gold);
    transform: translateY(-2px);
    color: var(--color-bg-primary);
}

.btn--secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    border: 1px solid rgba(196, 163, 90, 0.3);
}

.btn--secondary:hover {
    background: var(--color-green-deep);
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--color-gold);
    color: var(--color-gold);
}

.btn--outline:hover {
    background: var(--color-gold);
    color: var(--color-bg-primary);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-secondary);
    padding: var(--space-sm);
}

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

.btn--large {
    padding: var(--space-md) var(--space-2xl);
    font-size: var(--text-base);
}

.btn--small {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
}

.btn--full {
    width: 100%;
}

/* ============================================
   GRIDS
   ============================================ */

.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.split-content {
    max-width: 550px;
}

.split-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   IMAGES
   ============================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-rounded {
    border-radius: var(--radius-md);
}

.img-circle {
    border-radius: 50%;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    :root {
        --section-padding: var(--space-4xl);
    }
}

@media (max-width: 1024px) {
    .grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .split-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .split-grid.reverse-mobile {
        direction: ltr;
    }

    .split-grid.reverse-mobile .split-content {
        order: 2;
    }

    .split-grid.reverse-mobile .split-image {
        order: 1;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: var(--space-3xl);
    }

    .container {
        padding: 0 var(--space-lg);
    }

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

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

    .btn--large {
        padding: var(--space-md) var(--space-xl);
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: var(--space-2xl);
    }

    .section-header {
        margin-bottom: var(--space-2xl);
    }
}
