/* ── Design Tokens ── */
:root {
    --bg-deep:      #100b09;  /* espresso — deepest bg */
    --bg:           #1c1310;  /* dark roast — page bg   */
    --bg-raised:    #251a15;  /* raised surface          */
    --bg-card:      #2e2018;  /* card bg                 */
    --border:       #3d2b1f;  /* default border          */
    --border-hover: #5c3d28;  /* hover border            */
    --text:         #f4deb8;  /* cream — primary text    */
    --text-muted:   #e8c28a;  /* latte — secondary text  */
    --text-dim:     #b37a48;  /* placeholder / disabled  */
    --accent:       #d4975c;  /* caramel — primary accent*/
    --accent-bright:#e8c28a;  /* accent hover/focus      */
    --accent-dim:   rgba(212, 151, 92, 0.14);
    --accent-glow:  rgba(212, 151, 92, 0.08);
    --green:        #4caf7d;
    --red:          #e06c6c;
    --font-serif:   'Lota', Georgia, 'Times New Roman', serif;
    --font-mono:    'Sometype Mono', 'Monaco', 'Courier New', monospace;
    --font-sans:    'DM Sans', system-ui, sans-serif;
    --radius:       10px;
    --transition:   0.2s ease;
    --max-w:        720px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */

h1, h2, h3 {
    font-family: var(--font-mono);
    font-weight: 600;
    line-height: 1.2;
}

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

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-raised);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--accent);
    word-break: break-all;
}

/* ── Header ── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text);
}
.nav-logo:hover { opacity: 0.6; }

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-menu a {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}
.nav-menu a:hover { color: var(--text); opacity: 1; }

.nav-dropdown {
    position: relative;
}
.nav-dropdown details {
    position: relative;
}
.nav-dropdown summary {
    list-style: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary:hover,
.nav-dropdown details[open] summary {
    color: var(--text);
}
.nav-dropdown .dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 0.5rem);
    min-width: 220px;
    margin: 0;
    padding: 0.5rem 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    list-style: none;
    z-index: 200;
    display: none;
}
.nav-dropdown details[open] .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu li { white-space: nowrap; }
.nav-dropdown .dropdown-menu a,
.nav-dropdown .dropdown-disabled {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.nav-dropdown .dropdown-menu a:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text);
}
.nav-dropdown .dropdown-disabled { cursor: default; color: var(--text-dim); }
.nav-dropdown summary:focus { outline: none; }
@media (max-width: 600px) {
    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
    }
}

/* ── Main ── */

.main-content {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Hero ── */

.hero {
    padding: 4rem 0 3rem;
}

.hero-eyebrow {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    letter-spacing: 0.04em;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    color: var(--text);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-bio {
    font-size: 1.0625rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 560px;
    margin-bottom: 1.5rem;
}

.hero-bio a {
    color: var(--accent);
    border-bottom: 1px solid var(--accent-dim);
    transition: border-color var(--transition), opacity var(--transition);
}
.hero-bio a:hover {
    opacity: 1;
    border-bottom-color: var(--accent);
}

/* ── Sections ── */

.content-section {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
}

.section-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
}

/* ── Feature Cards ── */

.feature-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.feature-card .feature-icon {
    font-size: 1.5rem;
    color: var(--accent);
    opacity: 0.8;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Tabs ── */

.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 2rem;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.125rem;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
    letter-spacing: 0.01em;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn i { margin-right: 0.375rem; }

.tab-pane { display: none; padding-bottom: 4rem; }
.tab-pane.active { display: block; }

/* ── About / Prose ── */

.prose {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.8;
}
.prose p + p { margin-top: 1rem; }
.prose a { color: var(--accent); border-bottom: 1px solid var(--accent-dim); }
.prose a:hover { border-bottom-color: var(--accent); opacity: 1; }
.prose strong { color: var(--text); font-weight: 600; }
.prose h3 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.prose ul, .prose ol {
    margin-left: 1.25rem;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}
.prose li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}
.prose li strong { color: var(--text); }

/* ── Steps (How it Works) ── */

.steps {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }

.step-num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    margin-top: 0.1rem;
    font-family: var(--font-mono);
}

.step-body h3 {
    font-family: var(--font-serif);
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.step-body p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── Code Blocks ── */

.code-block {
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    overflow: hidden;
}

.code-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
    background: var(--bg-raised);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.05em;
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.code-block code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ── Footer ── */

.site-footer {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
    border-top: 1px solid var(--border);
    font-size: 0.8125rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); opacity: 1; }

/* ── Responsive ── */

@media (max-width: 600px) {
    .hero { padding: 2.5rem 0 2rem; }
    .feature-cards { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
}
