/* DJs ON GOLD v2 — main.css
   Ported from the locked canvas (design-src/DJs-ON-GOLD-Desktop.dc.html).
   Section 1: global base + keyframes, copied verbatim from the canvas <helmet><style>.
   Section 2: layout classes added during the port, used only as responsive
   hooks (grid/flex structure) — no color or copy lives here. Desktop
   (>=1000px) values match the canvas inline styles exactly; the >=1000px
   contract is therefore untouched by anything in this file except where
   noted.
   Section 3: mobile (<1000px) adaptations — single/2-col stacking, fluid
   type, the mobile hero crop switch, and the never-horizontal-scroll rule.
   Section 4: fxdebug crosshair (gate affordance) + reduced-motion note.
*/

/* ============================= 1. Base ================================= */
html { scroll-behavior: smooth; }
body { margin: 0; background: #08060B; -webkit-font-smoothing: antialiased; }
a { color: #E8B84B; text-decoration: none; }
a:hover { color: #F6D98A; }
::selection { background: rgba(232,184,75,.3); color: #F4E9D2; }
img { max-width: 100%; display: block; }

@keyframes sealPress { 0% { transform: scale(1.75) rotate(-7deg); opacity: 0; filter: blur(7px); } 55% { transform: scale(.955) rotate(0deg); opacity: 1; filter: blur(0); } 72% { transform: scale(1.035); } 100% { transform: scale(1); } }
@keyframes flood { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.35); } 40% { opacity: .95; } 100% { opacity: .4; transform: translate(-50%,-50%) scale(1); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes wave { 0%, 100% { transform: scaleY(.34); } 50% { transform: scaleY(1); } }
@keyframes aurora { 0% { transform: translate3d(0,0,0) rotate(0deg) scale(1); } 100% { transform: translate3d(-60px,40px,0) rotate(14deg) scale(1.14); } }
@keyframes sporeHero { 0% { transform: translate3d(0,0,0) scale(.6); opacity: 0; } 12% { opacity: .9; } 55% { transform: translate3d(34px,-320px,0) scale(1.15); } 88% { opacity: .45; } 100% { transform: translate3d(-24px,-640px,0) scale(.5); opacity: 0; } }
@keyframes sporeNight { 0% { transform: translate3d(0,0,0) scale(.55); opacity: 0; } 14% { opacity: .85; } 52% { transform: translate3d(-30px,-420px,0) scale(1.2); } 86% { opacity: .4; } 100% { transform: translate3d(26px,-860px,0) scale(.5); opacity: 0; } }
@keyframes emberPulse { 0%, 100% { opacity: .32; } 50% { opacity: .72; } }
@keyframes cueDrop { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(9px); opacity: 1; } }
@keyframes sunTurn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes sunTurnBack { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes sunBreathe { 0%, 100% { opacity: .2; } 50% { opacity: .46; } }
@keyframes sporeBurst { 0% { transform: translate3d(0,0,0) scale(.25); opacity: 0; } 14% { opacity: .95; } 100% { transform: translate3d(var(--tx,0px),var(--ty,-160px),0) scale(1.2); opacity: 0; } }
@keyframes driftUp { 0% { transform: translate3d(0,0,0) scale(.7); opacity: 0; } 16% { opacity: .5; } 100% { transform: translate3d(26px,-640px,0) scale(1.1); opacity: 0; } }
@keyframes eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
@keyframes sunHalo { 0%, 100% { opacity: .3; transform: scale(.93); } 50% { opacity: .6; transform: scale(1.07); } }

/* ======================== 2. Layout / page shell ======================= */
.page {
  width: 100%;
  min-width: 1180px;
  background: #08060B;
  font-family: 'Frank Ruhl Libre', Georgia, serif;
  color: #F4E9D2;
  overflow-x: clip;
}

/* Desktop hero art: default background is the responsive desktop hero.
   The [data-sun-art] container's aspect-ratio is what placeSun() measures
   against — IW=1916,IH=821 below 1000px is swapped for the mobile crop
   (see js/main.js DESKTOP/MOBILE anchor constants). */
[data-sun-art] {
  aspect-ratio: 1916 / 821;
  background-image: url('../uploads/hero-chain-panorama-MASTER.png');
  background-image: -webkit-image-set(
    url('../uploads/hero-chain-panorama-960.webp') 1x,
    url('../uploads/hero-chain-panorama-1440.webp') 1.5x,
    url('../uploads/hero-chain-panorama-1916.webp') 2x
  );
  background-image: image-set(
    url('../uploads/hero-chain-panorama-960.webp') 1x,
    url('../uploads/hero-chain-panorama-1440.webp') 1.5x,
    url('../uploads/hero-chain-panorama-1916.webp') 2x
  );
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ==================== 3. Mobile / responsive (<1000px) ================= */
@media (max-width: 999px) {
  .page { min-width: 0; }
  html, body { overflow-x: hidden; }

  /* mobile hero crop swap — pairs with js/main.js MOBILE anchor constants
     (IW2=700, IH2=821, SX2=244, SY2=210). A taller box + a narrower source
     window centers the sun clear of the headline text below it (v1 used
     IW2=1300 at aspect 6/5, which left the sun directly behind "DJs ON
     GOLD" -- see BUILD-REPORT). The dancer chain (~x1000+ in the master)
     no longer fits at this width; brief's own fallback -- "prioritize the
     sun + wordmark legibility" -- covers that trade. */
  [data-sun-art] {
    aspect-ratio: 4 / 5;
    background-image: url('../uploads/hero-mobile-700.jpg');
    background-image: -webkit-image-set(
      url('../uploads/hero-mobile-350.webp') 1x,
      url('../uploads/hero-mobile-700.webp') 2x
    );
    background-image: image-set(
      url('../uploads/hero-mobile-350.webp') 1x,
      url('../uploads/hero-mobile-700.webp') 2x
    );
  }

  /* header: allow wrap onto a second row instead of a hamburger (canvas has
     no menu-drawer spec — every original link stays visible, just wraps) */
  .site-header {
    flex-wrap: wrap;
    row-gap: 12px;
    padding: 14px 20px !important;
  }
  .site-header nav {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start !important;
    gap: 12px 16px !important;
  }
  [data-radio-panel] { right: 20px !important; left: 20px !important; width: auto !important; }

  /* hero copy block: kill the 22%-indent + 372px min-width that would force
     horizontal scroll, and fluid-scale the type */
  .hero-copy {
    margin-inline-start: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 22px !important;
  }
  .hero-copy .h1 { font-size: clamp(44px, 13vw, 64px) !important; }
  .hero-copy .lede { font-size: clamp(16px, 4.6vw, 18px) !important; }

  /* generic section padding / headline scale */
  section { padding-left: 0; padding-right: 0; }
  .section-inner { padding: 0 22px !important; }
  .h2 { font-size: clamp(34px, 9vw, 44px) !important; }
  .lede { font-size: clamp(16px, 5vw, 19.5px) !important; line-height: 1.65 !important; }

  /* row/grid stacking */
  .section-head-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 20px !important;
  }
  .section-head-row p { max-width: 100% !important; }

  .stack-mobile { grid-template-columns: 1fr !important; }
  .grid2-mobile { grid-template-columns: repeat(2, 1fr) !important; }

  .next-journey-band {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 28px !important;
  }
  .next-journey-band > div:last-child { align-items: flex-start !important; width: 100%; }

  .spotlight-row {
    grid-template-columns: 96px 1fr !important;
    row-gap: 10px !important;
  }
  .spotlight-row > span:last-child,
  .spotlight-row > span:nth-child(3) { grid-column: 1 / -1; }

  .chapter-band-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 18px !important;
  }

  .ch5-teaser-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .ch5-teaser-left { flex-wrap: wrap !important; row-gap: 8px !important; }

  .footer-grid { grid-template-columns: 1fr 1fr !important; row-gap: 34px; }
  .footer-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }

  h1, h2 { text-wrap: balance; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .spotlight-row { grid-template-columns: 80px 1fr !important; }
  .grid2-mobile { grid-template-columns: 1fr !important; }
}

/* ============ 4. fxdebug crosshair + reduced-motion note ================
   prefers-reduced-motion handling is done in JS (main.js apply/motionOn) so
   that animated elements FREEZE VISIBLE at their current declared frame
   rather than disappearing — never display:none, per the brief. */
[data-fxdebug-mark] {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 999;
}
[data-fxdebug-mark]::before,
[data-fxdebug-mark]::after {
  content: '';
  position: absolute;
  background: #FF2D5E;
}
[data-fxdebug-mark]::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-1px); }
[data-fxdebug-mark]::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-1px); }
[data-fxdebug-mark] span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #FF2D5E;
}
