:root {
  --bg: #050505;
  --ink: #e8e0d4;
  --muted: #8a8378;
  --accent: #b31212;
  --accent-soft: rgba(179, 18, 18, 0.45);
  --shadow: rgba(28, 22, 18, 0.92);
  --shade: rgba(8, 6, 5, 0.62);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: "Oswald", "Segoe UI", sans-serif;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.grain,
.vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
}

.fog {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}

.fog-layer {
  position: absolute;
  inset: -20%;
  mix-blend-mode: screen;
  will-change: transform;
}

.fog-layer-a {
  opacity: 0.5;
  background: 
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(110, 18, 14, 0.45), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(48, 42, 40, 0.4), transparent 70%);
  animation: fog-drift-a 15s ease-in-out infinite alternate;
}

.fog-layer-b {
  opacity: 0.4;
  background: 
    radial-gradient(ellipse 45% 35% at 75% 75%, rgba(92, 12, 10, 0.4), transparent 70%),
    radial-gradient(ellipse 55% 45% at 25% 85%, rgba(30, 26, 24, 0.5), transparent 70%);
  animation: fog-drift-b 15s ease-in-out infinite alternate;
}

.fog-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/Fog-noise.png');
  background-repeat: repeat;
  background-size: 512px 512px; /* Lock tile size to match your texture width */
  opacity: 0.12;
  mix-blend-mode: screen;
  animation: fog-creep 30s linear infinite;
}

/* Hardware-accelerated 3D translations */
@keyframes fog-drift-a {
  0%   { transform: translate3d(-3%, 4%, 0) scale(1); }
  100% { transform: translate3d(4%, -3%, 0) scale(1.08); }
}

@keyframes fog-drift-b {
  0%   { transform: translate3d(4%, 2%, 0) scale(1.05); }
  100% { transform: translate3d(-4%, -4%, 0) scale(1); }
}

/* Seamless 100% loop match using container dimensions */
@keyframes fog-creep {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -512px -512px; /* Shifts by exactly 1 full tile width */
  }
}

@media (prefers-reduced-motion: reduce) {
  .fog-layer,
  .fog-texture {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fog-layer,
  .fog-noise {
    animation: none;
  }
}

.grain {
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  background: radial-gradient(ellipse at center, transparent 45%, #000 100%);
}

.header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0.55rem 1.5rem 0.2rem;
  gap: 0.15rem;
}

/* --- Countdown Section --- */
.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
  cursor: default;
}

.countdown.is-released {
  cursor: pointer;
}

.countdown-label {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(0.52rem, 1vw, 0.68rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown-row {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.4rem;
}

.countdown-value {
  font-family: "Oswald", sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-shadow: 0 0 18px var(--accent-soft);
}

.countdown-key {
  margin-top: 0.12rem;
  font-family: "Cinzel", serif;
  font-size: 0.48rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown-sep {
  padding-top: 0.05rem;
  font-size: 1.15rem;
  color: var(--accent);
  opacity: 0.8;
}

.countdown-out-now {
  font-family: "Cinzel", serif;
  font-size: clamp(1.2rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-soft);
  text-transform: uppercase;
  margin: 0.2rem 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.countdown.is-released:hover .countdown-out-now {
  color: var(--ink);
  transform: scale(1.04);
}

/* --- Mobile Responsiveness Adjustments for Countdown --- */
@media (max-width: 900px) and (orientation: landscape) {
  .countdown-label {
    display: none;
  }

  .countdown-value {
    font-size: 0.95rem;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .countdown-label {
    letter-spacing: 0.16em;
    font-size: 0.5rem;
  }
}

.logo {
  width: min(48vw, 680px);
  height: auto;
  max-height: 20vh;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(179, 18, 18, 0.35));
}

main {
  position: relative;
  z-index: 2;
  min-height: 0;
  display: flex;
}

.stage {
  width: 100%;
  min-height: 0;
  display: flex;
}

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  isolation: isolate;
}

.cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(58vh, 30vw);
  transform: translate(-50%, -52%);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.cover.is-center {
  z-index: 5;
  transform: translate(-50%, -52%) scale(1);
}

.cover.is-left {
  z-index: 3;
  transform: translate(calc(-50% - 108%), -52%) scale(0.72);
}

.cover.is-right {
  z-index: 3;
  transform: translate(calc(-50% + 108%), -52%) scale(0.72);
}

.cover.is-behind {
  z-index: 1;
  pointer-events: none;
}

.cover-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 14px 32px var(--shadow);
  transition: box-shadow 0.28s ease;
}

.cover-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, transparent 28%, var(--shade) 100%);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.cover-btn:hover,
.cover-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(90, 70, 55, 0.55),
    0 10px 28px rgba(18, 12, 10, 0.95),
    0 0 42px rgba(40, 28, 22, 0.85);
}

.cover-btn:hover .cover-shade,
.cover-btn:focus-visible .cover-shade {
  opacity: 1;
}

.cover-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 4, 4, 0.58);
  color: #efe6d8;
  pointer-events: none;
}

.cover-lock svg {
  width: min(28%, 72px);
  height: auto;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.85));
}

.cover.is-center .cover-btn {
  cursor: default;
}

.cover-links {
  margin: 0.55rem 0 0;
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  font-family: "Cinzel", serif;
  font-size: clamp(0.7rem, 1.15vw, 0.95rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px #000;
  opacity: 0.55;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 6;
}

.cover.is-center .cover-links {
  opacity: 1;
}

.cover-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cover.is-center .cover-links a {
  color: var(--ink);
}

.cover-links a:hover,
.cover-links a:focus-visible {
  color: var(--accent);
  outline: none;
}

.footer {
  position: relative;
  z-index: 2;
  padding: 0.35rem 1rem 0.7rem;
  margin-top: 1rem;
  text-align: center;
}

.footer-label {
  margin: 0 0 0.45rem;
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}


.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.15rem;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #cfc6b8;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  fill: currentColor;
}

.social:hover,
.social:focus-visible {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-soft);
  outline: none;
}

/* Visibility helper */
.is-hidden {
  display: none !important;
}

/* Released Link Banner (Matching Countdown Style) */
.album-released-link {
  font-family: "Oswald", sans-serif; /* Matches countdown numbers font */
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink); /* Matches countdown color */
  text-shadow: 0 0 18px var(--accent-soft); /* Matches countdown glow */
  text-transform: uppercase;
  text-decoration: none;
  margin: 0.2rem 0;
  transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.album-released-link:hover,
.album-released-link:focus-visible {
  color: #fff;
  text-shadow: 0 0 24px rgba(179, 18, 18, 0.7);
  transform: scale(1.04);
  outline: none;
}

/* Hide cover lock when unlocked */
.cover-lock.is-unlocked {
  display: none !important;
}

@media (max-width: 900px) and (orientation: landscape) {
  .header {
    padding: 0.25rem 1rem 0.1rem;
  }

  .countdown-label {
    display: none;
  }

  .countdown-value {
    font-size: 0.95rem;
  }

  .logo {
    height: min(8vh, 56px);
    max-width: 28vw;
  }

  .cover {
    width: min(58vh, 24vw, 260px);
  }

  .cover.is-left {
    transform: translate(calc(-50% - 68%), -54%) scale(0.56);
  }

  .cover.is-right {
    transform: translate(calc(-50% + 68%), -54%) scale(0.56);
  }

  .footer-label {
    display: none;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .header {
    padding: 0.45rem 0.8rem 0.15rem;
  }

  .countdown-label {
    letter-spacing: 0.16em;
    font-size: 0.5rem;
  }

  .logo {
    height: auto;
    width: min(58vw, 220px);
    max-width: 58vw;
  }

  .cover {
    width: min(46vw, 58vh, 240px);
  }

  .cover.is-left {
    transform: translate(calc(-50% - 58%), -54%) scale(0.5);
  }

  .cover.is-right {
    transform: translate(calc(-50% + 58%), -54%) scale(0.5);
  }

  .footer {
    padding: 0.45rem 0.75rem 0.9rem;
  }

  .socials {
    gap: 0.55rem 0.9rem;
  }

  .footer-label {
    display: none;
  }
}

@media (max-width: 520px) and (orientation: portrait) {
  .logo {
    width: min(64vw, 200px);
  }

  .cover {
    width: min(58vw, 250px);
  }

  .cover.is-left {
    transform: translate(calc(-50% - 42%), -54%) scale(0.46);
  }

  .cover.is-right {
    transform: translate(calc(-50% + 42%), -54%) scale(0.46);
  }

  .cover-links {
    font-size: 0.62rem;
    margin-top: 0.35rem;
    gap: 0.55rem;
  }

  .social {
    font-size: 0.68rem;
  }

  .footer-label {
    display: none;
  }
}

@media (max-width: 760px) {
  /* Enlarge logo and tighten vertical spacing */
  .logo {
    width: 92vw !important;        /* Makes logo take up nearly full viewport width */
    max-width: 440px !important;
    margin-top: 0px !important;  /* Pulls closer to countdown text */
    margin-bottom: 0px !important; /* Reduces gap before album cover */
  }

  /* Reduce top padding on carousel container if needed */
  .carousel-container {
    margin-top: 0px !important;
  }
}

/* --- Interactive Drag & Touch Controls --- */
.carousel {
  touch-action: pan-y;
}

.cover {
  will-change: transform, opacity;
}

/* Disable transition during active dragging for zero-latency finger tracking */
.carousel.is-dragging .cover {
  transition: none !important;
}

/* Base mobile responsive values for JS interpolation */
:root {
  --left-offset: -108%;
  --right-offset: 108%;
  --side-scale: 0.72;
}

@media (max-width: 900px) and (orientation: landscape) {
  :root {
    --left-offset: -68%;
    --right-offset: 68%;
    --side-scale: 0.56;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  :root {
    --left-offset: -58%;
    --right-offset: 58%;
    --side-scale: 0.5;
  }
}

@media (max-width: 520px) and (orientation: portrait) {
  :root {
    --left-offset: -42%;
    --right-offset: 42%;
    --side-scale: 0.46;
  }
}

/* Scope pointer-events passthrough ONLY to touch inputs so desktop clicks/hovers remain intact */
@media (pointer: coarse) {
  .cover-btn,
  .cover-shade,
  .cover img {
    pointer-events: none !important;
    -webkit-user-drag: none;
  }

  .cover-links,
  .cover-links a {
    pointer-events: auto !important;
  }
}

/* --- Header Layout & Video Widget --- */
.header-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* 3 tracks: empty left space, logo center, video right */
  align-items: center;
  width: 100%;
  gap: 1rem;
  padding: 0 1rem;
}

/* Empty pseudo-element to balance the left side and force the logo to stay centered */
.header-main::before {
  content: "";
  display: block;
}

.logo {
  grid-column: 2; /* Forces logo into the center track */
  width: min(48vw, 550px);
  height: auto;
  max-height: 20vh;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(179, 18, 18, 0.35));
}

.video-widget {
  grid-column: 3; /* Places video in the right track */
  justify-self: end; /* Aligns to the far right with margin */
  width: 100%;
  max-width: 360px; /* Adjust this limit if you want it even wider */
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(179, 18, 18, 0.4);
  border: 1px solid rgba(179, 18, 18, 0.3);
}

.video-widget iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 760px) {
  .header-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
  }

  .header-main::before {
    display: none;
  }

  .video-widget {
    width: min(80vw, 360px);
    margin: 0rem 0 3rem 0;
  }
}