/* ==================================================================
   ci42 Kit 0 — Landing Page Stylesheet
   ==================================================================
   Responsive, dark-mode-aware stylesheet for the coming soon page.
   The primary brand color is injected by the build pipeline from
   ci42.yml → theme.primary_color as a CSS custom property override
   in the <style> tag of index.html.

   Structure:
     1. CSS Custom Properties (theme tokens)
     2. Reset & Base Styles
     3. Layout (container, hero, cards)
     4. Components (badges, buttons, toggle)
     5. Dark Mode (prefers-color-scheme + manual toggle)
     6. Responsive (mobile-first breakpoints)

   Docs: https://docs.ci42.io/kit-0/
   ================================================================== */

/* --- 1. Theme Tokens ---
   --color-primary is overridden by the build pipeline.
   Default: ci42 blue (#2563eb). Change via ci42.yml → theme.primary_color */
:root {
    --color-primary: #2563eb;
    --color-primary-light: #3b82f6;
    --color-background: #ffffff;
    --color-surface: #f8fafc;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-border: #e2e8f0;
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "Fira Code", monospace;
    --max-width: 720px;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* --- 5. Dark Mode --- */
[data-theme="dark"] {
    --color-primary-light: #60a5fa;
    --color-background: #0f172a;
    --color-surface: #1e293b;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* --- 2. Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- 3. Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.hero {
    padding: 4rem 0 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-background) 100%);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.card code {
    font-family: var(--font-mono);
    background: var(--color-background);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid var(--color-border);
}

/* --- 4. Components --- */

/* "Coming Soon" badge */
.badge-coming-soon {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Tech stack badges */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Dark mode toggle button */
.theme-toggle {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.2s ease;
}

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

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

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

footer a:hover {
    text-decoration: underline;
}

/* --- 6. Responsive --- */
@media (max-width: 600px) {
    .hero {
        padding: 2.5rem 0 2rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 1.05rem;
    }

    .card {
        padding: 1.25rem;
    }
}
