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

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

:root {
  color-scheme: light dark;
  --page: light-dark(#f3eefb, #181520);
  --ink: light-dark(#17141f, #f6f1fa);
  --muted: light-dark(#6e4b80, #cdb8d7);
  --rule: light-dark(#bea5d7, #574666);
  --oval-cs: light-dark(#e5d6f7, #3d2d51);
  --oval-dota: light-dark(#d0e0d3, #294538);
  --art-shadow: light-dark(#3e2a514d, #09060ba6);
  --voted-surface: light-dark(#dfc9f0, #372746);
  --voted-border: light-dark(#673482, #8965a0);
  --voted-ink: light-dark(#351447, #f0dff7);
  --voted-inset: light-dark(#67348238, #12091d86);
  --selected: light-dark(#008758, #67e4a3);
  --switch-track: light-dark(#e8daf7, #352846);
  --switch-thumb: light-dark(#fff, #e9d6f5);
  --switch-icon: #2a1637;
  --gutter: clamp(1rem, 4.6vw, 5rem);
  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 {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  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;
  top: 50%;
  left: .25rem;
  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.125rem;
  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, 37fr) minmax(0, 63fr);
  grid-template-areas: "title art" "action art";
  grid-template-rows: minmax(0, 1.75fr) minmax(0, 1fr);
  column-gap: clamp(.5rem, 1.4vw, 1.4rem);
  row-gap: clamp(.8rem, 1.4vw, 1.45rem);
  min-height: clamp(16.5rem, 24.4cqi, 30rem);
  padding: .6rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.hero-title {
  grid-area: title;
  align-self: end;
  margin: 0;
  padding-inline-start: clamp(0rem, .9vw, 1rem);
  font-family: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  font-size: clamp(2.1rem, 4.99cqi, 6.2rem);
  font-weight: 800;
  line-height: .89;
  letter-spacing: -.017em;
  text-transform: uppercase;
}

.hero-title span {
  display: block;
}

.hero-title .title-conjunction {
  margin-block: .2em .24em;
  font-size: .49em;
  letter-spacing: .005em;
}

.hero-art {
  position: relative;
  display: grid;
  grid-area: art;
  grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.1rem, .45vw, .5rem);
  min-width: 0;
  isolation: isolate;
}

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

.hero-art::before {
  top: 13%;
  left: 0;
  width: 75%;
  height: 82%;
  background: var(--oval-cs);
  transform: rotate(-9deg);
}

.hero-art::after {
  right: 0;
  bottom: 1%;
  width: 51%;
  height: 85%;
  background: var(--oval-dota);
  opacity: .87;
  transform: rotate(-8deg);
}

.hero-art .skin-render {
  width: 100%;
  min-width: 0;
  transform: translateY(8%);
}

.warden-render {
  display: block;
  width: 100%;
  max-width: clamp(24rem, 23cqi, 30rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 .5rem .55rem var(--art-shadow));
}

.hero-action {
  grid-area: action;
  align-self: start;
  padding-inline-start: clamp(0rem, .9vw, 1rem);
}

.vote-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: clamp(10.5rem, 16.35vw, 17.1rem);
  min-height: clamp(3rem, 3.5vw, 3.7rem);
  border: 2px solid var(--voted-border);
  border-radius: .6rem;
  background: var(--voted-surface);
  box-shadow: inset 0 .27rem .3rem var(--voted-inset);
  color: var(--voted-ink);
  font-size: clamp(1.15rem, 1.96vw, 1.9rem);
  font-weight: 800;
  line-height: 1;
  opacity: 1;
}

.vote-note {
  margin: .55rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.4rem);
  font-weight: 650;
  line-height: 1.35;
}

.gallery {
  padding-block: clamp(.85rem, 1.1vw, 1.2rem) clamp(2rem, 3.5vw, 3.4rem);
}

.gallery h2 {
  margin: 0 0 .8rem;
  font-size: clamp(1.55rem, 2.25vw, 2.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: clamp(.65rem, 1vw, 1.05rem);
}

.gallery-view,
.thumbnail {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: .5rem;
  background: #14131a;
}

.gallery-view {
  aspect-ratio: 16 / 9;
  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(3, minmax(0, 1fr));
  gap: clamp(.45rem, .7vw, .75rem);
}

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

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

.thumbnail[aria-pressed="true"]::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px var(--selected);
  pointer-events: none;
  content: "";
}

@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: 52rem) {
  .site-header {
    min-height: 3.65rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "title" "art" "action";
    gap: .9rem;
    min-height: 0;
    padding-block: 1.65rem 1.55rem;
  }

  .hero-title {
    padding-inline-start: 0;
    font-size: clamp(2rem, 9.35vw, 4.6rem);
  }

  .hero-art {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    overflow: clip;
    overflow-clip-margin: .75rem;
  }

  .hero-action {
    padding-inline-start: 0;
  }

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

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

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