/* Foxglove Pictures: the work list with the gradient from the side */
:root {
  --night: #0b0709;            /* the near black of the page */
  --ink: #ffffff;              /* titles */
  --muted: rgba(255, 255, 255, 0.58);  /* running times, small words */
  --rose: #ff0080;             /* the warm rose glow behind the list */
  --wine: #a3003f;             /* the darker glow at the bottom */
  --bracket: #ff2c7d;          /* the brackets of the menu when they open */
  --mint: #3ffbbf;             /* the one accent: focus ring and timecode */
  --veil-a: rgba(255, 255, 255, 0.2);   /* the gradient under a title, its bright side */
  --veil-b: rgba(255, 255, 255, 0.08);  /* the gradient at 62% */
  --fs: clamp(11px, min(1.45vw, 2.6vh), 21px);   /* size of the titles */
  --pw: clamp(110px, 16.5vw, 240px);                /* width of the small frame */
  --col: clamp(180px, 25vw, 380px);               /* width of a column */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body { height: 100%; }

body {
  background: var(--night);
  color: var(--ink);
  font-family: "Inter Tight Variable", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  max-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}

/* the soft warm glow: two rose clouds drifting slowly, and a vignette */
.glow { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.glow__a, .glow__b {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.glow__a {
  width: 92vmax; height: 92vmax;
  left: 34%; top: -6%;
  background: radial-gradient(closest-side, rgba(255, 0, 128, 0.42), rgba(255, 18, 111, 0.16) 46%, transparent 72%);
  animation: drift-a 19s ease-in-out infinite alternate;
}
.glow__b {
  width: 80vmax; height: 80vmax;
  left: -26%; top: 38%;
  background: radial-gradient(closest-side, rgba(163, 0, 63, 0.55), rgba(163, 0, 63, 0.18) 50%, transparent 74%);
  animation: drift-b 23s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-9%, 7%, 0) scale(1.08); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0) scale(1.05); } to { transform: translate3d(8%, -6%, 0) scale(0.96); } }

.stage::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 55% 45%, transparent 40%, rgba(8, 3, 6, 0.72) 100%);
}

.grain {
  position: absolute; inset: 0; z-index: 5;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* header: the name and the menu with brackets */
.top {
  position: absolute;
  top: clamp(12px, 2.4vh, 22px);
  left: clamp(14px, 2.4vw, 28px);
  right: clamp(14px, 2.4vw, 28px);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: clamp(11px, 1vw, 13px);
}
.brand {
  font-weight: 760;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.brand em {
  font-family: "Newsreader Variable", Georgia, serif;
  font-style: italic;
  font-weight: 330;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.16em;
  color: rgba(255, 255, 255, 0.82);
}
.nav { display: flex; gap: 1.1em; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.22em;
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 640;
  letter-spacing: -0.01em;
  opacity: 0.82;
  transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
  border-radius: 2px;
}
.nav__link .br {
  display: inline-block;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.36s cubic-bezier(0.22, 1, 0.36, 1), transform 0.48s var(--ease);
}
.nav__link.is-current { opacity: 1; }
.nav__link.is-current .br,
.nav__link:focus-visible .br { color: var(--bracket); }
.nav__link.is-current .br:first-child,
.nav__link:focus-visible .br:first-child { transform: translateX(-0.34em); }
.nav__link.is-current .br:last-child,
.nav__link:focus-visible .br:last-child { transform: translateX(0.34em); }
.nav__link:focus-visible { outline: 1px solid var(--mint); outline-offset: 4px; }
@media (hover: hover) {
  .nav__link:hover { opacity: 1; }
  .nav__link:hover .br { color: var(--bracket); }
  .nav__link:hover .br:first-child { transform: translateX(-0.34em); }
  .nav__link:hover .br:last-child { transform: translateX(0.34em); }
}

/* the two columns; on the right of each one there is room for the small frame */
.work {
  display: grid;
  grid-template-columns: var(--col) var(--col);
  column-gap: calc(var(--pw) + 36px);
  margin-right: calc(var(--pw) * 0.5 + 10px);
  font-size: var(--fs);
  margin-top: clamp(10px, 2vh, 24px);
}

.col__label {
  font: inherit;
  margin-bottom: 0.55em;
  line-height: 1;
}
.col__chip {
  display: inline-block;
  background: #fff;
  color: #000;
  font-size: 0.82em;
  font-weight: 640;
  letter-spacing: -0.02em;
  padding: 0.28em 0.45em 0.32em;
  transform-origin: left center;
}

.list { list-style: none; }

.row {
  position: relative;
  display: block;
  width: 100%;
  isolation: isolate;
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0.42em 0.5em;
  margin-left: -0.5em;
  width: calc(100% + 0.5em);
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: opacity 420ms ease;
  touch-action: manipulation;
}

/* the gradient under the title: GSAP moves its two edges, the CSS only paints it */
.row__glow {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  transform-origin: left center;
  transform: scaleX(0);
}
.row__glow::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--veil-a), var(--veil-b) 62%, transparent);
  transition: opacity 0.18s ease;
}
.row__glow.is-rev::before { background: linear-gradient(270deg, var(--veil-a), var(--veil-b) 62%, transparent); }
.row.is-pressed .row__glow::before { filter: brightness(1.7); }

/* the bar of the title that plays, and the block of the first reveal: white in difference */
.row__bar, .row__wipe {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  background: #fff;
  mix-blend-mode: difference;
  transform: scaleX(0);
  transform-origin: right center;
}

.row__in {
  position: relative; z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  transform-origin: left center;
  transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.row.is-pressed .row__in { transform: scale(0.972); transition-duration: 110ms; transition-timing-function: ease-out; }

.row__meta {
  flex: 0 0 3.5em;
  font-size: 0.8em;
  font-weight: 520;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  will-change: transform;
}
.row__title {
  display: block;
  font-weight: 720;
  text-transform: uppercase;
  white-space: nowrap;
  will-change: transform;
}
.row__t {
  display: inline-block;
  letter-spacing: -0.02em;
  transition: letter-spacing 650ms var(--ease);
}
.row.is-hot .row__t { letter-spacing: 0.025em; }
.row.is-sel .row__meta { color: rgba(255, 255, 255, 0.86); }

/* the other titles step back */
.work.is-dim .row:not(.is-hot):not(.is-sel) { opacity: var(--dim, 0.52); }

.row:focus-visible { outline: 1px solid var(--mint); outline-offset: 3px; }

/* the small frame next to the title that plays */
.peek {
  position: absolute;
  left: 0; top: 0;
  z-index: 4;
  width: var(--pw);
  pointer-events: none;
  opacity: 0;
}
.peek__frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 3px;
  background: #160b10;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 14px 30px -8px rgba(0, 0, 0, 0.6),
    0 30px 60px -20px rgba(120, 0, 50, 0.55);
}
.peek__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}
.peek__img--next { clip-path: inset(50% 50%); }
.peek__sheen {
  position: absolute; inset: -20% -60%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.16) 48%, transparent 58%);
  transform: translateX(-60%);
  mix-blend-mode: screen;
}
.peek__corners i {
  position: absolute;
  width: 7px; height: 7px;
  border: 1px solid rgba(255, 255, 255, 0.78);
}
.peek__corners i:nth-child(1) { left: 6px; top: 6px; border-right: 0; border-bottom: 0; }
.peek__corners i:nth-child(2) { right: 6px; top: 6px; border-left: 0; border-bottom: 0; }
.peek__corners i:nth-child(3) { left: 6px; bottom: 6px; border-right: 0; border-top: 0; }
.peek__corners i:nth-child(4) { right: 6px; bottom: 6px; border-left: 0; border-top: 0; }
.peek__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(10, 2, 6, 0.42));
  pointer-events: none;
}
.peek__cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
  font-size: clamp(9.5px, 0.78vw, 11px);
  letter-spacing: -0.005em;
}
.peek__swap { display: block; overflow: hidden; min-width: 0; }
.peek__dir {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 560;
}
.peek__tc {
  flex: none;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
  font-weight: 520;
}

.hint {
  position: absolute;
  bottom: clamp(10px, 2.2vh, 20px);
  left: 0; right: 0;
  text-align: center;
  font-size: clamp(10px, 0.85vw, 12px);
  color: rgba(255, 255, 255, 0.46);
  letter-spacing: 0.01em;
}

/* phone and narrow windows: the columns stack, the frame keeps its lane on the right */
@media (max-width: 700px) {
  :root {
    --pw: clamp(84px, 27vw, 150px);
    --fs: clamp(10.5px, min(3.3vw, 2.75vh), 15px);
  }
  .work {
    grid-template-columns: calc(100vw - var(--pw) - 46px);
    row-gap: clamp(10px, 3.4vh, 26px);
    margin-right: calc(var(--pw) + 14px);
    margin-top: clamp(14px, 4vh, 30px);
  }
  .nav__link--wide { display: none; }
  .peek__cap { flex-direction: column; align-items: flex-start; gap: 2px; }
  .peek__swap { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .glow__a, .glow__b { animation: none; }
  .row__in, .row__t, .nav__link .br { transition-duration: 0.01ms; }
  .row.is-hot .row__t { letter-spacing: -0.02em; }
}
