/* =============================================================================
   Velorex Music — photographic page banners
   Used by: #page-products (Music / Merchandise / Vinyl Care), #page-preowned,
            #page-combos, #page-blog — and the server-rendered versions of the
            same markup in seo-render.php.

   Owns .page-banner and every .page-banner-* rule. The old flat .page-hero in
   pages/storefront.css is still used by cart / profile / login and is left
   alone; these pages swapped their wrapper class rather than restyling
   .page-hero, so there are never two same-specificity definitions of one
   selector racing on <link> order (the trap described in CLAUDE.md §21).

   The one shared class is .page-hero-title on the <h1>. seo-render.php finds
   the heading by that exact opening tag, so it stays, and is restyled here
   through `.page-banner .page-hero-title` — higher specificity than the
   storefront rules, whichever file loads last.

   The banner is dark in BOTH themes: it sits on a photograph, and a photograph
   does not flip with the theme toggle. So every colour below is a literal, not
   a token — --text flips to near-black in light mode and would put dark text
   on a dark photo (the failure mode CLAUDE.md §29 describes).
   ============================================================================= */

.page-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(15rem, 21vw, 18.5rem);
  margin-bottom: 2.5rem;
  background-color: #0b0a10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f5f1ec;
}

/* The photograph. A background, not an <img>: #page-products switches between
   three of them without re-rendering, and a background on a display:none
   section is never downloaded — six <img> tags in six hidden sections would
   all be fetched on first load. These are decorative scenes with nothing a
   search engine should index, so the usual reason to prefer <img> (§28) does
   not apply. */
.page-banner-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: #0b0a10;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: right center;
}

/* Legibility scrim. The copy sits on the left, where every image is darkest,
   but not uniformly dark enough — the Vinyl Care scene has a lit bookshelf
   there. Fades out by ~75% so the right-hand artwork (and the lettering baked
   into it) stays untouched. */
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg,
      rgba(10, 9, 14, 0.94) 0%,
      rgba(10, 9, 14, 0.82) 28%,
      rgba(10, 9, 14, 0.38) 55%,
      rgba(10, 9, 14, 0) 76%),
    linear-gradient(0deg, rgba(10, 9, 14, 0.45) 0%, rgba(10, 9, 14, 0) 45%);
}

.page-banner[data-banner="music"] .page-banner-bg       { background-image: url("../../img/banners/music-vinyl-records-banner.jpg"); }
.page-banner[data-banner="merchandise"] .page-banner-bg { background-image: url("../../img/banners/music-merchandise-banner.jpg"); }
.page-banner[data-banner="vinyl-care"] .page-banner-bg  { background-image: url("../../img/banners/vinyl-care-banner.jpg"); background-position: 70% 62%; }
.page-banner[data-banner="preowned"] .page-banner-bg    { background-image: url("../../img/banners/pre-owned-records-banner.jpg"); }
.page-banner[data-banner="combos"] .page-banner-bg      { background-image: url("../../img/banners/combo-offers-banner.jpg"); }
.page-banner[data-banner="blog"] .page-banner-bg        { background-image: url("../../img/banners/velorex-journal-blog-banner.jpg"); }

.page-banner-inner { width: 100%; padding-block: 2.25rem; }
.page-banner-copy { max-width: 38rem; }

.page-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff6b35;
}
/* #page-products carries one eyebrow per department and shows the one that
   matches data-banner. A class of its own rather than .page-banner-variant,
   whose display values (flex / grid) are tuned for the feature rows. */
.page-banner-eyebrow-variant { display: none; }
.page-banner[data-banner="music"]       .page-banner-eyebrow-variant[data-for="music"],
.page-banner[data-banner="merchandise"] .page-banner-eyebrow-variant[data-for="merchandise"],
.page-banner[data-banner="vinyl-care"]  .page-banner-eyebrow-variant[data-for="vinyl-care"] { display: inline-flex; }
.page-banner-eyebrow::after {
  content: '';
  width: 2.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.page-banner .page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0 0 0.55rem;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
/* The accented half of the heading. Built by heroTitleHtml() in pages.js and
   velorex_banner_title_html() in seo-render.php — same rule in both. */
.page-banner .page-hero-title span { color: #ff6b35; }

.page-banner-tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: #ffffff;
  margin: 0 0 0.45rem;
}
.page-banner-desc {
  max-width: 34rem;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.62;
  color: rgba(245, 241, 236, 0.78);
}

/* Feature row (and the Music stats row, which shares the layout). */
.page-banner-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.25rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.page-banner-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.page-banner-feature > i {
  flex-shrink: 0;
  width: 2rem;
  font-size: 1.55rem;
  text-align: center;
  color: #ff6b35;
}
.page-banner-feature strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
}
.page-banner-feature small {
  display: block;
  font-size: 0.76rem;
  line-height: 1.35;
  color: rgba(245, 241, 236, 0.66);
}

/* Stats sit in a round chip rather than a bare glyph — they are numbers about
   the shelf, not promises, and the mockup separates the two that way. */
.page-banner-stats .page-banner-feature > i {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  font-size: 1rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f1ec;
}
.page-banner-stats .page-banner-feature:last-child > i { color: #ffb020; }
.page-banner-stats .page-banner-feature strong { font-size: 1rem; }

/* One banner, three departments. #page-products carries every variant's
   tagline and feature row in the markup and shows the one matching
   data-banner, so the copy has exactly one home (index.html) and both the
   SPA and seo-render.php switch it by changing a single attribute. */
.page-banner-variant { display: none; }
.page-banner[data-banner="music"]       .page-banner-variant[data-for="music"],
.page-banner[data-banner="merchandise"] .page-banner-variant[data-for="merchandise"],
.page-banner[data-banner="vinyl-care"]  .page-banner-variant[data-for="vinyl-care"] { display: flex; }
.page-banner[data-banner="merchandise"] p.page-banner-variant[data-for="merchandise"],
.page-banner[data-banner="vinyl-care"]  p.page-banner-variant[data-for="vinyl-care"] { display: block; }

@media (max-width: 900px) {
  .page-banner { min-height: 0; margin-bottom: 1.75rem; }
  .page-banner-inner { padding-block: 1.9rem; }
  .page-banner::before {
    background:
      linear-gradient(90deg, rgba(10, 9, 14, 0.92) 0%, rgba(10, 9, 14, 0.7) 60%, rgba(10, 9, 14, 0.35) 100%),
      linear-gradient(0deg, rgba(10, 9, 14, 0.5) 0%, rgba(10, 9, 14, 0) 50%);
  }
  .page-banner[data-banner="music"] .page-banner-bg       { background-image: url("../../img/banners/music-vinyl-records-banner-960.jpg"); }
  .page-banner[data-banner="merchandise"] .page-banner-bg { background-image: url("../../img/banners/music-merchandise-banner-960.jpg"); }
  .page-banner[data-banner="vinyl-care"] .page-banner-bg  { background-image: url("../../img/banners/vinyl-care-banner-960.jpg"); }
  .page-banner[data-banner="preowned"] .page-banner-bg    { background-image: url("../../img/banners/pre-owned-records-banner-960.jpg"); }
  .page-banner[data-banner="combos"] .page-banner-bg      { background-image: url("../../img/banners/combo-offers-banner-960.jpg"); }
  .page-banner[data-banner="blog"] .page-banner-bg        { background-image: url("../../img/banners/velorex-journal-blog-banner-960.jpg"); }
  .page-banner-features { gap: 0.85rem 1.5rem; margin-top: 1.1rem; }
  .page-banner-feature > i { font-size: 1.3rem; width: 1.6rem; }
}

@media (max-width: 560px) {
  .page-banner-bg { background-position: 78% center; }
  .page-banner .page-hero-title { font-size: 2rem; }
  .page-banner-tagline { font-size: 1rem; }
  .page-banner-desc { font-size: 0.9rem; }
  /* Two across on a phone: three in a row wraps unevenly and a lone item on
     its own line reads as an afterthought. */
  /* Only the NON-variant rows get display here. `.page-banner-features` and
     `.page-banner-variant` are the same specificity, so a bare
     `display: grid` on the former came later and beat the variant's
     `display: none` — on phones every department's feature row rendered at
     once (stats + Merchandise + Vinyl Care on /products), tripling the banner.
     The variant rows get their display from the data-banner rules below. */
  .page-banner-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-banner-features:not(.page-banner-variant) { display: grid; }
  /* Stats are three short counts — one row of three, icon over number, rather
     than two-plus-an-orphan. */
  .page-banner-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
  .page-banner-stats .page-banner-feature { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .page-banner-stats .page-banner-feature > i { width: 2.2rem; height: 2.2rem; font-size: 0.9rem; }
  .page-banner-inner { padding-block: 1.5rem; }
  .page-banner { margin-bottom: 1.25rem; }
  .page-banner[data-banner="music"]       .page-banner-variant[data-for="music"],
  .page-banner[data-banner="merchandise"] ul.page-banner-variant[data-for="merchandise"],
  .page-banner[data-banner="vinyl-care"]  ul.page-banner-variant[data-for="vinyl-care"] { display: grid; }
}
