/* ============================================================
   lune.dev — Editorial Lunar
   Palette:
     --new-moon       #0c0c14   Nouvelle Lune (primary background)
     --moonlight      #1a1a2e   Clair de Lune (secondary surface)
     --croissant      #d4c5a9   Croissant Gold (heading text, accent)
     --parchemin      #e8e0d0   Parchemin (body text)
     --crepuscule     #4a4a6a   Crépuscule (borders, subtle)
     --lavande        #7b6fa0   Lavande (links)
     --pleine-lune    #f0e8d8   Pleine Lune (rare bright accent)
   Fonts: Cormorant (display), Crimson Pro (body), Fira Code (code)
============================================================ */

:root {
    --new-moon:    #0c0c14;
    --moonlight:   #1a1a2e;
    --croissant:   #d4c5a9;
    --parchemin:   #e8e0d0;
    --crepuscule:  #4a4a6a;
    --lavande:     #7b6fa0;
    --pleine-lune: #f0e8d8;

    --font-display: "Cormorant", "Cormorant Garamond", Georgia, serif;
    --font-body:    "Crimson Pro", "Crimson Text", Georgia, serif;
    --font-mono:    "Fira Code", "JetBrains Mono", "Menlo", monospace;

    --gutter: clamp(1.25rem, 4vw, 4rem);
    --section-gap: clamp(4rem, 10vh, 8rem);
    --content-max: 1280px;
    --rule-color: var(--crepuscule);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--new-moon);
    color: var(--parchemin);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body {
    /* Layered moonlight background: a soft top-vignette + a quiet radial glow */
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(123, 111, 160, 0.10), transparent 60%),
        radial-gradient(ellipse 60% 40% at 90% 110%, rgba(212, 197, 169, 0.05), transparent 60%),
        var(--new-moon);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Subtle film-grain overlay using a CSS noise via stacked tiny radial dots */
.ambient-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    mix-blend-mode: overlay;
    background-image:
        radial-gradient(rgba(232, 224, 208, 0.04) 1px, transparent 1px),
        radial-gradient(rgba(232, 224, 208, 0.03) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    background-position: 0 0, 1px 2px;
}

a {
    color: var(--lavande);
    text-decoration: none;
    border-bottom: 1px solid rgba(123, 111, 160, 0.35);
    transition: color 320ms ease, border-color 320ms ease, letter-spacing 320ms ease;
}
a:hover {
    color: var(--pleine-lune);
    border-bottom-color: var(--pleine-lune);
}

p {
    margin: 0 0 1.4em;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--parchemin);
    font-size: 1.05rem;
    line-height: 1.8;
    font-feature-settings: "onum" 1, "liga" 1;
}

::selection {
    background: rgba(212, 197, 169, 0.25);
    color: var(--pleine-lune);
}

/* ============================================================
   MASTHEAD
============================================================ */
.masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(12, 12, 20, 0.94) 60%, rgba(12, 12, 20, 0));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.5rem var(--gutter) 2rem;
    border-bottom: 1px solid rgba(74, 74, 106, 0.35);
}
.masthead-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}
.masthead-marque {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    color: var(--croissant);
    font-style: italic;
}
.masthead-name { letter-spacing: 0.06em; }
.masthead-dot { color: var(--crepuscule); margin: 0 0.05em; }
.masthead-tld { font-style: normal; font-weight: 300; color: var(--parchemin); letter-spacing: 0.18em; font-size: 0.9rem; text-transform: uppercase; }

.masthead-nav {
    display: flex;
    justify-content: center;
    gap: 2.25rem;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
}
.masthead-nav a {
    color: var(--parchemin);
    border-bottom: none;
    position: relative;
    padding-bottom: 4px;
    letter-spacing: 0.02em;
}
.masthead-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--croissant);
    transition: width 480ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.masthead-nav a:hover { color: var(--croissant); }
.masthead-nav a:hover::after { width: 100%; }
.masthead-nav a.is-active { color: var(--croissant); }
.masthead-nav a.is-active::after { width: 100%; }

.masthead-issue {
    font-family: var(--font-display);
    text-align: right;
    line-height: 1;
}
.issue-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--crepuscule);
    margin-bottom: 0.25rem;
}
.issue-no {
    display: block;
    font-style: italic;
    font-weight: 400;
    color: var(--croissant);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

/* ============================================================
   HERO
============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem var(--gutter) 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-rule {
    position: absolute;
    left: 50%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--crepuscule), transparent);
    transform: translateX(-50%);
}
.hero-rule-top    { top: 5rem;    height: 4rem; }
.hero-rule-bottom { bottom: 4rem; height: 4rem; }

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--crepuscule);
    letter-spacing: 0.1em;
    margin-bottom: 3.5rem;
}
.hero-eyebrow-line {
    display: inline-block;
    width: 3rem;
    height: 1px;
    background: var(--crepuscule);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3rem, 18vw, 14rem);
    line-height: 0.92;
    margin: 0;
    color: var(--croissant);
    text-shadow: 0 0 40px rgba(212, 197, 169, 0.18), 0 0 80px rgba(123, 111, 160, 0.10);
    letter-spacing: -0.01em;
    font-style: italic;
}
.hero-title-word {
    display: inline-block;
    background: linear-gradient(180deg, var(--pleine-lune) 0%, var(--croissant) 50%, #b8a98c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-crescent {
    margin: 2.5rem 0 1.75rem;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 12px rgba(212, 197, 169, 0.22));
}
.hero-crescent svg { display: block; }
.hero-crescent svg path {
    fill: none;
    stroke: var(--croissant);
    stroke-width: 1;
}

.hero-tagline {
    font-family: var(--font-body);
    font-style: italic;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    color: var(--parchemin);
    letter-spacing: 0.02em;
    max-width: 36rem;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.9rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crepuscule);
}
.hero-meta-divider { color: var(--crepuscule); opacity: 0.6; }
.hero-meta-item { color: var(--croissant); opacity: 0.8; }

.hero-scroll-cue {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--crepuscule);
}
.hero-scroll-line {
    width: 1px;
    height: 2.5rem;
    background: linear-gradient(to bottom, var(--crepuscule), transparent);
    animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); transform-origin: top; }
    50%      { opacity: 1;   transform: scaleY(1.25); transform-origin: top; }
}

/* ============================================================
   EDITORIAL SPREADS
============================================================ */
.spread {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--section-gap) var(--gutter);
    display: grid;
    gap: clamp(2rem, 6vw, 5rem);
    position: relative;
    border-top: 1px solid rgba(74, 74, 106, 0.18);
}

.spread-left  { grid-template-columns: minmax(120px, 1fr) 2fr; }
.spread-right { grid-template-columns: 2fr minmax(120px, 1fr); }

.spread-aside {
    position: relative;
    padding-right: clamp(1rem, 2vw, 2rem);
}
.spread-right .spread-aside {
    padding-right: 0;
    padding-left: clamp(1rem, 2vw, 2rem);
}
.spread-aside-inner {
    position: sticky;
    top: 7.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
}
.spread-right .spread-aside-inner {
    align-items: flex-end;
    text-align: right;
}

.spread-mini-crescent {
    width: 24px;
    height: 24px;
    opacity: 0.85;
}
.spread-mini-crescent svg path {
    fill: none;
    stroke: var(--croissant);
    stroke-width: 1;
}

.spread-number {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(4rem, 8vw, 7rem);
    line-height: 1;
    color: var(--crepuscule);
    letter-spacing: -0.02em;
    transition: color 720ms ease, transform 720ms ease;
}
.spread:hover .spread-number {
    color: var(--croissant);
}

.spread-subtitle {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.05rem;
    color: var(--parchemin);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.spread-rule {
    width: 1px;
    height: clamp(8rem, 28vh, 18rem);
    background: linear-gradient(to bottom, var(--crepuscule), rgba(74, 74, 106, 0));
    margin-top: 0.5rem;
}
.spread-right .spread-aside .spread-rule { align-self: flex-end; }

.spread-folio {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--crepuscule);
    opacity: 0.8;
}

.spread-body {
    max-width: 38em;
    padding-top: 0.75rem;
}
.spread-right .spread-body {
    margin-left: 0;
}

.spread-deck {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--croissant);
    letter-spacing: 0.04em;
    margin: 0 0 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(74, 74, 106, 0.45);
    line-height: 1.55;
}

.spread-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--parchemin);
    line-height: 1.15;
    margin: 0 0 1.75rem;
    letter-spacing: -0.005em;
}

.spread-lede {
    font-family: var(--font-body);
    font-size: 1.18rem;
    line-height: 1.75;
    color: var(--parchemin);
    margin-bottom: 1.6em;
}
.spread-lede::first-letter {
    font-family: var(--font-display);
    float: left;
    font-size: 4em;
    line-height: 0.85;
    padding: 0.1em 0.12em 0 0;
    color: var(--croissant);
    font-weight: 400;
    font-style: italic;
}

/* Pull-quote */
.spread-pullquote {
    margin: 2.5rem 0;
    padding: 1.5rem 2rem;
    border-left: 1px solid var(--croissant);
    position: relative;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.5;
    color: var(--croissant);
}
.spread-pullquote p {
    color: inherit;
    font-family: inherit;
    font-style: inherit;
    font-size: inherit;
    margin: 0 0 0.75em;
    line-height: inherit;
}
.spread-pullquote .pullquote-mark {
    color: var(--crepuscule);
    font-size: 1.75em;
    line-height: 0;
    position: relative;
    top: 0.2em;
    margin-right: 0.15em;
}
.spread-pullquote .pullquote-mark-end { margin-right: 0; margin-left: 0.15em; }
.spread-pullquote cite {
    display: block;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--parchemin);
    margin-top: 0.5rem;
    opacity: 0.75;
}

/* ============================================================
   ATELIER (Chapter 02 list)
============================================================ */
.atelier-list {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0;
    counter-reset: atelier;
}
.atelier-item {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(74, 74, 106, 0.35);
    align-items: baseline;
    transition: background 480ms ease, padding 480ms ease;
}
.atelier-item:hover {
    background: linear-gradient(90deg, rgba(123, 111, 160, 0.05), transparent);
    padding-left: 0.5rem;
}
.atelier-item:last-child { border-bottom: none; }
.atelier-roman {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--crepuscule);
    line-height: 1;
}
.atelier-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--croissant);
    margin: 0 0 0.4em;
    letter-spacing: 0.02em;
}
.atelier-desc {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--parchemin);
    margin: 0;
}

/* ============================================================
   CODEX (Chapter 03 — code block)
============================================================ */
.codex-code {
    margin: 2rem 0;
    padding: 0;
    background: var(--moonlight);
    border: 1px solid rgba(74, 74, 106, 0.55);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(212, 197, 169, 0.04) inset, 0 12px 28px -16px rgba(0, 0, 0, 0.6);
}
.codex-caption {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.85rem;
    color: var(--croissant);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(74, 74, 106, 0.4);
    background: rgba(12, 12, 20, 0.5);
}
.codex-caption-em { color: var(--parchemin); text-transform: none; font-style: italic; letter-spacing: 0.04em; }
.codex-pre {
    margin: 0;
    padding: 1.25rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.75;
    color: var(--parchemin);
    overflow-x: auto;
    white-space: pre;
}
.codex-pre code { font-family: inherit; }
.tok-c { color: var(--crepuscule); font-style: italic; }
.tok-k { color: var(--lavande); }
.tok-f { color: var(--croissant); }
.tok-v { color: var(--parchemin); }
.tok-m { color: var(--pleine-lune); }

.codex-margin {
    border-top: 1px dashed rgba(74, 74, 106, 0.6);
    padding-top: 1rem;
    margin-top: 1.75rem;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--parchemin);
    opacity: 0.85;
}
.codex-margin-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    color: var(--croissant);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-right: 0.25em;
}

/* ============================================================
   ÉPHÉMÉRIDES (Chapter 04 list)
============================================================ */
.ephemera-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    border-top: 1px solid rgba(74, 74, 106, 0.45);
}
.ephemera-row {
    display: grid;
    grid-template-columns: 6rem 2.5rem 1fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(74, 74, 106, 0.45);
    transition: background 360ms ease;
}
.ephemera-row:hover {
    background: linear-gradient(90deg, transparent, rgba(212, 197, 169, 0.06), transparent);
}
.ephemera-date {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--croissant);
    letter-spacing: 0.12em;
}
.ephemera-phase {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--croissant);
    background: var(--new-moon);
    position: relative;
    overflow: hidden;
    justify-self: center;
    box-shadow: 0 0 12px rgba(212, 197, 169, 0.12);
}
/* mini phases */
.ephemera-phase-new::before { content: ""; position: absolute; inset: 0; background: var(--new-moon); }
.ephemera-phase-crescent::before {
    content: ""; position: absolute; inset: 0;
    background: var(--croissant);
    clip-path: polygon(60% 0, 100% 0, 100% 100%, 60% 100%);
}
.ephemera-phase-quarter::before {
    content: ""; position: absolute; inset: 0;
    background: var(--croissant);
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}
.ephemera-phase-gibbous::before {
    content: ""; position: absolute; inset: 0;
    background: var(--croissant);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 20% 100%);
}
.ephemera-phase-full::before {
    content: ""; position: absolute; inset: 0;
    background: var(--pleine-lune);
}

.ephemera-title {
    font-family: var(--font-body);
    font-size: 1.02rem;
    color: var(--parchemin);
    line-height: 1.55;
}

/* ============================================================
   CORRESPONDANCE (Chapter 05 — form)
============================================================ */
.correspondence-form {
    margin: 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.field-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(74, 74, 106, 0.4);
}
.field-row-submit {
    border-bottom: none;
    padding-bottom: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}
.field-label {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--croissant);
    letter-spacing: 0.1em;
}
.field-roman {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--crepuscule);
    margin-right: 0.4em;
    letter-spacing: 0.04em;
}
.field-input {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(212, 197, 169, 0.3);
    color: var(--parchemin);
    font-family: var(--font-body);
    font-size: 1.1rem;
    padding: 0.4rem 0;
    outline: none;
    transition: border-color 360ms ease, padding-left 360ms ease;
    border-radius: 0;
}
.field-input::placeholder {
    color: var(--crepuscule);
    font-style: italic;
    opacity: 0.85;
}
.field-input:focus {
    border-bottom-color: var(--croissant);
    padding-left: 0.25rem;
}
.field-textarea {
    resize: vertical;
    min-height: 5rem;
    line-height: 1.6;
}

.field-submit {
    appearance: none;
    background: transparent;
    border: 1px solid var(--croissant);
    color: var(--croissant);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.85rem 1.75rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    transition: background 480ms ease, color 480ms ease, letter-spacing 480ms ease;
}
.field-submit:hover {
    background: var(--croissant);
    color: var(--new-moon);
    letter-spacing: 0.22em;
}
.field-submit-mark { opacity: 0.6; }
.field-submit-glyph { font-size: 1.05em; line-height: 1; }

.field-confirm {
    margin: 0;
    flex: 1 1 16rem;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--crepuscule);
    line-height: 1.55;
    transition: color 480ms ease;
}
.field-confirm[data-state="sent"] {
    color: var(--croissant);
}

/* ============================================================
   COLOPHON
============================================================ */
.colophon {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: clamp(3rem, 8vh, 6rem) var(--gutter) 4rem;
}
.colophon-rule {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--crepuscule), transparent);
    margin-bottom: 3rem;
}
.colophon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem 3rem;
    margin-bottom: 3rem;
}
.colophon-cell {
    border-left: 1px solid rgba(74, 74, 106, 0.45);
    padding-left: 1.25rem;
}
.colophon-label {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--croissant);
    margin-bottom: 0.85rem;
}
.colophon-body {
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--parchemin);
    opacity: 0.9;
    margin: 0;
}
.colophon-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    color: var(--crepuscule);
    text-transform: uppercase;
    padding-top: 2rem;
    border-top: 1px solid rgba(74, 74, 106, 0.25);
}
.colophon-mark {
    font-size: 1.4rem;
    color: var(--croissant);
    line-height: 1;
}

/* ============================================================
   LUNAR INDICATOR (fixed, scroll-driven)
============================================================ */
.lunar-indicator {
    position: fixed;
    right: clamp(1rem, 3vw, 2.25rem);
    bottom: clamp(1rem, 3vw, 2.25rem);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    z-index: 60;
    pointer-events: none;
    background: var(--new-moon);
    box-shadow: 0 0 0 1px var(--crepuscule);
    overflow: hidden;
}
.lunar-indicator-dark { position: absolute; inset: 0; background: var(--new-moon); }
.lunar-indicator-lit {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 35% 35%, var(--pleine-lune), var(--croissant) 75%);
    /* Default: full new moon (nothing visible); JS updates clip-path to reveal lit portion */
    clip-path: inset(0 100% 0 0);
    transition: clip-path 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.lunar-indicator-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(212, 197, 169, 0.18);
    pointer-events: none;
}

/* ============================================================
   SECTION MARKER (small fixed chapter readout, top-right)
============================================================ */
.section-marker {
    position: fixed;
    left: clamp(1rem, 3vw, 2.25rem);
    bottom: clamp(1rem, 3vw, 2.25rem);
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-family: var(--font-display);
    font-style: italic;
    color: var(--crepuscule);
    pointer-events: none;
    transition: color 480ms ease, opacity 480ms ease;
    opacity: 0.7;
}
.section-marker-label {
    font-size: 0.65rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
}
.section-marker-value {
    font-size: 1.15rem;
    color: var(--croissant);
    letter-spacing: 0.06em;
}

/* ============================================================
   ANIMATIONS — crescent path-draw
============================================================ */
.hero-crescent svg path {
    /* JS sets stroke-dasharray + offset, then animates to 0 */
    transition: stroke-dashoffset 1500ms cubic-bezier(0.65, 0, 0.35, 1);
}

/* fade-in for spreads on scroll */
.spread,
.colophon {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 900ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.spread.is-visible,
.colophon.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* hero fade-in is immediate */
.hero { opacity: 1; }
.hero-eyebrow,
.hero-title,
.hero-tagline,
.hero-meta,
.hero-scroll-cue {
    opacity: 0;
    animation: heroFade 1200ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-eyebrow    { animation-delay: 200ms; }
.hero-title      { animation-delay: 480ms; }
.hero-crescent   { /* drawn via stroke-dashoffset, no fade needed */ }
.hero-tagline    { animation-delay: 1500ms; }
.hero-meta       { animation-delay: 1800ms; }
.hero-scroll-cue { animation-delay: 2100ms; }

@keyframes heroFade {
    0%   { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
    .masthead-inner {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    .masthead-nav {
        order: 3;
        grid-column: 1 / -1;
        justify-content: flex-start;
        gap: 1.25rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    .masthead-issue { text-align: right; }
}

@media (max-width: 768px) {
    body { font-size: 17px; }

    .hero { padding: 5rem 1.25rem 3rem; }
    .hero-title { font-size: clamp(4.5rem, 28vw, 9rem); }
    .hero-eyebrow { font-size: 0.85rem; gap: 0.6rem; margin-bottom: 2.5rem; }
    .hero-eyebrow-line { width: 1.75rem; }

    .spread-left,
    .spread-right {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .spread-aside,
    .spread-right .spread-aside {
        padding: 0;
        order: -1;
    }
    .spread-aside-inner {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 1rem 1.25rem;
    }
    .spread-right .spread-aside-inner {
        align-items: center;
        text-align: left;
    }
    .spread-mini-crescent { order: 1; }
    .spread-number {
        font-size: clamp(3rem, 15vw, 5rem);
        order: 2;
    }
    .spread-subtitle { order: 3; }
    .spread-rule { display: none; }
    .spread-folio { order: 4; width: 100%; }

    .spread-body { max-width: none; }

    .atelier-item {
        grid-template-columns: 3rem 1fr;
        gap: 0.75rem;
    }

    .ephemera-row {
        grid-template-columns: 5rem 1.75rem 1fr;
        gap: 0.75rem;
        font-size: 0.95rem;
    }

    .field-row-submit { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
    .field-submit { width: 100%; justify-content: center; }

    .colophon-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero-meta { font-size: 0.72rem; gap: 0.5rem; letter-spacing: 0.14em; }
    .hero-meta-divider { display: none; }
    .hero-meta-item { display: inline-block; }
    .lunar-indicator { right: 0.85rem; bottom: 0.85rem; }
    .section-marker  { left:  0.85rem; bottom: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    .spread,
    .colophon { opacity: 1; transform: none; }
    .hero-eyebrow,
    .hero-title,
    .hero-tagline,
    .hero-meta,
    .hero-scroll-cue { opacity: 1; }
}
