/* ==========================================================================
   MyDailyTally — Brand-aligned with iOS app design system
   Color tokens from ColorTheme.swift / DESIGN.md
   ========================================================================== */

/* CSS Custom Properties — iOS App Brand Tokens */
:root {
    /* Primary palette (light theme) */
    --bg-primary: #FAF8F2;         /* warm cream */
    --bg-secondary: #F2EDE8;       /* soft warm gray */
    --bg-card: #FFFFFF;
    --text-primary: #26262E;       /* dark navy */
    --text-secondary: #736E6B;     /* warm gray */
    --accent: #2E9994;             /* warm teal */
    --accent-hover: #267E7A;
    --accent-secondary: #38B3AB;   /* lighter teal */
    --streak-orange: #ED8C23;      /* warm orange */
    --separator: #E0DBD6;

    /* Dark palette (footer, dark sections) */
    --dark-bg: #171A2B;            /* dark navy */
    --dark-card: #292B42;
    --dark-text: #F2F0EB;
    --dark-text-muted: #9E9CA6;
    --dark-separator: #383A4D;
    --dark-accent: #F29940;        /* warm orange (dark mode accent) */

    /* Semantic */
    --success: #34C759;

    /* Spacing (from 4pt base) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-xxl: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Hero Section — warm teal gradient, not purple */
.hero {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1E2A3A 50%, #1A3038 100%);
    color: var(--dark-text);
    padding: 6rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Subtle warm teal glow in hero */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(46, 153, 148, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(242, 153, 64, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    color: var(--dark-text);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.85;
    line-height: 1.6;
    color: var(--dark-text-muted);
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.feature-icon {
    font-size: 1.5rem;
}

.app-store-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.app-store-btn {
    display: inline-block;
}

.app-store-btn img {
    height: 53px;
    width: auto;
}

.coming-soon {
    color: var(--dark-text-muted);
    font-size: 0.9rem;
}

.hero-phone {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-screenshot {
    max-width: 300px;
    height: auto;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(46, 153, 148, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    video.phone-screenshot {
        animation-play-state: paused;
    }
}

/* Features Section — warm cream background */
.features {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

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

.feature-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--separator);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon-large {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Screenshots Section — primary warm cream bg */
.screenshots {
    padding: 6rem 0;
    background: var(--bg-primary);
}

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

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

.screenshot-item img {
    width: 160px;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.screenshot-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.screenshot-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Pricing Section — secondary warm bg */
.pricing {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--separator);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.pricing-card.featured {
    border: 3px solid var(--accent);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.price-period {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.price-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--separator);
    color: var(--text-primary);
}

.features-list li:last-child {
    border-bottom: none;
}

/* Privacy Section — primary warm cream bg */
.privacy-section {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.privacy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.privacy-text h2 {
    text-align: left;
    margin-bottom: 2rem;
}

.privacy-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.privacy-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.privacy-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.privacy-icon {
    font-size: 2rem;
    margin-top: 0.25rem;
}

.privacy-feature h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.privacy-feature p {
    color: var(--text-secondary);
}

/* Footer — app dark theme navy */
.footer {
    background: var(--dark-bg);
    color: var(--dark-text);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    color: var(--dark-accent);
}

.footer-section p {
    color: var(--dark-text-muted);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--dark-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.app-store-footer img {
    height: 40px;
    width: auto;
}

.footer-bottom {
    border-top: 1px solid var(--dark-separator);
    padding-top: 2rem;
    text-align: center;
    color: var(--dark-text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding: 4rem 0;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

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

    .privacy-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .screenshot-carousel {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .screenshot-item img {
        width: 130px;
    }

    .pricing-card.featured {
        transform: none;
    }
}