/* ==========================================================================
   CSS Variables & Tokens (Headspace-Inspired)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    /* Colors (Strictly Maintained Palette) */
    --clr-teal: #1E8A8A;
    --clr-teal-dark: #156B6B;
    --clr-teal-light: #E4F4F4;
    
    --clr-blue: #4E7EF7;
    --clr-blue-dark: #375ECB;
    --clr-blue-light: #EAF0FE;
    
    --clr-accent: #A7E8D3;
    --clr-accent-dark: #87C8B3;
    
    --clr-bg-white: #FFFFFF;
    
    /* Typography */
    --clr-text-main: #1C2733;
    --clr-text-muted: #536471;
    --clr-text-light: #FFFFFF;
    
    --font-family: 'Nunito', sans-serif;
    
    /* Borders - Bubbly & Organic */
    --radius-pill: 100px;
    --radius-lg: 40px;
    --radius-md: 24px;
    --radius-sm: 16px;
    
    /* Layout */
    --container-max: 1200px;
    --section-pad: 6rem 2rem;
    --section-pad-sm: 4rem 2rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--clr-text-main);
    background-color: var(--clr-bg-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 800; /* Headspace uses very bold, heavy headings */
    color: inherit;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 1rem; }

p {
    font-size: 1.125rem;
    color: inherit;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

/* ==========================================================================
   Layout & Containers
   ========================================================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

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

/* Headspace Background Colors - Flat Solid Blocks */
.bg-white { background-color: var(--clr-bg-white); color: var(--clr-text-main); }
.bg-teal { background-color: var(--clr-teal); color: var(--clr-text-light); }
.bg-accent { background-color: var(--clr-accent); color: var(--clr-text-main); }
.bg-blue { background-color: var(--clr-blue); color: var(--clr-text-light); }
.bg-teal-light { background-color: var(--clr-teal-light); color: var(--clr-text-main); }

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

/* Organic Dividers (Waves) */
.wave-divider {
    position: absolute;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.wave-top { top: 0; left: 0; transform: translateY(-99%); }
.wave-bottom { bottom: 0; left: 0; transform: translateY(99%) rotate(180deg); }
.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
/* Default wave fill is white, overridden inline if needed */
.wave-divider .shape-fill { fill: var(--clr-bg-white); }


/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.pill-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(255,255,255,0.2); /* Soft transparent background */
    color: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    margin-bottom: 1.5rem;
    border: 2px solid currentColor;
}
.bg-white .pill-badge { background: var(--clr-teal-light); color: var(--clr-teal); border: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 800;
    border-radius: var(--radius-pill);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
}

.btn-primary {
    background-color: var(--clr-text-main);
    color: var(--clr-bg-white);
}

/* On colored backgrounds, buttons might need to invert */
.bg-teal .btn-primary { background-color: var(--clr-accent); color: var(--clr-text-main); }
.bg-accent .btn-primary { background-color: var(--clr-teal); color: var(--clr-text-light); }

.btn-outline {
    background: transparent;
    color: inherit;
    border: 3px solid currentColor;
}

.btn-white {
    background-color: var(--clr-bg-white);
    color: var(--clr-text-main);
}


/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: transparent;
}
.navbar.scrolled {
    background: var(--clr-bg-white);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); /* Only shadow on the page for nav separation */
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}
.logo-img { height: 40px; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 700; color: var(--clr-text-main); transition: opacity 0.2s; }
.navbar.scrolled .nav-links a { color: var(--clr-text-main); }
.nav-links a:hover { opacity: 0.7; }

.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
.nav-link-login { font-weight: 700; color: var(--clr-text-main); }
.navbar .btn { padding: 0.6rem 1.5rem; font-size: 1rem; }

/* Mobile Menu */
.mobile-menu-btn { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.mobile-menu-btn span { display: block; width: 24px; height: 3px; background-color: var(--clr-text-main); border-radius: 3px; transition: 0.3s; }

@media (max-width: 992px) {
    .nav-links, .nav-actions { display: none; }
    .mobile-menu-btn { display: flex; z-index: 1001; }
    
    .mobile-menu-open { overflow: hidden; }
    .mobile-menu-open .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(250, 252, 253, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 6rem 2rem 2rem;
        z-index: 999;
        justify-content: flex-start;
        align-items: center;
        gap: 2rem;
    }
    .mobile-menu-open .nav-links a { font-size: 1.5rem; }
    
    .mobile-menu-open .nav-actions {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 2rem; left: 0; width: 100%;
        padding: 0 2rem;
        z-index: 1000;
        gap: 1rem;
    }
    .mobile-menu-open .nav-actions .btn { width: 100%; }

    .mobile-menu-open .mobile-menu-btn span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .mobile-menu-open .mobile-menu-btn span:nth-child(2) { opacity: 0; }
    .mobile-menu-open .mobile-menu-btn span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem; /* Account for navbar */
    overflow: hidden;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-cta { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.hero-visual { position: relative; }
.mockup-img {
    border-radius: var(--radius-lg);
    border: 12px solid var(--clr-text-main); /* Thick, solid borders instead of shadows */
    width: 100%;
    transform: rotate(2deg);
}

.floating-blob {
    position: absolute;
    border-radius: var(--radius-pill);
    padding: 1.5rem;
    font-weight: 800;
    border: 4px solid var(--clr-text-main);
    z-index: 10;
}
.blob-1 {
    background: var(--clr-accent);
    top: 5%; left: -10%;
    transform: rotate(-5deg);
}
.blob-2 {
    background: var(--clr-blue);
    color: white;
    bottom: 10%; right: -5%;
    transform: rotate(5deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.blob-2 .number { font-size: 3rem; line-height: 1; }
.blob-2 .label { font-size: 1rem; }

@media (max-width: 992px) {
    .hero { min-height: auto; padding-top: 6rem; padding-bottom: 4rem; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-cta { justify-content: center; }
    .mockup-img { transform: rotate(0); }
    .floating-blob { border-width: 3px; }
}

/* ==========================================================================
   Trust Features
   ========================================================================== */
.hero-trust-features {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
@media (max-width: 992px) { .hero-trust-features { justify-content: center; } }
.trust-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.trust-feature .icon-wrapper {
    background: var(--clr-text-main);
    color: var(--clr-accent);
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.trust-feature strong { font-weight: 800; font-size: 0.95rem; }

/* ==========================================================================
   Problem Section
   ========================================================================== */
.problem-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.timeline-bubbly {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.timeline-card {
    background: rgba(255,255,255,0.2);
    border: 3px solid var(--clr-text-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    border: none;
    background: white;
    color: var(--clr-text-main);
    border-radius: var(--radius-lg);
}
.timeline-card h4 { margin-bottom: 0.5rem; font-size: 1.3rem; }
.timeline-card p { margin-bottom: 0; font-size: 1rem; }
.timeline-card.alert { background: #FF9B9B; color: var(--clr-text-main); }
.timeline-card.alert h4 { color: var(--clr-text-main); }

@media (max-width: 992px) {
    .problem-split { grid-template-columns: 1fr; gap: 2rem; }
    .stats-flex { gap: 2rem; }
}


/* ==========================================================================
   Stats Banner
   ========================================================================== */
.stats-flex {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
}
.stat-item {
    text-align: center;
}
.stat-item h3 {
    font-size: 4rem;
    margin: 0;
    display: inline-block;
    line-height: 1;
}
.stat-item .suffix { font-size: 2.5rem; font-weight: 900; }
.stat-item p { font-size: 1.1rem; margin-top: 1rem; font-weight: 700; }

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}
.feature-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-10px); }
.bg-white .feature-card { background: var(--clr-teal-light); }

.feature-icon-bubble {
    width: 80px; height: 80px;
    background: var(--clr-accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}
.feature-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.feature-card p { font-size: 1.05rem; margin-bottom: 0; color: var(--clr-text-muted); }

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


/* ==========================================================================
   Workflow (How It Works)
   ========================================================================== */
.workflow-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 4rem;
    position: relative;
    gap: 2rem;
}
.workflow-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}
.step-bubble {
    width: 100px; height: 100px;
    background: var(--clr-text-main);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    position: relative;
    border: 6px solid var(--clr-bg-white);
}
.bg-teal .step-bubble { background: var(--clr-accent); color: var(--clr-text-main); border-color: var(--clr-teal); }
.bg-accent .step-bubble { background: var(--clr-text-main); color: var(--clr-accent); border-color: var(--clr-accent); }

.step-num {
    position: absolute;
    top: -10px; right: -10px;
    background: var(--clr-blue);
    color: white;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

.workflow-connector {
    position: absolute;
    top: 50px; left: 10%; right: 10%;
    height: 8px;
    background: var(--clr-text-main);
    border-radius: 4px;
    z-index: 1;
    opacity: 0.1;
}

@media (max-width: 992px) {
    .workflow-grid { flex-direction: column; gap: 4rem; }
    .workflow-connector {
        top: 10%; bottom: 10%; left: 50%; right: auto;
        width: 8px; height: auto;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   Product Split
   ========================================================================== */
.product-split {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}
.phone-mockup {
    max-width: 280px;
    margin: 0 auto;
    border-radius: 40px;
    border: 12px solid var(--clr-text-main);
    background: white;
}

@media (max-width: 992px) {
    .product-split { grid-template-columns: 1fr; }
}

/* ==========================================================================
   AI Nodes
   ========================================================================== */
.ai-nodes-organic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
}
.node-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.node-pill {
    background: var(--clr-bg-white);
    color: var(--clr-text-main);
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 1.1rem;
    text-align: center;
}
.node-pill.fusion {
    background: var(--clr-text-main);
    color: var(--clr-accent);
    padding: 2rem 3rem;
    font-size: 1.5rem;
    transform: scale(1.1);
}
.bg-white .node-pill { background: var(--clr-teal-light); color: var(--clr-teal); }
.bg-white .node-pill.fusion { background: var(--clr-teal); color: white; }

@media (max-width: 768px) {
    .ai-nodes-organic { flex-direction: column; }
    .node-stack { flex-direction: row; flex-wrap: wrap; justify-content: center;}
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-bold {
    background-color: var(--clr-text-main);
    color: white;
    padding: 6rem 2rem 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 4rem;
    max-width: var(--container-max);
    margin: 0 auto;
}
.footer-brand p { opacity: 0.7; margin-top: 1.5rem; }
.footer-links h4 { margin-bottom: 1.5rem; font-size: 1.2rem; }
.footer-links a { display: block; margin-bottom: 0.8rem; opacity: 0.7; font-weight: 600; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

.footer-bottom-bar {
    max-width: var(--container-max);
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 2px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    opacity: 0.6;
    font-weight: 600;
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom-bar { flex-direction: column; text-align: center; gap: 1rem; }
}

/* ==========================================================================
   Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
