/* ============================================================
   Vibe Coding with Claude — Business Edition
   Shared design system · "Warm Editorial × Calm Premium"
   Synthesized from: superhuman.com (warm-dark), saybriefly.com
   (warm-light + Bricolage Grotesque), cleanmeter.app (calm minimal).
   Light default + [data-theme="dark"] override. Legacy var names
   (--accent-teal, --bg-secondary, …) are kept as ALIASES so the
   pages' inline styles restyle automatically.
   ============================================================ */

/* ---------- Tokens: LIGHT (default) ---------- */
:root {
    --bg: #FBF9F4;
    --surface: #FFFFFF;
    --surface-alt: #F3EEE4;
    --ink: #1B1A17;
    --text: #1B1A17;
    --text-2: #6C665B;
    --text-3: #938C7E;
    --border: #E8E1D4;
    --border-strong: #DAD1BF;

    --accent: #C05A31;          /* clay / terracotta */
    --accent-hover: #A94C27;
    --accent-contrast: #FFFFFF;
    --accent-soft: rgba(192, 90, 49, 0.10);
    --accent-line: rgba(192, 90, 49, 0.28);

    --accent-2: #2C6E49;        /* forest green */
    --accent-2-soft: rgba(44, 110, 73, 0.10);
    --accent-2-line: rgba(44, 110, 73, 0.30);

    --highlight: #B8860B;       /* text-safe amber (butter #F2C14E used for fills) */
    --highlight-fill: #F2C14E;
    --highlight-soft: rgba(242, 193, 78, 0.16);
    --highlight-line: rgba(242, 193, 78, 0.55);

    --shadow: 0 1px 2px rgba(27, 26, 23, 0.04), 0 8px 24px rgba(27, 26, 23, 0.06);
    --shadow-lg: 0 12px 40px rgba(27, 26, 23, 0.12);
    --nav-bg: rgba(251, 249, 244, 0.85);
    --hero-glow-1: rgba(192, 90, 49, 0.10);
    --hero-glow-2: rgba(44, 110, 73, 0.08);
    --hero-glow-3: rgba(70, 140, 205, 0.07);
    --grid-line: rgba(27, 26, 23, 0.045);
    --glow-line: rgba(70, 140, 205, 0.35);
    --code-bg: #FBF7EF;

    /* ---- Legacy aliases (do not remove: inline styles use these) ---- */
    --bg-primary: var(--bg);
    --bg-secondary: var(--surface);
    --bg-tertiary: var(--border);
    --accent-teal: var(--accent);
    --accent-coral: var(--accent);
    --accent-gold: var(--highlight);
    --text-primary: var(--text);
    --text-secondary: var(--text-2);
    --text-muted: var(--text-3);

    --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Roboto Mono', ui-monospace, monospace;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-pill: 50px;
}

/* ---------- Tokens: DARK (warm espresso — lifted, never pure black) ---------- */
:root[data-theme="dark"] {
    --bg: #211D17;
    --surface: #2A251D;
    --surface-alt: #332C21;
    --ink: #F3EEE4;
    --text: #F3EEE4;
    --text-2: #B5AD9E;
    --text-3: #857D6D;
    --border: #3D3626;
    --border-strong: #4E4633;

    --accent: #E3A47C;          /* softened clay — warm, not neon orange */
    --accent-hover: #EDB18C;
    --accent-contrast: #211D17;
    --accent-soft: rgba(227, 164, 124, 0.14);
    --accent-line: rgba(227, 164, 124, 0.34);

    --accent-2: #8FBF9C;        /* sage */
    --accent-2-soft: rgba(143, 191, 156, 0.14);
    --accent-2-line: rgba(143, 191, 156, 0.34);

    --highlight: #E7C05F;
    --highlight-fill: #E7C05F;
    --highlight-soft: rgba(231, 192, 95, 0.13);
    --highlight-line: rgba(231, 192, 95, 0.42);

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 10px 30px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 16px 50px rgba(0, 0, 0, 0.45);
    --nav-bg: rgba(33, 29, 23, 0.85);
    --hero-glow-1: rgba(227, 164, 124, 0.13);
    --hero-glow-2: rgba(143, 191, 156, 0.09);
    --hero-glow-3: rgba(125, 205, 222, 0.16);
    --grid-line: rgba(240, 235, 225, 0.042);
    --glow-line: rgba(125, 205, 222, 0.6);
    --code-bg: #1B1811;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, .logo, .footer h3, .section-header h2 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 0 2rem;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 1rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.03em;
}
.logo::before {
    content: '';
    display: inline-block;
    width: 10px; height: 10px;
    margin-right: 0.55rem;
    border-radius: 50%;
    background: var(--accent);
    vertical-align: middle;
}

.nav-tabs { display: flex; gap: 0.25rem; list-style: none; align-items: center; }

.nav-tabs a {
    color: var(--text-2);
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
.nav-tabs a:hover,
.nav-tabs a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

/* ---------- Module selector ---------- */
.module-selector {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 999;
    padding: 0.7rem 2rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.module-selector::-webkit-scrollbar { height: 6px; }
.module-selector::-webkit-scrollbar-track { background: transparent; }
.module-selector::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.module-selector-container { max-width: 1400px; margin: 0 auto; display: flex; gap: 0.5rem; align-items: center; }

.selector-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    white-space: nowrap;
    flex-shrink: 0;
}
.selector-label i { color: var(--accent); }
.selector-divider { width: 1px; align-self: stretch; background: var(--border-strong); margin: 0.15rem 0.3rem; flex-shrink: 0; }

.module-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}
.module-chip:hover {
    border-color: var(--accent-line);
    color: var(--accent);
    transform: translateY(-1px);
}
.module-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-contrast);
    box-shadow: var(--shadow);
}

.module-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    background: var(--surface-alt);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-2);
}
.module-chip.active .module-number { background: rgba(255, 255, 255, 0.25); color: var(--accent-contrast); }

.module-chip-advanced { border-color: var(--accent-2-line); color: var(--accent-2); }
.module-chip-advanced:hover,
.module-chip-advanced.active {
    background: var(--accent-2-soft);
    border-color: var(--accent-2-line);
    color: var(--accent-2);
    transform: translateY(-1px);
}
.module-chip-advanced .module-number { color: var(--accent-2); }

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 200px 2rem 100px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}
/* faint tech grid, faded out toward edges */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 0%, transparent 78%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 0%, transparent 78%);
    pointer-events: none;
}
/* drifting aurora — warm clay + cool cyan glow (the "futuristic" layer) */
.hero::after {
    content: '';
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(circle at 26% 26%, var(--hero-glow-1) 0%, transparent 42%),
        radial-gradient(circle at 80% 28%, var(--hero-glow-3) 0%, transparent 46%),
        radial-gradient(circle at 62% 84%, var(--hero-glow-2) 0%, transparent 46%);
    filter: blur(24px);
    animation: aurora 20s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes aurora {
    0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
    100% { transform: translate3d(2%, 2.5%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .hero::after { animation: none; }
}
.hero-content { position: relative; z-index: 1; max-width: 860px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    color: var(--ink);
    letter-spacing: -0.035em;
}
.hero h1 .accent { color: var(--accent); }

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-2);
    margin: 0 auto 2.5rem;
    max-width: 680px;
    line-height: 1.55;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-body);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--accent-line); color: var(--accent); }

/* ---------- Layout ---------- */
.main-content { max-width: 1120px; margin: 0 auto; padding: 80px 2rem 0; }

.section { padding: 80px 0; border-bottom: 1px solid var(--border); }
.section:last-child { border-bottom: none; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent);
    margin-bottom: 1.25rem;
}
.section-header h2 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; margin-bottom: 1rem; color: var(--ink); }
.section-header p { font-size: 1.125rem; color: var(--text-2); max-width: 680px; margin: 0 auto; }

/* Group divider heading (e.g. Playbook: Running It Well / Reference) */
.group-heading { margin: 1rem 0 -1rem; padding: 0 0 0.9rem; border-bottom: 2px solid var(--accent-line); }
.group-heading .group-eyebrow { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 0.4rem; }
.group-heading h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--ink); font-family: var(--font-display); letter-spacing: -0.02em; }
.group-heading p { font-size: 1.05rem; color: var(--text-2); margin-top: 0.35rem; max-width: 680px; }

/* ---------- Module header ---------- */
.module-header {
    background: var(--surface-alt);
    padding: 1.75rem 2rem;
    border-radius: var(--radius);
    margin-bottom: 3rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
}
.module-header h3 { font-size: 1.6rem; margin-bottom: 0.4rem; color: var(--ink); }
.module-header .duration { color: var(--accent); font-weight: 600; }

/* ---------- Module content ---------- */
.module-content { font-size: 1.08rem; line-height: 1.8; }
.module-content h3 { font-size: 1.5rem; margin: 2.5rem 0 1rem; color: var(--ink); font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; }
.module-content h3:first-child { margin-top: 0; }
.module-content h4 { font-size: 1.2rem; margin: 2rem 0 0.75rem; color: var(--ink); font-weight: 600; }
.module-content p { margin-bottom: 1rem; color: var(--text); }
.module-content ul, .module-content ol { margin: 1.5rem 0; padding-left: 1.5rem; }
.module-content li { margin-bottom: 0.6rem; color: var(--text); }
.module-content li strong { color: var(--accent); font-weight: 600; }
.module-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
/* iridescent hairline — warm clay fading into cool glow */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-line) 35%, var(--glow-line) 65%, transparent);
    opacity: 0.55;
    transition: opacity 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card-icon {
    width: 46px; height: 46px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    overflow: hidden;
}
.card-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.card-icon:has(img) { background: transparent; padding: 0; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; color: var(--ink); font-family: var(--font-display); letter-spacing: -0.01em; }
.card p { font-size: 0.95rem; color: var(--text-2); line-height: 1.6; }

/* ---------- Code blocks ---------- */
.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}
.code-block pre { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.copy-btn {
    position: absolute;
    top: 0.9rem; right: 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--accent);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; align-items: center; gap: 0.4rem;
}
.copy-btn:hover { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

/* ---------- Live demo banner ---------- */
.live-demo {
    display: flex; align-items: center; gap: 1rem;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin: 2rem 0;
    font-weight: 600;
    color: var(--accent);
}
.live-demo i { font-size: 1.4rem; }

/* ---------- Callout ---------- */
.callout {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--highlight-soft);
    border: 1px solid var(--highlight-line);
    border-left: 3px solid var(--highlight-fill);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin: 2rem 0;
}
.callout i { font-size: 1.35rem; color: var(--highlight); margin-top: 2px; }
.callout p { margin: 0; color: var(--text); }

/* ---------- Workshop badge (follow-along videos) ---------- */
.workshop-badge {
    display: inline-block;
    background: var(--accent-2-soft);
    color: var(--accent-2);
    border: 1px solid var(--accent-2-line);
    border-radius: var(--radius-pill);
    padding: 0.15rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.5rem;
    vertical-align: middle;
    white-space: nowrap;
}

/* ---------- Content images ---------- */
.content-image { max-width: 100%; height: auto; border-radius: var(--radius); margin: 2rem 0; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---------- Logo grid ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.logo-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.6rem; text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.logo-item:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.logo-item img { max-width: 100%; max-height: 56px; object-fit: contain; }
.logo-item i { font-size: 1.9rem; color: var(--accent); }
.logo-item span { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }

/* ---------- Key takeaways ---------- */
.key-takeaways {
    background: var(--accent-2-soft);
    border: 1px solid var(--accent-2-line);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    margin: 3rem 0;
}
.key-takeaways h4 { display: flex; align-items: center; gap: 0.75rem; font-size: 1.2rem; margin-bottom: 1.25rem; color: var(--accent-2); font-family: var(--font-display); }
.key-takeaways ul { margin: 0; padding: 0; list-style: none; }
.key-takeaways li { display: flex; align-items: flex-start; gap: 0.9rem; padding: 0.7rem 0; border-bottom: 1px solid var(--accent-2-line); color: var(--text); }
.key-takeaways li:last-child { border-bottom: none; }
.key-takeaways li i { color: var(--accent-2); margin-top: 4px; }

/* ---------- Mermaid ---------- */
.mermaid { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin: 2rem 0; box-shadow: var(--shadow); }

/* ---------- Comparison table ---------- */
.comparison-table { width: 100%; border-collapse: collapse; margin: 2rem 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.comparison-table th, .comparison-table td { padding: 0.95rem 1.4rem; text-align: left; border-bottom: 1px solid var(--border); }
.comparison-table th { background: var(--surface-alt); font-weight: 700; color: var(--accent); font-family: var(--font-body); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: var(--surface-alt); }
.table-wrap { overflow-x: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--surface-alt); border-top: 1px solid var(--border); padding: 3rem 2rem; text-align: center; }
.footer h3 { font-size: 1.9rem; margin-bottom: 1rem; color: var(--ink); }
.footer p { color: var(--text-2); margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-tabs { display: none; }
    .mobile-menu-btn { display: block; }
    .hero { padding: 150px 1rem 60px; }
    .module-header { padding: 1.4rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .logo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease forwards; }

/* ---------- Print ---------- */
@media print {
    .navbar, .module-selector, .theme-toggle, .hero-cta, .copy-btn { display: none !important; }
    body { background: #fff; color: #000; }
}
