/* ═══════════════════════════════════════════
   FONTS
   ═══════════════════════════════════════════ */
@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-300.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-500.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
    --brand-50: #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --brand-300: #93c5fd;
    --brand-400: #60a5fa;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-800: #1e40af;
    --brand-900: #1e3a8a;

    --accent-400: #f472b6;
    --accent-500: #ec4899;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gray-950: #020617;

    --success: #10b981;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.16);

    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #1a1a24;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border: #1e293b;
    --border-subtle: #1a1a24;

    --glass-bg: rgba(15, 23, 42, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

a:hover {
    color: var(--brand-700);
}

[data-theme="dark"] a {
    color: var(--brand-400);
}

[data-theme="dark"] a:hover {
    color: var(--brand-300);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo img {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    letter-spacing: -0.01em;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

[data-theme="dark"] .nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

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

    .nav-links.show {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        padding: 0.75rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--glass-shadow);
    }

    [data-theme="dark"] .nav-links.show {
        background: rgba(10, 10, 15, 0.95);
    }

    .nav-links.show a {
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

/* ═══════════════════════════════════════════
   CONTENT
   ═══════════════════════════════════════════ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}
.back-link:hover {
    color: var(--brand-500);
}

.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.page-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    text-align: center;
}

.page-meta {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-bottom: 3rem;
}

.page-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 2rem 0 0.75rem;
}

.page-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.page-content ul {
    margin: 0.75rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.65;
}

.page-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
    background: var(--gray-950);
    color: white;
    padding: 3rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.footer-description {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.65;
    max-width: 320px;
}

.footer-heading {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
    color: var(--gray-400);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--gray-500);
    font-size: 0.8125rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ═══════════════════════════════════════════
   BLOG-SPECIFIC
   ═══════════════════════════════════════════ */
.blog-content {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 0.75rem;
    letter-spacing: -0.02em;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 650;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
}

.blog-content p {
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.625rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.highlight-box {
    background: var(--brand-50);
    border-left: 4px solid var(--brand-500);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius-sm);
    font-style: italic;
}

[data-theme="dark"] .highlight-box {
    background: rgba(59, 130, 246, 0.08);
}

.problem-list {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .problem-list {
    background: rgba(239, 68, 68, 0.08);
}

.solution-list {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .solution-list {
    background: rgba(34, 197, 94, 0.08);
}

.cta-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-950) 100%);
    color: white;
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.cta-section h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.cta-section p {
    margin-bottom: 1.5rem;
    opacity: 0.75;
    position: relative;
    z-index: 1;
}

.app-store-badge {
    height: 48px;
    transition: all var(--transition);
}

.app-store-badge:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

@media (max-width: 768px) {
    .page-content {
        padding: 2rem 1rem 3rem;
    }

    .blog-content {
        padding: 2rem 1.5rem;
    }
}
