@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --page: light-dark(#f4f1fa, #17151e);
  --ink: light-dark(#17141f, #f6f1fa);
  --muted: light-dark(#50465c, #c8bdd4);
  --rule: light-dark(#c9bdd9, #51435e);
  --art-ellipse: light-dark(#e3d6f6, #392746);
  --art-shadow: light-dark(#3d285241, #09060ba6);
  --accent: #ccee52;
  --pink: #ff3dad;
  --button-ink: #210b19;
  --button-edge: light-dark(#98135e, #a71b6c);
  --voted-surface: light-dark(#e8deef, #35273e);
  --voted-border: light-dark(#b8a8c6, #675475);
  --voted-ink: light-dark(#442553, #ebdbf3);
  --voted-inset: light-dark(#4a34552c, #1009137a);
  --selected: light-dark(#bc1477, #ff59b7);
  --switch-track: light-dark(#e6ddf1, #352a42);
  --switch-thumb: light-dark(#fff, #e9d6f5);
  --switch-icon: light-dark(#22142f, #291637);
  --gutter: clamp(1rem, 5.25vw, 6rem);
  font-family: "DM Sans", system-ui, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

button {
  font: inherit;
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

.site-shell {
  width: min(clamp(90rem, 72vw, 120rem), 100% - 2 * var(--gutter));
  margin-inline: auto;
  container-type: inline-size;
}

.site-header {
  display: flex;
  min-height: 3.9rem;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}

.site-logo {
  display: block;
  width: 2.375rem;
  height: 2.375rem;
}

.theme-switch:not([hidden]) {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  place-items: center;
  width: 4.85rem;
  height: 2.75rem;
  padding: 0 .25rem;
  border: 1px solid var(--rule);
  border-radius: 2rem;
  background: var(--switch-track);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-thumb {
  position: absolute;
  left: .25rem;
  top: 50%;
  width: 1.96rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--switch-thumb);
  box-shadow: 0 1px 4px #15101d26;
  transform: translateY(-50%);
  transition: transform 180ms ease;
}

.theme-switch[aria-checked="true"] .theme-thumb {
  transform: translate(2.2rem, -50%);
}

.theme-icon {
  position: relative;
  font-family: "Segoe UI Symbol", system-ui, sans-serif;
  font-size: 1.13rem;
  line-height: 1;
}

.theme-switch[aria-checked="false"] .theme-icon:not(.moon-icon),
.theme-switch[aria-checked="true"] .moon-icon {
  color: var(--switch-icon);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 39fr) minmax(0, 61fr);
  grid-template-areas:
    "title art"
    "action art";
  align-items: center;
  column-gap: clamp(.5rem, 1.8vw, 2rem);
  row-gap: clamp(1rem, 2vw, 2rem);
  min-height: clamp(20rem, 29cqi, 32rem);
  padding-block: clamp(1.75rem, 3vw, 3rem);
  border-bottom: 1px solid var(--rule);
}

.hero-title {
  grid-area: title;
  align-self: end;
  margin: 0;
}

.skin-type {
  display: block;
  margin-block-end: .7rem;
  font-size: clamp(1rem, 1.65vw, 1.48rem);
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1;
}

.skin-title {
  display: block;
  font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(3.4rem, 9cqi, 10.5rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: .83;
  text-transform: uppercase;
}

.hero-art {
  position: relative;
  display: grid;
  grid-area: art;
  align-items: center;
  align-self: stretch;
  isolation: isolate;
  min-width: 0;
}

.hero-art::before,
.hero-art::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
}

.hero-art::before {
  top: 50%;
  right: 4%;
  width: 88%;
  aspect-ratio: 2.4;
  background: var(--art-ellipse);
  transform: translateY(-49%) rotate(-10deg);
}

.hero-art::after {
  right: 7%;
  bottom: 9%;
  width: 8%;
  aspect-ratio: 2.65;
  background: var(--accent);
  transform: rotate(-16deg);
}

.skin-render {
  position: relative;
  aspect-ratio: 1770 / 540;
  filter: drop-shadow(0 .7rem .65rem var(--art-shadow));
}

.skin-render img {
  position: absolute;
  top: -72.22%;
  left: -5.08%;
  width: 108.47%;
  height: auto;
  pointer-events: none;
  /* Trace the original 1920 × 1080 studio frame. The loops keep its openings clear. */
  clip-path: polygon(evenodd,
    6.25% 47.78%, 6.93% 47.22%, 7.60% 47.13%, 7.76% 46.85%,
    8.75% 46.76%, 8.96% 46.20%, 9.01% 39.35%, 9.11% 38.98%,
    9.43% 38.80%, 10.21% 38.89%, 10.78% 41.94%, 11.20% 45.19%,
    11.30% 46.67%, 18.96% 46.76%, 19.22% 45.93%, 19.84% 45.19%,
    20.31% 45.00%, 20.99% 43.70%, 21.61% 42.13%, 23.54% 42.13%,
    24.22% 41.85%, 26.25% 41.76%, 27.81% 41.76%, 28.28% 41.48%,
    29.38% 41.48%, 30.00% 40.93%, 31.30% 40.65%, 35.52% 40.46%,
    39.06% 40.37%, 40.26% 40.37%, 40.68% 40.74%, 40.89% 41.57%,
    41.20% 40.56%, 42.03% 40.46%, 42.60% 39.91%, 42.97% 39.91%,
    43.28% 40.28%, 44.74% 40.19%, 44.95% 39.63%, 45.36% 39.54%,
    45.73% 40.00%, 48.02% 39.44%, 48.18% 38.98%, 48.44% 39.07%,
    48.44% 39.91%, 45.68% 40.46%, 45.52% 41.02%, 44.74% 41.02%,
    43.23% 41.57%, 42.76% 41.94%, 63.80% 41.94%, 67.60% 41.94%,
    68.54% 42.04%, 69.27% 43.33%, 70.57% 45.28%, 71.04% 46.39%,
    70.99% 47.41%, 72.29% 47.96%, 75.47% 48.70%, 77.92% 49.54%,
    79.48% 49.63%, 80.21% 49.07%, 81.15% 48.15%, 87.60% 47.96%,
    91.93% 48.15%, 94.69% 48.06%, 95.26% 48.61%, 95.31% 56.30%,
    95.31% 61.57%, 95.42% 64.91%, 95.16% 65.65%, 94.43% 65.74%,
    93.23% 65.37%, 91.30% 64.63%, 88.75% 63.52%, 86.25% 62.31%,
    83.85% 60.93%, 81.46% 59.63%, 79.06% 58.33%, 76.04% 56.85%,
    73.85% 55.83%, 71.41% 55.00%, 69.58% 54.81%, 69.17% 56.20%,
    69.32% 57.96%, 69.69% 59.91%, 69.95% 62.31%, 70.47% 65.74%,
    70.89% 68.61%, 70.99% 70.37%, 70.83% 71.20%, 69.79% 71.94%,
    68.28% 72.78%, 67.34% 73.15%, 66.98% 72.69%, 66.77% 71.67%,
    66.46% 68.89%, 66.09% 65.65%, 65.52% 62.41%, 64.90% 59.44%,
    64.32% 58.52%, 63.96% 58.43%, 63.91% 59.07%, 63.75% 59.72%,
    63.44% 60.28%, 63.02% 60.56%, 59.74% 60.65%, 59.32% 60.56%,
    58.96% 60.19%, 58.80% 59.35%, 58.54% 59.17%, 58.07% 59.07%,
    57.76% 59.63%, 57.81% 61.67%, 57.60% 62.04%, 57.29% 58.89%,
    57.24% 57.41%, 56.67% 56.57%, 56.46% 57.78%, 55.73% 62.13%,
    54.84% 65.74%, 53.75% 69.54%, 52.45% 72.69%, 50.52% 76.57%,
    48.44% 80.46%, 46.46% 83.43%, 45.73% 84.17%, 45.26% 83.80%,
    43.65% 79.81%, 42.19% 76.02%, 42.14% 75.37%, 42.97% 74.26%,
    45.00% 71.30%, 46.72% 68.24%, 48.02% 65.19%, 49.06% 62.22%,
    49.90% 58.89%, 50.31% 56.30%, 50.42% 54.54%, 50.21% 53.43%,
    46.46% 53.15%, 45.10% 53.06%, 44.43% 53.52%, 43.28% 54.07%,
    41.98% 54.17%, 40.52% 52.96%, 38.70% 52.69%, 35.68% 52.31%,
    32.76% 51.94%, 30.00% 51.67%, 29.32% 51.20%, 29.06% 50.74%,
    20.42% 50.93%, 20.05% 51.57%, 19.17% 51.48%, 18.96% 50.83%,
    11.20% 50.74%, 10.63% 50.65%, 10.47% 51.30%, 10.00% 51.39%,
    9.64% 51.02%, 9.06% 50.93%, 8.96% 49.72%, 6.25% 49.63%,
    6.25% 47.78%, 59.17% 54.07%, 60.63% 54.07%, 61.67% 54.44%,
    62.24% 55.28%, 62.45% 56.30%, 62.40% 57.13%, 62.14% 57.96%,
    61.82% 58.61%, 62.24% 58.52%, 62.55% 58.06%, 62.86% 56.57%,
    62.97% 55.46%, 63.33% 54.63%, 63.91% 54.63%, 63.96% 55.65%,
    63.80% 58.06%, 63.70% 58.98%, 63.44% 59.63%, 63.02% 60.09%,
    60.05% 60.19%, 59.43% 60.00%, 59.22% 59.63%, 59.11% 58.89%,
    59.11% 55.74%, 59.17% 54.07%, 6.25% 47.78%, 9.53% 44.17%,
    10.21% 44.07%, 10.42% 44.35%, 10.68% 45.09%, 10.68% 45.65%,
    9.58% 45.65%, 9.38% 45.46%, 9.32% 44.72%, 9.53% 44.17%,
    6.25% 47.78%, 21.41% 45.19%, 25.10% 45.28%, 28.07% 45.19%,
    28.07% 46.57%, 20.26% 46.76%, 20.57% 46.11%, 21.41% 45.19%,
    6.25% 47.78%
  );
}

.hero-action {
  grid-area: action;
  align-self: start;
}

.action-row,
.workshop-stats {
  display: flex;
  align-items: center;
}

.action-row {
  flex-wrap: wrap;
  gap: 1rem clamp(1.25rem, 2.1vw, 2.05rem);
}

.vote-control {
  display: grid;
}

.button__login,
.vote-status {
  display: inline-flex;
  grid-area: 1 / 1;
  justify-content: center;
  align-items: center;
  min-height: 3.4rem;
  padding: .7rem 1.35rem;
  border: 1px solid var(--button-edge);
  border-radius: .55rem;
  background: var(--pink);
  box-shadow: 0 .24rem 0 var(--button-edge);
  color: var(--button-ink);
  font-size: 1.075rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.button__login {
  position: relative;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.button__login::after {
  position: absolute;
  inset-block-start: .55rem;
  inset-inline-end: .55rem;
  width: .65rem;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(31% 0, 100% 0, 100% 69%, 86% 69%, 86% 24%, 10% 100%, 0 90%, 76% 14%, 31% 14%);
  pointer-events: none;
  content: "";
}

@media (hover: hover) {
  .button__login:hover {
    background: #ff61bc;
    box-shadow: 0 .38rem 0 var(--button-edge);
    transform: translateY(-.14rem);
  }
}

.button__login:active {
  box-shadow: 0 .07rem 0 var(--button-edge);
  transform: translateY(.17rem);
}

.vote-status {
  visibility: hidden;
  gap: .5rem;
  border-color: var(--voted-border);
  background: var(--voted-surface);
  box-shadow: inset 0 .17rem .3rem var(--voted-inset);
  color: var(--voted-ink);
  cursor: default;
  opacity: 1;
}

[data-voted] .button__login {
  visibility: hidden;
}

[data-voted] .vote-status {
  visibility: visible;
}

.vote-thanks,
[data-voted] .vote-prompt {
  display: none;
}

[data-voted] .vote-thanks {
  display: inline;
}

.workshop-stats {
  gap: .9rem;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.workshop-stats > div {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.workshop-stats > div + div {
  padding-inline-start: .9rem;
  border-inline-start: 1px solid var(--rule);
}

.workshop-stats dt {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.15;
}

.workshop-stats dd {
  order: -1;
  margin: 0;
  font-size: clamp(1.4rem, 2.15vw, 1.925rem);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: .95;
}

.vote-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.35;
}

.gallery {
  padding-block: clamp(1.25rem, 2.2vw, 2.3rem) clamp(2.5rem, 4vw, 4.5rem);
}

.gallery h2 {
  margin: 0 0 .9rem;
  font-size: clamp(1.45rem, 2.65vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1.12;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(.6rem, 1.25vw, 1.15rem);
}

.gallery-view,
.thumbnail {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: .45rem;
  background: #14131a;
}

.gallery-view {
  touch-action: pan-y pinch-zoom;
}

.gallery-view img,
.thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.5rem, .9vw, .8rem);
}

.thumbnail {
  position: relative;
  width: 100%;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.thumbnail::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.thumbnail[aria-pressed="true"] {
  border-color: var(--selected);
}

.thumbnail[aria-pressed="true"]::after {
  box-shadow: inset 0 0 0 2px var(--selected);
}

@media (hover: hover) {
  .thumbnail:hover {
    border-color: var(--selected);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 48rem) {
  .site-header {
    min-height: 3.7rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "art" "action";
    row-gap: clamp(1.1rem, 4vw, 1.8rem);
    min-height: 0;
    padding-block: 1.65rem 1.8rem;
  }

  .skin-title {
    font-size: clamp(3rem, 13.35vw, 6.95rem);
  }

  .hero-art {
    min-height: 0;
    padding-block: .6rem;
  }

  .hero-art::after {
    bottom: 9%;
  }

  .gallery-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-thumbnails {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .thumbnail {
    min-height: 2.75rem;
  }
}

@media (max-width: 24rem) {
  .action-row {
    flex-direction: column;
    align-items: stretch;
    gap: .9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-thumb,
  .button__login {
    transition: none;
  }
}
