:root {
  --bg: #0f0f10;
  --fg: #f4f4f5;
  --muted: #9a9a9f;
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

/* Background layer */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.bg-img {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.bg-day {
  background-image: url("Data/Images/bg.jpg");
}

.bg-transition {
  background-image: url("Data/Images/bg-transition.jpg");
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
}

.bg-transition.is-visible {
  opacity: 1;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 16, 0.55);
}

/* View system — for no-reload transitions */
.view {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.9s ease;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

#view-next {
  background: #000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Portfolio */
.portfolio {
  position: relative;
  width: 100%;
}

/* Background image sits behind the flowing content at the top of the page,
   and scrolls up and off as you scroll — black shows beneath it. */
.portfolio::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background-image: url("Data/Images/bg-transition.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Fade the bottom of the image smoothly into the black below. */
.portfolio::after {
  content: "";
  position: absolute;
  top: 70vh;
  left: 0;
  right: 0;
  height: 30vh;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
  z-index: 0;
}

/* All real content flows above the image layer, in normal document flow, so
   elements can never overlap regardless of viewport size or zoom level. */
.hero-content,
.portfolio-inner,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Hero pushes the About block into the lower part of the image. Because it's
   normal flow, the songs below always sit after it with real spacing. */
.hero-content {
  padding-top: 19vh;
  padding-bottom: 4vh;
}

.showreel-mount {
  margin-bottom: 4vh;
}

/* Combined class so this wins over the later `.about-headline` shorthand,
   which was resetting margin-top to 0. Centers the showreel block between
   the About box (above) and Vol. 1 (below ≈ 8vh). */
.about-headline.about-headline--gap {
  margin-top: 8vh;
}

.portfolio-inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem clamp(4rem, 12vh, 8rem);
}

/* Footer — profile photo + contact links at the very bottom. */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.5rem clamp(3rem, 8vh, 5rem);
}

.pfp {
  width: 81px;
  height: 81px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  transition: opacity 0.3s ease;
}

.contact img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.contact:hover {
  opacity: 0.72;
}

@media (max-width: 760px) {
  .contact { font-size: 0.82rem; }
}

/* About box — container styling identical to the music players. */
.about-inner {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.about-headline {
  text-align: center;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  font-size: clamp(1.1rem, 2.3vw, 1.75rem);
  line-height: 1.3;
  margin: 0 auto 1.4rem;
  color: var(--fg);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.7);
}

.about {
  background: rgba(10, 10, 12, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(244, 244, 245, 0.12);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  padding: clamp(1.1rem, 2.2vw, 1.6rem) clamp(1.6rem, 3.5vw, 2.4rem);
}

.about-kicker {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.about p {
  margin: 0 auto;
  max-width: 84ch;
  text-align: center;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  color: rgba(244, 244, 245, 0.88);
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 2rem;
}

/* ============================================================
   Responsive adjustments
   ============================================================ */

/* Shorter viewports (e.g. 1366x768, or zoomed-in browsers): the vertical
   space above the songs shrinks, so pull the About block up and tighten it
   to keep the image, quote and box comfortably on the first screen. */
@media (max-height: 860px) {
  .hero-content { padding-top: 14vh; padding-bottom: 3vh; }
  .showreel-mount { margin-bottom: 3vh; }
  .about-headline.about-headline--gap { margin-top: 6vh; }
}

@media (max-height: 720px) {
  .hero-content { padding-top: 10vh; padding-bottom: 4vh; }
}

@media (max-height: 600px) {
  .hero-content { padding-top: 7vh; }
}

/* Narrower screens: single-column songs and a tighter hero. */
@media (max-width: 760px) {
  .track-grid { grid-template-columns: 1fr; }
  .about p { max-width: none; }
}

/* Small phones. */
@media (max-width: 460px) {
  .about { padding: 1.1rem 1.15rem; }
  .about-headline { font-size: clamp(1rem, 4.5vw, 1.4rem); }
}

.release-label {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 3rem 0 2rem;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.release-label.first {
  margin-top: 0;
}

.track {
  margin-bottom: 0;
}

.track-title {
  text-align: center;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  font-size: clamp(0.92rem, 1.7vw, 1.2rem);
  line-height: 1.3;
  margin-bottom: 1.1rem;
  color: var(--fg);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

.player {
  background: rgba(10, 10, 12, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(244, 244, 245, 0.12);
  border-radius: 14px;
  padding: 1rem 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.player-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.play {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(244, 244, 245, 0.25);
  background: rgba(244, 244, 245, 0.06);
  color: var(--fg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.play:hover {
  background: rgba(244, 244, 245, 0.14);
  border-color: rgba(244, 244, 245, 0.6);
  transform: translateY(-1px);
}

.play:active { transform: scale(0.95); }

.play svg { width: 18px; height: 18px; display: block; }

.viz {
  flex: 1 1 0%;
  min-width: 0; /* allow the canvas to shrink instead of overflowing the player */
  width: 100%;
  height: 60px;
  display: block;
  cursor: pointer;
}

.progress {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(244, 244, 245, 0.15);
  cursor: pointer;
}

.progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: rgba(244, 244, 245, 0.85);
  border-radius: 2px;
}

.meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.15;
  text-indent: 0.22em;
}

.tagline {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  position: relative;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: var(--muted);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 400;
  text-indent: 0.4em;
}

.tagline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: rgba(244, 244, 245, 0.4);
}

/* Enter button */
.enter {
  margin-top: 3.5rem;
  width: 72px;
  height: 72px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  animation: enterIn 1s ease 0.3s both, breathe 3.5s ease-in-out 1.3s infinite;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.enter img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* Glowing ring that expands on hover */
.enter::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(244, 244, 245, 0.25);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.4s ease, box-shadow 0.4s ease;
}

.enter:hover {
  transform: translateY(-3px);
  animation-play-state: paused;
}

.enter:hover img {
  opacity: 1;
  transform: scale(1.25);
}

.enter:hover::before {
  transform: scale(1.25);
  border-color: rgba(244, 244, 245, 0.7);
  box-shadow: 0 0 25px rgba(244, 244, 245, 0.15);
}

.enter:active {
  transform: translateY(-1px) scale(0.96);
}

.enter:focus-visible {
  outline: none;
}

.enter:focus-visible::before {
  border-color: rgba(244, 244, 245, 0.7);
  box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.2);
}

@keyframes enterIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  .enter { animation: none; }
  .view, .view.is-active { transition: opacity 0.3s ease; }
}
