/* really sus — shared stylesheet (earth-tone design system, see CLAUDE.md) */

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

:root {
    --bg: #FEF3C7;
    --bg-card: #FDF6E3;
    --primary: #92400E;
    --secondary: #B45309;
    --text: #78350F;
    --text-muted: #A16207;
    --accent: #FBBF24;
    --border: #E5D9C3;
    --nav-h: 5rem;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Anonymous Pro', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- nav (rendered by js/nav.js into <nav id="site-nav">) ---------- */
#site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    min-height: var(--nav-h);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, var(--bg) 70%, transparent);
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 20px rgba(120, 53, 15, 0.08);
    white-space: nowrap;
}

.nav-links a { font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--secondary); }
.nav-links a.active { color: var(--primary); font-weight: 700; }
.nav-links a.disabled { color: var(--border); cursor: not-allowed; pointer-events: none; }

.logo {
    margin-left: auto;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.logo:hover { color: var(--text); }

/* ---------- home hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 400px; }

/* ---------- long-form pages: TOC rail + article ---------- */
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 7rem 2rem 5rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 4rem;
    align-items: start;
}

aside.toc { position: sticky; top: 7rem; font-size: 0.85rem; }
.toc-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.toc ul { list-style: none; border-left: 1px solid var(--border); }
.toc li a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text-muted);
    border-left: 2px solid transparent;
    margin-left: -1px;
    transition: color 0.2s, border-color 0.2s;
}
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 700; }

article { min-width: 0; }
article header { margin-bottom: 3rem; }
article h1, .page-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.subtitle { color: var(--text-muted); }

section { margin-bottom: 4rem; scroll-margin-top: 6rem; }
section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
section p { margin-bottom: 1.25rem; }

section p a {
    color: var(--secondary);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
}
section p a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- photos + lightbox (js/lightbox.js) ---------- */
figure { margin: 2rem 0; }
figure img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    display: block;
    transition: opacity 0.2s;
    background: var(--bg-card);
}
figure img:hover { opacity: 0.9; }
figure figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.photo-row figure { margin: 0; }

/* placeholder box until a real photo exists */
.ph {
    aspect-ratio: 4 / 3;
    background: repeating-linear-gradient(45deg,
        var(--bg-card), var(--bg-card) 12px, var(--border) 12px, var(--border) 13px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: zoom-in;
}
.ph:hover { opacity: 0.85; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(40, 20, 5, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1000;
    cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 95vh; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--bg);
    font-size: 1.5rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ---------- designs gallery ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 7rem 2rem 5rem; }
.wrap > header { margin-bottom: 3rem; }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    list-style: none;
}
.tile a {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tile a:hover, .tile a:focus-visible {
    transform: translateY(-3px);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.12);
}
.tile img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.tile .tile-name { display: block; padding: 0.9rem 1.1rem 0.2rem; font-weight: 700; }
.tile .tile-blurb { display: block; padding: 0 1.1rem 1rem; font-size: 0.85rem; color: var(--text-muted); }

/* ---------- design page ---------- */
.back { display: inline-block; margin-bottom: 1.5rem; font-size: 0.85rem; color: var(--text-muted); }
.back:hover { color: var(--secondary); }

.viewer {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
}
.viewer:active { cursor: grabbing; }
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer img.poster { width: 100%; height: 100%; object-fit: contain; }
.viewer .hint {
    position: absolute;
    bottom: 0.75rem; left: 0; right: 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    pointer-events: none;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0; }
.btn {
    display: inline-block;
    padding: 0.7rem 1.3rem;
    border-radius: 50px;
    border: 1px solid var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--primary); color: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--text); }
.btn.primary:hover { background: var(--secondary); border-color: var(--secondary); color: var(--bg); }

.specs { list-style: none; border-top: 1px solid var(--border); }
.specs li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.specs b { display: inline-block; min-width: 9rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .page { grid-template-columns: 1fr; gap: 2rem; padding: 8rem 1.25rem 3rem; }
    aside.toc {
        position: static;
        background: var(--bg-card);
        padding: 1rem;
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    .toc ul { border-left: none; display: flex; flex-wrap: wrap; gap: 0.25rem; }
    .toc li a { padding: 0.25rem 0.6rem; border-left: none; border-radius: 4px; }
    .toc li a.active { background: var(--bg); border-left: none; }
}

/* below this the centred pill would collide with the wordmark: stack them */
@media (max-width: 760px) {
    #site-nav { flex-direction: column-reverse; gap: 0.6rem; padding: 0.75rem 1rem 1.25rem; }
    .nav-links {
        position: static;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
        white-space: normal;
        gap: 0.4rem 1rem;
        padding: 0.55rem 1.1rem;
    }
    .nav-links a { font-size: 0.8rem; }
    .logo { margin: 0; font-size: 0.85rem; }
    .page, .wrap { padding-top: 8.5rem; }
    .wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
    section { scroll-margin-top: 8.5rem; }
    .hero h1 { font-size: 2.5rem; letter-spacing: -1px; }
    .hero p { font-size: 1rem; }
}

@media (max-width: 640px) {
    .photo-row { grid-template-columns: 1fr; }
}
