/* ============================================================
 * legal.css — shared styling for the Terms & Conditions and
 * Privacy Policy pages (and any page that sets
 * {% block body_class %}legal-page{% endblock %}).
 *
 * The starfield + shooting-star CSS/JS is reused as-is from
 * templates/includes/star_animation.html. This file only:
 *   1. repaints that partial's gradient as the snapshot's
 *      "sunset at top -> deep night below" atmosphere that
 *      scrolls away,
 *   2. forces the body solid dark below the atmosphere,
 *   3. drops the old glass card + widens the content,
 *   4. golds the page H1,
 *   5. honours prefers-reduced-motion.
 *
 * Scoped to `body.legal-page` so it cleanly out-specifies the
 * partial's inline <style> regardless of source order.
 * ============================================================ */

/* Solid deep-night base so the page below the 100vh sunset band
   is night, not the app-wide dark->gold body gradient. */
body.legal-page {
    background: rgb(0, 0, 5);
    background-attachment: scroll;
}

/* Sunset -> night gradient, confined to the first screen and
   scrolling away (absolute, not fixed). Mirrors the snapshot's
   .satelles-atmosphere .gradient-background. */
body.legal-page .gradient-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgb(255, 132, 38)   0%,
        rgb(240,  70, 20)   4%,
        rgb(200,  50, 30)   9%,
        rgb(140,  40, 50)  16%,
        rgb( 80,  35, 70)  26%,
        rgb( 40,  30, 75)  38%,
        rgb( 20,  25, 70)  52%,
        rgb( 10,  20, 60)  66%,
        rgb(  5,  15, 45)  80%,
        rgb(  0,  10, 30)  90%,
        rgb(  0,   5, 15)  96%,
        rgb(  0,   0,  5) 100%);
    z-index: -3;
}

/* Starry image overlay also confined to the first screen and
   scroll-away. (The shared starry_background.png is a broken
   placeholder site-wide, so this overlay is currently blank and
   harmless; styled for parity with the snapshot in case the
   asset is restored later.) */
body.legal-page .stars-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    opacity: 0.35;
    mix-blend-mode: screen;
    z-index: -2;
}

/* Wide, full-bleed content: neutralise the shared Bootstrap
   .container max-width on <main> and apply the snapshot's
   generous horizontal padding (keeps the py-5 vertical rhythm). */
body.legal-page main.container {
    max-width: 100%;
    padding-left: clamp(2rem, 12vw, 12rem);
    padding-right: clamp(2rem, 12vw, 12rem);
}

/* No glass card — content flows directly on the night sky.
   (The old .terms-content / .privacy-content card styling lived
   in each template's inline <style>, now removed; these wrappers
   are intentionally left as plain blocks.) */
body.legal-page .terms-content,
body.legal-page .privacy-content {
    position: relative;
    z-index: 1;
}

/* Gold page title (the partial/base default headings are white). */
body.legal-page main h1 {
    color: #FFCE76;
}

/* Respect reduced-motion: stop the twinkle + hide shooting stars. */
@media (prefers-reduced-motion: reduce) {
    body.legal-page .star-glow,
    body.legal-page .star-gentle-glow {
        animation: none !important;
    }
    body.legal-page .shooting-star {
        display: none !important;
    }
}

/* Tighten the side padding on small screens for readability. */
@media (max-width: 768px) {
    body.legal-page main.container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
