/* archetype.moe — a cinematic dual-panel reverie
   Honeyed-neutral · split-screen · frutiger-clean · gradient-mesh · star-celestial */

:root {
    --linen:       #F4E6C8;
    --linen-deep: #EBD9B0;
    --linen-light: #FAF2E1;

    --ink:        #2A2219;
    --espresso:   #5C4A33;
    --tawny:      #8D7754;

    --honey-gold: #D89A3E;
    --dusk-mauve: #B47AA5;
    --twilight:   #7A9ABF;

    --letterbox-h: 48px;
    --gutter:      96px;
    --pad:         72px;
}

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

html, body {
    width: 100%;
    background: var(--linen);
    color: var(--ink);
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-weight: 400;
    font-size: 16.5px;
    line-height: 1.68;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    height: 100vh;
}

/* CANVAS STARFIELD ------------------------------------------------------- */
#starfield {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.22;
    pointer-events: none;
}

/* LETTERBOX BANDS -------------------------------------------------------- */
.letterbox {
    position: fixed;
    left: 0;
    right: 0;
    height: var(--letterbox-h);
    background: var(--linen-deep);
    border-top: 0.5px solid rgba(141, 119, 84, 0.22);
    border-bottom: 0.5px solid rgba(141, 119, 84, 0.22);
    z-index: 50;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.letterbox-top    { top: 0; }
.letterbox-bottom { bottom: 0; }

.lb-inner {
    width: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    font-family: "DM Mono", monospace;
    font-weight: 500;
    font-size: 11px;
    line-height: 1.45;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--espresso);
}

.lb-timecode {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.lb-glyph {
    color: var(--honey-gold);
    font-size: 13px;
    animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1.0; }
}

/* MAIN REEL -------------------------------------------------------------- */
#reel {
    width: 100vw;
}

/* SPREAD PRIMITIVE ------------------------------------------------------- */
.spread {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    background: var(--linen);
}

.spread .panel-deeper.panel-left,
.spread .panel-deeper.panel-right {
    background: var(--linen-deep);
}

.panel {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
}

.panel-left  { padding-right: var(--gutter); padding-left: var(--pad);
               padding-top:    calc(var(--letterbox-h) + var(--pad));
               padding-bottom: calc(var(--letterbox-h) + var(--pad)); }
.panel-right { padding-left:  var(--gutter); padding-right: var(--pad);
               padding-top:    calc(var(--letterbox-h) + var(--pad));
               padding-bottom: calc(var(--letterbox-h) + var(--pad)); }

.panel-pad {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    position: relative;
}
.panel-right .panel-pad { align-items: flex-start; }
.panel-left  .panel-pad { align-items: flex-start; }
.gutter-text { max-width: 38ch; }

.center-content {
    align-items: center !important;
    justify-content: center;
    text-align: center;
}

/* SEAM ------------------------------------------------------------------- */
.seam {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-1px);
    background: linear-gradient(180deg,
        rgba(244, 230, 200, 0) 0%,
        rgba(216, 154, 62, 0.45) 18%,
        rgba(244, 230, 200, 0.85) 50%,
        rgba(216, 154, 62, 0.45) 82%,
        rgba(244, 230, 200, 0) 100%);
    opacity: 0.7;
    z-index: 5;
    animation: breathe 7.2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes breathe {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 0.85; }
}

/* VIGNETTE --------------------------------------------------------------- */
.vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: radial-gradient(ellipse 140% 140% at center,
        transparent 0%,
        transparent 55%,
        rgba(42, 34, 25, 0.06) 90%,
        rgba(42, 34, 25, 0.10) 100%);
}

/* CUES ------------------------------------------------------------------- */
.cue {
    font-family: "DM Mono", monospace;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--espresso);
    margin-bottom: 8px;
}
.cue-right { text-align: left; }

/* TYPOGRAPHY ------------------------------------------------------------- */
.title {
    font-family: "Nunito", sans-serif;
    font-weight: 200;
    font-size: clamp(3.2rem, 8.4vw, 7.6rem);
    letter-spacing: -0.025em;
    line-height: 0.92;
    color: var(--ink);
    position: relative;
}

.title-archetype { color: var(--ink); }
.title-moe {
    color: var(--ink);
    font-style: italic;
    font-weight: 200;
    animation: breathe-text 6.4s ease-in-out infinite 0.6s;
}
@keyframes breathe-text {
    0%, 100% { letter-spacing: -0.025em; opacity: 0.94; }
    50%      { letter-spacing: -0.010em; opacity: 1.0; }
}

.subline {
    font-family: "Nunito Sans", sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: var(--espresso);
    margin-top: 14px;
    font-style: italic;
}
.subline-right { text-align: left; }

.h2 {
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    letter-spacing: -0.012em;
    line-height: 1.08;
    color: var(--ink);
    margin-bottom: 6px;
}
.h2-right { text-align: left; }

.body {
    font-family: "Nunito Sans", sans-serif;
    font-weight: 400;
    font-size: 16.5px;
    line-height: 1.68;
    color: var(--ink);
    margin-bottom: 12px;
    max-width: 38ch;
}
.body-cont { color: var(--espresso); }

.footnote {
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tawny);
    margin-top: 18px;
}
.footnote-right { text-align: right; }

.caption {
    font-family: "Nunito Sans", sans-serif;
    font-weight: 300;
    font-size: 13px;
    color: var(--espresso);
    margin-top: 24px;
    line-height: 1.55;
    text-align: center;
}
.caption em {
    font-style: italic;
    color: var(--ink);
    font-weight: 600;
}
.mono {
    font-family: "DM Mono", monospace;
    font-size: 10.5px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--tawny);
}

/* PULLQUOTE CROSSING SEAM ----------------------------------------------- */
.pullquote-cross {
    position: absolute;
    top: 78%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: baseline;
    z-index: 6;
    font-family: "Nunito", sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    color: var(--espresso);
    font-style: italic;
    pointer-events: none;
}
.pq-left {
    width: 50vw;
    text-align: right;
    padding-right: 14px;
    color: var(--ink);
}
.pq-right {
    width: 50vw;
    text-align: left;
    padding-left: 14px;
    color: var(--ink);
}

/* ORBS (gradient-mesh) --------------------------------------------------- */
.orb {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 0.5px solid rgba(141, 119, 84, 0.4);
    overflow: hidden;
    filter: drop-shadow(0 24px 60px rgba(42, 34, 25, 0.10));
}
.orb-large { width: 320px; height: 320px; }

.orb-mesh {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

/* Manifesto orb — dusk-mauve dominant */
.orb-mesh-1 {
    background:
      radial-gradient(circle at 30% 30%, rgba(180, 122, 165, 0.85) 0%, transparent 35%),
      radial-gradient(circle at 70% 55%, rgba(216, 154, 62, 0.75) 0%, transparent 38%),
      radial-gradient(circle at 50% 80%, rgba(250, 242, 225, 0.95) 0%, transparent 45%),
      radial-gradient(circle at 50% 50%, rgba(180, 122, 165, 0.40) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 18s ease-in-out infinite;
}

/* Wanderer — twilight-cerulean */
.orb-mesh-cerulean {
    background:
      radial-gradient(circle at 30% 30%, rgba(122, 154, 191, 0.85) 0%, transparent 38%),
      radial-gradient(circle at 70% 60%, rgba(180, 122, 165, 0.55) 0%, transparent 38%),
      radial-gradient(circle at 50% 82%, rgba(216, 154, 62, 0.55) 0%, transparent 42%),
      radial-gradient(circle at 50% 50%, rgba(122, 154, 191, 0.30) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 22s ease-in-out infinite;
}
.orb-mesh-mauve {
    background:
      radial-gradient(circle at 30% 30%, rgba(180, 122, 165, 0.85) 0%, transparent 38%),
      radial-gradient(circle at 70% 60%, rgba(122, 154, 191, 0.50) 0%, transparent 38%),
      radial-gradient(circle at 50% 82%, rgba(216, 154, 62, 0.55) 0%, transparent 42%),
      radial-gradient(circle at 50% 50%, rgba(180, 122, 165, 0.30) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 20s ease-in-out infinite reverse;
}
.orb-mesh-tawny {
    background:
      radial-gradient(circle at 30% 30%, rgba(141, 119, 84, 0.85) 0%, transparent 38%),
      radial-gradient(circle at 70% 60%, rgba(216, 154, 62, 0.65) 0%, transparent 40%),
      radial-gradient(circle at 50% 82%, rgba(180, 122, 165, 0.40) 0%, transparent 40%),
      radial-gradient(circle at 50% 50%, rgba(141, 119, 84, 0.20) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 24s ease-in-out infinite;
}

/* moé side — honey-gold dominant (same topology, different hues) */
.orb-mesh-gold-1 {
    background:
      radial-gradient(circle at 30% 30%, rgba(216, 154, 62, 0.90) 0%, transparent 38%),
      radial-gradient(circle at 70% 60%, rgba(180, 122, 165, 0.45) 0%, transparent 38%),
      radial-gradient(circle at 50% 82%, rgba(250, 242, 225, 0.95) 0%, transparent 42%),
      radial-gradient(circle at 50% 50%, rgba(216, 154, 62, 0.30) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 22s ease-in-out infinite;
}
.orb-mesh-gold-2 {
    background:
      radial-gradient(circle at 30% 30%, rgba(216, 154, 62, 0.92) 0%, transparent 38%),
      radial-gradient(circle at 70% 60%, rgba(180, 122, 165, 0.50) 0%, transparent 38%),
      radial-gradient(circle at 50% 82%, rgba(250, 242, 225, 0.95) 0%, transparent 42%),
      radial-gradient(circle at 50% 50%, rgba(216, 154, 62, 0.32) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 20s ease-in-out infinite reverse;
}
.orb-mesh-gold-3 {
    background:
      radial-gradient(circle at 30% 30%, rgba(216, 154, 62, 0.94) 0%, transparent 38%),
      radial-gradient(circle at 70% 60%, rgba(141, 119, 84, 0.45) 0%, transparent 38%),
      radial-gradient(circle at 50% 82%, rgba(250, 242, 225, 0.95) 0%, transparent 42%),
      radial-gradient(circle at 50% 50%, rgba(216, 154, 62, 0.34) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 24s ease-in-out infinite;
}

.orb-mesh-atelier {
    background:
      radial-gradient(circle at 30% 30%, rgba(216, 154, 62, 0.85) 0%, transparent 35%),
      radial-gradient(circle at 70% 55%, rgba(180, 122, 165, 0.65) 0%, transparent 38%),
      radial-gradient(circle at 50% 80%, rgba(250, 242, 225, 0.95) 0%, transparent 45%),
      radial-gradient(circle at 50% 50%, rgba(216, 154, 62, 0.30) 0%, rgba(244, 230, 200, 0.98) 80%);
    animation: orb-drift 26s ease-in-out infinite;
}

@keyframes orb-drift {
    0%, 100% { transform: scale(1.0) rotate(0deg); }
    50%      { transform: scale(1.04) rotate(180deg); }
}

.orb-glyph {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Nunito", sans-serif;
    color: var(--linen-light);
    font-size: 28px;
    opacity: 0.6;
    pointer-events: none;
}

/* FIGURES ---------------------------------------------------------------- */
.figures {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-top: 14px;
}
.figures li {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 22px;
    align-items: center;
    opacity: 0.55;
    transition: opacity 480ms ease;
}
.figures li.active { opacity: 1; }

.figures li .orb {
    width: 96px;
    height: 96px;
}

.fig-meta { display: flex; flex-direction: column; gap: 4px; }
.fig-name {
    font-family: "Nunito", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    letter-spacing: -0.012em;
}
.fig-tag {
    font-family: "DM Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.10em;
    color: var(--tawny);
    text-transform: uppercase;
}
.fig-line {
    font-family: "Nunito Sans", sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: var(--espresso);
    line-height: 1.5;
    font-style: italic;
}

/* PENCIL LINE / SEAM CROSS ---------------------------------------------- */
.pencil-line {
    margin-top: 24px;
    opacity: 0.6;
}

.seam-cross {
    position: absolute;
    pointer-events: none;
    z-index: 7;
}
.seam-cross-3-4 {
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
}
.seam-cross-1 {
    top: 64%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ATELIER SKETCHES ------------------------------------------------------- */
.sketch-collage {
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: 20px;
}
.sketch {
    position: absolute;
    width: 200px;
    height: 160px;
    opacity: 0.85;
}
.sketch-1 { top: 0;    left: 0;    transform: rotate(-3deg); }
.sketch-2 { top: 40px; right: 20px; transform: rotate(2deg); }
.sketch-3 { bottom: 40px; left: 60px; transform: rotate(-1.5deg); }
.sketch-4 { bottom: 0;  right: 40px; transform: rotate(4deg); }

/* CORRESPONDENCE --------------------------------------------------------- */
.spread--correspondence .panel-pad { justify-content: center; }

/* STAR CHART ------------------------------------------------------------- */
.star-chart {
    width: 380px;
    height: 380px;
}
.chart-star {
    font-family: "Nunito", sans-serif;
    font-size: 14px;
    fill: var(--honey-gold);
    cursor: pointer;
    transition: fill 240ms ease, font-size 240ms ease;
    pointer-events: auto;
}
.chart-star:hover {
    fill: var(--twilight);
    font-size: 22px;
}

.reel-list {
    list-style: none;
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.reel-list li {
    display: grid;
    grid-template-columns: 60px 1fr 80px;
    gap: 12px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 0.5px solid rgba(141, 119, 84, 0.18);
    color: var(--espresso);
    font-size: 11px;
}
.reel-list .reel-no { color: var(--honey-gold); font-weight: 500; }
.reel-list .reel-title {
    font-family: "Nunito Sans", sans-serif;
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    color: var(--ink);
    font-style: italic;
    font-weight: 400;
}
.reel-list .reel-date { text-align: right; color: var(--tawny); font-size: 10px; }

/* COLOPHON --------------------------------------------------------------- */
.credits {
    list-style: none;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.credits li {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    align-items: baseline;
    padding-bottom: 8px;
    border-bottom: 0.5px solid rgba(141, 119, 84, 0.16);
}
.cr-role {
    font-family: "DM Mono", monospace;
    font-size: 10.5px;
    letter-spacing: 0.10em;
    color: var(--tawny);
    text-transform: uppercase;
}
.cr-name {
    font-family: "Nunito", sans-serif;
    font-weight: 400;
    color: var(--ink);
    font-size: 15px;
}

.closing-shot { position: relative; width: 300px; height: 300px; }
#constellation-svg { width: 300px; height: 300px; }
.c-star {
    font-family: "Nunito", sans-serif;
    font-size: 22px;
    fill: var(--honey-gold);
    transform-origin: 150px 150px;
    transition: opacity 600ms ease, font-size 600ms ease;
    text-anchor: middle;
}
.final-asterisk {
    font-family: "Nunito", sans-serif;
    font-weight: 200;
    font-size: 10px;
    fill: var(--ink);
    opacity: 0;
    text-anchor: middle;
    transition: opacity 800ms ease, font-size 800ms ease;
}
.constellation-rotated #constellation-group {
    animation: slow-rotate 18s linear infinite;
    transform-origin: 150px 150px;
}
.constellation-resolved .c-star {
    opacity: 0;
    font-size: 6px;
}
.constellation-resolved .final-asterisk {
    opacity: 1;
    font-size: 96px;
}
@keyframes slow-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* COMPASS ---------------------------------------------------------------- */
.compass {
    position: fixed;
    right: 28px;
    bottom: calc(var(--letterbox-h) + 24px);
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 800ms ease;
}
.compass-star {
    background: transparent;
    border: none;
    color: var(--tawny);
    opacity: 0.35;
    font-family: "Nunito", sans-serif;
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: color 320ms ease, opacity 320ms ease, transform 320ms ease;
}
.compass-star .compass-no {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "DM Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.10em;
    color: var(--tawny);
    opacity: 0;
    transition: opacity 240ms ease;
}
.compass-star:hover { opacity: 0.85; }
.compass-star:hover .compass-no { opacity: 0.85; }
.compass-star.active {
    color: var(--honey-gold);
    opacity: 1;
    transform: scale(1.16);
}
.compass.rotating { transform: rotate(8deg); }

/* DRIFT STARS (created by JS) ------------------------------------------- */
.drift-star {
    position: fixed;
    pointer-events: none;
    color: var(--honey-gold);
    font-family: "Nunito", sans-serif;
    font-size: 12px;
    z-index: 70;
    will-change: transform, opacity;
}

/* RESPONSIVE ------------------------------------------------------------- */
@media (max-width: 900px) {
    :root {
        --gutter: 36px;
        --pad:    28px;
    }
    .figures li { grid-template-columns: 72px 1fr; }
    .figures li .orb { width: 72px; height: 72px; }
    .orb { width: 220px; height: 220px; }
    .orb-large { width: 240px; height: 240px; }
    .star-chart { width: 280px; height: 280px; }
    .closing-shot, #constellation-svg { width: 220px; height: 220px; }
    .pullquote-cross { font-size: 0.9rem; top: 86%; }
    .credits li { grid-template-columns: 110px 1fr; gap: 10px; }
    .reel-list li { grid-template-columns: 40px 1fr 60px; }
}
