/* Shared Rhythm Color Palette (synced with app theme) */
:root {
    --bg: #E0F2F1;
    --surface: #FFFFFF;
    --ink: #0F172A;
    --ink-strong: #020617;
    --muted: #334155;
    --outline: #94A3B8;
    --primary: #0F766E;
    --primary-press: #0B5F58;
    --primary-accent: #2DD4BF;
    --primary-soft: #CCFBF1;
    --success: #16A34A;
    --warning: #F59E0B;
    --error: #DC2626;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(2, 6, 23, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity var(--transition-base);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: var(--bg);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(224, 242, 241, 0.35);
    border-top-color: var(--bg);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--spacing-md);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-content p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* Hero Section */
.hero {
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
    text-align: center;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    margin-bottom: var(--spacing-lg);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.9rem 1.8rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow:
        0 18px 45px rgba(2, 6, 23, 0.08),
        0 2px 10px rgba(2, 6, 23, 0.04);
}

.logo-image {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
}

@supports (backdrop-filter: blur(6px)) {
    .hero-logo {
        backdrop-filter: blur(6px);
    }
}

@media (max-width: 768px) {
    .logo-image {
        max-width: 150px;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1.75rem, 6vw, 3rem);
    font-weight: 300;
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto var(--spacing-xl);
    opacity: 0.9;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* Store Badges */
.store-badge {
    display: inline-block;
    transition: transform var(--transition-base), opacity var(--transition-base);
    text-decoration: none;
    line-height: 0;
    width: 220px;
    height: 72px;
    overflow: hidden;
    border-radius: 8px;
}

.store-badge--app {
    width: 208px;
}

.store-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.store-badge:active {
    transform: translateY(0);
}

.badge-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.store-badge--app .badge-image {
    transform: scale(0.98);
    transform-origin: center;
}

@media (max-width: 768px) {
    .store-badge {
        width: 190px;
        height: 62px;
    }

    .store-badge--app {
        width: 178px;
    }

    .badge-image {
        border-radius: 7px;
    }

}

@media (max-width: 480px) {
    .store-badge {
        width: 168px;
        height: 55px;
    }

    .store-badge--app {
        width: 156px;
    }

    .badge-image {
        border-radius: 6px;
    }

}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-family);
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    color: #FFFFFF;
    background-color: var(--primary);
    box-shadow: 0 2px 10px rgba(15, 118, 110, 0.22);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.3);
    background-color: var(--primary-press);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background-color: var(--primary-press);
}

.btn-secondary {
    background-color: var(--ink);
}

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

.btn svg {
    flex-shrink: 0;
}

/* Features Section */
.features {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--primary-soft);
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.feature-card {
    background-color: var(--surface);
    padding: var(--spacing-xl);
    border-radius: 16px;
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    border: 1px solid var(--outline);
    box-shadow: 0 3px 10px rgba(2, 6, 23, 0.08);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.14);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    line-height: 1;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    font-size: 1rem;
    color: var(--muted);
    opacity: 1;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    text-align: center;
    background: linear-gradient(135deg, var(--primary-soft) 0%, #99F6E4 100%);
}

.cta-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--spacing-md);
}

.cta-description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--muted);
    opacity: 1;
    margin-bottom: var(--spacing-xl);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* Footer */
.footer {
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    background-color: var(--ink-strong);
    color: var(--bg);
}

.footer-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.footer-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .hero-cta,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .store-badge,
    .cta-buttons .store-badge {
        margin: 0 auto;
    }

    .btn {
        justify-content: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

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

    .feature-card {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .features,
    .cta-section {
        padding: var(--spacing-xl) var(--spacing-sm);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus states for accessibility */
.btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Legal pages (Privacy Policy, etc.) */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 10000;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--surface);
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
}

.skip-link:focus {
    left: var(--spacing-md);
    top: var(--spacing-md);
}

.legal-page {
    min-height: 60vh;
    padding: var(--spacing-xl) 0 var(--spacing-2xl);
}

.legal-page__inner {
    max-width: 42rem;
}

.legal-page__nav {
    margin-bottom: var(--spacing-lg);
}

.legal-page__back {
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.legal-page__back:hover {
    text-decoration: underline;
}

.legal-page__header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--outline);
}

.legal-page__title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 700;
    color: var(--ink-strong);
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-md);
}

.legal-page__meta {
    font-size: 0.9375rem;
    color: var(--muted);
    margin-bottom: var(--spacing-xs);
}

.legal-page__body {
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.7;
}

.legal-page__body p {
    margin-bottom: var(--spacing-md);
}

.legal-page__body h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink-strong);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
}

.legal-page__body ul {
    margin: 0 0 var(--spacing-md) var(--spacing-lg);
    padding: 0;
}

.legal-page__body li {
    margin-bottom: var(--spacing-sm);
}

.legal-page__body a {
    color: var(--primary);
    font-weight: 500;
}

.footer-legal {
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
}

.footer-legal a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 500;
}

.footer-legal a:hover {
    text-decoration: underline;
}