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

html {
  color-scheme: dark;
}

html,
body {
  margin: 0;
  background: #000;
  color: #fff;
}

body.home {
  overflow: clip;
}

body {
  min-height: 100dvh;
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mark {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: min(72vw, 46rem);
  aspect-ratio: 1;
  transform: translate(15%, 15%);
  opacity: 0.72;
  pointer-events: none;
  user-select: none;
}

.feedback {
  position: absolute;
  width: 180%;
  height: 180%;
  left: -40%;
  top: -40%;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: clamp(1.25rem, 3.2vw, 3.25rem);
}

[data-glow] {
  --cx: 0px;
  --cy: 0px;
  --ca: 0;
  --mx: 50%;
  --my: 50%;
  position: relative;
}

h1 {
  position: relative;
  margin: 0;
  width: 100%;
  font-size: clamp(2.85rem, min(8.9vw, 14.5vh), 10.75rem);
  font-weight: 500;
  letter-spacing: -0.042em;
  line-height: 0.96;
  text-wrap: balance;
}

.glow {
  position: absolute;
  inset: -0.7em;
  padding: 0.7em;
  pointer-events: none;
  user-select: none;
  color: transparent;
  text-shadow:
    calc(var(--cx) * -1) calc(var(--cy) * -1) 0.09em
      rgb(184 249 251 / calc(var(--ca) * 0.8)),
    calc(var(--cx) * -0.5) calc(var(--cy) * -0.5) 0.055em
      rgb(170 212 250 / calc(var(--ca) * 0.65)),
    calc(var(--cx) * 0.5) calc(var(--cy) * 0.5) 0.055em
      rgb(255 244 196 / calc(var(--ca) * 0.9)),
    var(--cx) var(--cy) 0.095em rgb(247 214 140 / calc(var(--ca) * 0.85));
  -webkit-mask-image: radial-gradient(
    circle 2.8em at calc(var(--mx) + 0.7em) calc(var(--my) + 0.7em),
    #000 0%,
    rgb(0 0 0 / 0.8) 42%,
    transparent 76%
  );
  mask-image: radial-gradient(
    circle 2.8em at calc(var(--mx) + 0.7em) calc(var(--my) + 0.7em),
    #000 0%,
    rgb(0 0 0 / 0.8) 42%,
    transparent 76%
  );
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.12em;
  text-decoration-color: currentColor;
}

a:hover {
  text-decoration-thickness: 0.1em;
}

a:focus-visible {
  outline: 0.08em solid #fff;
  outline-offset: 0.12em;
}

::selection {
  background: #fff;
  color: #000;
}

.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;
}

body.home main {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.more {
  display: inline-block;
  margin-top: clamp(1.35rem, 3.2vh, 2.4rem);
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

button {
  font: inherit;
  color: inherit;
}

.work .mark {
  opacity: 0.5;
}

.back {
  position: fixed;
  z-index: 2;
  top: clamp(1rem, 2.2vw, 1.4rem);
  left: clamp(1.25rem, 3.2vw, 2rem);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  letter-spacing: -0.03em;
  background: #000;
  padding: 0.2rem 0.55rem 0.2rem 0;
}

main.sheet {
  display: block;
  min-height: 0;
  width: min(68rem, calc(100% - 2 * clamp(1.25rem, 4vw, 3rem)));
  margin: 0 auto;
  padding: clamp(4.75rem, 12vh, 6.75rem) 0 clamp(5rem, 12vh, 8rem);
}

.sheet h1 {
  width: auto;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
}

.index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.15rem;
  margin: 1.15rem 0 0;
  max-width: 46rem;
  font-size: clamp(1.02rem, 1.45vw, 1.2rem);
  letter-spacing: -0.03em;
  line-height: 1.3;
}

article {
  scroll-margin-top: 4.25rem;
}

article + article {
  margin-top: clamp(4.75rem, 13vh, 8.5rem);
}

.sheet h2 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.15rem);
  font-weight: 500;
  letter-spacing: -0.042em;
  line-height: 0.96;
  text-wrap: balance;
}

.meta,
.note {
  margin: 0.7rem 0 0;
  max-width: 38rem;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.copy {
  max-width: 38rem;
  margin-top: 1.15rem;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.copy p {
  margin: 0 0 0.9rem;
}

.copy p:last-child {
  margin-bottom: 0;
}

.credits {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0.3rem 1rem;
  margin: 1.35rem 0 0;
  max-width: 38rem;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.credits dt,
.credits dd {
  margin: 0;
}

.frames {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.4rem;
  align-items: start;
  margin-top: 1.35rem;
}

.frames + .frames {
  margin-top: 0.4rem;
}

.frames + .note {
  margin-top: 1.6rem;
}

.note + .frames {
  margin-top: 0.85rem;
}

.look {
  margin: 1.85rem 0 0;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

.look + .frames {
  margin-top: 0.6rem;
}

.frame {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  text-align: left;
}

.frame img {
  display: block;
  width: 100%;
  height: auto;
}

.s3 { grid-column: span 3; }
.s4 { grid-column: span 4; }
.s5 { grid-column: span 5; }
.s6 { grid-column: span 6; }
.s7 { grid-column: span 7; }
.s8 { grid-column: span 8; }
.s12 { grid-column: span 12; }

@media (min-width: 641px) {
  .frames.even {
    aspect-ratio: var(--row, 8 / 7);
    align-items: stretch;
    grid-template-rows: 1fr;
  }

  .frames.even .frame {
    height: 100%;
    overflow: hidden;
  }

  .frames.even img {
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

.frame:focus-visible {
  outline: 0.08em solid #fff;
  outline-offset: 0.15rem;
}

.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.viewer::backdrop {
  background: rgb(0 0 0 / 0.94);
}

.viewer img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: calc(100vw - 2.5rem);
  max-height: calc(100dvh - 4.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.viewer .close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  z-index: 1;
  padding: 0;
  border: 0;
  background: none;
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.14em;
  cursor: pointer;
}

.viewer .close:focus-visible {
  outline: 0.08em solid #fff;
  outline-offset: 0.15rem;
}

@media (max-width: 640px) {
  .credits {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .credits dd {
    margin-bottom: 0.7rem;
  }

  .frame {
    grid-column: span 12;
  }
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  width: 100%;
  margin-top: clamp(4.5rem, 12vh, 8rem);
  font-size: 0.95rem;
  letter-spacing: -0.03em;
}

body.home .footer {
  margin-top: clamp(1.6rem, 4vh, 2.6rem);
}

.footer p {
  margin: 0;
}

.social {
  display: flex;
  gap: 0.85rem;
}

.social a {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.social svg {
  width: 1.15rem;
  height: 1.15rem;
}

.social a:hover svg,
.social a:focus-visible svg {
  opacity: 0.65;
}
