@import url('./cinema-sections.css');

/* ==========================================================================
   Cinematic staging primitives — shared across public pages.
   Chapter markers, uppercase display titles, ghost buttons, title-card hero,
   film-strip rows, hairline grids, and the finale block. Page-specific
   staging lives in per-page stylesheets (ecosystem*.css, etc.). Loaded
   globally from partials/head.php. Brand palette only.
   ========================================================================== */

/* --- Shared primitives ------------------------------------------------- */

.nm-cine-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: clamp(4.5rem, 9vw, 8rem) 0;
}

.nm-cine-kicker {
    align-items: center;
    color: var(--nm-color-ember-hi);
    display: inline-flex;
    font-family: var(--nm-font-mono);
    font-size: 0.72rem;
    gap: 0.7rem;
    letter-spacing: 0.32em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.nm-cine-kicker::before {
    background: var(--nm-color-ember);
    content: "";
    display: inline-block;
    height: 1px;
    width: 20px;
}

.nm-cine-chapter {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.nm-cine-chapter-act {
    color: var(--nm-color-ember-hi);
    font-family: var(--nm-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    order: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.nm-cine-chapter-act::before {
    color: var(--nm-color-text-subtle);
    content: "[ ";
}

.nm-cine-chapter-act::after {
    color: var(--nm-color-text-subtle);
    content: " ]";
}

.nm-cine-chapter-label {
    color: var(--nm-color-text-subtle);
    font-family: var(--nm-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    order: 2;
    text-transform: uppercase;
    white-space: nowrap;
}

.nm-cine-chapter-rule {
    background: linear-gradient(90deg, rgba(225, 29, 51, 0.5), rgba(255, 255, 255, 0.06));
    flex: 1;
    height: 1px;
    order: 3;
}

.nm-cine-title {
    color: var(--nm-color-text);
    font-family: var(--nm-font-display);
    font-size: clamp(2.1rem, 4.6vw, 3.6rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 0.98;
    margin: 0;
    text-transform: uppercase;
    text-wrap: balance;
}

.nm-cine-title--sm {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.nm-cine-ghostbtn {
    align-items: center;
    background: linear-gradient(180deg, rgba(225, 29, 51, 0.22), rgba(153, 0, 1, 0.16));
    border: 1px solid var(--nm-color-ember);
    border-radius: 2px;
    color: #fff;
    display: inline-flex;
    font-family: var(--nm-font-mono);
    font-size: 0.78rem;
    font-weight: 400;
    gap: 0.6rem;
    justify-content: center;
    letter-spacing: 0.14em;
    padding: 1rem 1.9rem;
    text-transform: uppercase;
    transition:
        background var(--nm-duration-fast) var(--nm-ease-standard),
        border-color var(--nm-duration-fast) var(--nm-ease-standard),
        box-shadow var(--nm-duration-base) var(--nm-ease-standard),
        transform var(--nm-duration-fast) var(--nm-ease-standard);
}

.nm-cine-ghostbtn:hover,
.nm-cine-ghostbtn:focus-visible {
    background: var(--nm-color-ember);
    border-color: var(--nm-color-ember);
    box-shadow: 0 10px 40px -12px rgba(225, 29, 51, 0.7);
    color: #fff;
    transform: translateY(-2px);
}

.nm-cine-ghostbtn--dim {
    background: transparent;
    border-color: var(--nm-color-line);
    color: rgba(240, 240, 250, 0.72);
}

.nm-cine-ghostbtn--dim:hover,
.nm-cine-ghostbtn--dim:focus-visible {
    background: transparent;
    border-color: rgba(240, 240, 250, 0.4);
    box-shadow: none;
    color: #fff;
}

/* --- Title card hero ---------------------------------------------------- */

.nm-cine-hero {
    background:
        radial-gradient(72% 55% at 82% 14%, rgba(153, 0, 1, 0.20), transparent 62%),
        radial-gradient(120% 75% at 42% 118%, rgba(153, 0, 1, 0.18), transparent 60%),
        linear-gradient(180deg, #05060a, #08090f 60%, #0a0b12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

/* Faint decorative moon orb, top-right of every sub-page hero. Home is excluded
   automatically — its eclipse hero does not use .nm-cine-hero. Desktop only,
   mirroring the original `hidden md:block`. */
@media (min-width: 768px) {
    .nm-cine-hero::after {
        animation: nm-hero-moon-float 6s ease-in-out infinite;
        background: radial-gradient(circle at 50% 50%, rgba(153, 0, 1, 0.2), transparent 52%);
        border: 1px solid rgba(179, 179, 179, 0.2);
        border-radius: 50%;
        box-shadow: inset 40px 20px 0 0 rgba(179, 179, 179, 0.1);
        content: "";
        height: 600px;
        opacity: 0.2;
        pointer-events: none;
        position: absolute;
        right: -10%;
        top: 0;
        width: 600px;
        z-index: 0;
    }
}

@keyframes nm-hero-moon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Even, tiling starfield (matches the About artifact hero). */
.nm-cine-hero::before {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 130px 70px, rgba(255, 255, 255, 0.28), transparent),
        radial-gradient(1.2px 1.2px at 80px 150px, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 170px 120px, rgba(255, 255, 255, 0.24), transparent),
        radial-gradient(1px 1px at 50px 190px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 190px 22px, rgba(255, 255, 255, 0.26), transparent),
        radial-gradient(1.1px 1.1px at 110px 45px, rgba(255, 255, 255, 0.32), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    content: "";
    inset: 0;
    opacity: 0.7;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.nm-cine-hero-glow {
    background:
        radial-gradient(ellipse 60% 42% at 50% 108%, rgba(153, 0, 1, 0.30), transparent 70%),
        radial-gradient(ellipse 50% 40% at 82% 12%, rgba(153, 0, 1, 0.20), transparent 68%);
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 0;
}

.nm-cine-hero-vignette {
    background: radial-gradient(ellipse 78% 66% at 50% 46%, transparent 58%, rgba(0, 0, 0, 0.62) 100%);
    inset: 0;
    pointer-events: none;
    position: absolute;
}

/* Keep title-card content vertically staged even when the rendering engine
   does not support the small-viewport unit. The later svh declaration is the
   progressive enhancement; the vh value is the required fallback. */
.nm-cine-hero-stage {
    min-height: 92vh;
    min-height: 92svh;
}

.nm-cine-hero-title {
    color: var(--nm-color-text);
    font-family: var(--nm-font-display);
    /* Width-driven scale, capped by viewport height so the title never pushes
       the kicker/breadcrumb up behind the fixed nav on short screens. Sized so
       the longest single word (e.g. OVERLOOKED) fits one line at the wide face. */
    font-size: clamp(2.2rem, min(7.2vw, 12vh), 5.75rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 0.95;
    margin: 0 0 2rem;
    text-shadow: 0 0 60px rgba(153, 0, 1, 0.3);
    text-transform: uppercase;
    text-wrap: balance;
}

.nm-blog-post-title {
    font-size: calc(clamp(2.2rem, min(7.2vw, 12vh), 5.75rem) - 2pt);
}

/* Small phones (~375): the wide display face runs a touch large — ease it down.
   Placed after the base rule so it wins the cascade (media queries add no specificity). */
@media (max-width: 640px) {
    .nm-cine-hero-title {
        font-size: clamp(1.7rem, 8vw, 2.8rem);
    }

    .nm-blog-post-title {
        font-size: calc(clamp(1.7rem, 8vw, 2.8rem) - 2pt);
    }
}

.nm-cine-logline {
    color: #b3b3b3;
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    font-weight: 300;
    line-height: 1.65;
    margin: 0 auto;
    max-width: 42rem;
    text-wrap: balance;
}

.nm-cine-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

.nm-cine-scrollcue {
    align-items: center;
    bottom: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
}

.nm-cine-scrollcue-line {
    animation: nm-cine-scrollcue 2.4s var(--nm-ease-standard) infinite;
    background: linear-gradient(180deg, rgba(153, 0, 1, 0.9), transparent);
    height: 3rem;
    width: 1px;
}

.nm-cine-scrollcue-text {
    color: rgba(179, 179, 179, 0.5);
    font-family: var(--nm-font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.34em;
    text-transform: uppercase;
}

@keyframes nm-cine-scrollcue {
    0% { opacity: 0; transform: scaleY(0.2); transform-origin: top; }
    45% { opacity: 1; transform: scaleY(1); }
    100% { opacity: 0; transform: scaleY(1); }
}

@media (max-height: 840px) {
    .nm-cine-scrollcue {
        display: none;
    }
}
