/* ============================================================
   continua.st  —  celestial neomorphism, aurora gradient,
   single column, tilt-3d, humanist type.

   Palette:
     #0B0B23  Thermosphere Ink
     #1A1B3A  Meridian Indigo
     #3B4DA5  Aurora Cobalt
     #B566D2  Aurora Lilac
     #F6A6C8  Aurora Rose
     #E8DDC9  Champagne Platinum
     #7E8AB8  Twilight Lavender
     #FFFFFFE6 Star White (90% white)

   Fonts: Inter, Fraunces, Newsreader (Google Fonts)
   ============================================================ */

:root {
    --c-ink:       #0B0B23;
    --c-meridian:  #1A1B3A;
    --c-cobalt:    #3B4DA5;
    --c-lilac:     #B566D2;
    --c-rose:      #F6A6C8;
    --c-champagne: #E8DDC9;
    --c-lavender:  #7E8AB8;
    --c-star:      rgba(255, 255, 255, 0.9);

    --shadow-cool: rgba(11, 11, 35, 0.55);
    --shadow-warm: rgba(246, 166, 200, 0.18);

    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
    --t-small: 280ms;
    --t-tilt:  480ms;
    --t-reveal: 1200ms;

    --spine-width: min(640px, 78vw);
    --aurora-shift: 0px;
}

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

html {
    scroll-behavior: smooth;
    background: var(--c-ink);
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 17px;
    line-height: 1.68;
    font-weight: 380;
    letter-spacing: -0.005em;
    color: var(--c-star);
    background: var(--c-ink);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    perspective: 1400px;
}

/* ============================================================
   Aurora gradient layer  (fixed, scroll-shifted)
   ============================================================ */
.aurora {
    position: fixed;
    inset: -10vh -10vw;
    z-index: -3;
    background: linear-gradient(180deg,
        #0B0B23 0%,
        #1A1B3A 18%,
        #3B4DA5 38%,
        #B566D2 58%,
        #F6A6C8 78%,
        #E8DDC9 100%);
    background-size: 100% 220vh;
    background-attachment: fixed;
    transform: translateY(var(--aurora-shift));
    will-change: transform;
    pointer-events: none;
}

/* SVG-noise grain layer over background  (4% opacity) */
.aurora-grain {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: 256px 256px;
    mix-blend-mode: overlay;
}

/* ============================================================
   Constellation field  (220 stars — placed by script.js)
   ============================================================ */
.constellation {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.85;
}

.constellation circle {
    fill: rgba(255, 255, 255, 0.55);
    filter: drop-shadow(0 0 2px rgba(181, 102, 210, 0.6));
    animation: starPulse var(--pulse-dur, 6s) ease-in-out infinite;
    animation-delay: var(--pulse-delay, 0s);
}

@keyframes starPulse {
    0%, 100% { opacity: 0.32; }
    50%      { opacity: 0.95; }
}

/* ============================================================
   Spine: single column, 640px / 78vw, perfectly centered
   ============================================================ */
.spine {
    width: var(--spine-width);
    margin: 0 auto;
    padding: 14vh 0 12vh;
    position: relative;
    z-index: 1;
}

/* ============================================================
   Masthead: a single luminous star + title + epigraph
   ============================================================ */
.masthead {
    text-align: center;
    padding: 4vh 0 8vh;
    position: relative;
}

.star-mark {
    display: inline-block;
    width: 96px;
    height: 96px;
    position: relative;
    text-decoration: none;
    margin: 0 auto 6vh;
    cursor: pointer;
}

.star-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #FFFFFFE6;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.85),
        0 0 12px rgba(181, 102, 210, 0.55);
}

.star-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
        rgba(181, 102, 210, 0.55) 0%,
        rgba(59, 77, 165, 0.32) 40%,
        rgba(11, 11, 35, 0) 70%);
    filter: blur(2px);
    transition: width var(--t-tilt) var(--ease-spring),
                height var(--t-tilt) var(--ease-spring),
                background var(--t-tilt) var(--ease-spring);
    z-index: 1;
}

.star-mark:hover .star-halo,
.star-mark:focus .star-halo {
    width: 96px;
    height: 96px;
    background: radial-gradient(circle,
        rgba(246, 166, 200, 0.45) 0%,
        rgba(181, 102, 210, 0.45) 35%,
        rgba(59, 77, 165, 0.25) 60%,
        rgba(11, 11, 35, 0) 80%);
}

/* champagne-tinted footer star */
.star-mark--champagne .star-halo {
    background: radial-gradient(circle,
        rgba(232, 221, 201, 0.55) 0%,
        rgba(246, 166, 200, 0.32) 40%,
        rgba(11, 11, 35, 0) 70%);
}
.star-mark--champagne .star-core {
    background: var(--c-champagne);
    box-shadow:
        0 0 6px rgba(232, 221, 201, 0.85),
        0 0 12px rgba(246, 166, 200, 0.45);
}

/* sub-stars: hairline ring revealed on hover */
.sub-stars {
    position: absolute;
    inset: -120px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--t-tilt) var(--ease-spring);
    z-index: 2;
}

.star-mark:hover .sub-stars,
.star-mark:focus .sub-stars {
    opacity: 1;
    pointer-events: auto;
}

.sub-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-128px);
    color: var(--c-lavender);
    font-size: 11px;
    font-weight: 480;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sub-dot {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 3px;
    background: var(--c-star);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(181, 102, 210, 0.7);
}

.sub-label {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) rotate(calc(-1 * var(--angle)));
    white-space: nowrap;
    font-family: "Inter", sans-serif;
    color: var(--c-lavender);
}

.page-title {
    font-family: "Fraunces", "Lora", serif;
    font-size: clamp(2.4rem, 5.6vw, 4.8rem);
    font-variation-settings: "opsz" 144, "wght" 360, "ital" 6;
    font-style: italic;
    font-weight: 360;
    line-height: 1.05;
    color: var(--c-star);
    margin-bottom: 1.4rem;
    letter-spacing: -0.012em;
}

.epigraph {
    font-family: "Newsreader", "Lora", serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: rgba(255, 255, 255, 0.78);
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.55;
}

/* ============================================================
   Panels: celestial neomorphism, paired shadow, tilt-3D
   ============================================================ */
.panel {
    position: relative;
    margin: 6vh 0;
    padding: 56px 52px;
    border-radius: 28px;
    background: var(--c-meridian);
    color: var(--c-star);
    transform-style: preserve-3d;
    transform: perspective(1400px) rotateX(0deg) rotateY(0deg);
    transition:
        transform var(--t-tilt) var(--ease-spring),
        box-shadow var(--t-tilt) var(--ease-spring);
    box-shadow:
        14px 18px 36px rgba(11, 11, 35, 0.55),
        -10px -12px 28px rgba(246, 166, 200, 0.18),
        inset 1px 1px 2px rgba(255, 255, 255, 0.06);
    overflow: hidden;
    will-change: transform, box-shadow;
}

/* noise grain, 2% opacity, baked into every panel */
.panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: 256px 256px;
    opacity: 0.02;
    mix-blend-mode: overlay;
    border-radius: inherit;
    z-index: 1;
}

/* catch-glint: radial highlight that slides as the panel tilts */
.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        circle at var(--glint-x, 80%) var(--glint-y, 12%),
        rgba(255, 255, 255, 0.18),
        transparent 35%);
    opacity: 0.85;
    transition: background var(--t-tilt) var(--ease-spring);
    border-radius: inherit;
    z-index: 2;
    mix-blend-mode: screen;
}

.panel > * { position: relative; z-index: 3; }

/* tone variants — base color matches the band of aurora behind it */
.panel--ink       { background: linear-gradient(160deg, #15163b 0%, #0e0f2c 100%); }
.panel--meridian  { background: linear-gradient(160deg, #1f2147 0%, #15163b 100%); }
.panel--cobalt    { background: linear-gradient(160deg, #2a376e 0%, #1d2552 100%); }
.panel--lilac     { background: linear-gradient(160deg, #5e3f86 0%, #3a2960 100%); }
.panel--rose      { background: linear-gradient(160deg, #885379 0%, #5b3a5a 100%); }
.panel--champagne {
    background: linear-gradient(160deg, #ece2d1 0%, #d8cbb2 100%);
    color: var(--c-ink);
    box-shadow:
        14px 18px 36px rgba(11, 11, 35, 0.32),
        -10px -12px 28px rgba(246, 166, 200, 0.30),
        inset 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.panel--champagne .pullquote { color: rgba(11, 11, 35, 0.78); border-left-color: var(--c-cobalt); }
.panel--champagne .section-mark { color: rgba(11, 11, 35, 0.55); }
.panel--champagne em { color: var(--c-cobalt); }

/* ============================================================
   Type within panels
   ============================================================ */
.section-mark {
    display: inline-block;
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 580;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-lavender);
    margin-bottom: 1.4rem;
    font-feature-settings: "smcp";
}

.section-title {
    font-family: "Fraunces", "Lora", serif;
    font-variation-settings: "opsz" 144, "wght" 360;
    font-weight: 360;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    line-height: 1.18;
    margin-bottom: 1.6rem;
    letter-spacing: -0.012em;
    color: inherit;
}

.panel p {
    font-family: "Inter", sans-serif;
    font-weight: 380;
    font-size: 17px;
    line-height: 1.68;
    margin-bottom: 1.2rem;
    color: inherit;
}

.panel p em {
    font-style: italic;
    color: var(--c-rose);
}
.panel--ink em, .panel--meridian em, .panel--cobalt em { color: var(--c-rose); }
.panel--lilac em { color: var(--c-champagne); }
.panel--rose em  { color: var(--c-cobalt); }

.panel p strong {
    font-family: "Fraunces", "Lora", serif;
    font-style: italic;
    font-weight: 480;
    color: var(--c-rose);
}
.panel--champagne p strong { color: var(--c-cobalt); }

/* star-bullet list */
.star-list {
    list-style: none;
    margin: 1.8rem 0;
    padding: 0;
}

.star-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.star-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.65em;
    width: 4px;
    height: 4px;
    background: var(--c-star);
    border-radius: 50%;
    box-shadow:
        0 0 4px rgba(255, 255, 255, 0.6),
        0 0 8px rgba(181, 102, 210, 0.6);
}

.panel--champagne .star-list li::before {
    background: var(--c-cobalt);
    box-shadow:
        0 0 4px rgba(59, 77, 165, 0.6),
        0 0 8px rgba(181, 102, 210, 0.4);
}

/* swatch chips inside lists */
.swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--c, #fff);
    margin: 0 4px 0 6px;
    vertical-align: -1px;
    box-shadow: 0 0 4px rgba(0,0,0,0.4), inset 0 0 1px rgba(255,255,255,0.3);
}
.swatch-name {
    font-family: "Inter", sans-serif;
    font-weight: 480;
    letter-spacing: 0.04em;
    color: var(--c-lavender);
    font-size: 0.92em;
}

/* pull-quote */
.pullquote {
    font-family: "Newsreader", "Lora", serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.4rem, 2.2vw, 1.72rem);
    line-height: 1.4;
    margin: 2rem 0 2rem 1rem;
    padding: 0.4rem 0 0.4rem 1.6rem;
    border-left: 1px solid;
    border-image: linear-gradient(180deg, #3B4DA5, #B566D2, #F6A6C8) 1;
    color: rgba(255, 255, 255, 0.84);
}

/* sign-off */
.signoff {
    text-align: center;
    margin-top: 2.4rem;
    font-family: "Newsreader", serif;
    font-style: italic;
    color: rgba(11, 11, 35, 0.55);
}

.signoff-link {
    color: var(--c-cobalt);
    text-decoration: none;
    background-image: linear-gradient(90deg, #3B4DA5, #B566D2, #F6A6C8);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size var(--t-small) var(--ease-spring);
}
.signoff-link:hover { background-size: 100% 1px; }

/* ============================================================
   Aurora ribbon dividers
   ============================================================ */
.ribbon-divider {
    width: 100%;
    height: 80px;
    margin: 4vh 0;
    overflow: visible;
}

.ribbon-divider svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.ribbon-path {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
    mix-blend-mode: screen;
    opacity: 0.55;
    filter: blur(1.5px);
    animation: ribbonDrift 22s linear infinite;
}
.ribbon-cobalt { stroke: var(--c-cobalt); }
.ribbon-lilac  { stroke: var(--c-lilac);  animation-duration: 28s; animation-direction: reverse; }
.ribbon-rose   { stroke: var(--c-rose);   animation-duration: 34s; }

@keyframes ribbonDrift {
    0%   { transform: translateX(0); }
    100% { transform: translateX(48px); }
}

/* arc divider — implied planetary horizon */
.arc-divider {
    width: 100%;
    height: 60px;
    margin: 3vh 0;
}
.arc-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================================
   Footer star
   ============================================================ */
.footer {
    text-align: center;
    padding: 8vh 0 4vh;
}

.footer .star-mark { margin-bottom: 2.4rem; }

.colophon {
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 480;
    letter-spacing: 0.16em;
    color: var(--c-lavender);
    text-transform: uppercase;
    font-feature-settings: "smcp";
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
    .panel { padding: 40px 28px; border-radius: 22px; }
    .ribbon-divider { height: 60px; }
}

/* reduced motion: tilt-3D off, aurora drift at 25% rate */
@media (prefers-reduced-motion: reduce) {
    .panel,
    .star-halo {
        transition: none !important;
    }
    .panel { transform: none !important; }
    .ribbon-path,
    .constellation circle {
        animation: none !important;
    }
}
