/* ============================================
   Period Tracker — Website Styles
   ============================================ */

:root {
    --primary: #5478D9;
    --primary-dark: #3F5FC0;
    --accent: #F26687;
    --accent-dark: #E04A6E;
    --period: #E63854;
    --fertile: #2EB882;
    --ovulation: #339ADB;
    --pms: #F29C12;
    --bg: #FAFBFF;
    --card-bg: #FFFFFF;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --border: #E5E7EB;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(84, 120, 217, 0.10);
    --shadow-lg: 0 12px 48px rgba(84, 120, 217, 0.15);
    --max-width: 1120px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--primary-dark);
}

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

/* ============================================
   Navigation
   ============================================ */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
}

.nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
    background: var(--primary-dark);
    color: #fff !important;
    transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--text);
}

/* ============================================
   Hero
   ============================================ */

.hero {
    padding: 140px 24px 80px;
    text-align: center;
    background: linear-gradient(180deg, #EEF2FF 0%, var(--bg) 100%);
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

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

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--text);
    color: #fff;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

.store-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.store-btn-label small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
    text-align: left;
}

.store-btn-label span {
    display: block;
    font-size: 17px;
    font-weight: 700;
    text-align: left;
}

/* ============================================
   Features
   ============================================ */

.features {
    padding: 80px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
}

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

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

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

/* Phase colors for feature icons */
.icon-period { background: rgba(230, 56, 84, 0.12); color: var(--period); }
.icon-fertile { background: rgba(46, 184, 130, 0.12); color: var(--fertile); }
.icon-ovulation { background: rgba(51, 154, 219, 0.12); color: var(--ovulation); }
.icon-pms { background: rgba(242, 156, 18, 0.12); color: var(--pms); }
.icon-primary { background: rgba(84, 120, 217, 0.12); color: var(--primary); }
.icon-accent { background: rgba(242, 102, 135, 0.12); color: var(--accent); }

/* ============================================
   Phases Section
   ============================================ */

.phases {
    padding: 80px 24px;
    background: linear-gradient(180deg, var(--bg) 0%, #EEF2FF 100%);
}

.phases-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.phases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.phase-card {
    text-align: center;
    padding: 28px 20px;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.phase-card:hover {
    transform: translateY(-3px);
}

.phase-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.phase-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.phase-card p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================
   CTA Section
   ============================================ */

.cta {
    padding: 80px 24px;
    text-align: center;
}

.cta-box {
    max-width: 640px;
    margin: 0 auto;
    padding: 56px 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 24px;
    color: #fff;
}

.cta-box h2 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 12px;
}

.cta-box p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 32px;
}

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

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #fff;
    color: var(--primary);
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.2s;
    text-decoration: none;
}

.cta-btn:hover {
    transform: translateY(-2px);
    color: var(--primary-dark);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 40px 24px;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
}

.footer-brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

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

/* ============================================
   Legal Pages
   ============================================ */

.legal-page {
    padding: 120px 24px 80px;
    max-width: 780px;
    margin: 0 auto;
}

.legal-page h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.legal-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.legal-page h2 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 12px;
}

.legal-page h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 8px;
}

.legal-page p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.legal-page ul,
.legal-page ol {
    margin: 12px 0 16px 24px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
}

.legal-page li {
    margin-bottom: 6px;
}

.legal-page strong {
    color: var(--text);
}

.legal-page a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================
   404 Page
   ============================================ */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.error-page h1 {
    font-size: 96px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 12px;
}

.error-page h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.error-page .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.error-page .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    color: #fff;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    /* Mobile menu */
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px 20px;
        gap: 16px;
        box-shadow: var(--shadow);
    }

    .hero {
        padding: 120px 20px 60px;
    }

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

    .hero p {
        font-size: 16px;
    }

    .store-btn {
        padding: 12px 22px;
    }

    .features {
        padding: 60px 20px;
    }

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

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

    .cta-box {
        padding: 40px 24px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .legal-page {
        padding: 100px 20px 60px;
    }

    .legal-page h1 {
        font-size: 28px;
    }
}
