/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Brand Colors */
    --color-primary: #06b6d4;
    /* Cyan-500 */
    --color-primary-light: #22d3ee;
    /* Cyan-400 */
    --color-primary-dark: #0e7490;
    /* Cyan-700 */

    /* Core Dark Theme */
    --color-background: #012B40;
    /* Deep Navy */
    --color-surface: #0f172a;
    /* Slate-900 */
    --color-surface-light: #1e293b;
    /* Slate-800 */

    /* Text Colors */
    --color-text: #f1f5f9;
    /* Slate-100 */
    --color-text-secondary: #94a3b8;
    /* Slate-400 */
    --color-text-muted: #64748b;
    /* Slate-500 */

    /* UI Colors */
    --color-border: #1e293b;
    /* Slate-800 */

    /* Semantic Colors */
    --color-success: #10B981;
    /* Emerald-500 */
    --color-warning: #F59E0B;
    /* Amber-500 */
    --color-danger: #EF4444;
    /* Red-500 */

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

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

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

body {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    /* Better specific character variants */
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus visible styles */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

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

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

/* Layout Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   2. NAVIGATION BAR
   ========================================= */
.navbar {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(1, 43, 64, 0.85);
    /* Deep Navy with opacity */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

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

.nav-links a:focus-visible {
    outline-offset: 4px;
}

.btn-outline {
    border: 1px solid var(--color-border);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    color: var(--color-text) !important;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary) !important;
    background: rgba(6, 182, 212, 0.05);
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    padding: 160px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background Glow */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(1, 43, 64, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 64px;
    position: relative;
    z-index: 1;
}

.tagline {
    color: var(--color-primary);
    font-weight: 600;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 24px;
    text-transform: uppercase;
}

h1 {
    margin-bottom: 24px;
}

.highlight-text {
    color: var(--color-primary-light);
    /* Fallback if gradient doesn't work well on bg */
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 540px;
}

.cta-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    background: var(--color-primary);
    color: #000;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.25);
    color: #000;
}

.btn.btn-outline {
    background: transparent;
    border-color: var(--color-text-secondary);
    color: var(--color-text);
    box-shadow: none;
}

.btn.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(6, 182, 212, 0.05);
    transform: translateY(-2px);
    box-shadow: none;
}

/* Phone Mockup */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 300px;
    height: 600px;
    background: var(--color-surface);
    border-radius: 44px;
    border: 8px solid var(--color-surface);
    position: relative;
    overflow: hidden;
    z-index: 2;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: var(--color-surface);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 10;
}

.phone-mockup {
    width: 100%;
    height: 100%;
    border-radius: 36px;
    object-fit: cover;
}

.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-background) 100%);
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    color: var(--color-primary);
    opacity: 0.8;
}

.placeholder-text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, rgba(1, 43, 64, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* =========================================
   4. SECTIONS COMMON
   ========================================= */
section {
    padding: 120px 0;
    position: relative;
    border-top: 1px solid rgba(30, 41, 59, 0.5);
}

.section-title {
    text-align: center;
    margin-bottom: 16px;
    color: var(--color-text);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 80px;
    font-size: 1.125rem;
}

/* =========================================
   5. HOW IT WORKS
   ========================================= */
.how-it-works {
    background-color: rgba(15, 23, 42, 0.3);
    /* Slight tint */
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.step-item {
    text-align: left;
    padding: 32px 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    height: 100%;
}

.step-item:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary-dark);
}

.step-item:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.step-number {
    width: 40px;
    height: 40px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-weight: 700;
    font-size: 1.125rem;
}

.step-item h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-text);
}

.step-item p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.science-banner {
    text-align: center;
    padding: 64px 40px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(1, 43, 64, 0.5) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    max-width: 900px;
    margin: 0 auto;
}

.science-banner h3 {
    margin-bottom: 16px;
    color: var(--color-primary-light);
}

.science-banner p {
    color: var(--color-text-secondary);
    max-width: 650px;
    margin: 0 auto;
}

/* =========================================
   6. FEATURES SECTION
   ========================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary-dark);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.feature-card:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.card-glow {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: var(--color-primary);
    filter: blur(80px);
    opacity: 0.05;
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.feature-card:hover .card-glow {
    opacity: 0.15;
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary-light);
    stroke-width: 1.5;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

/* =========================================
   7. SUPPORT & FOOTER
   ========================================= */
.support-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 64px 48px;
    text-align: center;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-background) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}



.email-text {
    color: var(--color-text-secondary);
    font-family: 'Inter', monospace;
    /* Monospace sometimes looks harsh */
    font-size: 0.9rem;
    display: block;
    margin-top: 16px;
}

.support-links {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.separator {
    color: var(--color-border);
    font-size: 0.8rem;
}

footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 64px 0 32px;
}

.footer-container {
    text-align: center;
}

.footer-logo {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 24px;
    display: block;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 48px;
}

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

.footer-nav a:hover {
    color: var(--color-text);
}

.copyright {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.disclaimer {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.7;
}

/* =========================================
   8. MODAL
   ========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(1, 43, 64, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal-open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--color-surface);
    border: 1px solid var(--color-primary-dark);
    padding: 48px 32px;
    border-radius: 24px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-open .modal-content {
    transform: scale(1);
}

.modal-icon {
    color: var(--color-primary);
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.modal-text {
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-close:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.btn-close:focus-visible {
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3);
}

.btn-full-width {
    margin: 0;
    width: 100%;
}

.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-background) 100%);
}

.screenshot-placeholder.hidden {
    display: none;
}

.screenshot-placeholder.visible {
    display: flex;
}

/* =========================================
   9. POLICY PAGES
   ========================================= */
.policy-container {
    max-width: 800px;
    padding: 160px 24px 80px;
}

.policy-content h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.last-updated {
    font-family: monospace;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 64px;
    display: block;
}

.policy-content h2 {
    color: var(--color-text);
    margin-top: 48px;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.policy-content h3 {
    color: var(--color-primary-light);
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.policy-content p,
.policy-content li {
    margin-bottom: 16px;
}

.policy-content ul {
    list-style: disc inside;
    margin-left: 16px;
    color: var(--color-text-secondary);
}

/* Common Boxes */
.notice-box,
.warning-box,
.alternatives,
.email-template {
    margin: 32px 0;
    padding: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.notice-box {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.2);
}

.warning-box {
    background: rgba(239, 68, 68, 0.05);
    /* Danger tint */
    border-color: rgba(239, 68, 68, 0.2);
}

.warning-box h3 {
    color: var(--color-danger);
}

.email-template {
    background: var(--color-surface);
    font-family: monospace;
    white-space: pre-wrap;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating {
        animation: none !important;
    }

    .step-item:hover {
        transform: none !important;
    }

    .feature-card:hover {
        transform: none !important;
    }

    .btn:hover {
        transform: none !important;
    }
}

/* =========================================
   10. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

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

    .cta-group {
        justify-content: center;
    }

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

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .navbar {
        padding: 16px 0;
    }

    .nav-links {
        display: none;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    .support-card {
        padding: 40px 24px;
    }
}