/* ================================================================
   THE BREAKBOMB PROJECT — breakbomb.com
   Direction: darkroom editorial. Near-black, paper type, film grain.
   Color exists only inside release artwork.
   Type: Archivo (variable width/weight) · Fragment Mono (meta)
   ================================================================ */

:root {
  /* Lifted, warm blacks — film never hits pure black */
  --bg: #131211;
  --bg-2: #191817;
  --ink: #eceae4;
  --ink-soft: #c9c7c0;
  --dim: #8f8d85;
  --line: rgba(236, 234, 228, 0.16);
  --paper: #e9e7e1;
  --paper-ink: #131311;
  --paper-line: rgba(19, 19, 17, 0.22);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Film layer ----
   Primary: WebGL shader canvas (#film, js/film.js) — per-pixel grain at a
   true 24fps clock + vignette + exposure flicker, at device resolution.
   Fallback: the CSS tile + vignette below (html.no-webgl / no JS). */

#film {
  position: fixed; inset: 0; z-index: 200;
  width: 100%; height: 100%;
  pointer-events: none;
  display: block;
}

/* When the shader is live, the CSS fallback layers stand down */
.webgl body::before, .webgl body::after { content: none; }

/* Emulsion pass — type and B&W imagery sit "in" the film: micro
   displacement + a slight blur (SVG filters defined in index.html).
   Media (artwork, players) stays exempt. The .hero gets one shared
   pass so the difference-blend wordmark keeps compositing correctly. */
.hero,
.head__nav,
.label,
.selected__list,
.release__info,
.release__actions,
.video__name, .video__meta, .video__ext,
.about,
.foot__inner {
  filter: url(#emulsion);
}
/* (story text is excluded — pixel type must stay crisp) */

/* Lens vignette — soft edge falloff, heavier in the corners */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 199;
  pointer-events: none;
  mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse 130% 105% at 50% 45%,
      transparent 58%,
      rgba(10, 9, 8, 0.16) 84%,
      rgba(10, 9, 8, 0.34) 100%);
}

/* Photographic grain — dual-polarity alpha tile (assets/grain.webp):
   bright specks read on dark, dark specks read on the paper footer.
   No blend mode, so it renders identically in every browser.
   Oversized and shuffled at ~12fps in hard steps so it dances like
   projected film. Freeze it by deleting the `animation` line.
   Strength dial: this block's `opacity` (0.5 subtle — 1 heavy). */
body::after {
  content: "";
  position: fixed; inset: -50%; z-index: 200;
  pointer-events: none;
  opacity: 0.5;
  background: url("../assets/grain.webp?v=2") repeat;
  background-size: 384px 384px;
  will-change: transform;
  /* 8 keyframe jumps per cycle / 0.333s = 24fps, matching the shader */
  animation: grainShift 0.3333s steps(1) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  12%  { transform: translate(-2.2%, 1.6%); }
  25%  { transform: translate(1.8%, -2.4%); }
  37%  { transform: translate(-1.2%, -1.8%); }
  50%  { transform: translate(2.4%, 1.2%); }
  62%  { transform: translate(-2.6%, 0.6%); }
  75%  { transform: translate(1.4%, 2.2%); }
  87%  { transform: translate(-0.8%, -2.6%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--bg); }

:focus-visible { outline: 1px dashed var(--ink); outline-offset: 3px; }

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dim { color: var(--dim); }

/* Section titles — heavy, tight-set headers */
.label {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 900;
  font-stretch: 80%;
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  letter-spacing: -0.045em;
  text-transform: uppercase;
  line-height: 1;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

.section {
  padding: clamp(3.5rem, 7vw, 6rem) var(--pad);
  scroll-margin-top: 4.5rem;
}

/* Action link / button */
.act {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.6em 1em;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.act:hover, .act:focus-visible {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.act:active { transform: translateY(1px); }

/* ---------------- Header ---------------- */

.head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  transition: background 250ms ease, border-color 250ms ease;
  border-bottom: 1px solid transparent;
}
.head.is-scrolled {
  background: rgba(15, 15, 14, 0.92);
  border-bottom-color: var(--line);
}
.head__mark img { width: 34px; height: 34px; }
.head__nav { display: flex; gap: clamp(0.9rem, 2.5vw, 1.8rem); flex-wrap: wrap; }
.head__nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 140ms ease;
}
.head__nav a:hover, .head__nav a:focus-visible { color: var(--ink); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.hero__photo {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 32%;
  /* Aged silver print: mono, slight warm tone, gently faded contrast */
  filter: grayscale(1) sepia(0.14) contrast(0.99) brightness(0.9);
  /* Parallax: the banner lags behind the scroll (main.js, rAF,
     transform-only) while the logo and bar move normally.
     The scale guards the exposed edge during the shift. */
  transform: scale(1.08);
  will-change: transform;
}
/* Lockup carries the difference blend itself (a transformed ancestor would
   isolate the blend from the photo, so the rise animation lives here too) */
.hero__lockup {
  position: absolute;
  left: var(--pad); right: var(--pad);
  bottom: clamp(9rem, 20vh, 13rem);
  mix-blend-mode: difference;
  opacity: 0.4;   /* inverted pass — 40% */
}
.hero__title {
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(2.5rem, 10.2vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #fff;
  user-select: none;
}
.hero__title.has-img .hero__title-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%);
}

/* Solid white pass stacked over the inverted pass —
   opacity sets the white/invert mix (lower = more invert) */
.hero__lockup--solid {
  mix-blend-mode: normal;
  opacity: 0.6;   /* white pass — 60% */
  pointer-events: none;
}
.hero__wordmark {
  display: block;
  width: clamp(300px, 52vw, 780px);
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.hero__latest {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 1.4rem;
  padding: clamp(1.5rem, 3.2vh, 2.2rem) var(--pad);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.hero__play {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0.75em 1.3em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}
.hero__play:hover, .hero__play:focus-visible { background: var(--ink); color: var(--bg); }
.hero__play:active { transform: translateY(1px); }
.hero__latest-name {
  font-weight: 700;
  font-stretch: 90%;
  font-size: clamp(1.15rem, 2.9vw, 1.8rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero__latest-name em { font-style: normal; color: var(--dim); }
.hero__latest-link { white-space: nowrap; color: var(--ink); }
.hero__latest-link:hover { color: var(--dim); }

/* Waveform seek bar — click or drag to scrub */
.hero__wave {
  flex: 1 1 220px;
  min-width: 140px;
  height: 44px;
  cursor: pointer;
  touch-action: none;
  align-self: center;
}
.hero__wave:focus-visible { outline: 1px dashed var(--ink); outline-offset: 4px; }
.hero__wave canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 760px) {
  .hero__latest { flex-wrap: wrap; gap: 0.6rem 1rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
  .hero__latest-name { white-space: normal; }
  .hero__wave { flex-basis: 100%; order: 5; height: 36px; }
  /* Anchor the lockup from the top on phones so it can never
     collide with the (taller, wrapped) latest bar at the bottom */
  .hero__lockup {
    bottom: auto;
    top: clamp(7rem, 16vh, 10rem);
  }
  .hero__wordmark { width: clamp(240px, 62vw, 340px); }
}

/* Load moment — one staggered rise, CSS only */
@media (prefers-reduced-motion: no-preference) {
  .hero__lockup, .hero__latest {
    animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hero__lockup { animation-delay: 0.08s; }
  .hero__latest { animation-delay: 0.28s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- Selected ---------------- */

.selected { padding: clamp(3.5rem, 7vw, 6rem) var(--pad) clamp(1.25rem, 2.5vw, 2rem); }
#music { padding-top: clamp(1.75rem, 3.5vw, 3rem); }
.selected .label { margin-bottom: 0; }
.selected__list { list-style: none; }
.selected__list li { border-bottom: 1px solid var(--line); }
.selected__list li > a,
.selected__list li > span:first-child { transition: background 140ms ease; }
.selected__list li > a,
.selected__list li:not(:has(a)) {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.35rem 2rem;
  padding: 1.15rem 0;
}
.selected__list li > a:hover { background: var(--bg-2); }
.selected__what {
  font-weight: 700;
  font-stretch: 78%;
  font-size: clamp(1.35rem, 3.4vw, 2.35rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.selected__who { color: var(--dim); text-align: right; }

/* ---------------- Music index ---------------- */

#music .label { margin-bottom: 0; }

.release {
  display: grid;
  grid-template-columns: clamp(84px, 12vw, 128px) 1fr auto;
  gap: clamp(1rem, 3vw, 2.2rem);
  align-items: center;
  padding: clamp(1.2rem, 2.5vw, 1.8rem) 0;
  border-bottom: 1px solid var(--line);
  transition: background 140ms ease;
}
.release:hover { background: var(--bg-2); }

.release__art { align-self: center; }
.release__art img {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 1 / 1; object-fit: cover;
  border: 1px solid var(--line);
}
/* Artwork keeps its color — the only color on the site */
.artwork img { filter: none; }

/* Typographic plate when artwork is unavailable */
.release__art--type {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
}
.release__art--type span {
  font-weight: 900;
  font-stretch: 66%;
  font-size: clamp(0.95rem, 1.9vw, 1.35rem);
  line-height: 1.05;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: center;
}

.release__meta { color: var(--dim); margin-bottom: 0.4rem; }
.release__name {
  font-weight: 900;
  font-stretch: 66%;
  font-size: clamp(2.3rem, 6.5vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.release__actions {
  display: flex; flex-direction: column; gap: 0.7rem; align-items: stretch;
}
.release__actions .act {
  font-size: 0.88rem;
  padding: 0.9em 2.6em;
  min-width: 190px;
  text-align: center;
}
.release__player { grid-column: 1 / -1; }
.release__player iframe { width: 100%; border: 0; display: block; }

@media (max-width: 640px) {
  .release { grid-template-columns: 84px 1fr; }
  .release__actions { grid-column: 1 / -1; flex-direction: row; }
  .release__actions .act { flex: 1; text-align: center; min-width: 0; padding: 0.9em 1em; }
}

/* ---------------- Video ---------------- */

.video { max-width: 1020px; margin: 0 auto; text-align: center; }
.video__name {
  font-weight: 900;
  font-stretch: 66%;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.95;
  text-transform: uppercase;
}
.video__meta { color: var(--dim); margin: 0.7rem 0 1.6rem; }
.video__player {
  position: relative;
  cursor: pointer;
  border: 1px solid var(--line);
}
.video__player img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  filter: grayscale(1) sepia(0.14) contrast(1.02);
}
.video__player iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.video__cue {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  background: rgba(15, 15, 14, 0.35);
  font-size: 0.95rem;
  transition: background 140ms ease;
}
.video__player:hover .video__cue, .video__player:focus-visible .video__cue {
  background: rgba(15, 15, 14, 0.12);
}
.video__ext { display: inline-block; margin-top: 1.1rem; color: var(--dim); transition: color 140ms ease; }
.video__ext:hover, .video__ext:focus-visible { color: var(--ink); }

/* ---------------- Story: Group G.C. (8-bit grey, logo + bio only) ---------------- */

.section--story {
  background: #2e2e2b;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  /* clear break line + air between the video section and Group G.C. */
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.story {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.story__mark {
  display: inline-block;
  width: clamp(150px, 19vw, 220px);
  margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem);
  opacity: 0.92;
  transition: opacity 200ms ease, transform 300ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.story__mark:hover, .story__mark:focus-visible { opacity: 1; transform: scale(1.04); }
.story__mark img { display: block; width: 100%; height: auto; }
.story__text {
  max-width: 66ch;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.32);
  padding: clamp(1.5rem, 3.5vw, 2.6rem);
}
.story__text p {
  font-family: "Jersey 15", var(--mono);
  text-transform: uppercase;
  color: #d9d7d0;
  line-height: 1.6;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  letter-spacing: 0.02em;
}
.story__text p + p { margin-top: 1.4rem; }

/* ---------------- About — split layout, full-bleed photo ---------------- */

.section--about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  scroll-margin-top: 4.5rem;
  /* full-width rule separating About from the sign-up button */
  border-bottom: 1px solid var(--line);
}
.about__text {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(1.5rem, 3vw, 2.5rem) var(--pad);
}
.about__lede {
  font-weight: 500;
  font-size: clamp(1.45rem, 3.2vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.about__body {
  margin-top: 1.4rem;
  color: var(--ink-soft);
  line-height: 1.75;
  max-width: 58ch;
}
.about__press { margin-top: 2.2rem; color: var(--dim); }

/* Photo bleeds to the section's top, bottom, and right edges */
.about__photo { margin: 0; }
.about__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
}

@media (max-width: 820px) {
  .section--about { grid-template-columns: 1fr; gap: 0; }
  .about__text { padding-right: var(--pad); }
  .about__photo img { height: auto; max-height: 70vh; }
}

/* ---------------- Footer (inverted paper) ---------------- */

.foot {
  background: var(--paper);
  color: var(--paper-ink);
  margin-top: clamp(0.5rem, 2vw, 1.5rem);
}
.foot__inner { padding: clamp(4rem, 8vw, 6.5rem) var(--pad) 1.4rem; }
.foot .label { color: rgba(19, 19, 17, 0.55); border-bottom-color: var(--paper-line); }
.foot__booking {
  display: inline-block;
  font-weight: 900;
  font-stretch: 72%;
  font-size: clamp(2.1rem, 6.5vw, 5.2rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.foot__booking span { display: inline-block; transition: transform 180ms ease; }
.foot__booking:hover span, .foot__booking:focus-visible span { transform: translateX(0.35em); }
.foot__social {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem;
  margin-top: clamp(2.2rem, 5vw, 3.5rem);
}
.foot__social a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(19, 19, 17, 0.72);
  transition: color 140ms ease;
}
.foot__social a::after { content: "\2009\2197"; }
.foot__social a:hover, .foot__social a:focus-visible { color: var(--paper-ink); }
.foot__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  border-top: 1px solid var(--paper-line);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.1rem;
  color: rgba(19, 19, 17, 0.55);
}
.foot ::selection { background: var(--paper-ink); color: var(--paper); }

/* ---------------- Release NEW tag (added by JS, 45 days) ---------------- */
.tag-new {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  border: 1px solid var(--ink);
  padding: 0.1em 0.55em;
  margin-left: 0.7rem;
  vertical-align: 0.15em;
}

/* ---------------- Sign up — one large button ---------------- */
#signup {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.signup-cta {
  display: block;
  text-align: center;
  border: 1px solid var(--line);
  padding: clamp(1.6rem, 4vw, 2.6rem) 1.5rem;
  font-weight: 900;
  font-stretch: 72%;
  font-size: clamp(1.5rem, 4.2vw, 3.2rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.signup-cta span { display: inline-block; transition: transform 180ms ease; }
.signup-cta:hover, .signup-cta:focus-visible {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.signup-cta:hover span { transform: translate(0.12em, -0.12em); }
.signup-cta:active { transform: translateY(1px); }

/* ---------------- Story: scroll-linked exposure develop ---------------- */
@supports (animation-timeline: view()) {
  .js .story__text.reveal:not(.is-in) { opacity: 1; transform: none; }
  .story__text p {
    animation: develop linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 55%;
  }
}
@keyframes develop {
  from { opacity: 0.08; }
  to { opacity: 1; }
}

/* ---------------- Scroll reveals ---------------- */

.js .reveal {
  opacity: 1; transform: none;
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(16px); }

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal:not(.is-in) { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}
