/* ==========================================================================
   Be A Recovery Coach - Editorial Transformation Design
   Aesthetic: Magazine-style, bold typography, warm professionalism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Source+Sans+3:wght@400;600;700&display=swap');

/* ==========================================================================
   CSS Variables - Editorial Theme
   ========================================================================== */

:root {
    /* Colors - Deep & Warm Palette */
    --primary-navy: #0a2540;
    --secondary-navy: #1a365d;
    --accent-coral: #ff6b5a;
    --accent-gold: #d4a574;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6b7280;
    --bg-cream: #faf8f5;
    --bg-white: #ffffff;
    --bg-navy-soft: #f0f4f8;
    --border-subtle: #e5e7eb;
    
    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Source Sans 3', sans-serif;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-xxl: 8rem;
    
    /* Effects */
    --shadow-sm: 0 2px 12px rgba(10, 37, 64, 0.08);
    --shadow-md: 0 8px 30px rgba(10, 37, 64, 0.12);
    --shadow-lg: 0 20px 60px rgba(10, 37, 64, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-medium);
    background: var(--bg-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography - Editorial Style
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
}

h3 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h4 {
    font-size: 1.75rem;
}

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

strong {
    font-weight: 700;
    color: var(--text-dark);
}

a {
    color: var(--primary-navy);
    text-decoration: none;
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
}

a:hover {
    color: var(--accent-coral);
    border-bottom-color: var(--accent-coral);
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container--narrow {
    max-width: 800px;
}

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

/* ==========================================================================
   Navigation - Clean & Elegant
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
}

.site-logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-navy);
    letter-spacing: -0.02em;
    border-bottom: none;
}

.site-logo:hover {
    color: var(--accent-coral);
    border-bottom: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-medium);
    border-bottom: 2px solid transparent;
    padding-bottom: 0.25rem;
    transition: var(--transition-smooth);
}

.nav-menu a:hover {
    color: var(--primary-navy);
    border-bottom-color: var(--accent-coral);
}

.nav-menu a.btn--apply {
    color: white;
    border-bottom: none;
    padding: 0.5rem 1.5rem;
    line-height: 1.4;
    vertical-align: middle;
}

.nav-menu a.btn--apply:hover {
    color: white;
    border-bottom: none;
}

/* ==========================================================================
   Buttons - Bold & Purposeful
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
    text-align: center;
}

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

.btn--primary:hover {
    background: var(--accent-coral);
    color: white;
    border-color: var(--accent-coral);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--accent-coral);
}

.btn--secondary {
    background: transparent;
    color: var(--primary-navy);
    border-color: var(--primary-navy);
}

.btn--secondary:hover {
    background: var(--primary-navy);
    color: white;
    border-bottom-color: var(--primary-navy);
}

.btn--large {
    padding: 1.5rem 3.5rem;
    font-size: 1.125rem;
}

.btn--apply {
    background: var(--accent-coral);
    border-color: var(--accent-coral);
    color: white;
}

.btn--apply:hover {
    background: var(--primary-navy);
    border-color: var(--primary-navy);
    border-bottom-color: var(--primary-navy);
}

/* ==========================================================================
   Hero - Bold & Editorial
   ========================================================================== */

.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: white;
    overflow: hidden;
    padding: var(--space-xl) 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 90, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 165, 116, 0.08) 0%, transparent 50%);
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

.hero-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    margin-bottom: var(--space-md);
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--accent-gold);
    background: rgba(212, 165, 116, 0.1);
}

.hero h1 {
    color: white;
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.5rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.stat {
    text-align: center;
    animation: fadeInUp 1s ease-out;
    animation-fill-mode: both;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }
.stat:nth-child(4) { animation-delay: 0.4s; }

.stat-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

.hero-trust {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-trust p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Sections - Magazine Layout
   ========================================================================== */

.section {
    padding: var(--space-xxl) 0;
}

.section--cream {
    background: var(--bg-cream);
}

.section--white {
    background: var(--bg-white);
}

.section--navy {
    background: var(--primary-navy);
    color: white;
}

.section--navy h2,
.section--navy h3 {
    color: white;
}

/* Fix headings/links in inline navy divs within markdown content */
.content div[style*="--primary-navy"] h2,
.content div[style*="--primary-navy"] h3,
.content div[style*="--primary-navy"] strong {
    color: white;
}

.content div[style*="--primary-navy"] a:not(.btn) {
    color: var(--accent-coral);
}

/* Content tables */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.content thead th {
    background: var(--primary-navy);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
}

.content tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.content tbody tr:nth-child(even) {
    background: var(--bg-cream);
}

.content tbody td:first-child {
    font-weight: 600;
}

/* Platform tool screenshots */
.platform-screenshot {
    max-width: 680px;
    width: 100%;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.section-label {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-coral);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ==========================================================================
   Cards - Clean & Elevated
   ========================================================================== */

.card {
    background: var(--bg-white);
    border-radius: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.card-content {
    padding: var(--space-lg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   Grid Layouts
   ========================================================================== */

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

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

/* ==========================================================================
   Footer - Elegant & Organized
   ========================================================================== */

.site-footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-col h4 {
    font-size: 1.25rem;
    color: white;
    margin-bottom: var(--space-md);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid transparent;
}

.footer-col a:hover {
    color: white;
    border-bottom-color: var(--accent-coral);
}

.footer-bottom {
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Animations - Purposeful Motion
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
        --space-xxl: 5rem;
    }
    
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 1rem;
    }
    
    h1 {
        font-size: clamp(2rem, 10vw, 3rem);
        line-height: 1.2;
    }
    
    h2 {
        font-size: clamp(1.5rem, 7vw, 2.25rem);
        line-height: 1.3;
        margin-bottom: var(--space-md);
    }
    
    h3 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        line-height: 1.6;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .nav-menu {
        display: none; /* Mobile menu would go here */
    }
    
    .section {
        padding: var(--space-xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-lg);
    }
    
    .section-subtitle {
        font-size: 1.125rem;
    }
    
    .grid--2,
    .grid--3 {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

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

.text-navy {
    color: var(--primary-navy);
}

.mt-lg {
    margin-top: var(--space-lg);
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}
