/* ==========================================================================
   my dyingDay — The God I Know
   Palette and type pulled from the single cover: black water, slate stone,
   tarnished gold in the cracks, bone white text.
   ========================================================================== */

:root {
  --bg: #050607;
  --bg-2: #0b0d10;
  --stone: #16191d;
  --stone-2: #22262b;
  --line: rgba(233, 228, 216, 0.09);
  --gold: #c9a24a;
  --gold-bright: #e8c66b;
  --gold-deep: #7d5f1f;
  --bone: #e9e4d8;
  --mute: #8d9197;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* ---------- film grain over everything ---------- */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 50;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 300px 300px;
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-30px, 20px); }
  40% { transform: translate(20px, -40px); }
  60% { transform: translate(-50px, -10px); }
  80% { transform: translate(40px, 30px); }
  100% { transform: translate(0, 0); }
}

/* ---------- header ---------- */
.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(to bottom, rgba(5, 6, 7, 0.85), rgba(5, 6, 7, 0));
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--bone);
}
.wordmark b { font-weight: 700; }
.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.site-nav a { transition: color 0.25s; }
.site-nav a:hover { color: var(--gold-bright); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  background: transparent;
  overflow: hidden;
  transition: color 0.35s, border-color 0.35s, transform 0.35s var(--ease);
  isolation: isolate;
}
.btn::before {
  /* gold seeping in from the crack at the bottom */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, var(--gold-deep), var(--gold));
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
  clip-path: polygon(0 100%, 12% 92%, 25% 97%, 40% 90%, 55% 96%, 70% 89%, 85% 95%, 100% 91%, 100% 100%);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.btn:hover, .btn:focus-visible { color: #0a0804; transform: translateY(-1px); }
.btn--ghost {
  border-color: transparent;
  color: rgba(233, 228, 216, 0.85);
  background: rgba(233, 228, 216, 0.035);
}
.btn--ghost::before { background: rgba(233, 228, 216, 0.09); }
.btn--ghost:hover { color: var(--bone); border-color: transparent; }
.btn--small { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  overflow: hidden;
  /* matches the sky at the top edge of the cover, so the band above the
     image reads as more sky */
  background: radial-gradient(ellipse 70% 60% at 50% 0%, #121e26 0%, #0e171d 45%, #090f12 100%);
}
/* The stage: a box with the cover's exact aspect ratio, scaled to cover the
   viewport and pinned to the top so the sky above the crown survives. Every
   layer inside is positioned in percentages of this box. */
.stage {
  --stage-ratio: 1.0849;           /* 3604 / 3322 */
  position: absolute;
  top: 0;
  left: 50%;
  width: max(100vw, calc(100vh * var(--stage-ratio)));
  width: max(100vw, calc(100svh * var(--stage-ratio)));
  aspect-ratio: 3604 / 3322;
  transform: translateX(-50%);
  transform-origin: 50% 35%;
  animation: breathe 40s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes breathe {
  from { transform: translateX(-50%) scale(1); }
  to { transform: translateX(-50%) scale(1.05); }
}
.stage__bg,
.stage__fog {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}
.stage__bg { object-fit: cover; display: block; }
.stage__fog { mix-blend-mode: screen; }
.stage__fog--back { opacity: 0.9; }
.stage__fog--front { opacity: 0.5; }

/* bounding box of the figure cut-out, in percent of the stage */
.stage__figure {
  position: absolute;
  left: 35.0166%;
  top: 14.0578%;
  width: 29.9667%;
  height: 54.6659%;
  will-change: transform;
}
.stage__figure img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.stage__reflection {
  top: 100% !important;
  transform: scaleY(-1);
  opacity: 0.3;
  filter: url(#ripple) blur(1.5px);
  /* opaque nearest the figure's base (the element's bottom edge before the flip) */
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 28%, transparent 62%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 28%, transparent 62%);
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(0,0,0,0) 35%, rgba(5,6,7,0.55) 100%),
    linear-gradient(to bottom, rgba(5,6,7,0.35) 0%, rgba(5,6,7,0) 25%, rgba(5,6,7,0) 55%, rgba(5,6,7,0.92) 92%, var(--bg) 100%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.25rem clamp(3.5rem, 9vh, 7rem);
  max-width: 900px;
}
.eyebrow {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero__title {
  margin: 0 0 1.6rem;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(2.6rem, 8.5vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--bone);
  text-shadow: 0 2px 40px rgba(0,0,0,0.8);
}

.countdown { margin: 0 auto 1.8rem; }
.countdown__label {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mute);
}
.countdown__grid {
  display: inline-grid;
  grid-auto-flow: column;
  gap: clamp(0.8rem, 3vw, 2.2rem);
}
.countdown__cell {
  display: grid;
  gap: 0.1rem;
  min-width: 3.2ch;
}
.countdown__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--gold-bright);
  text-shadow: 0 0 30px rgba(201, 162, 74, 0.25);
}
.countdown__unit {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mute);
}
.hero__out {
  margin: 0 0 1.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.scroll-hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  z-index: 3;
  width: 1px;
  height: 44px;
  overflow: hidden;
  opacity: 0.6;
}
.scroll-hint span {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  animation: drip 2.4s ease-in-out infinite;
}
@keyframes drip {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

/* ---------- generic section ---------- */
.section {
  position: relative;
  padding: clamp(5rem, 11vw, 9rem) 0;
  overflow: hidden;
}
.wrap {
  position: relative;
  z-index: 1;
  width: min(var(--wrap), calc(100% - 2 * clamp(1.25rem, 5vw, 3.5rem)));
  margin: 0 auto;
}
.h-display {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--bone);
}
.lede {
  font-size: 1.15rem;
  max-width: 52ch;
  color: rgba(233, 228, 216, 0.85);
}
.lede em { font-style: normal; color: var(--gold-bright); }

/* gold cracks drawn by JS */
.cracks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  /* keep the middle clear so cracks never run through the content */
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 50%, transparent 35%, #000 100%);
  mask-image: radial-gradient(ellipse 55% 60% at 50% 50%, transparent 35%, #000 100%);
}
.cracks path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-linejoin: miter;
  stroke-linecap: butt;
  transition: stroke-dashoffset 2.8s var(--ease);
}
.cracks path.branch { stroke-width: 0.6; opacity: 0.7; }

/* section dividers: a split in the stone */
.divider { height: 40px; position: relative; z-index: 2; margin: -20px 0; }
.divider svg { width: 100%; height: 100%; display: block; }
.divider__line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  opacity: 0.45;
  vector-effect: non-scaling-stroke;
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- the single ---------- */
.section--single { background: linear-gradient(to bottom, var(--bg), var(--bg-2)); }
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.sleeve {
  margin: 0;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,162,74,0.25);
  transition-delay: 0.1s;
}
.sleeve::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(233,228,216,0.06);
  pointer-events: none;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 1.5rem 2.5rem;
  margin: 1.8rem 0 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--mute);
}
.facts dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--gold-bright);
}

.player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: rgba(22, 25, 29, 0.6);
}
.player__btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  cursor: pointer;
  position: relative;
}
.player__btn::before {
  content: "";
  position: absolute;
  left: 55%; top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--gold-bright);
}
.player__btn.is-playing::before {
  left: 50%;
  width: 12px; height: 14px;
  border: 0;
  border-left: 4px solid var(--gold-bright);
  border-right: 4px solid var(--gold-bright);
}
.player__wave { width: 100%; height: 56px; display: block; cursor: pointer; }
.player__time { font-family: var(--font-display); color: var(--mute); font-variant-numeric: tabular-nums; }

/* ---------- listen ---------- */
.section--listen { background: var(--bg-2); }
.releases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 2.5rem 0 2rem;
}
.release {
  display: grid;
  gap: 0.3rem;
  padding: 2rem 1.6rem 1.8rem;
  background: rgba(233, 228, 216, 0.025);
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}
.release::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(to right, var(--gold-deep), var(--gold-bright), var(--gold-deep));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.release:hover { background: rgba(233, 228, 216, 0.06); }
.release:hover::after { transform: scaleX(1); }
.release__year { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.3em; color: var(--gold); }
.release__title { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; line-height: 1.05; text-transform: uppercase; }
.release__type { font-size: 0.95rem; color: var(--mute); }
.release:nth-child(2) { transition-delay: 0.12s; }
.release:nth-child(3) { transition-delay: 0.24s; }

.embed { border: 1px solid var(--line); background: var(--stone); }
.embed iframe { display: block; border: 0; }
.links { margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.8rem; font-family: var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.9rem; color: var(--mute); }
.links a { color: var(--bone); border-bottom: 1px solid var(--gold-deep); transition: color 0.3s, border-color 0.3s; }
.links a:hover { color: var(--gold-bright); border-color: var(--gold-bright); }

/* ---------- band ---------- */
.section--band { background: linear-gradient(to bottom, var(--bg-2), var(--bg)); }
.band__photo {
  position: relative;
  margin: 2.5rem 0 0;
  aspect-ratio: 851 / 232;
  background: url("../assets/band.jpg") center bottom / cover no-repeat;
  filter: grayscale(1) contrast(1.1);
  border: 1px solid var(--line);
  overflow: hidden;
}
.band__photo::before, .band__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  opacity: 0;
  pointer-events: none;
}
.band__photo::before { mix-blend-mode: screen; filter: hue-rotate(40deg) saturate(3); }
.band__photo::after  { mix-blend-mode: screen; filter: hue-rotate(-60deg) saturate(3); }
.band__photo:hover::before { opacity: 0.8; animation: glitch-a 0.9s steps(2) infinite; }
.band__photo:hover::after  { opacity: 0.8; animation: glitch-b 1.1s steps(3) infinite; }
@keyframes glitch-a {
  0%   { clip-path: inset(10% 0 70% 0); transform: translate(-6px, 0); }
  25%  { clip-path: inset(55% 0 20% 0); transform: translate(5px, 0); }
  50%  { clip-path: inset(30% 0 45% 0); transform: translate(-3px, 0); }
  75%  { clip-path: inset(80% 0 5% 0);  transform: translate(7px, 0); }
  100% { clip-path: inset(5% 0 85% 0);  transform: translate(-4px, 0); }
}
@keyframes glitch-b {
  0%   { clip-path: inset(60% 0 10% 0); transform: translate(5px, 0); }
  33%  { clip-path: inset(15% 0 65% 0); transform: translate(-7px, 0); }
  66%  { clip-path: inset(40% 0 35% 0); transform: translate(4px, 0); }
  100% { clip-path: inset(75% 0 15% 0); transform: translate(-5px, 0); }
}
.band__quote {
  margin: 2.5rem 0 0;
  padding-left: 1.4rem;
  border-left: 1px solid var(--gold);
  max-width: 48ch;
}
.band__quote p {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 300;
  color: rgba(233, 228, 216, 0.9);
}

/* ---------- follow ---------- */
.section--follow { background: var(--bg); }
.follow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-height: 190px;
  padding: 1.6rem 1.4rem;
  background: rgba(233, 228, 216, 0.025);
  transition: background 0.4s;
}
.card:hover { background: rgba(233, 228, 216, 0.06); }
.card__kicker { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; text-transform: uppercase; }
.card__arrow {
  position: absolute;
  right: 1.3rem; bottom: 1.1rem;
  font-size: 1.4rem;
  color: var(--gold-bright);
  transform: translateX(-6px);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s;
}
.card:hover .card__arrow { transform: none; opacity: 1; }
.card:nth-child(2) { transition-delay: 0.1s; }
.card:nth-child(3) { transition-delay: 0.2s; }
.card:nth-child(4) { transition-delay: 0.3s; }

/* ---------- footer ---------- */
.site-foot {
  padding: 3rem 1rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--line);
  background: #000;
}
.site-foot__logo {
  width: 150px;
  margin: 0 auto 0.5rem;
  filter: drop-shadow(0 0 18px rgba(0,0,0,0.6));
  opacity: 0.9;
}
.site-foot__text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sleeve { max-width: 520px; margin: 0 auto; }
  .releases { grid-template-columns: 1fr; }
  .follow-grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .site-head .btn { margin-left: auto; }
  .hero__content { padding-bottom: 4rem; }
  .countdown__grid { gap: 1rem; }
  .countdown__num { font-size: 2.6rem; }
  .eyebrow { letter-spacing: 0.22em; font-size: 0.8rem; }
  .hero__actions .btn { width: 100%; max-width: 320px; }
  .follow-grid { grid-template-columns: 1fr; }
  .band__photo { aspect-ratio: 851 / 232; }
  .embed iframe { height: 380px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .stage, .scroll-hint span, .band__photo:hover::before, .band__photo:hover::after { animation: none; }
  .stage__reflection { filter: blur(1.5px); }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cracks path { transition: none; }
}
