/* Brand palette transcribed from slide 3 of SACHA LEVY BRAND.key. */
:root {
  color-scheme: dark;
  --cobalt: #142AA6;
  --royal: #16288C;
  --blue: #162D73;
  --navy: #162759;
  --deep-blue: #162440;
  --black: #0E1115;
  --white: #F2F2EE;
  --muted: rgba(242, 242, 238, .64);
  --display: "Bad Coma", Impact, "Arial Black", sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh; margin: 0;
  background-color: #050609;
  /* The blue texture scrolls with the page; stars are drawn separately. */
  background-image: url("assets/Website Background big.jpg");
  background-repeat: repeat-y; background-position: center top;
  background-size: 100% auto; background-attachment: scroll;
  color: var(--white); font-family: var(--body); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
::selection { color: var(--white); background: var(--cobalt); }

.skip-link {
  position: fixed; z-index: 20; top: 12px; left: 12px; padding: 12px 16px;
  background: var(--white); color: var(--black); transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.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;
}


.hero {
  position: relative; min-height: 100svh; height: auto; overflow: visible;
  display: grid; place-items: center; background: transparent;
}
.hero__content {
  width: min(1450px, 100%); padding: 0 5vw;
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.hero__artist {
  width: max-content; max-width: none; margin: 0; white-space: nowrap; color: var(--white);
  font-family: var(--display); font-size: clamp(54px, 11vw, 210px);
  font-weight: 400; line-height: .92; letter-spacing: .015em;
  text-shadow: 0 3px 2px rgba(0, 0, 0, .32), 0 0 26px rgba(22, 45, 115, .28);
}
.hero__ep-title {
  margin: 24px 0 0; color: rgba(246, 246, 242, .94); font-family: var(--display);
  font-size: clamp(22px, 3.1vw, 43px); line-height: 1.05; letter-spacing: .105em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .62);
}
.release-section {
  position: relative; padding: 92px 6vw 108px; overflow: hidden;
  background: transparent;
}
.release-grid {
  width: min(1440px, 100%); margin: 0 auto; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 30px);
}
.release-card {
  position: relative; margin: 0; padding: 0; overflow: hidden;
  background: transparent; border: 0; box-shadow: none;
}
.release-card a { display: block; }
.release-card a:focus-visible { outline: 2px solid var(--white); outline-offset: -2px; }
.release-card img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover;
  filter: contrast(1.05) saturate(.88); transition: transform .6s ease, filter .4s ease;
}
.release-card:hover img { transform: scale(1.035); filter: contrast(1.09) saturate(1.05); }

/* Keep about two empty screen-heights after the artwork. */
main::after {
  content: ""; display: block;
  min-height: 200vh; min-height: 200svh;
}

@media (max-width: 760px) {
  .hero { min-height: 100svh; }
  .hero__content { padding: 0 5vw; }
  .hero__artist { font-size: clamp(54px, 14.2vw, 108px); }
  .hero__ep-title { margin-top: 21px; font-size: clamp(22px, 5vw, 32px); line-height: 1.12; }
  .release-section { padding: 76px 6% 82px; }
  .release-grid { grid-template-columns: 1fr; gap: 18px; }
  .release-card { max-width: 620px; width: 100%; margin: 0 auto; }
}
@media (max-width: 420px) {
  .hero { min-height: 100svh; }
  .hero__artist { font-size: clamp(48px, 13.6vw, 62px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Floating EP title with an occasional screen glitch. */
.hero__ep-title {
  position: relative;
  animation: ep-float 6s ease-in-out infinite,
             ep-glitch 4.7s steps(1, end) infinite;
}

@keyframes ep-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  35% { transform: translate(2px, -5px) rotate(.2deg); }
  70% { transform: translate(-2px, -2px) rotate(-.2deg); }
}

@keyframes ep-glitch {
  0%, 92%, 97%, 100% {
    left: 0;
    filter: none;
  }
  93% {
    left: -3px;
    filter: drop-shadow(3px 0 0 #547dff);
  }
  94% {
    left: 3px;
    filter: drop-shadow(-3px 0 0 #9bcfff);
  }
  95% {
    left: -1px;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__ep-title { animation: none; }
}

:root {
  --f-size: 15;
  --f-unit: 1vmin;
  --f: calc(var(--f-size) * var(--f-unit));
  --bg: #181717;
}

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

.hero__ep-title {
  position: relative;
  animation: ep-float 6s ease-in-out infinite;
}

.hero__ep-title::before, .hero__ep-title::after {
  --top: 0;
  --left: 0;
  --v-height: 30%;
  --n-tenth: calc(var(--f-size) * .1 * var(--top));
  --t-cut: calc(var(--n-tenth) / var(--f-size) * 100%);
  --b-cut: calc(var(--t-cut) + var(--v-height));
  content: attr(data-text);
  position: absolute;
  width: 100%;
  left: 0;
  text-align: center;
  transform: translateX(calc(var(--left) * 100%));
  filter: drop-shadow(0 0 transparent);
  text-shadow: calc(var(--left) * -0.5em) 0 0.02em #2DD2FF, calc(var(--left) * -1em) 0 0.02em #ff00e1;
  background-color: var(--bg);
  clip-path: polygon(0% var(--t-cut), 100% var(--t-cut), 100% var(--b-cut), 0% var(--b-cut));
}
.hero__ep-title:before {
  animation: glitch-b 1.7s infinite alternate-reverse;
}
.hero__ep-title:after {
  animation: glitch-a 3.1s infinite alternate;
}

.hero__ep-title::before,
.hero__ep-title::after {
  top: 0;
  white-space: pre-line;
  font: inherit;
  background: transparent;
  pointer-events: none;
}

@keyframes glitch-p {
  17% {
    --scale: .87;
  }
  31% {
    --scale: 1.1;
  }
  37% {
    --scale: 1.3;
  }
  47% {
    --scale: .91;
  }
  87% {
    --scale: 1;
  }
}
@keyframes glitch-a {
  10%, 30%, 50%, 70%, 90% {
    --top: 0;
    --left: 0;
  }
  0% {
    --v-height: 15%;
  }
  20% {
    --left: .005;
  }
  40% {
    --left: .01;
    --v-height: 20%;
    --top: 3;
  }
  60% {
    --left: .03;
    --v-height: 25%;
    --top: 6;
  }
  80% {
    --left: .07;
    --v-height: 5%;
    --top: 8;
  }
  100% {
    --left: .083;
    --v-height: 30%;
    --top: 1;
  }
}
@keyframes glitch-b {
  10%, 30%, 50%, 70%, 90% {
    --top: 0;
    --left: 0;
  }
  0% {
    --v-height: 15%;
    --top: 10;
  }
  20% {
    --left: -.005;
  }
  40% {
    --left: -.01;
    --v-height: 17%;
    --top: 3;
  }
  60% {
    --left: -.03;
    --v-height: 35%;
    --top: 6;
  }
  80% {
    --left: -.07;
    --v-height: 5%;
    --top: 8;
  }
  100% {
    --left: -.083;
    --v-height: 30%;
    --top: 1;
  }
}

/* Keep the title still for visitors who request reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .hero__ep-title {
    animation: none;
    transform: none;
  }
  .hero__ep-title::before,
  .hero__ep-title::after {
    display: none;
  }
}


/* Artist name: a short blue glitch every 12 seconds. */
.hero__artist {
  position: relative;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__artist::before,
  .hero__artist::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    pointer-events: none;
    opacity: 0;
    text-shadow: -2px 0 #2dd2ff, 2px 0 #547dff;
    animation: artist-glitch 3s steps(1, end) infinite;
  }

  .hero__artist::before {
    --jump: -2px;
    clip-path: inset(20% 0 55% 0);
  }

  .hero__artist::after {
    --jump: 2px;
    clip-path: inset(60% 0 20% 0);
  }
}

@keyframes artist-glitch {
  0%, 94%, 98%, 100% {
    opacity: 0;
    transform: translateX(0);
  }
  95%, 97% {
    opacity: 1;
    transform: translateX(var(--jump));
  }
  96% {
    opacity: .7;
    transform: translateX(calc(var(--jump) * -1));
  }
}


/* Temporary test: hide only the EP title's after copy. */
.hero__ep-title::after {
  display: block;
}

/* Temporary test: hide only the EP title's after copy. */
.hero__ep-title::before {
  display: block;
}


/* The transparent star canvas tracks page scroll over the scrolling blue texture. */
body {
  isolation: isolate;
  background-attachment: scroll;
}

.starfield-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__content {
  position: relative;
}

.blacksheep {
  position: absolute;
  bottom: calc(100% + -44px);
  left: 7%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  margin: 0;
  background-image: url("assets/blacksheep.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: invert(1);
}

@media (prefers-reduced-motion: no-preference) {
  .blacksheep::before,
  .blacksheep::after {
   content: "";
    background: inherit;
    position: absolute;
    inset: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    pointer-events: none;
    opacity: 0;
    text-shadow: -2px 0 #2dd2ff, 2px 0 #547dff;
    animation: artist-glitch 5s steps(1, end) infinite;
  }

  .blacksheep::before {
    --jump: -2px;
    clip-path: inset(40% 0 50% 0);
  }

  .blacksheep::after {
    --jump: 2px;
    clip-path: inset(70% 0 45% 0);
  }
}

@keyframes artist-glitch {
  0%, 94%, 98%, 100% {
    opacity: 0;
    transform: translateX(0);
  }
  95%, 97% {
    opacity: 1;
    transform: translateX(var(--jump));
  }
  96% {
    opacity: .7;
    transform: translateX(calc(var(--jump) * -1));
  }
}

.blacksheep::before {
  clip-path: inset(30% 0 55% 0);
}

.blacksheep::after {
  clip-path: inset(65% 0 20% 0);
}