/* 1. GLOBAL VARIABLES (From the Brand Reference) */
:root {
    --purple-dark: #26215C;
    --purple-mid: #3C3489;
    --purple-light: #EEEDFE;
    --purple-soft: #CECBF6;
    --green-dark: #0F6E56;
    --green-mid: #1D9E75;
    --green-light: #E1F5EE;
    --gray-text: #444441;
    --gray-muted: #888780;
    --off-white: #F9F8F6;
}

/* 1.5 GLOBAL SCROLL BEHAVIOR */
html {
    scroll-behavior: smooth; /* Makes the page glide down gracefully instead of teleporting */
    scroll-padding-top: 100px; /* Forces the jump to stop 100px early so your sticky header doesn't cover the title! */
}

/* 2. GLOBAL RESET & TYPOGRAPHY */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--off-white);
    color: var(--gray-text);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'DM Serif Display', serif;
    color: var(--purple-dark);
    font-weight: 400;
}

/* 2.5 TOP NAVIGATION BANNER STYLING */
.top-nav-banner {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 3rem; /* 3rem on the sides keeps it aligned with your footer padding */
    box-sizing: border-box;
    width: 100%;
}

.nav-container {
    width: 100%;
    margin: 0; /* Clears any default centering margins */
    
    /* 3-column grid layout */
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-self: start; /* Locks branding to the far left margin */
}

/* INCREASING LOGO SIZES */
.parent-logo { 
    height: 48px; /* Bumped up from 32px for clear visibility */
    width: auto;
    display: block;
}

.product-logo { 
    height: 36px; /* Bumped up from 24px to balance with the parent logo */
    width: auto;
    display: block;
}

.divider { 
    color: var(--purple-soft); 
    font-weight: 300;
    font-size: 1.5rem;
}

.product-name { 
    font-family: 'DM Sans', sans-serif; 
    font-weight: 600; 
    color: var(--purple-dark); 
    font-size: 1.3rem; 
    letter-spacing: -0.5px; 
}

.nav-links-right {
    display: flex;
    align-items: center;
    gap: 32px;
    grid-column: 2; /* Keeps links dead-centered in the middle column */
    justify-self: center; 
}

.nav-links-right a { 
    text-decoration: none; 
    color: var(--gray-muted); 
    font-size: 15px; 
    font-weight: 500; 
    transition: color 0.2s ease; 
}

.nav-links-right a:hover, .nav-links-right a.active { 
    color: var(--purple-dark); 
}

/* RIGHT JUSTIFIED BUTTON FIX */
.btn-nav-demo {
    grid-column: 3;
    justify-self: end; /* Forces the button to hit the exact right padding wall */
    
    background: var(--purple-dark);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap; /* Prevents the text inside the button from wrapping */
}

/* 3. HERO SECTION STYLING */
.hero-section {
    /* The brief asked for a radial gradient using purple-soft and green-light tints */
    background: radial-gradient(circle at top center, var(--green-light) 0%, var(--off-white) 60%), 
                radial-gradient(circle at bottom right, var(--purple-light) 0%, var(--off-white) 60%);
    text-align: center;
    padding: 120px 20px 80px;
}

.hero-section h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-section h1 i {
    color: var(--green-mid);
}

/* 4. UTILITY CLASSES (Shared margins and section padding) */
.eyebrow {
    color: var(--green-dark);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.sub-copy {
    max-width: 700px;
    font-size: 1.125rem;
    margin-bottom: 48px;
}

/* 5. TRUST STATS (Flexbox row) */
.trust-stats {
    display: flex;
    justify-content: space-around;
    padding: 40px 20px;
    background: #fff;
    border-top: 1px solid #EAEAEA;
    border-bottom: 1px solid #EAEAEA;
    max-width: 100%;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    color: var(--green-mid);
    font-family: 'DM Serif Display', serif;
    font-size: 2.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--gray-muted);
    font-size: 0.875rem;
    margin-top: 8px;
}

/* 6. PROBLEM SECTION (3-Column Grid) */
.problem-section {
    background: #fff;
    max-width: 100%;
    padding-left: 10%;
    padding-right: 10%;
}
.problem-section h2 { font-size: 2.5rem; margin-bottom: 16px; }

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

.card {
    background: var(--off-white);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--purple-soft);
    
    /* 1. Set the initial invisible state */
    opacity: 0;
    transform: translateY(40px);
    
    /* 2. Declare ALL transitions here so they never conflict */
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

/* 3. The JS observer triggers this to slide the card onto the screen */
.card.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* 4. We chain .in-view to the hover so it only lifts *after* it has entered the screen */
.card.in-view:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(38, 33, 92, 0.05);
}

.stat-large {
    display: block;
    color: var(--green-mid);
    font-family: 'DM Serif Display', serif;
    font-size: 3rem;
    margin-bottom: 16px;
}

/* 7. MEET LILY (50/50 Split Layout) */
.meet-lily h2 { font-size: 2.5rem; margin-bottom: 16px; }
.split-layout {
    display: flex;
    gap: 64px;
    align-items: center;
    margin-top: 48px;
}

.media-left { flex: 1; }
.features-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-chip {
    background: var(--purple-light);
    border-radius: 12px;
    padding: 16px 24px;
}
.feature-chip strong { color: var(--purple-dark); display: block; margin-bottom: 4px; }
.feature-chip p { font-size: 0.9rem; margin: 0; }

/* 7.5 DEMO PLAYER (Meet Lily section) */
.demo-player {
    background: #fff;
    border: 1px solid var(--purple-soft);
    border-radius: 16px;
    padding: 28px 28px 20px;
    box-shadow: 0 10px 20px rgba(38, 33, 92, 0.05);
}
.demo-player .eyebrow { font-size: 0.8rem; }
.demo-player h3 { font-size: 1.6rem; line-height: 1.2; margin-bottom: 6px; }
.demo-blurb { font-size: 0.95rem; color: var(--gray-muted); margin-bottom: 18px; }
.demo-player audio {
    width: 100%;
    display: block;
    margin-bottom: 18px;
    border-radius: 999px;
}
.demo-tracks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.demo-track {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: var(--purple-light);
    color: var(--purple-dark);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    transition: background 0.2s ease, transform 0.2s ease;
}
.demo-track:hover { background: var(--purple-soft); transform: none; }
.demo-track.is-active { background: var(--purple-dark); color: #fff; }
.demo-track.is-active .demo-track-time { color: var(--green-light); }
.demo-track-time {
    font-size: 0.8rem;
    color: var(--gray-muted);
    font-variant-numeric: tabular-nums;
}
.demo-track.is-active.is-playing .demo-track-name::before {
    content: '\25B6\00A0';
    color: var(--green-mid);
    font-size: 0.7rem;
}
.demo-note { font-size: 0.78rem; color: var(--gray-muted); margin-top: 16px; }

/* 8. PRICING GRID */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.pricing-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    border: 1px solid var(--purple-soft);
    position: relative;
}

.pricing-card.highlight {
    background: var(--purple-light);
    border: 2px solid var(--purple-dark);
}

.badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--green-mid);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.price { font-size: 2.5rem; font-family: 'DM Serif Display', serif; color: var(--purple-dark); margin: 16px 0; }
.pricing-card ul { list-style: none; padding: 0; }
.pricing-card li { margin-bottom: 12px; padding-left: 24px; position: relative; }
.pricing-card li::before { content: '✓'; color: var(--green-mid); position: absolute; left: 0; font-weight: bold; }

/* 9. BUTTON STYLING */
button {
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: transform 0.2s ease;
}
.btn-primary { background: var(--purple-dark); color: #fff; border: none; }
.btn-outline-white { background: transparent; color: var(--purple-dark); border: 2px solid var(--purple-soft); margin-left: 16px; }
button:hover { transform: translateY(-2px); }

/* 10. DASHBOARD LAYOUT */
.dashboard-layout {
    display: flex;
    gap: 48px;
    align-items: center;
    margin-top: 40px;
}

.screenshot-container {
    flex: 1;
    background: var(--purple-light);
    border-radius: 16px;
    min-height: 300px; /* Gives the box a shape until you add the real image */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.screenshot-container img {
    width: 100%;
    height: auto;
}

.dashboard-bullets {
    flex: 1;
    list-style: none;
}

.dashboard-bullets li {
    margin-bottom: 16px;
    padding-left: 24px;
    position: relative;
}

/* Adds the square purple bullet points requested in the brief */
.dashboard-bullets li::before {
    content: '■';
    color: var(--purple-mid);
    position: absolute;
    left: 0;
}

/* 11. ANIMATION STATES */
.step, .dashboard-layout {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.step.in-view, .dashboard-layout.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the step animations so they cascade one by one */
.step:nth-child(1) { transition-delay: 0.1s; }
.step:nth-child(2) { transition-delay: 0.2s; }
.step:nth-child(3) { transition-delay: 0.3s; }
.step:nth-child(4) { transition-delay: 0.4s; }

/* 11. FOOTER STYLING */
.site-footer {
    font-family: 'DM Sans', sans-serif;
    color: var(--purple-soft); /* CHANGED: Soft text layout clarity on dark background */
    line-height: 1.7;
    box-sizing: border-box;
    margin: 0;
    background: var(--purple-dark); /* CHANGED: Dark layout match per production brief */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* CHANGED: Light opacity rule separating blocks cleanly */
    padding: 1.75rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    height: 24px; /* Set clean boundary scaling for high-resolution logo resource */
    width: auto;
    align-self: flex-start;
}

.footer-left p {
    font-family: 'DM Sans', sans-serif;
    line-height: 1.7;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: var(--purple-soft); /* CHANGED: Legibility matching structural layout requirements */
}

.footer-right {
    font-family: 'DM Sans', sans-serif;
    color: var(--purple-soft); /* CHANGED: Unified color scale text rules */
    line-height: 1.7;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
}

.footer-right a {
    font-family: 'DM Sans', sans-serif;
    line-height: 1.7;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: var(--purple-soft); /* CHANGED: Soft light links on high contrast background */
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: #ffffff; /* CHANGED: Bright white clarity link highlights */
}

/* 12. MOBILE BREAKPOINTS */

/* Tablet & Large Mobile (Below 768px) [cite: 207, 209, 210] */
@media (max-width: 768px) {
    /* Stack the Pain cards and Pricing cards into a single column [cite: 206, 207] */
    .card-grid, .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    /* Remove the 50/50 split layout for Meet Lily and the Dashboard [cite: 210] */
    .split-layout, .dashboard-layout {
        flex-direction: column;
    }
    
    /* Make the large dashboard screenshot horizontally scrollable [cite: 209] */
    .screenshot-container {
        overflow-x: auto;
        width: 100%;
    }
}

/* Small Mobile (Below 480px) [cite: 208] */
@media (max-width: 480px) {
    /* Stack the hero buttons to be full-width [cite: 208] */
    .hero-section button {
        width: 100%;
        margin-left: 0;
        margin-bottom: 16px; /* Adds space between the stacked buttons */
    }
    
    .hero-section h1 {
        font-size: 2.5rem; /* Shrink the massive headline for small screens */
    }
}
/* 12. PRICING CTA + CONTACT FORM */
.price.price-contact { font-size: 1.75rem; line-height: 1.25; }
.pricing-cta { text-align: center; margin-top: 48px; }
.pricing-cta p { margin-bottom: 20px; }
a.btn-link { display: inline-block; padding: 16px 32px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: transform 0.2s ease; }
a.btn-link:hover { transform: translateY(-2px); }

.contact-section .contact-sub, .contact-section .contact-form { max-width: 820px; }
.contact-sub { font-size: 1.125rem; margin: 12px 0 32px; }
.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    background: #fff;
    border: 1px solid var(--purple-soft);
    border-radius: 16px;
    padding: 32px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { grid-column: 1 / -1; }
.form-field label { font-weight: 600; color: var(--purple-dark); font-size: 0.95rem; }
.form-field .optional { font-weight: 400; color: var(--gray-muted); }
.form-field input, .form-field select, .form-field textarea {
    font: inherit;
    color: var(--gray-text);
    padding: 12px 14px;
    border: 1px solid var(--purple-soft);
    border-radius: 8px;
    background: var(--off-white);
    width: 100%;
}
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: 2px solid var(--purple-mid);
    outline-offset: 1px;
    background: #fff;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-actions button:disabled { opacity: 0.6; cursor: wait; transform: none; }
.form-status { margin: 0; }
.form-status.is-success { color: var(--green-dark); font-weight: 600; }
.form-status.is-error { color: #B42318; }
.form-status a { color: inherit; }

@media (max-width: 600px) {
    .contact-form { grid-template-columns: 1fr; padding: 24px 20px; }
    .form-actions button { width: 100%; }
    .btn-outline-white { margin-left: 0; margin-top: 12px; }
}

/* 13. PRICING (no tiers) */
.pricing-section .pricing-cta { max-width: 700px; margin: 16px 0 0; text-align: left; }
.pricing-section .pricing-cta p { font-size: 1.125rem; }
.contact-sub a { color: var(--green-dark); font-weight: 600; text-decoration: none; }
.contact-sub a:hover { text-decoration: underline; }
