/* ===== CSS Variables ===== */
:root {
    /* Colors - Carma 2.0 Brand */
    --color-navy: #1c2b3a;
    --color-navy-light: #243447;
    --color-accent: #FF4F52;
    --color-accent-dark: #E63840;
    --color-silver: #94a3b8;
    --color-silver-dark: #64748b;
    --color-white: #ffffff;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* Typography */
    --font-family: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray-800);
    background-color: var(--color-white);
}

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

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

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

/* ===== Header — hidden, slides in on scroll ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: radial-gradient(ellipse at 30% 50%, #3d3d3d 0%, #2d2d2d 40%, #1a1a1a 100%);
    padding: 16px 0;
    border-bottom: 2px solid var(--color-accent);
    transform: translateY(-100%);
    transition: transform 0.35s ease;
}

.header.visible {
    transform: translateY(0);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 44px;
    width: auto;
}

.nav-desktop {
    display: flex;
    gap: 32px;
}

.nav-desktop a {
    color: var(--color-gray-200);
    font-size: 14px;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.nav-desktop a:hover {
    color: var(--color-white);
    border-bottom-color: var(--color-accent);
}

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 24px;
    background: radial-gradient(ellipse at 30% 50%, #3d3d3d 0%, #2d2d2d 40%, #1a1a1a 100%);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile a {
    color: var(--color-gray-200);
    padding: 12px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--color-navy);
}

.nav-mobile a:hover {
    color: var(--color-white);
}

.nav-mobile .btn {
    margin-top: 16px;
    text-align: center;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-white);
    transition: transform var(--transition-fast);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

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

/* ===== Hero Section — full viewport takeover ===== */
.hero {
    background: radial-gradient(ellipse at 30% 20%, #3d3d3d 0%, #2d2d2d 40%, #1a1a1a 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 24px;
}

.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 40px;
    opacity: 0.95;
}

.hero h1 {
    font-size: 36px;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    color: var(--color-white);
    line-height: 1.15;
    margin-bottom: 24px;
}

.hero h1 strong {
    font-weight: 700;
}

.hero-subtitle {
    font-size: 16px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--color-gray-200);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: bounce 2s ease infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Stats Bar — seamless, no background block ===== */
.stats-bar {
    background: var(--color-white);
    padding: 56px 0;
}

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
}

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

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--color-accent-dark);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--color-silver-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--color-gray-200);
}

/* ===== Section Divider — thin rule between sections ===== */
.stats-bar + .how-it-works,
.how-it-works + .programs,
.programs + .why-carma {
    border-top: 1px solid var(--color-gray-200);
}

/* ===== How It Works ===== */
.how-it-works {
    padding: var(--section-padding) 0;
    background: var(--color-white);
}

.section-title {
    font-size: 36px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--color-gray-900);
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--color-silver-dark);
    margin-bottom: 56px;
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.step-card {
    text-align: center;
    padding: 24px 32px;
    flex: 0 1 280px;
    position: relative;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-navy);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.step-icon {
    width: 64px;
    height: 64px;
    background: var(--color-gray-50);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--color-navy);
}

.step-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 8px;
}

.step-card p {
    font-size: 15px;
    color: var(--color-silver-dark);
    line-height: 1.5;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 72px;
    color: var(--color-gray-200);
}

/* ===== Programs Section — seamless light ===== */
.programs {
    padding: var(--section-padding) 0;
    background: var(--color-white);
}

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

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.program-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    padding: 32px 24px 24px;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    user-select: none;
}

.program-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 24px rgba(255, 79, 82, 0.15);
    transform: translateY(-4px);
}

.program-card.active {
    border-color: var(--color-accent);
    box-shadow: 0 4px 24px rgba(255, 79, 82, 0.15);
    transform: translateY(-4px);
    background: #fff8f8;
}

.program-card.active .program-icon {
    color: var(--color-accent);
}

.program-card.active h3 {
    color: var(--color-accent-dark);
}

.program-icon {
    color: var(--color-accent-dark);
    margin-bottom: 16px;
}

.program-card:hover .program-icon {
    color: var(--color-accent);
}

.program-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 12px;
}

.program-card-chevron {
    color: var(--color-silver);
    transition: transform 0.3s ease, color 0.2s ease;
    line-height: 1;
}

.program-card:hover .program-card-chevron {
    color: var(--color-accent);
}

.program-card.active .program-card-chevron {
    transform: rotate(180deg);
    color: var(--color-accent);
}

/* ===== Program Detail Panel ===== */
.program-detail-panel {
    grid-column: 1 / -1;
    background: var(--color-gray-50);
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    border-top: 3px solid var(--color-accent);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.program-detail-panel.open {
    max-height: 600px;
    opacity: 1;
    margin-top: 4px;
    margin-bottom: 8px;
}

.program-detail-inner {
    padding: 36px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.program-detail-desc {
    grid-column: 1 / 3;
}

.program-detail-desc h4 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 10px;
}

.program-detail-desc p {
    font-size: 15px;
    color: var(--color-silver-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.program-detail-eligibility h5,
.program-detail-coverages h5 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.program-detail-eligibility ul,
.program-detail-coverages ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.program-detail-eligibility ul li,
.program-detail-coverages ul li {
    font-size: 14px;
    color: var(--color-gray-800);
    padding: 5px 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.4;
}

.program-detail-eligibility ul li::before,
.program-detail-coverages ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 12px;
}

.program-detail-cta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--color-gray-200);
    margin-top: 4px;
}

.program-detail-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-silver);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.program-detail-close:hover {
    color: var(--color-gray-800);
}

.programs-cta {
    text-align: center;
    color: var(--color-silver-dark);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.programs-cta a {
    color: var(--color-accent-dark);
    font-weight: 600;
    text-decoration: underline;
}

.programs-cta a:hover {
    color: var(--color-accent);
}

/* ===== Why CARMA Section ===== */
.why-carma {
    padding: var(--section-padding) 0;
    background: #e5e4e2;
}

.why-carma .section-subtitle {
    margin-top: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--color-accent-dark);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-gray-900);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: var(--color-silver-dark);
}

/* ===== Our Team Section ===== */
.our-team {
    padding: var(--section-padding) 0;
    background: var(--color-white);
}

.team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 48px 40px;
    max-width: 680px;
    margin: 0 auto;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 200px;
    max-width: 200px;
}

.team-photo-wrap {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--color-gray-200);
    flex-shrink: 0;
}

.team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.team-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: var(--color-navy);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.team-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-gray-900);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.team-title {
    font-size: 13px;
    color: var(--color-accent-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

.team-bio {
    font-size: 13px;
    color: var(--color-silver-dark);
    line-height: 1.5;
    margin-bottom: 12px;
}

.team-linkedin {
    color: var(--color-silver-dark);
    transition: color var(--transition-fast);
    margin-top: auto;
}

.team-linkedin:hover {
    color: #0077b5;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: var(--section-padding) 0;
    background: radial-gradient(ellipse at 60% 50%, #3d3d3d 0%, #2d2d2d 40%, #1a1a1a 100%);
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    color: var(--color-gray-200);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
    background: radial-gradient(ellipse at 60% 50%, #3d3d3d 0%, #2d2d2d 40%, #1a1a1a 100%);
    padding: 64px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 64px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    display: block;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--color-white);
    font-size: 14px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-column h4 {
    color: var(--color-white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column a {
    display: block;
    color: var(--color-white);
    font-size: 14px;
    padding: 6px 0;
    transition: color var(--transition-fast);
}

.footer-column a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid var(--color-navy-light);
    padding-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-linkedin {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-linkedin:hover {
    color: var(--color-white);
}

.footer-bottom p {
    color: var(--color-white);
    font-size: 14px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .step-connector {
        display: none;
    }

    .steps-grid {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .nav-desktop {
        display: none;
    }

    .header .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        min-height: 100vh;
    }

    .hero-logo {
        height: 56px;
        margin-bottom: 32px;
    }

    .hero h1 {
        font-size: 23px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero-ctas .btn {
        text-align: center;
        width: 100%;
        max-width: 280px;
    }

    .stats-grid {
        flex-wrap: wrap;
        gap: 24px;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 0 0 40%;
    }

    .stat-number {
        font-size: 28px;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .step-connector {
        display: none;
    }

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

    .program-card {
        padding: 24px 16px;
    }

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

    .section-title {
        font-size: 28px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

@media (max-width: 768px) {
    .program-detail-inner {
        grid-template-columns: 1fr;
        padding: 24px 20px;
    }
    .program-detail-desc {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .programs-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

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

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

    .stat-item {
        flex: 0 0 100%;
    }
}
