/* ============================================================
   Rose IT Ltd — v5 chrome on the scroll-driven 3D pages
   (rmg-industry.html, education.html). Loads after styles.css,
   scene/page.css and v5.css. Scoped to body.v5.sc-page.

   The 3D scene stays the main thing; this sheet only fits the
   floating pill navigation (v5.css) to the sc- layout and brings
   the text cards and the tracker toward the v5 look.

   Hard rule, same as scene/page.css: nothing translucent or
   blurred sits or scrolls over the WebGL canvas (it flickers in
   Safari and Chrome). Every panel here is solid ink, and no
   backdrop-filter is introduced. The class names and ids the
   scripts read (.sc-beat, .sc-card, .sc-hud, #hud-*, body
   classes) are untouched.
   ============================================================ */

body.v5.sc-page {
  /* The pill: 14px from the top and ~60px tall on desktop, 10px and ~56px on phones (v5.css). */
  --sc-nav-clear: 74px;
  --sc-radius: 22px;
}

/* ----- The pill over the scene: fully opaque, no blur, and the mobile overlay menu the same ----- */
body.v5.sc-page header.nav .nav-inner,
body.v5.sc-page header.nav.scrolled .nav-inner {
  background: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 10px 30px rgba(3, 8, 20, 0.45), 0 1px 0 rgba(245, 241, 234, 0.06) inset;
}

/* ----- Text cards: solid ink panels with the v5 corner and rule ----- */
body.v5.sc-page .sc-beat .sc-card {
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--sc-radius);
  padding: 26px 28px 28px;
}
/* A solid panel needs no halo behind its type. */
body.v5.sc-page .sc-card h1,
body.v5.sc-page .sc-card h2,
body.v5.sc-page .sc-card p,
body.v5.sc-page .sc-card .sc-eyebrow,
body.v5.sc-page .sc-card .sc-facts,
body.v5.sc-page .sc-hero .sc-meta { text-shadow: none; }
/* The small labels had backing chips because they sat straight on the picture; inside a panel they are plain. */
body.v5.sc-page .sc-card .sc-eyebrow,
body.v5.sc-page .sc-hero .sc-meta,
body.v5.sc-page .sc-closing .sc-card > .sc-eyebrow:first-child {
  width: auto;
  margin-left: 0;
  padding: 0;
  background: none;
  border-radius: 0;
}
body.v5.sc-page .sc-hero .sc-meta { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--rule); }
body.v5.sc-page .sc-main h1,
body.v5.sc-page .sc-main h2 { font-family: var(--serif); font-weight: 400; }
body.v5.sc-page .sc-main h1 em,
body.v5.sc-page .sc-main h2 em { font-style: italic; color: var(--brass-bright); }
body.v5.sc-page .sc-facts { border-top-color: var(--rule); }

/* The closing card is the width of the page and sits over the lit roof: it stays open (text on the scrim) so the
   picture shows through, while its tiles, tags and button take the v5 corners and go solid. */
body.v5.sc-page .sc-beat.sc-closing .sc-card { background: none; border: 0; border-radius: 0; padding: 0; }
body.v5.sc-page .sc-closing .sc-card > h2,
body.v5.sc-page .sc-closing .sc-card > p,
body.v5.sc-page .sc-closing .sc-card > .sc-eyebrow { text-shadow: 0 1px 2px rgba(12, 26, 53, 0.85), 0 0 16px rgba(12, 26, 53, 0.7); }
body.v5.sc-page .sc-closing .sc-card > .sc-eyebrow:first-child {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 6px 14px;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-shadow: none;
}
body.v5.sc-page .sc-modules li { background: var(--ink); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 16px; }
body.v5.sc-page .sc-tags li { background: var(--ink); border: 1px solid var(--rule); }
body.v5.sc-page .sc-btn {
  border-radius: 14px;
  padding: 14px 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ----- Tracker: solid ink, rounded, same rule as the cards ----- */
body.v5.sc-page .sc-hud {
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 18px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.v5.sc-page .sc-hud .row strong { font-family: var(--mono); }
body.v5.sc-page .sc-hud .counts b { font-family: var(--serif); }

/* ----- Clearing the pill ----- */
/* Cards that hang from the top (closing beat, short screens) start under the floating pill with a little air. */
body.v5.sc-page .sc-closing { padding-top: calc(var(--sc-nav-clear) + 36px); }
body.v5.sc-page.sc-short .sc-beat { padding-top: calc(var(--sc-nav-clear) + 24px); }
@media (max-height: 560px) {
  body.v5.sc-page .sc-beat,
  body.v5.sc-page .sc-beat.sc-hero,
  body.v5.sc-page .sc-beat.sc-right { padding-top: calc(var(--sc-nav-clear) + 22px); }
}

/* ----- Tablet and phone ----- */
@media (max-width: 1100px) {
  body.v5.sc-page .sc-beat .sc-card { padding: 22px 22px 24px; }
}
@media (max-width: 760px) {
  body.v5.sc-page .sc-beat .sc-card { padding: 18px 18px 20px; border-radius: 18px; }
  body.v5.sc-page .sc-beat.sc-closing .sc-card { padding: 0; }
  body.v5.sc-page .sc-closing.sc-beat { padding-top: calc(var(--sc-nav-clear) + 36px); }
  body.v5.sc-page .sc-modules li { padding: 11px 13px; border-radius: 12px; }
  body.v5.sc-page .sc-hud { border-radius: 16px; }
}
@media (max-width: 1000px) {
  body.v5.sc-page { --sc-nav-clear: 66px; }
  /* The full-screen menu opens over the canvas: solid ink, no blur (styles.css blurs it on the other pages). */
  body.v5.sc-page nav.links {
    background: var(--ink);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
/* Pinned phone layout (body.sc-pinned from page.js): the card is a fixed panel above the tracker. Tighter padding keeps the
   picture's band above it, and the panel never grows up under the pill. */
html.sc-js body.v5.sc-page.sc-pinned .sc-beat:not(.sc-closing) .sc-card {
  padding: 16px 18px 18px;
  max-height: calc(100vh - 176px - var(--sc-nav-clear) - 12px);
  max-height: calc(100svh - 176px - var(--sc-nav-clear) - 12px);
  overflow: hidden;
}
html.sc-js body.v5.sc-page.sc-pinned .sc-beat.sc-hero .sc-card {
  max-height: calc(100vh - 56px - var(--sc-nav-clear) - 12px);
  max-height: calc(100svh - 56px - var(--sc-nav-clear) - 12px);
}
html.sc-js body.v5.sc-page.sc-pinned.sc-short .sc-beat:not(.sc-closing):not(.sc-hero) .sc-card {
  max-height: calc(100vh - 20px - var(--sc-nav-clear) - 12px);
  max-height: calc(100svh - 20px - var(--sc-nav-clear) - 12px);
}
body.v5.sc-page.sc-pinned .sc-main h2 { margin: 8px 0 8px; }

@media (prefers-reduced-motion: reduce) {
  body.v5.sc-page .sc-hud { transition: none; }
}
