:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --ink: #11110f;
  --muted: #6c6a62;
  --line: rgba(17, 17, 15, .16);
  --lime: #cfff36;
  --blue: #225bff;
  --gutter: clamp(18px, 4vw, 62px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, a { font: inherit; }
button { cursor: pointer; }

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid rgba(244, 241, 232, .18);
}
.site-header > p {
  margin: 0;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-size: .75rem;
  font-weight: 900;
  line-height: .9;
  text-decoration: none;
  text-transform: uppercase;
}
.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.brand-mark i {
  position: absolute;
  top: 12px;
  right: -4px;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: #090907;
}

.contest-opening {
  min-height: 100svh;
  overflow: hidden;
  position: relative;
  background: #090907;
  color: var(--paper);
}
.contest-opening .site-header { position: relative; z-index: 4; }
.contest-opening .site-header > p { color: rgba(244, 241, 232, .56); }
.contest-copy {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  top: 50%;
  width: min(540px, calc(100vw - (var(--gutter) * 2)));
  transform: translateY(-50%);
  pointer-events: none;
}
.contest-copy > p:last-child {
  max-width: 390px;
  margin: 30px 0 0;
  color: rgba(244, 241, 232, .7);
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1.35;
}
.contest-stage {
  position: absolute;
  inset: 88px 0 0;
  overflow: hidden;
  cursor: none;
  touch-action: none;
}
.contest-track { position: absolute; inset: 0; }
.runner {
  position: absolute;
  top: var(--runner-y);
  left: 0;
  width: clamp(92px, 11vw, 170px);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(244, 241, 232, .28);
  background: #f4f1e8;
  object-fit: cover;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  transform: translateX(-190px) rotate(var(--tilt));
  animation: race var(--duration) linear var(--delay) infinite;
  will-change: transform;
}
.runner.caught { filter: brightness(1.35); outline: 5px solid var(--lime); }
.catch-lens {
  position: absolute;
  z-index: 5;
  left: 72%;
  top: 50%;
  width: clamp(118px, 14vw, 190px);
  aspect-ratio: 1;
  border: 3px solid rgba(244, 241, 232, .94);
  border-radius: 50%;
  background: rgba(244, 241, 232, .09);
  box-shadow: inset 0 0 45px rgba(255, 255, 255, .16), 0 0 0 10px rgba(244, 241, 232, .05);
  backdrop-filter: blur(2px) saturate(1.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.catch-lens::after {
  content: "";
  position: absolute;
  right: -43%;
  bottom: -17%;
  width: 55%;
  height: 12px;
  border-radius: 999px;
  background: var(--paper);
  transform: rotate(42deg);
  transform-origin: left center;
}
.contest-result {
  position: absolute;
  z-index: 6;
  right: var(--gutter);
  bottom: 34px;
  max-width: min(420px, 68vw);
  margin: 0;
  color: rgba(244, 241, 232, .72);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: right;
  text-transform: uppercase;
}

@keyframes race {
  from { transform: translateX(-190px) rotate(var(--tilt)); }
  to { transform: translateX(calc(100vw + 210px)) rotate(var(--tilt)); }
}

.catalog { padding: clamp(66px, 8vw, 110px) var(--gutter) 80px; }
.catalog-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  padding-bottom: clamp(36px, 6vw, 74px);
}
.eyebrow {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.5rem, 11vw, 10.8rem);
  font-weight: 400;
  letter-spacing: -.085em;
  line-height: .76;
}
h1 em { color: var(--blue); font-style: normal; }
.contest-opening h1 em { color: var(--lime); }
.catalog-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 9vw, 9rem);
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .8;
}
.count {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.product-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}
.product-card:hover,
.product-card:focus-visible { background: #fff; outline: none; }
.product-card:focus-visible { box-shadow: inset 0 0 0 3px var(--blue); }
.product-image {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--line);
  background: #e7e3d9;
  object-fit: cover;
}
.product-copy {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  padding: 18px;
}
.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.product-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.02;
}
.product-price {
  margin: auto 0 0;
  padding-top: 22px;
  font-size: .85rem;
  font-weight: 850;
}

.detail {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: auto;
  background: var(--paper);
  padding: clamp(18px, 4vw, 62px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .18s ease, transform .18s ease;
}
.detail[aria-hidden="false"] { opacity: 1; pointer-events: auto; transform: none; }
.close-detail {
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  padding: 4px 0;
  color: inherit;
  font-weight: 850;
}
.detail-layout {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  align-items: center;
  gap: clamp(30px, 7vw, 110px);
  padding-top: 38px;
}
.detail-layout img { width: 100%; max-height: 72vh; object-fit: contain; background: #fff; }
.detail-copy .eyebrow { margin-bottom: 18px; }
.detail-copy h2 {
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 7rem);
  font-weight: 400;
  letter-spacing: -.07em;
  line-height: .86;
}
.detail-price { font-size: 1.5rem; font-weight: 900; }
.detail-note { max-width: 520px; color: var(--muted); line-height: 1.5; }
.detail-actions { display: flex; align-items: center; gap: 18px; margin-top: 34px; }
.detail-actions button {
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  padding: 14px 22px;
  color: var(--ink);
  font-weight: 900;
}
#detailCode { color: var(--muted); font-size: .75rem; font-weight: 850; letter-spacing: .12em; }
.loading { padding: 30px var(--gutter); color: var(--muted); }
.loading[hidden] { display: none; }

@media (max-width: 940px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .site-header { min-height: 72px; }
  .site-header > p { max-width: 130px; text-align: right; font-size: .56rem; }
  .contest-stage { top: 72px; }
  .contest-copy { top: 44%; }
  .contest-copy .eyebrow { margin-bottom: 20px; }
  .contest-copy h1 { font-size: clamp(5rem, 24vw, 8rem); }
  .catalog-head { display: block; }
  .count { margin-top: 24px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-copy { min-height: 146px; padding: 13px; }
  .product-meta { display: block; line-height: 1.5; }
  .product-meta span { display: block; }
  .product-card h2 { font-size: 1.25rem; }
  .detail-layout { grid-template-columns: 1fr; align-content: start; }
  .detail-layout img { max-height: 50vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .detail { transition: none; }
  .runner { animation-duration: calc(var(--duration) * 1.8); }
}
