/*
ART DIRECTION: "A private museum with one careful owner"
Concept: a deadpan gallery of 200 pairs of trainers. Warm cream walls, shoebox red,
brass labels, charcoal ink. A serious curator's voice attached to very silly objects.

PALETTE
--cream   #F4EDE0  page background (the gallery walls)
--paper   #FBF7EF  cards, exhibit mats, the hero tag
--tint    #E8DCC5  alternate bands and wing backgrounds
--ink     #231F1D  body text and headings (about 15:1 on cream)
--shoebox #A8231B  action red: buttons, stamp, big numbers (white text about 7:1)
--brass   #6E5420  small labels on cream (about 6:1)
--deep    #1E1A18  announcement bar and footer
--gilt    #C9A24B  hairlines and ornaments on dark backgrounds (about 7:1 on deep)
--placeholder #F1E3B8 highlight behind [bracketed] details still to be confirmed

TYPE
Display: Cormorant Garamond (high-contrast serif for headings and the wordmark)
Text: Inter (catalogue labels, body copy, buttons)

MOTIF
Museum tags: paper tags with a punched hole and a fine gilt inner border (hero card, lot cards).
A tilted red "Not for sale" stamp. Lot numbers set like gallery labels. A gilt ornament divider.
A faint grain on the cream walls.
*/

:root {
  --cream: #F4EDE0;
  --paper: #FBF7EF;
  --tint: #E8DCC5;
  --ink: #231F1D;
  --shoebox: #A8231B;
  --shoebox-deep: #8A1B15;
  --brass: #6E5420;
  --deep: #1E1A18;
  --gilt: #C9A24B;
  --placeholder: #F1E3B8;
  --display: "Cormorant Garamond", Garamond, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --shadow: 0 22px 44px -26px rgba(35, 31, 29, 0.55);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: hidden;
}

/* faint grain on the gallery walls */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(35, 31, 29, 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.6;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 5.5vw + 1rem, 5.25rem); }
h2 { font-size: clamp(2.1rem, 3.2vw + 1rem, 3.5rem); }
h3 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2rem); }

p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--ink); }
a:hover { color: var(--shoebox); }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius);
}
.skip-link:focus { left: 12px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

.section { padding-block: clamp(56px, 8vw, 112px); position: relative; }
.section--tint { background: var(--tint); }

.label {
  display: block;
  font: 600 0.75rem/1.2 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
}

.ph {
  background: var(--placeholder);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 500;
}

.ornament {
  display: block;
  width: min(220px, 100%);
  height: 12px;
  margin-bottom: 20px;
  position: relative;
  background: linear-gradient(var(--gilt), var(--gilt)) center / 100% 1px no-repeat;
}
.ornament::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--gilt);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- announcement bar ---------- */
.announce { background: var(--deep); color: var(--cream); font-size: 0.8125rem; padding: 10px 16px; }
.announce-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  text-align: center;
}
.announce-list li + li::before {
  content: "\2022";
  color: var(--gilt);
  padding: 0 12px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 237, 224, 0.97);
  border-bottom: 1px solid rgba(35, 31, 29, 0.12);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 24px -20px rgba(35, 31, 29, 0.6); }

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-block: 14px;
  transition: padding 0.3s var(--ease);
}
.site-header.is-scrolled .header-row { padding-block: 8px; }

.brand {
  order: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; color: var(--shoebox); }
.brand-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 0.95;
}
.brand-text em { font-style: italic; font-weight: 500; }

.nav {
  order: 3;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  align-items: center;
}
.nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  padding: 6px 0;
  background: linear-gradient(var(--shoebox), var(--shoebox)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.nav a:hover { background-size: 100% 2px; color: var(--ink); }
.nav a[aria-current="page"] { background-size: 100% 2px; }

.header-row .btn-sm { order: 2; margin-left: auto; }

@media (min-width: 860px) {
  .nav { order: 0; width: auto; flex: 1; justify-content: center; }
  .header-row .btn-sm { order: 2; margin-left: 0; }
  .brand-text { font-size: 1.6rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 0.9375rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-red {
  background: var(--shoebox);
  color: #fff;
  box-shadow: 0 10px 20px -12px var(--shoebox);
}
.btn-red:hover { background: var(--shoebox-deep); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 0.875rem; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--shoebox);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.text-link:hover { color: var(--shoebox); }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  background: none;
  border: 0;
  font: 600 0.9375rem/1 var(--sans);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--shoebox);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  cursor: pointer;
}
.text-btn:hover { color: var(--shoebox); }

/* ---------- photo slots ---------- */
.photo {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  background: var(--tint);
}
[data-photo-slot] > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- museum tag (hero card, bands) ---------- */
.tag-card {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow);
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px var(--gilt), var(--shadow);
}
.tag-card::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: inset 0 0 0 1px rgba(35, 31, 29, 0.25);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(560px, 92svh, 900px);
  display: flex;
  align-items: flex-end;
  padding-block: 48px;
}
.hero .photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 0;
  aspect-ratio: auto;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(30, 26, 24, 0.7) 0%, rgba(30, 26, 24, 0.35) 60%, rgba(30, 26, 24, 0.1) 100%);
}
.hero-card { max-width: 640px; }
.hero h1 { margin-bottom: 0.4em; }
.hero h1 .underline {
  background: linear-gradient(var(--shoebox), var(--shoebox)) 0 88% / 100% 0.12em no-repeat;
}
.lede { font-size: 1.125rem; color: #3E3733; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- curator's note ---------- */
.note-grid { display: grid; gap: 40px; align-items: center; }
.big-number {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(7rem, 22vw, 15rem);
  line-height: 0.85;
  color: var(--shoebox);
}
.big-caption {
  display: inline-block;
  margin-top: 16px;
  background: var(--paper);
  border: 1px solid var(--gilt);
  padding: 8px 16px;
  font-weight: 600;
  border-radius: 3px;
}
@media (min-width: 860px) {
  .note-grid { grid-template-columns: 5fr 7fr; gap: 72px; }
}

/* ---------- carousel ---------- */
.band-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
.carousel-controls { display: flex; align-items: center; gap: 10px; }
.round-btn,
.pause-btn {
  min-height: 48px;
  min-width: 48px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 600 0.875rem/1 var(--sans);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.round-btn svg { width: 20px; height: 20px; }
.round-btn:hover,
.pause-btn:hover { background: var(--ink); color: var(--cream); }
.round-btn:active,
.pause-btn:active { transform: scale(0.96); }

.carousel { position: relative; }
.carousel-track {
  position: relative;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 12px 4px 32px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.carousel-track > .slide {
  flex: 0 0 min(340px, 84%);
  scroll-snap-align: start;
}
@media (min-width: 900px) {
  .carousel-track > .slide { flex-basis: calc((100% - 24px) / 2); }
}

.dots { display: flex; gap: 0; margin-top: 4px; }
.dots button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dots button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(35, 31, 29, 0.35);
  transition: width 0.3s var(--ease), background-color 0.3s;
}
.dots button[aria-current="true"]::before { width: 26px; background: var(--shoebox); }

/* ---------- lot cards (flip over to read the condition report) ---------- */
.lot { perspective: 1400px; position: relative; height: 100%; }
.lot-inner {
  position: relative;
  display: grid;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
}
.lot.is-flipped .lot-inner { transform: rotateY(180deg); }

.lot-face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px 16px 20px;
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.lot-back { transform: rotateY(180deg); background: #FFFDF7; }

.lot-photo { aspect-ratio: 1 / 1; margin-bottom: 14px; }
.lot-photo img { transition: transform 0.7s var(--ease); cursor: pointer; }
.lot:hover .lot-photo img { transform: scale(1.04); }

.lot-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lot-no {
  font: 600 0.75rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--cream);
  padding: 6px 10px;
  border-radius: 3px;
}
.lot-wing { font: 600 0.6875rem/1.2 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); text-align: right; }
.lot-title { margin: 10px 0 2px; font-size: 1.6rem; }
.lot-title-sm { font-size: 1.4rem; }
.lot-blurb { margin: 0 0 12px; color: #3E3733; font-size: 0.9375rem; }
.lot-face .text-btn { margin-top: auto; align-self: flex-start; }

.lot-back .report { margin: 6px 0 14px; display: grid; gap: 10px; }
.lot-back .report div { border-top: 1px solid rgba(35, 31, 29, 0.14); padding-top: 10px; }
.lot-back dt {
  font: 600 0.6875rem/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}
.lot-back dd { margin: 4px 0 0; font-size: 0.9375rem; }
.lot-back .text-btn { margin-top: auto; align-self: flex-start; }

.stamp {
  align-self: flex-end;
  margin: 0 0 8px;
  display: inline-block;
  border: 2px solid var(--shoebox);
  color: var(--shoebox);
  font: 700 0.6875rem/1 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 4px;
  transform: rotate(-6deg);
  background: rgba(251, 247, 239, 0.9);
}

/* ---------- collection page ---------- */
.page-head { padding-block: clamp(48px, 7vw, 88px) 16px; }
.lead { font-size: 1.1875rem; color: #3E3733; max-width: 60ch; }

.wing { padding-block: clamp(48px, 6vw, 80px); }
.wing--tint { background: var(--tint); }
.wing-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
  margin-bottom: 36px;
}
.wing-head h2 { margin: 0; font-size: clamp(2rem, 3vw + 0.5rem, 3rem); }
.wing-head p { margin: 0; color: #3E3733; }

.lot-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .lot-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) {
  .lot-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .lot-grid--offset > :nth-child(2) { margin-top: 56px; }
}

/* image band with a caption tag */
.image-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(360px, 52vw, 520px);
  display: flex;
  align-items: center;
  padding-block: 56px;
}
.image-band .photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 0;
  aspect-ratio: auto;
}
.image-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(30, 26, 24, 0.55), rgba(30, 26, 24, 0.2));
}
.image-band .tag-card { max-width: 520px; margin-left: 0; }
.image-band-wrap { margin-block: 24px 0; }

/* ---------- curator page ---------- */
.bio-grid { display: grid; gap: 48px; align-items: start; }
.bio-photo { aspect-ratio: 4 / 5; }
.bio-photo img { object-position: 50% 50%; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { border-top: 1px solid rgba(35, 31, 29, 0.16); padding: 14px 0; }
.facts div:last-child { border-bottom: 1px solid rgba(35, 31, 29, 0.16); }
.facts dt {
  font: 600 0.6875rem/1.2 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 4px;
}
.facts dd { margin: 0; }
.bio-card { margin-top: 28px; }
@media (min-width: 900px) {
  .bio-grid { grid-template-columns: 5fr 7fr; gap: 80px; }
}

/* ---------- viewing request (form styled as an official sheet) ---------- */
.sheet-wrap { display: grid; gap: 40px; align-items: start; }
.sheet {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow);
  border-top: 8px solid var(--shoebox);
  position: relative;
}
.sheet-ref {
  font: 600 0.75rem/1.2 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 8px;
}
.form-grid { display: grid; gap: 20px; }
@media (min-width: 680px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

.field label,
.field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9375rem;
}
.field .hint { display: block; font-size: 0.875rem; color: #554C46; margin-bottom: 6px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="date"],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: 400 1rem/1.4 var(--sans);
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(35, 31, 29, 0.35);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: 3px solid var(--brass); outline-offset: 2px; border-color: var(--ink); }
.field .check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9375rem;
  font-weight: 400;
  margin-bottom: 0;
}
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--shoebox); }
.form-msg {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 500;
  max-width: none;
}
.form-msg--ok { background: #E4EFDC; color: #1F3A17; border-left: 4px solid #3F6B2E; }
.form-msg--err { background: #F6DCD6; color: #5A1510; border-left: 4px solid var(--shoebox); }

.terms {
  background: var(--tint);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  align-self: start;
}
.terms h2 { font-size: 2rem; }
.terms ol { margin: 0; padding-left: 1.25em; display: grid; gap: 12px; }
.terms li { padding-left: 4px; }

@media (min-width: 960px) {
  .sheet-wrap { grid-template-columns: 7fr 5fr; gap: 56px; }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--deep);
  color: var(--cream);
  padding-block: 64px 28px;
  margin-top: 0;
}
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--gilt); }
.footer-grid { display: grid; gap: 40px; }
.footer-grid p { color: #E5DCCB; }
.footer-brand .brand-text { color: var(--cream); font-size: 1.8rem; }
.footer-brand .brand svg { color: var(--gilt); }
.footer-brand .brand { color: var(--cream); }
.footer-h {
  font: 600 0.75rem/1.2 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gilt);
  margin: 0 0 12px;
}
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-legal {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(201, 162, 75, 0.45);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
}
.footer-legal p { margin: 0; color: #CFC5B4; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
}

/* ---------- motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .lot.is-flipped .lot-inner { transition: none; }
  .lot:hover .lot-photo img { transform: none; }
}
