@font-face {
  font-family: "Instrument Serif";
  src: url("/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@property --reveal {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 38%;
}

:root {
  color-scheme: dark;
  --room: #0b0a09;
  --line: #2a2622;
  --paper: #ede6d8;
  --muted: #a29a8d;
  --safelight: #e5361f;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  font-family: var(--serif);
  color: var(--paper);
  background: var(--room);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--safelight); outline-offset: 4px; }

.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 56px; }
.brand, .order-link, figcaption, .compare-instruction, .ticket-body, .station h2, .button, .checkout-note, .site-footer {
  font-family: var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
}
.brand::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--safelight); }
.order-link { font-size: .81rem; line-height: 1.3; text-underline-offset: 5px; text-decoration-color: var(--safelight); }
.order-link span { white-space: nowrap; }
.order-link:hover { text-decoration-thickness: 2px; }

.compare-instruction, .compare-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 29px;
  padding-block: 5px;
  font-size: .75rem;
  color: var(--muted);
}
.compare-instruction { justify-content: end; }
.sample-image {
  --split: 38%;
  --reveal: var(--split);
  isolation: isolate;
  position: relative;
  overflow: hidden;
  height: min(62svh, 680px);
  min-height: 300px;
  background: #18212b;
  animation: sweep 900ms ease-out;
}
@keyframes sweep {
  from { --reveal: 100%; }
  to { --reveal: 38%; }
}
.sample-image:focus-within {
  animation: none;
  outline: 2px solid var(--safelight);
  outline-offset: -2px;
}
.sample-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}
.sample-image .original { clip-path: inset(0 calc(100% - var(--reveal)) 0 0); }
.split {
  position: absolute;
  inset: 0 auto 0 clamp(6px, var(--reveal), 100% - 6px);
  transform: translateX(-50%);
  width: 1px;
  background: var(--safelight);
  pointer-events: none;
}
.split::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 12px;
  height: 44px;
  transform: translateX(-50%);
  background: var(--safelight);
  content: "";
}
.compare { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }

.hero-copy { padding-top: 42px; align-items: center; }
h1, h2 { font-weight: 400; text-wrap: balance; }
h1 {
  grid-column: 1 / 9;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: .94;
  letter-spacing: -.025em;
}
.hero-description { grid-column: 9 / -1; }
.hero-description p, .story-copy p, .odds p { font-size: clamp(1.22rem, 1.65vw, 1.5rem); line-height: 1.37; }
.hero-description .order-link { display: inline-flex; gap: .5em; align-items: center; min-height: 48px; margin-top: 9px; }

.story { padding-top: clamp(80px, 11vw, 160px); }
.story-grid { align-items: center; }
.story-copy { grid-column: 1 / 7; }
.story-copy h2 { font-size: clamp(2.8rem, 5.3vw, 4.5rem); line-height: .98; letter-spacing: -.016em; }
.story-copy p { max-width: 36ch; margin-top: 23px; }
.detail { grid-column: 8 / -1; }
.detail img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 86% 50%; }
.detail figcaption { margin-top: 9px; color: var(--muted); font-size: .75rem; }
.odds { margin-top: clamp(50px, 8vw, 90px); text-align: center; }
.odds-frames { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; width: min(100%, 670px); margin: 0 auto 15px; }
.odds-frames span { border: 1px solid #51473e; aspect-ratio: 3 / 2; }
.odds-frames span:last-child { background: var(--safelight); border-color: var(--safelight); }
.odds p { color: var(--muted); }
.odds strong { color: var(--paper); font-weight: inherit; }

.lab { padding-block: clamp(68px, 10vw, 142px); scroll-margin-top: -25px; }
.station {
  color-scheme: light;
  width: min(100%, 800px);
  margin-inline: auto;
  padding: clamp(24px, 5vw, 64px);
  color: var(--room);
  background: var(--paper);
}
.station h2 { padding-bottom: 12px; border-bottom: 1px solid #b3a99a; font-size: .9rem; line-height: 1.4; }
.ticket-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: stretch; padding-block: 22px; }
.drop {
  position: relative;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 3 / 2;
  padding: 14px;
  border: 1px dashed #8c8071;
  text-align: center;
  cursor: pointer;
}
.drop:hover, .drop.dragging { border-color: var(--room); background: #dfd3bd; }
.drop:focus-within { outline: 2px solid var(--safelight); outline-offset: 3px; }
.drop input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop input:disabled { cursor: wait; }
.drop-plus { position: relative; width: 16px; height: 16px; }
.drop-plus::before, .drop-plus::after { position: absolute; inset: 50% 0 auto; height: 1px; background: currentColor; content: ""; }
.drop-plus::after { transform: rotate(90deg); }
.drop-copy { display: grid; gap: 5px; max-width: 100%; }
.drop-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; font-size: 1rem; letter-spacing: 0; }
.drop-copy span { color: #554a3e; font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
.drop img { width: 47px; height: 47px; object-fit: cover; }
.drop:has(img:not([hidden])) .drop-plus { display: none; }
.order-details { display: grid; align-self: start; }
.order-details div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; padding-block: 11px; border-bottom: 1px solid #b3a99a; }
.order-details dt, .order-details dd { font-size: .75rem; line-height: 1.35; }
.order-details dt { color: #554a3e; }
.order-details dd { white-space: nowrap; }
.station-actions { display: grid; gap: 10px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px 16px;
  border: 1px solid var(--room);
  background: var(--room);
  color: var(--paper);
  text-decoration: none;
  font-size: .87rem;
  line-height: 1.3;
  cursor: pointer;
}
.button:not(:disabled):hover { background: #2c2219; }
.button:disabled { color: #f9f4e9; background: #6d6458; border-color: #6d6458; cursor: not-allowed; }
.checkout-note { color: #554a3e; font-size: .76rem; }
.status, .return-title { margin-top: 13px; font: 400 .93rem/1.45 var(--mono); overflow-wrap: anywhere; }
.status.error { color: #8f2013; }
#print { display: block; width: 100%; max-height: 500px; margin-top: 14px; object-fit: contain; background: var(--room); }
.return-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 16px; }
.plain-button { padding: 8px 0; border: 0; color: var(--room); background: transparent; text-decoration: underline; cursor: pointer; font: 400 .87rem/1.4 var(--mono); }
.site-footer { padding-block: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }

@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .grid { grid-template-columns: 1fr; row-gap: 18px; }
  .grid > * { grid-column: auto; }
  .sample-image { height: auto; min-height: 0; aspect-ratio: 4 / 5; }
  .sample-image img { object-position: 65% center; }
  .compare-instruction { min-height: 22px; padding-block: 2px; }
  .hero-copy { padding-top: 25px; }
  h1 { font-size: clamp(3.25rem, 13vw, 5rem); }
  .hero-description p, .story-copy p { max-width: 40ch; }
  .story-grid { row-gap: 30px; }
  .detail { width: min(100%, 440px); }
  .detail img { aspect-ratio: 4 / 5; }
  .odds-frames { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lab { width: 100%; }
}

@media (max-width: 520px) {
  .header-inner { gap: 12px; }
  .header-inner .order-link { font-size: .73rem; }
  .compare-labels { font-size: .68rem; }
  .ticket-body { grid-template-columns: 1fr; gap: 15px; }
  .drop { min-height: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  .sample-image { animation: none; }
}
