/* Tile - Professional Productivity Design
   Clean, minimal, purposeful. System fonts, slate blues, sharp geometry. */

:root {
    /* Light mode (default) - Clean and professional */
    --tile-primary: #4A6FA5;         /* Slate blue */
    --tile-primary-hover: #3D5E8C;   /* Darker blue for hover */
    --tile-accent: #5B8EC9;          /* Lighter accent blue */
    --tile-text: #1A1A2E;            /* Near-black text */
    --tile-background: #FAFBFC;      /* Very light gray */
    --tile-surface: #F0F2F5;         /* Card background */
    --tile-muted: #5A6370;           /* Secondary text */
    --tile-border: #D1D5DB;          /* Subtle borders */

    /* Feature icon colors */
    --tile-feature-blue: #4A6FA5;
    --tile-feature-teal: #2A9D8F;
    --tile-feature-slate: #6B7280;
    --tile-feature-dark: #374151;

    /* Typography - system fonts only */
    --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

    /* Bootstrap overrides */
    --bs-primary: var(--tile-primary);
    --bs-body-bg: var(--tile-background);
    --bs-body-color: var(--tile-text);
    --bs-link-color: var(--tile-primary);
}

[data-theme="dark"] {
    --tile-primary: #6B9BD2;         /* Lighter blue for dark mode */
    --tile-primary-hover: #8AB4E8;
    --tile-accent: #5B8EC9;
    --tile-text: #E5E7EB;            /* Light text */
    --tile-background: #111318;      /* True dark */
    --tile-surface: #1C1F26;         /* Dark surface */
    --tile-muted: #9CA3AF;           /* Muted text */
    --tile-border: #2D3340;          /* Dark borders */

    --tile-feature-blue: #6B9BD2;
    --tile-feature-teal: #4EC9B0;
    --tile-feature-slate: #9CA3AF;
    --tile-feature-dark: #D1D5DB;

    --bs-body-bg: var(--tile-background);
    --bs-body-color: var(--tile-text);
}

/* Typography */
body {
    font-family: var(--font-primary);
    background-color: var(--tile-background);
    color: var(--tile-text);
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--tile-text);
    letter-spacing: -0.02em;
}

p, li {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.7;
}

.text-muted {
    color: var(--tile-muted) !important;
}

/* ========================================
   ACCESSIBILITY: Focus States
   ======================================== */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.theme-toggle:focus-visible {
    outline: 2px solid var(--tile-primary);
    outline-offset: 2px;
}

/* Navbar */
.navbar {
    background-color: var(--tile-surface);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--tile-border);
}

.navbar-brand {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--tile-text) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.navbar-brand .brand-icon {
    display: flex;
    align-items: center;
    color: var(--tile-primary);
}

.nav-link {
    font-family: var(--font-primary);
    color: var(--tile-text) !important;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 6px;
    padding: 0.5rem 1rem !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    color: var(--tile-primary) !important;
    background-color: rgba(74, 111, 165, 0.08);
}

[data-theme="dark"] .nav-link:hover {
    background-color: rgba(107, 155, 210, 0.12);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--tile-border);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--tile-muted);
    font-size: 1.1rem;
}

.theme-toggle:hover {
    background-color: var(--tile-surface);
    border-color: var(--tile-primary);
    color: var(--tile-primary);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Cards and surfaces */
.card {
    background-color: var(--tile-surface);
    border: 1px solid var(--tile-border);
    border-radius: 12px;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--tile-primary);
    box-shadow: 0 8px 24px rgba(74, 111, 165, 0.12);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Hero section */
.hero {
    padding: 100px 0 80px;
    position: relative;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--tile-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: var(--tile-text);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--tile-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.7;
    max-width: 480px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

@media (min-width: 992px) {
    .hero .lead {
        max-width: none;
    }
    .hero-meta {
        justify-content: flex-start;
    }
}

.hero-platform,
.hero-price {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--tile-muted);
}

.hero-divider {
    width: 1px;
    height: 16px;
    background-color: var(--tile-border);
}

/* Hero app icon */
.hero-icon-wrapper {
    position: relative;
}

.hero-app-icon {
    max-width: 240px;
    width: 100%;
    height: auto;
    border-radius: 22.37%;
    box-shadow: 0 16px 48px rgba(74, 111, 165, 0.2);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .hero-app-icon {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.hero-app-icon:hover {
    transform: scale(1.03);
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-app-icon,
    .card,
    .theme-toggle,
    .app-store-badge {
        transition: none;
    }
}

/* Features section */
.features {
    padding: 80px 0;
    background-color: var(--tile-surface);
}

.features h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.features-subtitle {
    font-size: 1.1rem;
    color: var(--tile-muted);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

/* Feature icon color variants */
.feature-icon--blue {
    background-color: rgba(74, 111, 165, 0.12);
    color: var(--tile-feature-blue);
}
.feature-icon--teal {
    background-color: rgba(42, 157, 143, 0.12);
    color: var(--tile-feature-teal);
}
.feature-icon--slate {
    background-color: rgba(107, 114, 128, 0.12);
    color: var(--tile-feature-slate);
}
.feature-icon--dark {
    background-color: rgba(55, 65, 81, 0.12);
    color: var(--tile-feature-dark);
}

/* Dark mode adjustments for feature icons */
[data-theme="dark"] .feature-icon--blue {
    background-color: rgba(107, 155, 210, 0.15);
}
[data-theme="dark"] .feature-icon--teal {
    background-color: rgba(78, 201, 176, 0.15);
}
[data-theme="dark"] .feature-icon--slate {
    background-color: rgba(156, 163, 175, 0.15);
}
[data-theme="dark"] .feature-icon--dark {
    background-color: rgba(209, 213, 219, 0.12);
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.feature-card h5 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--tile-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--tile-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* CTA section */
.cta {
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid var(--tile-border);
}

.cta h2 {
    font-size: 2.2rem;
    color: var(--tile-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.cta p {
    color: var(--tile-muted);
    font-size: 1.1rem;
}

/* App Store badge */
.app-store-badge {
    height: 52px;
    transition: transform 0.15s ease;
    border-radius: 8px;
}

.app-store-badge:hover {
    transform: scale(1.03);
}

/* Footer */
.footer {
    background-color: var(--tile-surface);
    padding: 48px 0 32px;
    margin-top: auto;
    border-top: 1px solid var(--tile-border);
}

.footer h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tile-text);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer p {
    color: var(--tile-muted);
}

.footer a {
    color: var(--tile-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

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

.footer hr {
    border-color: var(--tile-border);
    opacity: 0.5;
}

/* Legal pages */
.legal-content {
    padding: 60px 0;
    max-width: 720px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.legal-content .last-updated {
    color: var(--tile-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.legal-content h2 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content p, .legal-content ul {
    color: var(--tile-muted);
    line-height: 1.8;
    font-size: 1rem;
}

.legal-content ul {
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.highlight-box {
    background-color: rgba(74, 111, 165, 0.06);
    border: 1px solid rgba(74, 111, 165, 0.2);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

[data-theme="dark"] .highlight-box {
    background-color: rgba(107, 155, 210, 0.08);
    border-color: rgba(107, 155, 210, 0.2);
}

.highlight-box strong {
    color: var(--tile-primary);
}

/* Support page */
.support-content {
    padding: 60px 0;
}

.support-content h1 {
    font-size: 2.5rem;
    letter-spacing: -0.03em;
}

.support-content h2 {
    font-size: 1.6rem;
    letter-spacing: -0.02em;
}

.contact-box {
    background-color: var(--tile-surface);
    border: 1px solid var(--tile-primary);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.contact-box h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.contact-box a {
    color: var(--tile-primary);
    font-weight: 600;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--tile-border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--tile-text);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.faq-question::before {
    content: 'Q';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--tile-primary);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

[data-theme="dark"] .faq-question::before {
    background-color: rgba(107, 155, 210, 0.15);
}

.faq-answer {
    color: var(--tile-muted);
    font-size: 1rem;
    line-height: 1.8;
    padding-left: 2.75rem;
}

/* ========================================
   RESPONSIVE: Tablet (1024px)
   ======================================== */
@media (max-width: 1024px) {
    .features .row {
        justify-content: center;
    }
}

/* ========================================
   RESPONSIVE: Mobile (768px)
   ======================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero {
        padding: 60px 0 50px;
    }

    .hero .lead {
        font-size: 1.1rem;
    }

    .features {
        padding: 50px 0;
    }

    .features h2 {
        font-size: 1.8rem;
    }

    .cta {
        padding: 60px 0;
    }

    .cta h2 {
        font-size: 1.8rem;
    }

    .legal-content h1,
    .support-content h1 {
        font-size: 2rem;
    }

    .hero-app-icon {
        max-width: 180px;
    }

    .footer .col-md-4 {
        margin-bottom: 2rem;
    }

    .faq-answer {
        padding-left: 0;
    }
}
