@font-face {
  font-family: "New Edge 666";
  src: url("./fonts/ne-666-semiboldrounded.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "New Edge 666";
  src: url("./fonts/ne-666-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("./fonts/roboto-mono-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("./fonts/roboto-mono-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #000;
  --text: #fff;
  --quiet: #bdbdbd;
  --accent: #c5fd50;
  --sans: "New Edge 666", "Helvetica Neue", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: 36px;
}

* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--text);
  background: var(--background);
  font-family: var(--sans);
}
body::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  z-index: 0;
  height: 33%;
  background: url("./assets/brisbane-cliffs.webp") center 68% / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 72%);
  mask-image: linear-gradient(to bottom, transparent, #000 72%);
  opacity: .36;
  pointer-events: none;
}
body > header, body > main, body > footer { position: relative; z-index: 1; }
img { display: block; max-width: 100%; }
p, h1, figure { margin: 0; }
p { color: var(--quiet); font-size: 1.0625rem; line-height: 1.48; }
a { color: inherit; text-underline-offset: .2em; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.wrap { width: 100%; padding-inline: var(--gutter); }
.mono, .pill, #preview-email {
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.25;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  padding-top: 1rem;
  flex: none;
}
.masthead img { height: auto; }
.black-sheep-logo { width: 150px; }

.split-stage {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  min-height: 0;
  gap: 0;
}

.giveaway {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: 2rem clamp(2rem, 5vw, 6rem) 2rem 0;
}
.giveaway-copy { width: min(100%, 45rem); }
.entry { width: min(100%, 39rem); }
h1 {
  max-width: 9.5em;
  font-size: clamp(3.25rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.giveaway-copy > p { max-width: 27rem; margin-top: 1.5rem; font-size: 1rem; }
.giveaway-copy > .kit-description { max-width: 45rem; color: #b3b3b3; font-size: 1.125rem; }
.giveaway > .giveaway-prompt { max-width: 40rem; margin-top: .5rem; color: #e6e6e6; font-size: 1rem; line-height: 1.4; }
.giveaway-prompt strong { color: var(--accent); font-weight: 700; }
.entry { display: grid; gap: .75rem; margin-top: 1rem; }
.entry-line { display: flex; gap: .5rem; }
#preview-email {
  width: 100%;
  min-width: 0;
  min-height: 3.25rem;
  border: 1px solid #5a5a5a;
  border-radius: 999px;
  padding-inline: 1rem;
  color: var(--text);
  background: var(--background);
}
#preview-email::placeholder { color: var(--quiet); opacity: 1; }
#preview-email:not(:placeholder-shown) { text-transform: none; }
.pill {
  min-height: 3.25rem;
  padding-inline: 1.15rem;
  border: 0;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.primary { color: #000; background: var(--text); }
.pill.primary:hover { background: #e3e3e3; }
.entry-note { max-width: 37rem; padding-top: 4px; font-size: .75rem; line-height: 1.42; }
.entry-status { color: var(--accent); font-size: .875rem; }

.viewer {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding-block: .75rem;
}
.viewer-sticky { display: contents; }
.feature-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  width: min(100%, 32rem);
  height: 6.25rem;
  margin-inline: auto;
  padding-top: .75rem;
  border-top: 1px solid rgb(255 255 255 / 25%);
  flex: none;
}
.giveaway > .feature-caption {
  position: relative;
  z-index: 2;
  margin: 2rem 0 0;
  border-top: 0;
}
.giveaway > .feature-caption + .giveaway-prompt { margin-top: 2rem; }
.giveaway > .feature-caption::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: calc(61vw - var(--gutter));
  height: 1px;
  background: linear-gradient(90deg, rgb(255 255 255 / 34%), rgb(255 255 255 / 20%));
  pointer-events: none;
}
.giveaway > .feature-caption::after {
  content: "";
  position: absolute;
  top: -4px;
  left: calc(61vw - var(--gutter));
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px #000;
  pointer-events: none;
}
.viewer-heading {
  margin: 0;
  font-size: 1.875rem;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.stage {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 0;
  max-height: 44rem;
  perspective: 58rem;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.stage:active { cursor: grabbing; }
.render-stack {
  position: absolute;
  inset: 0;
  transform: rotateY(var(--turn, 0deg));
  transform-style: preserve-3d;
  pointer-events: none;
}
.stage.is-3d .render-stack { opacity: 0; }
.singlet-model {
  position: absolute;
  inset: 0;
  padding: .75rem 8% 1rem;
  pointer-events: none;
  visibility: hidden;
}
.stage.is-3d .singlet-model { visibility: visible; }
.singlet-model canvas { display: block; width: 100%; height: 100%; }
.render {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: .75rem 8% 1rem;
  object-fit: contain;
  transform: translateZ(2px);
  backface-visibility: hidden;
}
.render-back { transform: rotateY(180deg) translateZ(2px); }
.annotations {
  min-width: 0;
}
.annotation {
  text-shadow: 0 2px 8px #000;
}
.annotation h2 {
  margin: 0;
  color: var(--text);
  font: 400 .625rem/1.3 var(--mono);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.annotation p { margin: .45rem 0 0; color: #d1d1d1; font-size: 1rem; line-height: 1.4; }
@media (max-width: 1499px) {
  .viewer-heading { font-size: 1.625rem; }
  .annotation p { font-size: .8125rem; }
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding-block: .65rem;
  flex: none;
}
.footer-notes {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  min-width: 0;
  color: var(--quiet);
  font-size: .8125rem;
  line-height: 1.4;
  text-shadow: 0 1px 4px #000;
}
.footer-notes a { text-decoration: none; }
.footer-notes a:hover, .footer-notes a:focus-visible { text-decoration: underline; }

@media (max-width: 860px) {
  :root { --gutter: 24px; }
  html { height: auto; overflow: auto; }
  body { position: relative; height: auto; min-height: 100svh; overflow: visible; }
  body::before { position: fixed; inset: auto 0 0; height: 65svh; background-position: center bottom; opacity: .28; }
  .masthead { min-height: 4.5rem; }
  .black-sheep-logo { width: 128px; }
  .split-stage { flex: none; display: flex; flex-direction: column; }
  .giveaway { padding: 2.75rem 0 .25rem; }
  h1 { max-width: 12em; font-size: clamp(2.5rem, 8vw, 4rem); line-height: 1.08; }
  .giveaway-copy > p { margin-top: .8rem; font-size: 1rem; }
  .giveaway-copy > .kit-description { margin-top: 1.5rem; font-size: .9375rem; line-height: 1.5; }
  .giveaway > .giveaway-prompt { margin-top: 1.5rem; font-size: .9375rem; line-height: 1.45; }
  .entry { margin-top: 1.75rem; }
  .entry-line { flex-direction: column; gap: .75rem; }
  .entry-line .pill { width: 100%; }
  .viewer { --mobile-tail-trim: clamp(4rem, 16svh, 8rem); display: block; height: calc(100svh + 1440px); padding: 0; }
  .viewer-sticky {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: calc(100svh - var(--mobile-tail-trim));
    min-height: 0;
    padding-top: clamp(1rem, 3svh, 2rem);
  }
  .feature-caption { width: 100%; height: auto; min-height: 5.5rem; gap: .35rem; padding-top: .75rem; }
  .viewer-heading { font-size: 1.25rem; }
  .stage { flex: none; height: clamp(24rem, 72svh, 42rem); max-height: none; touch-action: pan-y; cursor: default; }
  .singlet-model, .render { padding: 0 4% .5rem; }
  .annotation h2 { font-size: .625rem; }
  .annotation p { font-size: .8125rem; line-height: 1.35; }
  .footer { margin-top: 1.5rem; padding-bottom: 1.5rem; }
}

@media (max-width: 540px) {
  h1 { font-size: clamp(2.35rem, 9vw, 3rem); }
}

@media (max-width: 860px) and (max-height: 700px) {
  .stage { height: clamp(24rem, 68svh, 42rem); }
}

@media (max-height: 700px) and (min-width: 861px) {
  h1 { font-size: clamp(3rem, 4.5vw, 4rem); }
  .entry { margin-top: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
