:root {
  color-scheme: dark;
  --eye-contrast-filter: invert(1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: transparent;
}

/* The theme texture stays fixed while all website content scrolls above it. */
.site-background {
  position: fixed;
  inset: 0;
  /* Keep the theme as the page-wide backdrop so mix-blend-mode overlays
     elsewhere in the document can blend with the actual selected texture. */
  z-index: -1;
  pointer-events: none;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #542b18;
}

.site-background[data-theme="theme-1"] {
  background-image: url("/backgrounds/theme-1.png?v=2");
}

.site-background[data-theme="theme-2"] {
  background-image: url("/backgrounds/theme-2.png");
  background-color: #8b4926;
}

.site-background[data-theme="theme-3"] {
  background-image: url("/backgrounds/theme-3.png");
  background-color: #12304d;
}

.site-background[data-theme="theme-4"] {
  background-image: url("/backgrounds/theme-4.png");
  background-color: #272727;
}

.site-background[data-theme="theme-5"] {
  background-image: url("/backgrounds/theme-5.png");
  background-color: #6b7b82;
}

.site-background[data-theme="theme-6"] {
  background-image: url("/backgrounds/theme-6.png");
  background-color: #c8cdd6;
}

.page-content {
  /* Do not create a stacking context here: the purchase overlay must be able
     to blend with the fixed theme texture behind this content. */
  position: relative;
  z-index: auto;
  min-height: 100vh;
}

/* Minimal, unboxed eye control to match the supplied mockup. */
.theme-toggle {
  position: fixed;
  z-index: 10;
  top: clamp(10px, 1.4vw, 20px);
  right: clamp(12px, 1.6vw, 24px);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease;
}

.theme-toggle:hover {
  transform: scale(1.06);
}

.theme-toggle:active {
  transform: scale(0.92);
}

.theme-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.eye-icon {
  display: block;
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: invert(1);
}

/* The last two backgrounds are lighter, so use the supplied black eye. */
html[data-theme="theme-5"] .eye-icon,
html[data-theme="theme-6"] .eye-icon {
  filter: none;
}

/* Cassette-cover interaction. The artwork itself stays unmodified. */
.album-hero {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: clamp(38px, 5.4vw, 64px) 16px clamp(18px, 2.2vw, 28px);
}

.cover-stage {
  width: min(68vw, 560px);
  min-width: min(270px, calc(100vw - 32px));
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

.cover-object {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --shadow-x: 0px;
  --shadow-y: 11px;

  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 2048 / 1215;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 280ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

.cover-shadow {
  position: absolute;
  z-index: -1;
  inset: 3% 1% -3%;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.72);
  filter: blur(22px);
  opacity: 0.792;
  transform: translate3d(var(--shadow-x), var(--shadow-y), -18px) scale(0.98);
  transition: transform 280ms ease, opacity 280ms ease;
  pointer-events: none;
}

.cover-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2048 / 1215;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  backface-visibility: hidden;
}

.cover-stage.is-hovering .cover-shadow {
  opacity: 0.924;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .cover-stage {
    width: min(78vw, 560px);
  }
}

@media (max-width: 600px) {
  .theme-toggle {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .eye-icon {
    width: 24px;
    height: 24px;
  }

  .album-hero {
    padding-top: 40px;
  }

  .cover-stage {
    width: min(78vw, 420px);
    min-width: min(270px, calc(100vw - 32px));
  }
}

@media (hover: none), (pointer: coarse) {
  .cover-object {
    transform: none;
    transition: none;
  }

  .cover-shadow {
    transform: translateY(8.8px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .cover-object,
  .cover-shadow {
    transition: none;
  }
}

/* Locally hosted fonts supplied for the ESCP FRM LA landing page. */
@font-face {
  font-family: "Libertinus Mono";
  src: url("/fonts/LibertinusMono-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DejaVu Sans Mono";
  src: url("/fonts/DejaVuSansMono-BoldOblique.ttf") format("truetype");
  font-style: oblique;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Impact Label";
  src: url("/fonts/Impact-Label.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Impact Label Reversed";
  src: url("/fonts/Impact-Label-Reversed.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Album metadata and purchase information. */
.album-info {
  width: min(80vw, 820px);
  margin: 0 auto;
  padding: 0 0 86px;
  color: #f4eee7;
}

.album-metadata {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  font-family: "Libertinus Mono", monospace;
  font-size: clamp(10.2px, 1.49vw, 17px);
  line-height: 1.25;
}

.album-name,
.album-price,
.album-tagline {
  margin: 0;
}

.album-name {
  flex: 0 1 auto;
  white-space: nowrap;
  /* Fine-grain worn-print treatment; keep the text crisp and readable. */
  filter: url("#worn-print");
}

.album-specifications {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  white-space: nowrap;
}

.album-specifications span {
  filter: url("#worn-print");
}

.purchase-row {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr;
  align-items: center;
  gap: clamp(12px, 3vw, 34px);
  margin-top: clamp(32px, 4vw, 48px);
  color: #090705;
  font-family: "DejaVu Sans Mono", monospace;
  font-size: clamp(14px, 2.45vw, 26px);
  font-style: oblique;
  font-weight: 700;
  line-height: 1.25;
}

.album-price {
  justify-self: start;
  white-space: nowrap;
}

.purchase-link {
  position: relative;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.14em 0.25em;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 140ms ease, transform 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.purchase-button-overlay {
  position: absolute;
  /* Place the blend layer above the label so its Overlay blend affects the lettering too. */
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 112%;
  height: auto;
  max-width: none;
  /* The white highlight sits high within the PNG because of its soft shadow below.
     Offset the image down slightly so the visible glow crosses the label text. */
  transform: translate(-50%, -35%);
  mix-blend-mode: overlay;
  opacity: 0.65;
  pointer-events: none;
  user-select: none;
}

.purchase-link-label {
  position: relative;
  z-index: 1;
}

.purchase-link:hover {
  opacity: 0.9;
}

.purchase-link:active {
  transform: scale(0.97);
}

.purchase-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

.album-tagline {
  margin-top: clamp(48px, 6.6vw, 76px);
  text-align: center;
  font-family: "Impact Label Reversed", sans-serif;
  font-size: clamp(10px, 1.12vw, 13px);
  line-height: 1.25;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.album-tagline span {
  display: inline-block;
  padding: 0.14em 0.42em 0.10em;
  background: #f3eee6;
  color: #17120e;
}

/* On the two lightest textures, flip the metadata to keep it readable. */
html[data-theme="theme-5"] .album-info,
html[data-theme="theme-6"] .album-info {
  color: #171513;
}

@media (max-width: 600px) {
  .album-hero {
    padding-bottom: 24px;
  }

  .album-info {
    width: min(88vw, 820px);
    padding-bottom: 64px;
  }

  .album-metadata {
    gap: 10px;
    font-size: clamp(9.35px, 2.38vw, 11.9px);
  }

  .purchase-row {
    grid-template-columns: 0.72fr 1.45fr;
    gap: 10px;
    margin-top: 30px;
    font-size: clamp(12px, 3.05vw, 16px);
  }

  .album-tagline {
    margin-top: 46px;
    font-size: clamp(9px, 2vw, 11px);
    letter-spacing: 0.11em;
  }
}

@media (max-width: 360px) {
  .album-info {
    width: 92vw;
  }

  .album-metadata {
    font-size: 8.5px;
  }

  .purchase-row {
    font-size: 11px;
  }
}


/* Centered Instagram link at the bottom of the current landing page. */
.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.instagram-link {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease, opacity 140ms ease;
}

.instagram-link img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: invert(1);
}

/* Use a dark Instagram glyph on the two lightest background themes. */
html[data-theme="theme-5"] .instagram-link img,
html[data-theme="theme-6"] .instagram-link img {
  filter: none;
}

.instagram-link:hover {
  transform: scale(1.08);
  opacity: 0.86;
}

.instagram-link:active {
  transform: scale(0.94);
}

.instagram-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .instagram-link {
    transition: none;
  }
}
