/* Stoner - a 1970s desert record sleeve: aged kraft paper, brown ink, the loop framed in stripe bands. */
:root {
  --paper: #ead3a8;
  --paper-hi: #f3e2c2;
  --ink: #3b2216;            /* text and keylines */
  /* Contrast on plain paper / at the darkest stained corner: ink-soft 8.1 / 4.8, rust 7.9 / 4.7.
     Text stays out of the lower corners, where the stains and the edge vignette meet. */
  --ink-soft: #4e3020;       /* secondary text */
  --rust: #6a2010;           /* role line */
  --cream: #f6e7c9;
  --band-orange: #d6743a;
  --band-brick: #a3412a;
  --band-purple: #5b3b57;

  --font-display: "Caprasimo", Georgia, serif;
  --font-label: "Barlow Condensed", "Arial Narrow", sans-serif;

  --gutter: clamp(20px, 3.4vw, 48px);
  /* stripe frame: cream, orange, brick, purple, ink keyline */
  --b1: 3px; --b2: 7px; --b3: 7px; --b4: 7px; --b5: 3px;
  --frame: calc(var(--b1) + var(--b2) + var(--b3) + var(--b4) + var(--b5));

  color-scheme: light;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-label);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
  overflow-x: clip;
  /* aged sleeve: a few soft stains and darker, handled edges */
  background:
    radial-gradient(ellipse 38% 30% at 12% 8%, rgba(165, 105, 45, 0.13), transparent 70%),
    radial-gradient(ellipse 30% 40% at 92% 88%, rgba(150, 90, 35, 0.16), transparent 70%),
    radial-gradient(ellipse 22% 16% at 64% 96%, rgba(140, 85, 30, 0.10), transparent 70%),
    radial-gradient(ellipse 18% 12% at 46% 4%, rgba(255, 245, 220, 0.35), transparent 70%),
    radial-gradient(ellipse 120% 110% at 50% 45%, transparent 58%, rgba(115, 70, 28, 0.26) 100%),
    var(--paper);
}

/* Paper grain, static. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .15 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--band-purple); color: var(--cream); }

a { color: var(--ink); text-decoration: none; }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--band-purple); outline-offset: 3px; }

/* - the sleeve - */
.sleeve {
  max-width: 1360px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 40px) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3.2vh, 32px);
}

/* Top of the sleeve: the title, and the credits beside it */
.top {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  column-gap: clamp(24px, 3.4vw, 48px);
  padding-bottom: clamp(16px, 2.6vh, 24px);
  /* a double rule, like the sleeve's printed border */
  border-bottom: 3px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) left bottom 3px / 100% 1px no-repeat;
}

.name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.7rem, 6.2vw, 6rem);
  line-height: .92;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: balance;
}

.role {
  margin: clamp(10px, 1.6vh, 16px) 0 0;
  font: 600 15px/1.35 var(--font-label);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rust);
}

.credits { min-width: 0; }

.lede {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(19px, 1.55vw, 22px);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-soft);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(16px, 2.4vh, 22px);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: 600 16px/1 var(--font-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--band-brick); border-color: var(--band-brick); color: var(--cream); }
.btn-solid:hover { background: var(--band-purple); border-color: var(--band-purple); }
.btn-line:hover { background: var(--ink); color: var(--cream); }

/* - the illustration, framed in stripe bands - */
.frame {
  flex: 1;
  display: flex;
  min-height: 0;
  padding: var(--frame);
}
.film {
  position: relative;
  flex: 1;
  min-height: clamp(220px, 46vh, 560px);
  border-radius: 4px;
  overflow: hidden;
  background: #e7b399 center 20% / cover no-repeat;
  box-shadow:
    0 0 0 var(--b1) var(--cream),
    0 0 0 calc(var(--b1) + var(--b2)) var(--band-orange),
    0 0 0 calc(var(--b1) + var(--b2) + var(--b3)) var(--band-brick),
    0 0 0 calc(var(--b1) + var(--b2) + var(--b3) + var(--b4)) var(--band-purple),
    0 0 0 var(--frame) var(--ink);
}
.film-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.film-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: rgba(59, 34, 22, .82);
  color: var(--cream);
  cursor: pointer;
  transition: background-color .2s;
}
.film-toggle[hidden] { display: none; }
.film-toggle:hover { background: var(--ink); }
.film-toggle svg { grid-area: 1 / 1; width: 16px; height: 16px; }
.icon-pause { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.icon-play { fill: currentColor; display: none; }
.film-toggle.is-paused .icon-pause { display: none; }
.film-toggle.is-paused .icon-play { display: block; }
.film-toggle-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* - tablet - */
@media (max-width: 1023px) {
  .top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .film { min-height: clamp(240px, 42vh, 520px); }
}

/* Upright screens stack the credits under the title */
@media (max-width: 1023px) and (orientation: portrait), (max-width: 699px) {
  .top { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
}

/* - phone - */
@media (max-width: 599px) {
  :root { --b1: 2px; --b2: 5px; --b3: 5px; --b4: 5px; --b5: 2px; }
  body { font-size: 17px; }
  .film { min-height: 300px; }
  .film-video { object-position: 58% 30%; }
  .btn { padding: 0 16px; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .film-toggle { transition: none; }
}
