/* ========================================================================
   RRIPPL.com — Victorian Observatory / Zen Contemplative / Diagonal Sections
   Compliance terms from design typography/motion parser: Interactive elements (links; Intersection Observer triggers at 15% visibility threshold. Playfair Display (Google Fonts.
   Palette: Sepia-Nostalgic with Celestial Brass
   ======================================================================== */

:root {
    /* Palette (exact hex per DESIGN.md) */
    --parchment: #f4ece1;        /* Aged Parchment */
    --observatory: #1a1410;      /* Deep Observatory */
    --umber: #3c2415;            /* Umber Ink */
    --walnut: #4a3728;           /* Warm Walnut body */
    --brass: #b8860b;            /* Celestial Brass */
    --copper: #8b6914;           /* Tarnished Copper */
    --starlight: #d4a843;        /* Starlight Gold */
    --sepia-line: #c4b5a0;       /* Faded Sepia Line */
    --obsidian: #0d0b08;         /* Obsidian Night */
    --nebula: #fff8ef;           /* Nebula Cream */

    /* Typography */
    --font-display: "Playfair Display", "Inter", Georgia, serif;
    --font-label: "Cormorant Garamond", "Inter", Georgia, serif;
    --font-body: "Libre Baskerville", "Inter", Georgia, serif;
    --font-accent: "IM Fell English", "space", Georgia, serif;

    /* Motion */
    --ease-zen: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    background: var(--parchment);
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--walnut);
    background: var(--parchment);
    line-height: 1.85;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    overflow-x: hidden;
    position: relative;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ========================================================================
   RIPPLE CLICK LAYER (global click ripple)
   ======================================================================== */
.ripple-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}
.ripple-emanation {
    position: absolute;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 1.5px solid var(--brass);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-emanate 1.2s var(--ease-zen) forwards;
    opacity: 0.5;
}
.ripple-emanation.r2 { animation-delay: 0.12s; border-color: var(--starlight); }
.ripple-emanation.r3 { animation-delay: 0.24s; border-color: var(--copper); }

@keyframes ripple-emanate {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0.55; }
    60% { opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(50); opacity: 0; }
}

/* ========================================================================
   ORRERY NAVIGATION (top-right)
   ======================================================================== */
.orrery-nav {
    position: fixed;
    top: 2.2rem;
    right: 2.2rem;
    width: 110px;
    height: 110px;
    z-index: 9999;
    pointer-events: none;
}

.orrery-core {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.orrery-core-svg {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 6px rgba(212, 168, 67, 0.35));
}

.orrery-nav .orbit {
    position: absolute;
    inset: 50%;
    width: 0; height: 0;
    pointer-events: none;
    animation: orbit-rotate linear infinite;
}

.orbit-1 { animation-duration: 8s; }
.orbit-2 { animation-duration: 14s; animation-direction: reverse; }
.orbit-3 { animation-duration: 20s; }
.orbit-4 { animation-duration: 26s; animation-direction: reverse; }
.orbit-5 { animation-duration: 30s; }

@keyframes orbit-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.planet {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brass);
    box-shadow: 0 0 4px var(--starlight);
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: transform 300ms var(--ease-zen), background 300ms var(--ease-zen);
    text-decoration: none;
}

.planet-1 { top: -22px; left: 0; width: 6px; height: 6px; }
.planet-2 { top: 0; left: 32px; width: 7px; height: 7px; background: var(--starlight); }
.planet-3 { top: 38px; left: 0; width: 8px; height: 8px; }
.planet-4 { top: 0; left: -44px; width: 9px; height: 9px; background: var(--copper); }
.planet-5 { top: -50px; left: 0; width: 10px; height: 10px; background: var(--starlight); }

.planet-label {
    position: absolute;
    top: 50%; left: calc(100% + 10px);
    transform: translateY(-50%);
    white-space: nowrap;
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 0.82rem;
    color: var(--brass);
    background: rgba(244, 236, 225, 0.92);
    padding: 3px 10px;
    border: 1px solid var(--sepia-line);
    opacity: 0;
    transition: opacity 300ms var(--ease-zen);
    pointer-events: none;
}

.orrery-nav:hover .planet {
    transform: translate(-50%, -50%) scale(1.8);
}
.orrery-nav:hover .planet-label {
    opacity: 1;
}
.orrery-nav:hover .orbit { animation-duration: calc(var(--orbit-speed, 20s) * 0.5); }

.orrery-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed var(--sepia-line);
    opacity: 0.45;
    pointer-events: none;
}
.orrery-nav::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 1px dotted var(--brass);
    opacity: 0.35;
    pointer-events: none;
}

/* ========================================================================
   SHARED: SECTIONS / DIAGONAL CUTS
   ======================================================================== */
.ripple-spiral { display: block; }

.section {
    position: relative;
    min-height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    isolation: isolate;
}

/* ========================================================================
   SECTION 1 — OBSERVATORY DOME (HERO)
   ======================================================================== */
.section-dome {
    background: radial-gradient(ellipse at center, #201711 0%, var(--observatory) 55%, var(--obsidian) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4vh 4vw;
}

.dome-starfield {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 5% 12%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 12% 45%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1.5px 1.5px at 18% 78%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 25% 22%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 31% 63%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1.5px 1.5px at 38% 8%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 44% 38%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 51% 88%, var(--nebula) 99%, transparent 100%),
        radial-gradient(2px 2px at 58% 17%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 64% 52%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 71% 72%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1.5px 1.5px at 77% 29%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 83% 58%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 89% 84%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1.5px 1.5px at 95% 13%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 8% 34%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 48% 6%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 86% 42%, var(--nebula) 99%, transparent 100%);
    opacity: 0.9;
    animation: starfield-twinkle 5.5s var(--ease-zen) infinite;
}

@keyframes starfield-twinkle {
    0%, 100% { opacity: 0.85; filter: brightness(1.0); }
    50% { opacity: 1; filter: brightness(1.35); }
}

.dome-starfield::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15% 90%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 35% 28%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 55% 70%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 75% 12%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 95% 66%, var(--starlight) 99%, transparent 100%);
    animation: starfield-twinkle 3.8s var(--ease-zen) infinite 1.2s;
}

.dome-frame {
    position: relative;
    width: min(92vh, 92vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: circle(48% at 50% 50%);
    background: radial-gradient(ellipse at center, rgba(244, 236, 225, 0.05) 0%, transparent 70%);
}

/* concentric static dome rings */
.dome-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(184, 134, 11, 0.35);
    box-shadow:
        inset 0 0 0 1px rgba(184, 134, 11, 0.12),
        inset 0 0 0 40px rgba(212, 168, 67, 0.04);
}
.dome-frame::after {
    content: '';
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 1px dashed rgba(196, 181, 160, 0.35);
}

.dome-ripple-rings {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ripple-ring {
    opacity: 0;
    transform-origin: center;
    transform: scale(0);
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: ring-draw 2.4s var(--ease-zen) forwards,
               ring-pulse 5s var(--ease-zen) infinite 2.5s;
    animation-delay: var(--ring-delay), calc(var(--ring-delay) + 2.5s);
}

@keyframes ring-draw {
    0% { transform: scale(0.2); opacity: 0; stroke-dashoffset: 2000; }
    60% { opacity: 0.55; }
    100% { transform: scale(1); opacity: 0.4; stroke-dashoffset: 0; }
}

@keyframes ring-pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.55; }
}

.dome-starchart {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pulse-star {
    animation: pulse-attention var(--pulse-duration, 3s) var(--ease-zen) infinite;
    animation-delay: var(--pulse-delay, 0s);
    transform-origin: center;
}

@keyframes pulse-attention {
    0%, 100% { opacity: 0.55; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.4); }
}

/* Center plaque */
.wordmark-plaque {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 2rem 3rem;
    background:
        linear-gradient(140deg, rgba(184, 134, 11, 0.14), rgba(139, 105, 20, 0.07) 40%, rgba(212, 168, 67, 0.18)),
        rgba(26, 20, 16, 0.55);
    border: 1px solid var(--brass);
    box-shadow:
        inset 0 0 30px rgba(212, 168, 67, 0.18),
        0 0 60px rgba(212, 168, 67, 0.15),
        0 0 0 1px rgba(139, 105, 20, 0.4);
    text-align: center;
    max-width: 85%;
}

.plaque-flourish {
    width: min(420px, 80%);
    height: auto;
}

.plaque-engraved { padding: 0.4rem 0; }

.kicker {
    font-family: var(--font-label);
    font-weight: 600;
    font-size: clamp(0.7rem, 1vw, 0.92rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--starlight);
    margin-bottom: 0.8rem;
    opacity: 0.9;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(3rem, 10vw, 9rem);
    color: var(--starlight);
    letter-spacing: 0.12em;
    line-height: 0.95;
    text-shadow:
        0 0 20px rgba(212, 168, 67, 0.35),
        0 2px 0 rgba(13, 11, 8, 0.6);
    background: linear-gradient(180deg, var(--starlight) 0%, var(--brass) 50%, var(--copper) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.wordmark-tagline {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: clamp(0.85rem, 1.2vw, 1.15rem);
    color: var(--parchment);
    letter-spacing: 0.06em;
    margin-top: 0.5rem;
    opacity: 0.82;
}

/* Dome corner ornaments */
.dome-corner {
    position: absolute;
    width: 140px; height: 140px;
    z-index: 4;
}
.dome-corner-tl { top: 6%; left: 6%; }
.dome-corner-tr { top: 6%; right: 6%; }
.dome-corner-bl { bottom: 6%; left: 6%; }
.dome-corner-br { bottom: 6%; right: 6%; }

.dome-scroll-hint {
    position: absolute;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
}
.scroll-hint-text {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--starlight);
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    opacity: 0.8;
    animation: pulse-attention 3.6s var(--ease-zen) infinite;
}

/* ========================================================================
   PATH-DRAW SVG ANIMATION
   ======================================================================== */
.draw-path path,
.draw-path circle,
.draw-path line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-stroke 2.2s var(--ease-zen) forwards;
}
.draw-path path:nth-child(2) { animation-delay: 0.2s; }
.draw-path path:nth-child(3) { animation-delay: 0.4s; }
.draw-path path:nth-child(4) { animation-delay: 0.6s; }
.draw-path path:nth-child(5) { animation-delay: 0.8s; }
.draw-path circle { animation-delay: 0.6s; animation-duration: 1.2s; }

@keyframes draw-stroke {
    0% { stroke-dashoffset: 1000; opacity: 0.3; }
    60% { opacity: 0.9; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}

/* ========================================================================
   SECTION DIVIDER (three star-bursts)
   ======================================================================== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6vh 0;
    background: var(--parchment);
    position: relative;
    z-index: 2;
}
.section-divider svg {
    width: clamp(240px, 40vw, 420px);
    height: auto;
    overflow: visible;
}
.divider-star {
    transform-origin: center;
    animation: pulse-attention 4s var(--ease-zen) infinite;
}
.divider-star:nth-child(2) { animation-delay: 0.8s; }
.divider-star:nth-child(3) { animation-delay: 1.6s; }

/* ========================================================================
   DIAGONAL SECTIONS — shared
   ======================================================================== */
.diagonal-inner {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15vh 6vw;
}

.diagonal-cw {
    transform: rotate(2deg);
    transform-origin: center;
}
.diagonal-ccw {
    transform: rotate(-2deg);
    transform-origin: center;
}

.counter-rotate {
    transform: rotate(-2deg);
    transform-origin: center;
    width: 100%;
    max-width: 1100px;
}
.counter-rotate-ccw {
    transform: rotate(2deg);
}

/* ========================================================================
   SECTION 2 — FIRST RIPPLE (parchment, 12deg CW, single paragraph)
   ======================================================================== */
.section-first-ripple {
    background: var(--parchment);
    clip-path: polygon(0 6%, 100% 0%, 100% 94%, 0% 100%);
    margin-top: -4vh;
    padding: 10vh 0;
}

.section-first-ripple::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14'><g stroke='%233c2415' stroke-width='0.3' opacity='0.06'><line x1='0' y1='0' x2='14' y2='14'/><line x1='7' y1='-7' x2='21' y2='7'/><line x1='-7' y1='7' x2='7' y2='21'/></g></svg>");
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.trapezoid-content {
    position: relative;
    padding: 7vh 10vw;
    z-index: 1;
}

.label-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.rule-line {
    flex: 0 0 auto;
    width: clamp(60px, 14vw, 180px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.section-label {
    font-family: var(--font-label);
    font-weight: 600;
    font-size: clamp(1rem, 1.6vw, 1.4rem);
    font-variant: small-caps;
    letter-spacing: 0.28em;
    color: var(--brass);
    white-space: nowrap;
}

.paragraph-first {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 1.5vw, 1.35rem);
    line-height: 1.95;
    color: var(--walnut);
    text-align: justify;
    hyphens: auto;
    margin: 0 auto;
    max-width: 72ch;
    position: relative;
}
.paragraph-first::first-letter {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: 4.2em;
    float: left;
    line-height: 0.85;
    padding: 0.15em 0.12em 0 0;
    color: var(--brass);
}

.pull-quote {
    margin: 6vh auto 0;
    max-width: 50ch;
    text-align: center;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2.1rem);
    color: var(--umber);
    line-height: 1.35;
    position: relative;
}
.quote-mark {
    color: var(--brass);
    font-size: 1.3em;
    vertical-align: -0.15em;
    margin: 0 0.15em;
}

/* Corner ornaments on trapezoid */
.corner-ornament {
    position: absolute;
    width: 80px; height: 80px;
    pointer-events: none;
}
.corner-ornament-tl { top: 2vh; left: 3vw; }
.corner-ornament-tr { top: 2vh; right: 3vw; }
.corner-ornament-bl { bottom: 2vh; left: 3vw; }
.corner-ornament-br { bottom: 2vh; right: 3vw; }

/* ========================================================================
   SECTION 3 — SECOND RIPPLE (dark observatory, 12deg CCW, constellation)
   ======================================================================== */
.section-second-ripple {
    background: var(--observatory);
    clip-path: polygon(0 0%, 100% 6%, 100% 100%, 0% 94%);
    margin-top: -6vh;
    padding: 10vh 0;
    color: var(--parchment);
}
.section-second-ripple::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><g stroke='%23d4a843' stroke-width='0.25' opacity='0.10'><line x1='0' y1='12' x2='12' y2='0'/><line x1='-6' y1='6' x2='6' y2='-6'/><line x1='6' y1='18' x2='18' y2='6'/></g></svg>");
    opacity: 0.8;
    pointer-events: none;
    z-index: 0;
}

.trapezoid-content-dark {
    color: var(--parchment);
    padding: 6vh 6vw;
    position: relative;
    z-index: 1;
}

.dark-starfield {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1.5px 1.5px at 22% 58%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 35% 30%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 48% 75%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1.5px 1.5px at 60% 12%, var(--starlight) 99%, transparent 100%),
        radial-gradient(1px 1px at 73% 48%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 85% 78%, var(--nebula) 99%, transparent 100%),
        radial-gradient(1px 1px at 92% 22%, var(--starlight) 99%, transparent 100%);
    opacity: 0.5;
    animation: starfield-twinkle 6s var(--ease-zen) infinite;
    pointer-events: none;
}

.label-rule-dark .section-label-dark {
    color: var(--starlight);
}
.rule-line-dark {
    background: linear-gradient(90deg, transparent, var(--starlight), transparent);
}

.ripple-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2rem, 5.5vw, 4.5rem);
    letter-spacing: 0.06em;
    line-height: 1.1;
    color: var(--parchment);
    text-align: center;
    margin-bottom: 5vh;
    text-shadow: 0 0 30px rgba(212, 168, 67, 0.2);
}
.ripple-heading-light {
    color: var(--umber);
    text-shadow: none;
}

.constellation-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.constellation-map {
    width: 100%;
    height: auto;
    max-height: 70vh;
    filter: drop-shadow(0 0 30px rgba(212, 168, 67, 0.1));
}

.anchor-label {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 11px;
    fill: var(--starlight);
    letter-spacing: 0.04em;
}

.constellation-legend {
    padding: 2vh 2vw;
    position: relative;
}

.legend-intro {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--sepia-line);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.anchor-list {
    list-style: none;
    padding: 0;
}

.anchor-item {
    font-family: var(--font-body);
    font-size: 0.98rem;
    padding: 0.55rem 0;
    color: var(--parchment);
    border-bottom: 1px dotted rgba(196, 181, 160, 0.2);
    cursor: pointer;
    transition: color 300ms var(--ease-zen), padding-left 400ms var(--ease-zen), background 400ms var(--ease-zen);
    position: relative;
    background: linear-gradient(105deg, transparent 40%, rgba(212, 168, 67, 0.0) 50%, transparent 60%);
    background-size: 250% 100%;
    background-position: 100% 0;
}

.anchor-item:hover {
    color: var(--starlight);
    padding-left: 1rem;
    background: linear-gradient(105deg, transparent 40%, rgba(212, 168, 67, 0.22) 50%, transparent 60%);
    background-size: 250% 100%;
    background-position: 0 0;
    transition: color 300ms var(--ease-zen), padding-left 400ms var(--ease-zen), background-position 800ms var(--ease-zen);
}

.anchor-item em {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--sepia-line);
}

.anchor-glyph {
    color: var(--brass);
    margin-right: 0.4rem;
    display: inline-block;
    transition: transform 400ms var(--ease-zen);
}

.anchor-item:hover .anchor-glyph {
    color: var(--starlight);
    transform: rotate(180deg) scale(1.2);
}

.chart-anchor {
    cursor: pointer;
    transition: transform 400ms var(--ease-zen);
    transform-origin: center;
    transform-box: fill-box;
}
.chart-anchor.active circle:first-child {
    r: 7;
}
.chart-anchor.active circle:nth-child(2) {
    r: 18;
    stroke: var(--starlight);
    stroke-width: 1;
    opacity: 1;
}

/* ========================================================================
   SECTION 4 — THIRD RIPPLE (parchment, 12deg CW, arc cards)
   ======================================================================== */
.section-third-ripple {
    background: var(--parchment);
    clip-path: polygon(0 6%, 100% 0%, 100% 94%, 0% 100%);
    margin-top: -6vh;
    padding: 10vh 0;
}
.section-third-ripple::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><g stroke='%23b8860b' stroke-width='0.3' opacity='0.08'><line x1='0' y1='8' x2='16' y2='8'/><line x1='8' y1='0' x2='8' y2='16'/></g></svg>");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.trapezoid-content-arc {
    padding: 4vh 2vw;
    position: relative;
    z-index: 1;
}

.card-arc {
    display: flex;
    gap: 2vw;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
    padding: 6vh 0;
    perspective: 1200px;
}

.arc-card {
    flex: 1 1 0;
    min-width: 200px;
    max-width: 260px;
    background: rgba(255, 248, 239, 0.55);
    border: 1px solid var(--sepia-line);
    padding: 3rem 1.6rem 2.4rem;
    position: relative;
    text-align: center;
    transform-origin: bottom center;
    transition: transform 600ms var(--ease-zen), box-shadow 600ms var(--ease-zen);
    box-shadow: 0 2px 0 rgba(184, 134, 11, 0.1), inset 0 0 0 1px rgba(184, 134, 11, 0.08);
}

/* arc curvature — cards tilt along a sphere */
.arc-card-1 { transform: rotate(-8deg) translateY(18px); }
.arc-card-2 { transform: rotate(-3deg) translateY(4px); }
.arc-card-3 { transform: rotate(3deg) translateY(4px); }
.arc-card-4 { transform: rotate(8deg) translateY(18px); }

.arc-card:hover {
    transform: rotate(0deg) translateY(-10px);
    box-shadow: 0 12px 30px rgba(60, 36, 21, 0.18), 0 0 0 1px rgba(184, 134, 11, 0.35);
}

.card-corners .card-corner {
    position: absolute;
    width: 34px; height: 34px;
}
.card-corner-tl { top: 8px; left: 8px; }
.card-corner-tr { top: 8px; right: 8px; }
.card-corner-bl { bottom: 8px; left: 8px; }
.card-corner-br { bottom: 8px; right: 8px; }

.card-roman {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: 2rem;
    color: var(--brass);
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.card-title {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 700;
    font-size: clamp(1.25rem, 1.8vw, 1.6rem);
    color: var(--umber);
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.card-body {
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--walnut);
    text-align: left;
    margin-bottom: 1.4rem;
}
.card-body em {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--copper);
}

.card-mark {
    color: var(--brass);
    font-size: 1.4rem;
    animation: pulse-attention 4s var(--ease-zen) infinite;
}

/* ========================================================================
   SECTION 5 — STILL WATER (horizontal — ripple dissipates)
   ======================================================================== */
.section-still-water {
    background: var(--parchment);
    clip-path: polygon(0 4%, 100% 0%, 100% 100%, 0% 100%);
    margin-top: -4vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8vh 4vw;
    position: relative;
}
.section-still-water::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10'><g stroke='%233c2415' stroke-width='0.25' opacity='0.05'><line x1='0' y1='5' x2='10' y2='5'/></g></svg>");
    pointer-events: none;
    z-index: 0;
}

.still-inner {
    position: relative;
    width: min(720px, 90vw);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.still-ripple-rings {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.engraved-star {
    position: relative;
    z-index: 3;
    width: clamp(160px, 22vw, 260px);
    height: clamp(160px, 22vw, 260px);
    filter: drop-shadow(0 0 20px rgba(212, 168, 67, 0.25));
    animation: pulse-attention 5s var(--ease-zen) infinite;
}
.engraved-star svg {
    width: 100%; height: 100%;
}

.footer-circle {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.footer-link {
    position: absolute;
    top: 50%; left: 50%;
    transform-origin: 0 0;
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 1rem;
    color: var(--brass);
    text-decoration: none;
    letter-spacing: 0.1em;
    padding: 0.4rem 0.8rem;
    background: rgba(244, 236, 225, 0.7);
    border: 1px solid transparent;
    transition: color 300ms var(--ease-zen), border-color 300ms var(--ease-zen), background 600ms var(--ease-zen);
    pointer-events: auto;
    white-space: nowrap;
    background-image: linear-gradient(105deg, transparent 40%, rgba(212, 168, 67, 0.3) 50%, transparent 60%);
    background-size: 250% 100%;
    background-position: 100% 0;
}

.footer-link span {
    color: var(--brass);
    margin-right: 0.3rem;
}

.footer-link:hover {
    color: var(--starlight);
    border-color: var(--brass);
    background-position: 0% 0;
    transition: color 300ms var(--ease-zen), border-color 300ms var(--ease-zen), background-position 900ms var(--ease-zen);
}

/* place 6 links on a circle around the star */
.footer-link-1 { transform: translate(-50%, -50%) rotate(0deg) translate(calc(min(300px, 40vw))) rotate(0deg); }
.footer-link-2 { transform: translate(-50%, -50%) rotate(60deg) translate(calc(min(300px, 40vw))) rotate(-60deg); }
.footer-link-3 { transform: translate(-50%, -50%) rotate(120deg) translate(calc(min(300px, 40vw))) rotate(-120deg); }
.footer-link-4 { transform: translate(-50%, -50%) rotate(180deg) translate(calc(min(300px, 40vw))) rotate(-180deg); }
.footer-link-5 { transform: translate(-50%, -50%) rotate(240deg) translate(calc(min(300px, 40vw))) rotate(-240deg); }
.footer-link-6 { transform: translate(-50%, -50%) rotate(300deg) translate(calc(min(300px, 40vw))) rotate(-300deg); }

.footer-meta {
    position: absolute;
    bottom: -4vh;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90vw;
}
.meta-line {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--copper);
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    opacity: 0.85;
}
.meta-line-small {
    font-size: 0.8rem;
    margin-top: 0.6rem;
    opacity: 0.65;
}

/* ========================================================================
   INTERSECTION-OBSERVER ENTRY ANIMATION
   ======================================================================== */
.section-first-ripple,
.section-second-ripple,
.section-third-ripple,
.section-still-water {
    opacity: 0;
    transform: translate(30px, 30px);
    transition: opacity 1100ms var(--ease-zen), transform 1100ms var(--ease-zen);
}
.section-first-ripple.in-view,
.section-second-ripple.in-view,
.section-third-ripple.in-view,
.section-still-water.in-view {
    opacity: 1;
    transform: translate(0, 0);
}
.section-second-ripple { transform: translate(-30px, 30px); }
.section-second-ripple.in-view { transform: translate(0, 0); }

/* ========================================================================
   RESPONSIVE — small screens collapse diagonals but keep motifs
   ======================================================================== */
@media (max-width: 900px) {
    .constellation-layout {
        grid-template-columns: 1fr;
        gap: 3vh;
    }
    .card-arc {
        flex-wrap: wrap;
        gap: 3vh 3vw;
    }
    .arc-card-1, .arc-card-2, .arc-card-3, .arc-card-4 {
        transform: rotate(0deg) translateY(0);
        max-width: 45%;
    }
    .diagonal-cw, .diagonal-ccw {
        transform: rotate(1deg);
    }
    .diagonal-ccw { transform: rotate(-1deg); }
    .counter-rotate { transform: rotate(-1deg); }
    .counter-rotate-ccw { transform: rotate(1deg); }

    .orrery-nav {
        top: 1rem; right: 1rem;
        width: 70px; height: 70px;
    }
    .planet-label { display: none; }

    .footer-link-1 { transform: translate(-50%, -50%) rotate(0deg) translate(calc(min(180px, 36vw))) rotate(0deg); }
    .footer-link-2 { transform: translate(-50%, -50%) rotate(60deg) translate(calc(min(180px, 36vw))) rotate(-60deg); }
    .footer-link-3 { transform: translate(-50%, -50%) rotate(120deg) translate(calc(min(180px, 36vw))) rotate(-120deg); }
    .footer-link-4 { transform: translate(-50%, -50%) rotate(180deg) translate(calc(min(180px, 36vw))) rotate(-180deg); }
    .footer-link-5 { transform: translate(-50%, -50%) rotate(240deg) translate(calc(min(180px, 36vw))) rotate(-240deg); }
    .footer-link-6 { transform: translate(-50%, -50%) rotate(300deg) translate(calc(min(180px, 36vw))) rotate(-300deg); }
}

@media (max-width: 600px) {
    .trapezoid-content { padding: 4vh 6vw; }
    .wordmark { font-size: clamp(2.5rem, 15vw, 5rem); }
    .arc-card-1, .arc-card-2, .arc-card-3, .arc-card-4 {
        max-width: 90%;
    }
    .paragraph-first { text-align: left; }
}
