/* Moonlit Thoughts — cinematic hero masthead.
   Self-contained "night" palette so the header looks identical across the
   light, dark, and inline article pages. */

header.site.hero {
    position: relative;
    width: 100%;
    height: 78vh;
    min-height: 460px;
    max-height: 780px;
    overflow: hidden;
    border-bottom: none;
    /* Fallback shown before/instead of the WebGL canvas. */
    background:
        radial-gradient(120% 90% at 52% 16%, rgba(150,160,210,0.16), transparent 42%),
        linear-gradient(180deg, #05070f 0%, #0a1020 46%, #0c1426 70%, #070a14 100%);
    isolation: isolate;
}

header.site.hero #moon-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

/* Scrims keep the nav (top) and caption (bottom) legible over the scene. */
header.site.hero::before,
header.site.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
}
header.site.hero::before {
    top: 0;
    height: 130px;
    background: linear-gradient(180deg, rgba(3,5,12,0.6), transparent);
}
header.site.hero::after {
    bottom: 0;
    height: 60%;
    background: linear-gradient(0deg, rgba(3,5,12,0.78), rgba(3,5,12,0.15) 55%, transparent);
}

/* Top nav bar, overlaid on the scene. */
header.site.hero .site-inner {
    position: relative;
    z-index: 2;
}
header.site.hero .brand { color: #f3f5fb; }
header.site.hero .brand span { color: #aab8e8; }
header.site.hero nav.site-nav a { color: rgba(225,230,245,0.78); }
header.site.hero nav.site-nav a:hover { color: #ffffff; }

/* Article masthead caption, anchored to the bottom of the hero. */
.hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
}
.hero-caption .hero-inner {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 3.25rem;
}
.hero-caption .hero-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #aeb9e6;
    margin-bottom: 1rem;
}
.hero-caption h1 {
    font-family: 'Fraunces', serif;
    font-weight: 800;
    font-size: clamp(2.25rem, 5.2vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: #fbfcff;
    text-shadow: 0 2px 34px rgba(0,0,0,0.55);
}
.hero-caption .hero-deck {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.5;
    color: rgba(233,237,248,0.88);
    margin: 0;
    max-width: 42ch;
}

@media (max-width: 600px) {
    header.site.hero { height: 72vh; min-height: 400px; }
    .hero-caption .hero-inner { padding: 0 1.25rem 2.25rem; }
    .hero-caption .hero-deck { font-size: 1.08rem; }
}
