:root {
    /* Color Palette - Teal & Slate */
    --primary: #0F766E;
    /* Teal 700 */
    --primary-light: #14B8A6;
    /* Teal 500 */
    --primary-dark: #0D9488;
    /* Teal 600 */
    --primary-super-dark: #134E4A;
    /* Teal 900 */

    --accent: #F59E0B;
    /* Amber 500 */
    --accent-light: #FBBF24;
    /* Amber 400 */

    --text-dark: #0F172A;
    /* Slate 900 */
    --text-medium: #334155;
    /* Slate 700 */
    --text-light: #64748B;
    /* Slate 500 */

    --bg-light: #F8FAFC;
    /* Slate 50 */
    --bg-white: #FFFFFF;
    --bg-off-white: #F1F5F9;
    /* Slate 100 */

    --border-color: #E2E8F0;
    /* Slate 200 */

    --highlight: #2DD4BF;
    /* Teal 400 */

    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-medium);
    font-size: 1.125rem;
}

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

/* --- Header & Hero Wrapper --- */
.dark-header-wrapper {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Full viewport height for impact */
    position: relative;
    overflow: hidden;
}

/* Decorative background elements */
.dark-header-wrapper::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.dark-header-wrapper::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* --- Header --- */
header {
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
    background-color: transparent;
    /* Start transparent */
}

header.scrolled {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
}

nav a:hover {
    color: white;
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    /* Pill shape */
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--primary-light);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(20, 184, 166, 0.39);
}

.btn-primary:hover {
    background-color: var(--highlight);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.23);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.cta-button {
    /* Header Login Button */
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.cta-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- Hero Section --- */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6rem;
    /* Space for fixed header */
    padding-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content.center {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title h1 {
    font-size: 4rem;
    /* Larger title */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title h1 span {
    color: var(--highlight);
    -webkit-text-fill-color: var(--highlight);
}

.hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cta-group .btn-primary {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.cta-group .cta-button {
    /* "Learn More" in Hero */
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 9999px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- App Preview Section --- */
.app-preview {
    margin-top: -6rem;
    /* Overlap with hero */
    padding-bottom: 4rem;
    position: relative;
    z-index: 10;
}

.preview-image {
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.preview-image img {
    max-width: 100%;
    width: 1000px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 8px solid rgba(255, 255, 255, 0.1);
    /* Glassy border */
    background-color: var(--bg-dark);
    /* Fallback */
}

/* --- Features Section --- */
.features-headline {
    text-align: center;
    padding: 4rem 0 2rem;
}

.features-headline h2 {
    color: var(--text-dark);
}

.features-headline h2 span {
    color: var(--primary);
}

.features {
    padding: 2rem 0 6rem;
    background-color: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature h3 {
    margin-top: 1rem;
    font-size: 1.25rem;
}

.feature p {
    font-size: 1rem;
    color: var(--text-light);
}

/* --- AI Insights Section --- */
.ai-insights {
    padding: 6rem 0;
    background-color: white;
}

.section-headline {
    text-align: center;
    margin-bottom: 3rem;
}

.section-headline h2 span.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.section-headline h2 span.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(20, 184, 166, 0.2);
    z-index: -1;
}

.split-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.ai-feature-tabs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-feature-tab {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.ai-feature-tab:hover {
    background-color: var(--bg-off-white);
}

.ai-feature-tab.active {
    background-color: var(--bg-off-white);
    border-left-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.ai-feature-tab h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-feature-tab p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.feature-video {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* --- Mood Tracking Section --- */
.mood-tracking {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.mood-tracking ul li {
    margin-bottom: 1.25rem;
    position: relative;
    padding-left: 2rem;
    color: var(--text-medium);
}

.mood-tracking ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* --- Pricing Section --- */
.pricing {
    padding: 6rem 0;
    background-color: white;
}

.pricing-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.pricing-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.pricing-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(to bottom, #F0FDFA, #FFFFFF);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 1rem 0;
}

.price-period {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.pricing-features {
    margin-bottom: 2.5rem;
    flex: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-medium);
}

.feature-icon {
    color: var(--primary);
    font-weight: bold;
}

.pricing-cta {
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.pricing-cta.btn-secondary {
    border-color: var(--primary);
    color: var(--primary);
}

.pricing-cta.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

.pricing-cta.btn-primary {
    background-color: var(--primary);
}

.pricing-cta.btn-primary:hover {
    background-color: var(--primary-dark);
}

.pricing-footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-light);
}

/* --- CTA Section --- */
.cta-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-super-dark), var(--primary-dark));
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
}

.cta-section .btn-primary {
    background-color: white;
    color: var(--primary-dark);
    padding: 1rem 3rem;
}

.cta-section .btn-primary:hover {
    background-color: var(--bg-off-white);
    transform: translateY(-3px);
}

/* --- Footer --- */
footer {
    background-color: var(--bg-light);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

footer .logo {
    color: #0F172A !important;
}

footer .logo span {
    color: #0F172A !important;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-light);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* --- Animations --- */
.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .split-content {
        flex-direction: column;
        gap: 3rem;
    }

    .split-content.reverse {
        flex-direction: column;
    }

    .image-content,
    .text-content {
        width: 100%;
    }

    /* Mobile Carousel Logic */
    .ai-feature-tabs {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .ai-feature-tab {
        display: none;
        /* Hide all by default */
        width: 100%;
        text-align: center;
        border: 1px solid var(--border-color);
        background-color: white;
    }

    .ai-feature-tab.active {
        display: block;
        /* Show only active */
        border-left: 1px solid var(--border-color);
        /* Reset left border to match standard border */
    }

    .ai-feature-tab h4 {
        justify-content: center;
    }

    .carousel-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: white;
        border: 1px solid var(--border-color);
        box-shadow: var(--shadow-sm);
        cursor: pointer;
        color: var(--primary);
        z-index: 2;
        transition: var(--transition);
        flex-shrink: 0;
    }

    .carousel-arrow:hover {
        background-color: var(--primary-light);
        color: white;
        border-color: var(--primary-light);
    }

    .carousel-arrow.prev {
        margin-right: 0.5rem;
        /* Tighter arrows */
    }

    .carousel-arrow.next {
        margin-left: 0.5rem;
    }

    /* Mobile Features Grid Compactness */
    .features {
        padding: 1.5rem 0 3rem;
        /* Further reduced */
    }

    .features-grid {
        gap: 0.75rem;
        /* Minimal gap */
    }

    .feature {
        padding: 1.25rem 1rem;
        /* Very compact padding */
    }

    .feature h3 {
        font-size: 1.05rem;
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }

    .feature p {
        font-size: 0.9rem;
        margin-bottom: 0px;
    }

    /* Mobile Pricing Compactness */
    .pricing {
        padding: 2rem 0;
    }

    .pricing-cards {
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .pricing-card {
        padding: 1.25rem;
        max-width: 100%;
    }

    .pricing-header h3 {
        font-size: 1.25rem;
    }

    .price {
        font-size: 2rem;
        margin: 0.5rem 0;
    }

    .feature-item {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
}

/* Hide arrows on desktop */
@media (min-width: 993px) {
    .carousel-arrow {
        display: none;
    }
}

@media (max-width: 768px) {

    /* Hero Compactness */
    .hero {
        padding-top: 5rem;
        /* Reduced from 8rem */
        padding-bottom: 2rem;
    }

    .hero-title h1 {
        font-size: 2.2rem;
        /* Smaller title */
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-group {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
        /* Full width buttons */
        padding: 0 1rem;
    }

    .cta-group .btn-primary,
    .cta-group .cta-button {
        padding: 0.75rem 1.5rem;
        /* Smaller buttons */
    }

    .nav {
        display: none;
    }

    .header-right nav {
        display: none;
    }

    .app-preview {
        margin-top: -2rem;
        /* Less overlap */
        padding-bottom: 2rem;
    }
}

/* Mood Tracking Image Base Style */
.mood-tracking .image-content img {
    /* Removed oversized desktop styles to fix laptop overlap */
    max-width: 100%;
    margin-left: 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* --- Laptop/Tablet Overlap Fix --- */
@media (max-width: 1200px) {
    .mood-tracking .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    .mood-tracking .split-content {
        gap: 2rem;
    }

    /* Reset the offset for smaller screens so it doesn't overlap text */
    .mood-tracking .image-content img {
        margin-left: 0;
        max-width: 100%;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
}