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

/* GLOBAL */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  padding: 2rem 1.5rem 4rem;
}

header {
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: 0.15em;
}

.subtitle {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* TRACK LIST */
.tracklist {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.track {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.track span {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* AUDIO */
audio {
  width: 100%;
}

.progress {
  cursor: pointer;
}

.progress:active .progress-fill {
  opacity: 0.6;
}

/* PAGE FADE */
.page-fade {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 999;
}

.page-fade.active {
  opacity: 1;
}

/* SIDE A — AGGRESSIVE */
.side-a {
  background: radial-gradient(circle at center, #0b0d12, #000);
  color: #fff;
  min-height: 100vh;
}

.side-a h1 {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.side-a .track span {
  text-transform: uppercase;
}

.side-a audio {
  filter: contrast(1.2);
}

/* SIDE B — SMOOTH */
.side-b {
  background: linear-gradient(180deg, #0f1116, #1a1d24);
  color: #000;
}

.side-b h1 {
  font-weight: 300;
  letter-spacing: 0.2em;
}

.side-b .track span {
  text-transform: uppercase;
}

.side-b audio {
  filter: brightness(0.9);
}

/* MOBILE COMFORT */
@media (min-width: 768px) {
  body {
    max-width: 600px;
    margin: auto;
  }
}

/* TRACK CONTAINER */
.track {
  position: relative;
}

/* INVERSION OVERLAY SIDE A*/
.invert-overlay-a {
  position: absolute;
  inset: -10px;
  border-radius: 16px;

  /* THE ACTUAL EFFECT */
  backdrop-filter: invert(1) contrast(1.3);
  -webkit-backdrop-filter: invert(1) contrast(1.3);

  /* IMPORTANT */
  background: transparent;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}


/* INVERSION STATE SIDE A*/
.track.is-reinterpreted .invert-overlay-a {
  opacity: 1;
}

/* INVERSION OVERLAY SIDE B*/
.invert-overlay-b {
  position: absolute;
  inset: -10px;
  border-radius: 16px;

  /* THE ACTUAL EFFECT */
  backdrop-filter: invert(1) contrast(1.3);
  -webkit-backdrop-filter: invert(1) contrast(1.3);

  /* IMPORTANT */
  background: transparent;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}


/* INVERSION STATE SIDE B*/
.track.is-reinterpreted .invert-overlay-b {
  opacity: 1;
}


/* =========================
   LANDING PAGE
========================= */

.landing {
  background: radial-gradient(circle at center, #0b0d12, #000);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-container {
  text-align: center;
  max-width: 480px;
  padding: 2rem;
}

.landing-title-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.landing h1 {
  font-size: 3rem;
  letter-spacing: 0.25em;
  margin-bottom: 0;
}

.album-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;

  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: none;
  color: inherit;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9rem;

  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.album-info-btn:hover {
  opacity: 1;
  border-color: #fff;
  transform: scale(1.08);
}

.landing-text {
  font-size: 0.95rem;
  opacity: 0.7;
  margin-bottom: 3rem;
  line-height: 1.6;
}

/* BUTTONS */
.landing-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;   /* ← THIS centers the squares */
}

.button {
  position: relative;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.15);
  text-decoration: none;
  color: inherit;
  letter-spacing: 0.15em;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.button-sub {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

/* SIDE A BUTTON — AGGRESSIVE */
.side-a-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #ffffff33, transparent);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.side-a-btn:hover {
  transform: scale(1.03);
  border-color: #fff;
}

.side-a-btn:hover::before {
  transform: translateX(0);
}

/* SIDE B BUTTON — SMOOTH */
.side-b-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.side-b-btn:hover {
  transform: scale(1.02);
  border-color: rgba(255,255,255,0.6);
}

.side-b-btn:hover::before {
  opacity: 1;
}

/* BUY LINK */
.buy-btn {
  display: inline-block;
  margin-top: 2.25rem;
  padding-bottom: 0.2rem;

  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  color: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.18em;

  opacity: 0.55;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.buy-btn:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.7);
}

.buy-btn-arrow {
  margin-left: 0.2em;
}

/* DESKTOP REFINEMENT */
@media (min-width: 768px) {
  .landing-buttons {
    flex-direction: row;
    gap: 2rem;
    justify-content: center; /* ← THIS */
  }

  .button {
    min-width: 220px;
  }
}


/* =========================
   VIDEO
========================= */
.bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 1;
  filter: brightness(0.5) contrast(1.05);
}

.sidea-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 1;
  filter: brightness(0.9) contrast(1.05);
}

.sideb-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 1;
  filter: brightness(0.9) contrast(1.05);
}

/* PLAYER */
.player {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play-btn {
  background: none;
  border: 1px solid currentColor;
  color: inherit;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.play-btn:hover {
  transform: scale(1.1);
  opacity: 0.85;
}

.progress {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.25);
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: currentColor;
  transition: width 0.1s linear;
}

/* TRACK HEADER */
.track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  min-height: 44px;
}

.track-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* INFORMATION BUTTON */
.info-btn {
  background: none;
  border: 1px solid #999999;
  color: inherit;

  font-size: 0.5rem;  
  width: 70px;
  height: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  opacity: 0.3;
  cursor: pointer;


  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.info-btn:hover {
  opacity: 1;
  font-size: 0.55rem;
  transition:all 0.5s ease;
}

/* TRACK INFO PANEL */
.track-info {
  position: fixed;
  inset: 0;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  padding: 2rem;

  background: rgba(0, 0, 0, 0.92);
  color: #fff;

  font-size: 1rem;
  line-height: 1.6;

  z-index: 1000;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

/* Centers short descriptions vertically; once content is taller than the
   screen, min-height stops constraining it and .track-info's own
   overflow-y takes over so the rest is reachable by scrolling. */
.track-info-content {
  max-width: 600px;
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.track-info p {
  max-width: 600px;
  text-align: justify;
}

.track-info.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;

  background: none;
  border: none;
  color: inherit;

  font-size: 2rem;
  cursor: pointer;

  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* REINTERPRETATION BUTTON */
.reinterpret-btn {
  background: none;
  border: none;
  color: inherit;

  font-size: 1.3rem;      /* BIGGER SYMBOL */
  width: 44px;            /* TOUCH TARGET */
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0.6;
  cursor: pointer;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}


.reinterpret-spacer {
  width: 44px;
  height: 44px;
}


.reinterpret-btn:hover {
  opacity: 1;
  transform: rotate(180deg);
}

/* SIDE A FEEL */
.side-a .progress-fill {
  background: #fff;
}

/* SIDE B FEEL */
.side-b .progress {
  background: rgba(0, 0, 0, 0.35); /* dark background line */
}

.side-b .progress-fill {
  background: rgba(0, 0, 0, 0.8); /* darker fill */
}


/* LOADER */
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Visible state */
.track.is-loading .loader {
  opacity: 1;
}

/* Hide play button while loading */
.track.is-loading .play-btn {
  opacity: 0.3;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.home-btn {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;

  text-decoration: none;
  color: inherit;

  font-size: 1rem;
  letter-spacing: 0.2em;
  opacity: 0.8;

  z-index: 10;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-btn:hover {
  opacity: 1;
  transform: translateX(-2px);
}

/* =========================
   MOBILE SIZING
========================= */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 1rem 3rem;
  }

  h1 {
    font-size: 1.75rem;
    letter-spacing: 0.08em;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  header {
    margin-bottom: 2rem;
    padding-top: 2rem;
  }

  .tracklist {
    gap: 1.25rem;
  }

  .track {
    gap: 0.4rem;
  }

  .track span {
    font-size: 0.78rem;
  }

  .track-title-group {
    gap: 0.5rem;
  }

  .info-btn {
    font-size: 0.48rem;
    width: 62px;
    height: 18px;
  }

  .landing-title-group {
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .landing h1 {
    font-size: 2rem;
    letter-spacing: 0.12em;
    margin-bottom: 0;
  }

  .album-info-btn {
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
  }

  .landing-text {
    font-size: 0.85rem;
    margin-bottom: 2rem;
  }

  .button {
    padding: 1.1rem;
  }
}

