/* ========================================
   touseefshaik.com - AI App Factory Lab Site
   Modern, technical, dark-theme aesthetic
========================================== */

:root {
    --bg-primary: #F9F6F3;
    --bg-secondary: #ECE5E1;
    --bg-card: #ffffff;
    --bg: #F9F6F3;
    --surface: #ffffff;
    --surface-alt: #ECE5E1;
    --border: #DDD6CF;
    --fg-primary: #313131;
    --fg-muted: #6b6b7a;
    --text: #313131;
    --text-heading: #112337;
    --text-secondary: #555555;
    --accent: #1863dc;
    --accent-dim: #1863dc22;
    --accent-strong: #001AB3;
    --warn: #d97706;
    --error: #dc2626;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-sans: 'Space Grotesk', system-ui, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --transition: 200ms ease;
    --container: 1120px;
}

/* === Ali Abdaal-style heading color: warm navy === */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
}


@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #F9F6F3;
        --bg-secondary: #ECE5E1;
        --bg-card: #ffffff;
        --border: #DDD6CF;
        --fg-primary: #313131;
        --fg-muted: #6b6b7a;
        --accent: #1863dc;
        --accent-dim: #1863dc22;
        --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
        --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    }
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--fg-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

code, pre, kbd, samp {
    font-family: var(--font-mono);
}

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

a:hover {
    color: var(--accent-strong);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER / NAV
========================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(249, 246, 243, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1rem;
    color: var(--fg-primary);
}

.nav-brand:hover {
    color: var(--accent);
}

.brand-badge {
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--fg-muted);
    transition: all var(--transition);
}

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

.nav-cta {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    font-weight: 600;
}

.nav-cta:hover {
    background: var(--accent-strong) !important;
    color: var(--bg-primary) !important;
}

/* ========================================
   BUTTONS
========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: var(--bg-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--fg-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.btn-outline {
    background: transparent;
    color: var(--fg-muted);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--fg-muted);
    border-color: transparent;
    padding: 8px 16px;
}

.btn-ghost:hover {
    color: var(--fg-primary);
    background: var(--bg-secondary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

/* ========================================
   HERO
========================================== */

.hero {
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--fg-muted);
    margin-bottom: 16px;
}

.hero-subtitle strong {
    color: var(--fg-primary);
}

.hero-context {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--fg-muted);
    margin-bottom: 32px;
    max-width: 600px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--fg-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-image {
    display: block;
}

/* Hero Layout - Two column */
.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-layout {
        grid-template-columns: 380px 1fr;
        gap: 64px;
    }
    
    .hero-image {
        display: block;
    }
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* ========================================
   SECTIONS
========================================== */

section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--fg-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   APP GRID
========================================== */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.app-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition);
}

.app-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.app-card.flagship::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.app-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--bg-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.app-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.app-desc {
    font-size: 0.9375rem;
    color: var(--fg-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.app-pattern {
    font-size: 0.8125rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.app-pattern strong {
    color: var(--accent-strong);
}

.app-future {
    font-size: 0.8125rem;
    color: var(--fg-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.app-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
}

.app-link:hover {
    gap: 10px;
}

.apps-cta, .patterns-cta, .stack-cta, .next-cta {
    text-align: center;
    margin-top: 32px;
}

/* ========================================
   PATTERN GRID
========================================== */

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.pattern-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition);
}

.pattern-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pattern-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    letter-spacing: 0.1em;
}

.pattern-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.pattern-validated {
    font-size: 0.8125rem;
    color: var(--fg-muted);
    margin-bottom: 16px;
}

.pattern-validated strong {
    color: var(--fg-primary);
}

.pattern-desc {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--fg-muted);
    background: var(--bg-primary);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow-x: auto;
    line-height: 1.6;
}

.pattern-uses {
    list-style: none;
    margin-bottom: 20px;
}

.pattern-uses li {
    font-size: 0.8125rem;
    color: var(--fg-muted);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.pattern-uses li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.pattern-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
}

.pattern-link:hover {
    gap: 10px;
}

/* ========================================
   NEXT SECTION
========================================== */

.next-preview {
    background: var(--bg-secondary);
}

.next-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 900px) {
    .next-grid {
        grid-template-columns: 1fr;
    }
}

.next-phase h3, .next-apps h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9375rem;
    color: var(--fg-muted);
}

.checklist li code {
    background: var(--bg-primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--accent);
}

.checklist input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.apps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.apps-table th,
.apps-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.apps-table th {
    font-weight: 600;
    color: var(--fg-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.apps-table td {
    color: var(--fg-primary);
}

.apps-table td:first-child {
    font-weight: 500;
}

.apps-table tr:last-child td {
    border-bottom: none;
}

.apps-table tr:hover td {
    background: var(--bg-primary);
}

.monetization-philosophy {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.monetization-philosophy h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.philosophy-item {
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.philosophy-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.philosophy-item p {
    font-size: 0.8125rem;
    color: var(--fg-muted);
}

.philosophy-note {
    font-size: 0.875rem;
    color: var(--fg-muted);
}

.philosophy-note strong {
    color: var(--fg-primary);
}

/* ========================================
   STACK PREVIEW
========================================== */

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stack-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.stack-category h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stack-category h3::before {
    content: '▸';
    color: var(--accent);
}

.stack-category ul {
    list-style: none;
}

.stack-category li {
    font-size: 0.875rem;
    color: var(--fg-muted);
    padding: 6px 0;
    position: relative;
    padding-left: 16px;
}

.stack-category li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* ========================================
   FOOTER
========================================== */

.site-footer {
    margin-top: auto;
    padding: 60px 0 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 48px;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand .brand-text {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9375rem;
    color: var(--fg-muted);
    max-width: 300px;
}

.footer-nav h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    margin-bottom: 16px;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    font-size: 0.9375rem;
    color: var(--fg-muted);
}

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

.footer-cta h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-cta p {
    font-size: 0.9375rem;
    color: var(--fg-muted);
    margin-bottom: 16px;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--fg-muted);
}

/* ========================================
   UTILITIES
========================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
</style>

/* ============================================================
   PHASE 1 EXTENSIONS — added 2026-06-05 for merge build
   Fills gaps in existing CSS, adds new page-type classes
   ============================================================ */

/* FIX: classes used in existing lab pages but not styled */
.future-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, transform 0.2s;
}
.future-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.future-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.future-cards h4 { margin: 0 0 0.5rem; font-size: 1.05rem; color: var(--text); }
.future-cards p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }

.meta-tag {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0.35rem 0.35rem 0;
    font-family: var(--font-mono);
}

.pattern-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.pattern-section h2 { margin-top: 0; }
.pattern-section h3 { margin-top: 1.5rem; font-size: 1.1rem; }
.pattern-section code { background: var(--bg); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85em; }
.pattern-section pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
}

.app-detail {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .app-detail { grid-template-columns: 1fr; padding: 1.5rem; }
}
.app-detail-main h2 { margin-top: 0; }
.app-detail-sidebar { position: sticky; top: 1rem; }
.app-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.app-desc-large { font-size: 1.1rem; line-height: 1.7; color: var(--text-secondary); }
.large { font-size: 1.1rem; }

.btn-block { display: block; width: 100%; text-align: center; }

/* NEW: blog post typography (long-form content on dark theme) */
.blog-post {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}
.blog-post h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1rem; }
.blog-post h2 { font-size: 1.6rem; margin: 2.5rem 0 1rem; color: var(--text); }
.blog-post h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; color: var(--text); }
.blog-post p { font-size: 1.05rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 1.25rem; }
.blog-post ul, .blog-post ol { padding-left: 1.5rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 1.25rem; }
.blog-post li { margin-bottom: 0.4rem; }
.blog-post code { background: var(--surface-alt); padding: 0.15rem 0.45rem; border-radius: 4px; font-size: 0.9em; color: var(--accent); }
.blog-post pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.blog-post pre code { background: transparent; padding: 0; color: var(--text); }
.blog-post blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}
.blog-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: border-color 0.2s, transform 0.2s;
    display: block;
    text-decoration: none;
    color: inherit;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-card h3 { margin-top: 0; }
.blog-card .blog-card-meta { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.75rem; }
.blog-card p { color: var(--text-secondary); margin-bottom: 1rem; }

/* NEW: contact form */
.contact-form {
    max-width: 520px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-form input,
.contact-form textarea {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-info { text-align: center; margin-bottom: 2rem; }
.contact-info p { color: var(--text-secondary); margin: 0.5rem 0; }
.contact-info a { color: var(--accent); }

/* NEW: legal pages (privacy, terms) */
.legal-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}
.legal-content h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.legal-content h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; color: var(--text); }
.legal-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; color: var(--text); }
.legal-content p { font-size: 1rem; line-height: 1.7; color: var(--text-secondary); margin-bottom: 1rem; }
.legal-content ul { padding-left: 1.5rem; line-height: 1.7; color: var(--text-secondary); }
.legal-updated { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }

/* NEW: ideas / roadmap */
.idea-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent);
}
.idea-card h3 { margin: 0 0 0.5rem; }
.idea-status {
    display: inline-block;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    background: var(--surface-alt);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.idea-status.live { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.idea-status.building { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.idea-status.idea { background: rgba(99, 102, 241, 0.15); color: #818cf8; }

/* NEW: page-intro (smaller hero for non-home pages) */
.page-intro {
    padding: 4rem 0 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.page-intro h1 { font-size: 2.5rem; line-height: 1.2; margin: 0.5rem 0 1rem; }
.page-intro p { color: var(--text-secondary); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }
.page-intro .eyebrow { color: var(--accent); font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* NEW: cta-strip (reusable CTA section for the bottom of pages) */
.cta-strip {
    text-align: center;
    padding: 4rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 3rem 0;
}
.cta-strip h2 { margin: 0 0 1rem; }
.cta-strip p { color: var(--text-secondary); margin: 0 0 1.5rem; max-width: 520px; margin-left: auto; margin-right: auto; }

/* NEW: download list (for resources page) */
.download-list { list-style: none; padding: 0; }
.download-list li {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.download-list .download-info { flex: 1; min-width: 240px; }
.download-list h4 { margin: 0 0 0.25rem; }
.download-list p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }

/* Visitor counter badge — appears in every page footer */
.visitor-counter { text-align: center; padding: 1rem 0 0.5rem; font-size: 0.8rem; color: var(--text-secondary); }
.visitor-counter img { height: 20px; vertical-align: middle; opacity: 0.85; }


/* ========================================
   HAMBURGER / MOBILE NAV
   ======================================== */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--fg-primary);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    align-items: center;
    justify-content: center;
}

.nav-toggle:hover {
    background: var(--bg-secondary);
}

.nav-toggle .hamburger-icon {
    display: block;
    width: 22px;
    height: 16px;
    position: relative;
}

.nav-toggle .hamburger-icon::before,
.nav-toggle .hamburger-icon::after,
.nav-toggle .hamburger-icon span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 200ms ease, opacity 200ms ease, top 200ms ease;
}

.nav-toggle .hamburger-icon::before { top: 0; }
.nav-toggle .hamburger-icon span { top: 7px; }
.nav-toggle .hamburger-icon::after { top: 14px; }

/* When open, X animation */
.nav-open .nav-toggle .hamburger-icon::before {
    top: 7px;
    transform: rotate(45deg);
}
.nav-open .nav-toggle .hamburger-icon span {
    opacity: 0;
}
.nav-open .nav-toggle .hamburger-icon::after {
    top: 7px;
    transform: rotate(-45deg);
}

/* ========================================
   MOBILE BREAKPOINT (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {

    /* Prevent horizontal scrollbar from off-screen elements */
    html {
        overflow-x: hidden;
    }

    /* === NAV === */
    .nav {
        height: 56px;
    }

    .nav-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    /* Brand link: ensure tappable height on mobile */
    .nav-brand {
        min-height: 44px;
    }

    .nav-links {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg-primary);
        padding: 16px;
        margin: 0;
        list-style: none;
        z-index: 99;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 250ms ease, visibility 0ms 250ms;
        border-top: 1px solid var(--border);
        visibility: hidden;
        pointer-events: none;
    }

    .nav-open .nav-links {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 250ms ease, visibility 0ms 0ms;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius-md);
        width: 100%;
    }

    .nav-links a.nav-cta {
        margin-top: 12px;
        text-align: center;
    }

    /* Lock body scroll when menu is open */
    body.nav-open {
        overflow: hidden;
    }

    /* === CONTAINER PADDING === */
    .container {
        padding: 0 16px;
    }

    /* === HERO === */
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .hero-image {
        order: -1; /* Image first on mobile */
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-image img {
        width: 100%;
        height: auto;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
        line-height: 1.2 !important;
    }

    .hero p {
        font-size: 1rem !important;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    /* === STATS BLOCK === */
    .stats,
    [class*="stat-"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    /* === PAGE INTRO === */
    .page-intro {
        padding: 2.5rem 0 1.5rem;
    }

    .page-intro h1 {
        font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
    }

    /* === GRIDS: collapse to single column === */
    .app-grid,
    .pattern-grid,
    .next-grid,
    .philosophy-grid,
    .stack-grid,
    .footer-grid,
    .next-preview-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* === APP DETAIL === */
    .app-detail {
        grid-template-columns: 1fr !important;
        padding: 1.5rem 1rem !important;
    }

    .app-detail-sidebar {
        position: static !important;
    }

    /* === BLOG POSTS / LEGAL === */
    .blog-post,
    .legal-content {
        padding: 2rem 1rem !important;
    }

    /* === CONTACT FORM === */
    .contact-form {
        padding: 0 0.5rem;
    }

    /* === BUTTONS: easier tap targets === */
    .btn {
        padding: 12px 20px;
        min-height: 44px;
    }

    /* === FOOTER === */
    .site-footer {
        padding: 40px 0 16px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    /* === HEADINGS === */
    h1 { font-size: clamp(1.75rem, 8vw, 2.25rem) !important; }
    h2 { font-size: clamp(1.5rem, 6vw, 1.875rem) !important; }

    /* === VISITOR COUNTER === */
    .visitor-counter {
        padding: 0.75rem 0 0.5rem;
    }
}

/* === VERY SMALL SCREENS (≤400px) === */
@media (max-width: 400px) {
    .hero-stats,
    [class*="stat"] {
        grid-template-columns: 1fr !important;
    }

    .hero h1 {
        font-size: 1.5rem !important;
    }
}
