/* ============================================
   namu.club - Scholarly Muji Broken-Grid
   ============================================ */
:root {
    --unbleached-cream: #F5F0E8;
    --warm-parchment: #EDE6D8;
    --deep-charcoal: #2B2522;
    --muted-walnut: #6B5E54;
    --burgundy-cloth: #7A2E3B;
    --faded-burgundy: #9E4A58;
    --dusty-rose: #C2877E;
    --oxidized-bronze: #8B7D6B;
    --pale-taupe: #D4CBBF;
    --deep-claret: #5E1A28;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
    font-size: 18px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body {
    background: var(--unbleached-cream);
    color: var(--deep-charcoal);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    font-feature-settings: "liga" 1, "kern" 1, "onum" 1;
    overflow-x: hidden;
}

/* ==============================
   BROKEN GRID
   ============================== */
.broken-grid {
    display: grid;
    grid-template-columns: [margin-start] 1fr [content-start] 2fr [offset-start] 5fr [content-end] 2fr [margin-end] 1fr;
    min-height: 100vh;
    padding: 89px clamp(1rem, 4vw, 3rem);
    position: relative;
}

/* ==============================
   TITLE PAGE
   ============================== */
.section--title {
    background: var(--unbleached-cream);
}
.section--title .broken-grid {
    align-items: start;
    padding-top: 25vh;
}
.site-title {
    grid-column: margin-start / offset-start;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--burgundy-cloth);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.site-title:hover {
    transform: scale(0.98);
}
.site-subtitle {
    grid-column: offset-start / margin-end;
    align-self: start;
    margin-top: 40px;
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--muted-walnut);
    max-width: 420px;
}

/* Grid Annotations */
.grid-annotation {
    position: absolute;
    z-index: 2;
}
.annotation--tl {
    top: 34px;
    left: clamp(1rem, 4vw, 3rem);
}
.coord, .timestamp {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    line-height: 1.6;
    letter-spacing: 0.05em;
    color: var(--muted-walnut);
    opacity: 0.5;
}

/* ==============================
   NARRATIVE SECTIONS
   ============================== */
.section--narrative {
    background: var(--unbleached-cream);
}
.section--narrative:nth-child(even) {
    background: var(--warm-parchment);
}

.narrative-block {
    padding: 55px 0;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.narrative-block:hover {
    transform: scale(1.015);
}
.narrative-block--right {
    grid-column: offset-start / content-end;
    max-width: 520px;
}
.narrative-block--left {
    grid-column: content-start / offset-start;
    max-width: 680px;
    grid-column-end: content-end;
}

.margin-note {
    grid-column: margin-start / content-start;
    align-self: start;
    padding-top: 62px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--muted-walnut);
    opacity: 0.5;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.margin-note:hover {
    opacity: 1;
    transform: rotate(180deg) scale(1.04);
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: var(--deep-charcoal);
    margin-bottom: 34px;
}

.body-text {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--deep-charcoal);
    margin-bottom: 21px;
}
.body-text em {
    font-style: italic;
    color: var(--muted-walnut);
}

.pull-quote {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    line-height: 1.45;
    color: var(--burgundy-cloth);
    margin: 34px 0 34px 21px;
    padding-left: 21px;
    border-left: 1px solid var(--pale-taupe);
}

/* ==============================
   GENERATIVE INTERLUDES
   ============================== */
.section--interlude {
    position: relative;
    height: 60vh;
    background: var(--unbleached-cream);
    overflow: hidden;
}
.section--interlude-small {
    height: 40vh;
}
.gen-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.gen-canvas:hover {
    transform: scale(1.02);
}
.hash-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.15em;
    color: var(--warm-parchment);
    pointer-events: none;
    z-index: 1;
}

/* ==============================
   COLOPHON
   ============================== */
.section--colophon {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--unbleached-cream);
}
.colophon-block {
    text-align: center;
}
.colophon-domain {
    display: block;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 0.02em;
    color: var(--deep-charcoal);
    margin-bottom: 13px;
}
.colophon-year {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.35em;
    color: var(--muted-walnut);
    opacity: 0.5;
}

/* ==============================
   SCROLL REVEAL
   ============================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(13px);
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1), transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}
[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .broken-grid {
        grid-template-columns: 1fr;
        padding: 55px clamp(1rem, 5vw, 2rem);
    }
    .site-title,
    .site-subtitle,
    .narrative-block--right,
    .narrative-block--left {
        grid-column: 1 / -1;
        max-width: 100%;
    }
    .site-subtitle {
        margin-top: 21px;
    }
    .margin-note {
        writing-mode: horizontal-tb;
        transform: none;
        grid-column: 1 / -1;
        padding-top: 0;
        margin-bottom: 13px;
    }
    .margin-note:hover {
        transform: scale(1.04);
    }
    .section--interlude {
        height: 40vh;
    }
}
