/* =========================================
   Modern Design System - 2026
   Inspired by Apple, Linear, Vercel, Stripe
   ========================================= */

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

/* Design Tokens */
:root {
    color-scheme: dark;

    /* Colors - from the logo: #10ACE3 and #003A78 */
    --color-bg: #030a14;
    --color-bg-secondary: #071221;
    --color-bg-tertiary: #0a1729;
    --color-surface: rgba(14, 30, 52, 0.8);
    --color-surface-hover: rgba(20, 40, 68, 0.95);

    --color-text: #f2f6fb;
    --color-text-secondary: #a9b7c8;
    --color-text-tertiary: #93a3b7;

    --color-primary: #10ace3;
    --color-primary-hover: #3fc0ec;
    --color-primary-light: rgba(16, 172, 227, 0.14);

    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.16);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #003a78 0%, #0a6cb5 100%);
    --gradient-hero: linear-gradient(180deg, #030a14 0%, #06101f 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, hsla(205, 100%, 45%, 0.12) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, hsla(212, 100%, 40%, 0.1) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, hsla(196, 90%, 45%, 0.08) 0px, transparent 50%);

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

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);

    /* Glassmorphism */
    --glass-bg: rgba(12, 26, 46, 0.72);
    --glass-blur: blur(20px);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--space-20);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image: var(--gradient-mesh);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
    color: var(--color-text-secondary);
    max-width: 65ch;
}

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

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

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    z-index: 1100;
    padding: var(--space-2) var(--space-4);
    background: var(--color-text);
    color: var(--color-bg);
    border-radius: var(--radius-md);
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
    color: var(--color-bg);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-sm {
    max-width: 900px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-4) 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--color-border);
}

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

.nav-logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

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

/* White tile keeps the navy half of the mark readable at small sizes */
.nav-logo img {
    width: 36px;
    height: 36px;
    padding: 3px;
    background: white;
    border-radius: var(--radius-md);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

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

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-text);
    color: var(--color-bg);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.nav-cta:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
    color: var(--color-bg);
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-32) 0 var(--space-20);
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-mesh);
    opacity: 0.5;
}

.hero-sm {
    min-height: 0;
    padding: var(--space-32) 0 var(--space-12);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 0 auto var(--space-6);
    animation: fadeInUp 0.6s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-6);
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-size: clamp(var(--text-4xl), 8vw, var(--text-7xl));
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-6);
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-10);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-sm .hero-subtitle {
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-bg);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-border-strong);
    color: var(--color-text);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    border-radius: var(--radius-xl);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Section Styles */
.section {
    padding: var(--space-24) 0;
}

.section-alt {
    background: var(--color-bg-tertiary);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-16);
}

.section-label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    margin: 0 auto;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.bento-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-border-strong);
}

.bento-card:hover::before {
    opacity: 1;
}

.bento-card-lg {
    grid-column: span 2;
}

.bento-card-gradient {
    background: var(--gradient-primary);
    border: none;
}

.bento-card-gradient h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
    color: white;
}

.bento-card-gradient p {
    color: rgba(255, 255, 255, 0.9);
    max-width: none;
}

.bento-card-gradient p + p {
    margin-top: var(--space-4);
}

.bento-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    font-size: var(--text-2xl);
}

.bento-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.bento-description {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.bento-link {
    display: inline-block;
    position: relative;
    margin-top: var(--space-6);
    font-weight: 500;
}

.bento-note {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* App Status */
.status-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    margin-bottom: var(--space-3);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.feature-check {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: #003a78;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    font-size: var(--text-xs);
}

.feature-text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    border-radius: var(--radius-2xl);
    padding: var(--space-16);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
}

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

.cta-title {
    font-size: var(--text-4xl);
    color: white;
    margin-bottom: var(--space-4);
}

.cta-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-block;
    background: white;
    color: #003a78;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
    font-weight: 600;
    border-radius: var(--radius-xl);
    transition: all var(--transition-fast);
    overflow-wrap: anywhere;
}

.cta-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-xl);
    color: #003a78;
}

/* Company Details */
.company-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4) var(--space-8);
    max-width: 700px;
    margin: var(--space-10) auto 0;
    text-align: left;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
}

.company-details dt {
    font-weight: 600;
    color: white;
}

.company-details a,
.company-details a:hover {
    color: white;
    text-decoration: underline;
}

.company-note {
    margin: var(--space-8) auto 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--text-sm);
}

/* Legal & Support Pages */
.legal-section {
    padding: var(--space-12) 0 var(--space-24);
}

.legal-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
}

.legal-card h2 {
    font-size: var(--text-2xl);
    margin: var(--space-10) 0 var(--space-4);
}

.legal-card h2:first-child {
    margin-top: 0;
}

.legal-card p,
.legal-card ul,
.legal-card ol {
    margin-bottom: var(--space-4);
    line-height: 1.8;
    color: var(--color-text-secondary);
    max-width: none;
}

.legal-card ul,
.legal-card ol {
    margin-left: var(--space-6);
}

.legal-notice {
    margin-bottom: var(--space-8);
    padding: var(--space-4) var(--space-6);
    background: var(--color-primary-light);
    border-radius: var(--radius-lg);
}

/* Footer */
.footer {
    background: var(--color-bg-tertiary);
    padding: var(--space-16) 0 var(--space-8);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(2, 1fr);
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand {
    max-width: 340px;
}

.footer-logo {
    display: block;
    width: 110px;
    height: auto;
    margin-bottom: var(--space-4);
}

.footer-description {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.footer-column h2 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    list-style: none;
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    max-width: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations (only when the script runs, so content is never stuck hidden) */
.js [data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.js [data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    .js [data-animate] {
        opacity: 1;
        transform: none;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-card-lg {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .nav-logo {
        font-size: var(--text-lg);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg-secondary);
        flex-direction: column;
        padding: var(--space-6);
        gap: var(--space-4);
        border-bottom: 1px solid var(--color-border);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: var(--space-24) 0 var(--space-16);
    }

    .hero-sm {
        min-height: 0;
        padding: var(--space-24) 0 var(--space-8);
    }

    .hero-actions {
        flex-direction: column;
    }

    .section {
        padding: var(--space-16) 0;
    }

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

    .bento-card-lg {
        grid-column: span 1;
    }

    .cta-section {
        padding: var(--space-10) var(--space-6);
    }

    .cta-title {
        font-size: var(--text-3xl);
    }

    .cta-btn {
        font-size: var(--text-sm);
        padding: var(--space-3) var(--space-4);
    }

    .company-details {
        grid-template-columns: 1fr;
    }

    .legal-card {
        padding: var(--space-6);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-logo,
    .footer-description {
        margin-left: auto;
        margin-right: auto;
    }

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