/* ═══════════════════════════════════════════════════════════════
   SplitEven — Shared Blog Stylesheet
   Used by: blog.html, blog/*.html
═══════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --primary-container: #E0E7FF;
    --secondary: #8B5CF6;
    --accent-green: #10B981;
    --surface: #FFFFFF;
    --background: #F8FAFC;
    --on-surface: #1E293B;
    --on-surface-variant: #64748B;
    --outline: #E2E8F0;
    --gradient-start: #6366F1;
    --gradient-end: #8B5CF6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--on-surface);
    line-height: 1.6;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--outline);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}
.logo-img { width: 40px; height: 40px; object-fit: contain; display: block; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--on-surface-variant);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--on-surface);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    box-shadow: 0 4px 20px rgba(99,102,241,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99,102,241,0.38); }
/* Prevent article link colour rules from overriding button text */
.article-body .btn-primary,
.article-cta .btn-primary { color: white !important; text-decoration: none !important; }
.btn-outline {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-container); }

/* ── Page Hero ──────────────────────────────────────────────── */
.page-hero {
    padding: 8rem 2rem 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
    text-align: center;
}
.page-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}
.page-hero p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    background: var(--on-surface);
    color: white;
    padding: 4rem 2rem 2rem;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}
.footer-brand h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }
.footer-brand p { color: rgba(255,255,255,0.7); font-size: 0.9rem; max-width: 300px; }
.footer-links h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1.5rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

/* ── Blog Index — Cards Grid ────────────────────────────────── */
.blog-section {
    padding: 4rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}
.blog-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--on-surface);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--outline);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--outline);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(99,102,241,0.13);
    border-color: var(--primary-light);
}
.blog-card-thumb {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}
.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-tag {
    display: inline-block;
    background: var(--primary-container);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 0.75rem;
    letter-spacing: 0.02em;
    width: fit-content;
}
.blog-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--on-surface);
    margin-bottom: 0.6rem;
    line-height: 1.4;
}
.blog-card p {
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1.25rem;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--outline);
}
.blog-card-meta span { display: flex; align-items: center; gap: 0.3rem; }
.blog-read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}
.blog-read-more:hover { gap: 0.5rem; }

/* ── Blog Post — Article Layout ─────────────────────────────── */
.post-hero {
    padding: 7rem 2rem 3.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6366f1 100%);
    text-align: center;
}
.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
}
.post-breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: none; }
.post-breadcrumb a:hover { color: white; }
.post-breadcrumb span { color: rgba(255,255,255,0.5); }
.post-hero .post-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}
.post-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    line-height: 1.25;
    margin-bottom: 1rem;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}
.post-meta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin-top: 0.5rem;
}
.post-meta-bar span { display: flex; align-items: center; gap: 0.35rem; }

/* Article body */
.article-wrap {
    background: white;
    padding: 4rem 2rem 5rem;
}
.article-body {
    max-width: 760px;
    margin: 0 auto;
}
.article-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--on-surface);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}
.article-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--on-surface);
    margin: 2rem 0 0.75rem;
}
.article-body p {
    color: var(--on-surface-variant);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}
.article-body ul, .article-body ol {
    color: var(--on-surface-variant);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { color: var(--on-surface); font-weight: 600; }
.article-body a { color: var(--primary); text-decoration: none; }
.article-body a:hover { text-decoration: underline; }

/* In-article CTA box */
.article-cta {
    background: linear-gradient(135deg, var(--primary-container), #EDE9FE);
    border-left: 4px solid var(--primary);
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.article-cta p {
    color: var(--primary-dark) !important;
    font-weight: 600;
    margin-bottom: 0 !important;
    font-size: 1rem !important;
}
.article-cta small {
    color: var(--on-surface-variant);
    font-size: 0.82rem;
    font-weight: 400;
    display: block;
    margin-top: 0.2rem;
}

/* Post footer nav */
.post-nav {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 2rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: repeat(2, 1fr); }
}
/* ── iOS Waitlist Modal ──────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-card {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
    box-shadow: 0 25px 80px rgba(0,0,0,0.2);
}
.modal-overlay.active .modal-card { transform: translateY(0) scale(1); }
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 2rem 1.5rem;
    position: relative;
    text-align: center;
}
.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: background 0.2s;
}
.modal-close:hover { background: rgba(255,255,255,0.35); }
.modal-apple-icon {
    width: 56px; height: 56px;
    margin: 0 auto 0.75rem;
    background: rgba(255,255,255,0.18);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-header h3 { color: white; font-size: 1.35rem; font-weight: 800; margin-bottom: 0.4rem; }
.modal-header p  { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.modal-body { padding: 1.75rem 2rem 2rem; }
.modal-form { display: flex; flex-direction: column; gap: 1rem; }
.modal-input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--outline);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    color: var(--on-surface);
}
.modal-input:focus { outline: none; border-color: var(--primary); }
.modal-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    cursor: pointer;
    line-height: 1.45;
}
.modal-checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.modal-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
}
.modal-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(99,102,241,0.3); }
.modal-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.modal-privacy { font-size: 0.78rem; color: var(--on-surface-variant); text-align: center; }
.modal-success { display: none; text-align: center; padding: 0.5rem 0; }
.modal-success.show { display: block; }
.modal-success-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.modal-success h4 { font-size: 1.2rem; font-weight: 700; color: var(--on-surface); margin-bottom: 0.5rem; }
.modal-success p  { color: var(--on-surface-variant); font-size: 0.95rem; }

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 1rem; border-bottom: 1px solid var(--outline); }
    .mobile-menu-btn { display: block; }
    .blog-grid { grid-template-columns: 1fr; }
    .page-hero h1 { font-size: 2rem; }
    .post-hero h1 { font-size: 1.75rem; }
    .article-cta { flex-direction: column; }
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { max-width: none; }
    .post-meta-bar { gap: 0.75rem; }
}
