/* =============================================================
   Folio Menu — follows Sam Ngo Universal Design System (design.md)
   Section numbers below map to design.md sections.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&family=Noto+Serif+TC:wght@700&display=swap');

/* §2 Color Palette + §5/§6/§12 theme tokens — dark default */
:root {
    --bg-primary:    #000000;
    --bg-card:       #13131a;
    --bg-card-alt:   #1a1a24;
    --text-primary:  #e8e8ed;
    --text-secondary:#9ca3af;
    --text-muted:    #6b7280;

    --accent:        #FF6B00;
    --accent-hover:  #FF8C42;
    --accent-glow:   rgba(255, 107, 0, 0.15);

    --border:        #1f1f2e;
    --border-strong: #2a2a3a;
    --tag-bg:        #1a1a24;
    --tag-text:      #FF6B00;

    --shadow:        0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-hover:  0 8px 30px rgba(0, 0, 0, 0.3);

    --nav-bg:        rgba(0, 0, 0, 0.92);
    --nav-text:      #e8e8ed;

    --hero-bg:               #000000;
    --hero-text:             #e8e8ed;
    --hero-muted:            #6b7280;
    --hero-orbit:            rgba(255, 107, 0, 0.12);
    --hero-orbit-lg:         rgba(255, 107, 0, 0.06);
    --hero-btn-border:       rgba(255, 255, 255, 0.2);
    --hero-pic-shadow:       0 0 30px rgba(255, 107, 0, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
    --hero-pic-shadow-hover: 0 0 40px rgba(255, 107, 0, 0.25), 0 20px 60px rgba(0, 0, 0, 0.5);

    --timeline-line: #2a2a3a;
    --grain-opacity: 0.04;
}

[data-theme="light"] {
    --bg-primary:    #f5f5f0;
    --bg-card:       #ffffff;
    --bg-card-alt:   #f0efe8;
    --text-primary:  #1a1a1f;
    --text-secondary:#4a4a55;
    --text-muted:    #8a8a95;

    --accent:        #D95A00;
    --accent-hover:  #FF6B00;
    --accent-glow:   rgba(217, 90, 0, 0.10);

    --border:        #e8e6e1;
    --border-strong: #d0cdc6;
    --tag-bg:        #f0ede6;
    --tag-text:      #8A3500;

    --shadow:        0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-hover:  0 8px 30px rgba(0, 0, 0, 0.08);

    --nav-bg:        rgba(245, 245, 240, 0.92);
    --nav-text:      #1a1a1f;

    --hero-bg:               #f5f5f0;
    --hero-text:             #1a1a1f;
    --hero-muted:            #6b7280;
    --hero-orbit:            rgba(217, 90, 0, 0.10);
    --hero-orbit-lg:         rgba(217, 90, 0, 0.05);
    --hero-btn-border:       rgba(26, 26, 31, 0.18);
    --hero-pic-shadow:       0 0 30px rgba(217, 90, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.1);
    --hero-pic-shadow-hover: 0 0 40px rgba(217, 90, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.12);

    --timeline-line: #d0cdc6;
    --grain-opacity: 0.03;
}

/* §3 Typography — base scale */
* { box-sizing: border-box; }

html { font-size: 18px; }

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s ease, color 0.4s ease;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 900;
    font-family: 'Space Mono', monospace;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 16px;
}

h2 {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.01em;
}

.meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

code, kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: var(--bg-card-alt);
    padding: 2px 6px;
    border-radius: 2px;
    border: 1px solid var(--border);
    color: var(--accent);
}

kbd { font-size: 0.7rem; padding: 2px 8px; }

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

/* §17 Accessibility — skip link + focus ring */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--accent);
    color: #0a0a0f;
    padding: 8px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    z-index: 10000;
    border-radius: 2px;
}
.skip-link:focus { left: 8px; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* §5 Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid transparent;
    padding: 0 32px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-brand {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}
.nav-brand svg { color: var(--accent); flex-shrink: 0; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-links a {
    color: var(--nav-text);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    opacity: 0.65;
    transition: opacity 0.25s;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    color: var(--nav-text);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 1.5px;
    background: var(--accent);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--nav-text);
    font-size: 0.95rem;
    transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.nav-hamburger {
    display: none;
    background: none; border: none;
    font-size: 1.3rem; padding: 4px;
    cursor: pointer;
    color: var(--nav-text);
}

@media (max-width: 768px) {
    .navbar { padding: 0 20px; }
    .nav-hamburger { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px; left: 0; right: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 16px 20px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-links a.active::after { display: none; }
}

/* §6 Hero */
header {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 140px 32px 80px;
    position: relative;
    overflow: hidden;
}
header::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 400px; height: 400px;
    border: 1px solid var(--hero-orbit);
    border-radius: 50%;
    animation: orbit-slow 25s linear infinite;
    pointer-events: none;
}
header::after {
    content: '';
    position: absolute;
    bottom: -200px; left: -100px;
    width: 500px; height: 500px;
    border: 1px solid var(--hero-orbit-lg);
    border-radius: 50%;
    animation: orbit-slow 35s linear infinite reverse;
    pointer-events: none;
}
@keyframes orbit-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.hero-canvas {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
    position: relative; z-index: 1;
}

.hero-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
}
.hero-label::before {
    content: '';
    width: 24px; height: 1px;
    background: var(--accent);
}

header h1 em {
    font-style: italic;
    color: var(--accent);
}

header p.headline {
    font-size: 1.1rem;
    color: var(--hero-muted);
    max-width: 480px;
    line-height: 1.6;
    margin: 0 0 8px;
}

header p.location {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--hero-muted);
    margin: 8px 0 24px;
    letter-spacing: 0.02em;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.contact-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--hero-muted);
    letter-spacing: 0.04em;
}
.contact-hint { opacity: 0.8; }

/* Hero photo slot: the live result card (replaces .profile-pic role) */
.result-card {
    width: 400px;
    padding: 28px 24px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 2px solid var(--accent-glow);
    box-shadow: var(--hero-pic-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-align: center;
    position: relative;
}
.result-card:hover {
    transform: scale(1.02);
    box-shadow: var(--hero-pic-shadow-hover);
}
.result-card.pop { animation: result-pop 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

@keyframes result-pop {
    0%   { transform: scale(0.94); opacity: 0.5; }
    60%  { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); }
}

.result-stamp {
    position: absolute;
    top: 12px; left: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    opacity: 0.85;
}
.result-stamp::before {
    content: '// ';
    color: var(--accent);
}

.result-image {
    display: block;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 30px auto 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg-card-alt);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.result-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-glow);
}
.result-image[hidden] { display: none; }

/* When an image is showing, shrink the emoji so it reads as a caption glyph */
.result-card:has(.result-image:not([hidden])) .result-emoji {
    font-size: 28px;
    margin: 4px 0 8px;
    opacity: 0.75;
}

.result-emoji {
    font-size: 80px;
    line-height: 1;
    margin: 24px 0 16px;
}
.result-name {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.result-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
    min-height: 18px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    header { padding: 110px 20px 60px; }
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero-photo { order: -1; display: flex; justify-content: center; }
    .result-card { width: 100%; max-width: 380px; }
    .result-image { max-width: 300px; }
}

/* Image lightbox — click a result image to enlarge */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}
.image-lightbox.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s linear 0s;
}
.image-lightbox img {
    max-width: min(92vw, 900px);
    max-height: 88vh;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px var(--accent-glow);
    background: var(--bg-card-alt);
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: zoom-out;
}
.image-lightbox.open img { transform: scale(1); }
.image-lightbox-close {
    position: absolute;
    top: 20px; right: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--hero-btn-border);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}
.image-lightbox-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}
.image-lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    pointer-events: none;
}
body.lightbox-open { overflow: hidden; }

/* §7 Section structure */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
    position: relative;
    z-index: 1;
}

section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 36px 40px;
    margin-bottom: 20px;
    transition: background 0.3s, border-color 0.3s;
    position: relative;
}

section h2 {
    color: var(--text-primary);
    margin: 0 -40px 24px;
    padding: 0 40px 12px;
    border-bottom: 1px solid var(--border);
}
section h2::before {
    content: '// ';
    color: var(--accent);
    font-weight: 400;
}

.summary-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 20px;
}

@media (max-width: 768px) {
    section { padding: 28px 24px; }
    section h2 { margin: 0 -24px 20px; padding: 0 24px 12px; }
}

/* §8 Button */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--accent);
    color: #0a0a0f;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #0a0a0f;
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
}
.btn-primary.rolling .spin-btn-text::after {
    content: " …";
}

.btn-outline {
    background: transparent;
    color: var(--hero-text);
    border: 1px solid var(--hero-btn-border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 107, 0, 0.06);
}

/* Filter chips — active state uses accent outline (no yellow/amber per §2) */
fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}
fieldset:last-child { margin-bottom: 0; }
legend {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    padding: 0;
}
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip {
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    color: var(--text-secondary);
    user-select: none;
    letter-spacing: 0.04em;
}
.chip:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}
.chip.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

/* §8 Form input */
.add-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 80px auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 0.88rem;
    font-family: 'Outfit', sans-serif;
    background: var(--bg-card-alt);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}
.add-form > .btn { height: fit-content; }

@media (max-width: 600px) {
    .add-form {
        grid-template-columns: 1fr 1fr;
    }
    .form-group-wide { grid-column: 1 / -1; }
    .add-form > .btn { grid-column: 1 / -1; justify-content: center; }
}

/* Food list */
.food-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--bg-card-alt);
}
.food-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    transition: background 0.15s;
}
.food-list li:last-child { border-bottom: none; }
.food-list li:hover { background: var(--bg-card); }

.food-list .food-emoji { font-size: 22px; width: 28px; text-align: center; }
.food-list .food-name { flex: 1; font-weight: 500; color: var(--text-primary); }
.food-list .food-tags {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.food-list .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-muted);
    padding: 0 6px;
    line-height: 1;
    transition: color 0.15s;
}
.food-list .delete-btn:hover { color: var(--accent); }

.food-list .default-badge {
    font-family: 'JetBrains Mono', monospace;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--border);
}

.food-list .empty {
    text-align: center;
    color: var(--text-muted);
    padding: 28px;
    font-style: italic;
    font-size: 0.88rem;
}

/* Suggest section */
.suggest-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.manage-footer {
    margin-top: 16px;
    text-align: right;
}
.link-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-decoration: underline;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px;
    transition: color 0.18s;
}
.link-btn:hover { color: var(--accent); }

/* §9 Footer */
footer {
    text-align: center;
    padding: 48px 24px 32px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
}
.footer-logo { margin-bottom: 8px; }
.footer-logo svg {
    color: var(--accent);
    opacity: 0.6;
}
.footer-tagline {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
    opacity: 0.6;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.footer-links a {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* §10 Motion — scroll-revealed sections */
.fade-in {
    opacity: 0.15;
    transform: translateY(12px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in:nth-child(2) { transition-delay: 0.06s; }
.fade-in:nth-child(3) { transition-delay: 0.12s; }
.fade-in:nth-child(4) { transition-delay: 0.18s; }
.fade-in:nth-child(5) { transition-delay: 0.24s; }

.hero-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hero-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.hero-text .hero-reveal:nth-child(1) { transition-delay: 0.00s; }
.hero-text .hero-reveal:nth-child(2) { transition-delay: 0.10s; }
.hero-text .hero-reveal:nth-child(3) { transition-delay: 0.20s; }
.hero-text .hero-reveal:nth-child(4) { transition-delay: 0.30s; }
.hero-text .hero-reveal:nth-child(5) { transition-delay: 0.40s; }
.hero-text .hero-reveal:nth-child(6) { transition-delay: 0.50s; }
.hero-photo.hero-reveal { transition-delay: 0.20s; }

/* §11 Grain overlay */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: var(--grain-opacity);
    background-image: radial-gradient(circle, var(--text-muted) 0.5px, transparent 0.5px);
    background-size: 24px 24px;
}

/* §10 Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
