/* Save The Scene — one stylesheet, no build step.
 *
 * Tokens first. BRAND.md explains the choices; change the values here and the
 * whole site follows. Dark on purpose: the garments and the cars are the only
 * saturated things on the page, plus one hazard-yellow signal.
 */

:root {
  /* Ground */
  --void: #070708;
  --asphalt: #0d0d0f;
  --surface: #16161a;
  --surface-lift: #202026;

  /* Ink */
  --chalk: #f2efe8;
  --chalk-soft: #a09c93;
  --chalk-faint: #66625b;

  /* Structure */
  --hairline: #26262c;
  --hairline-lit: #3a3a42;

  /* The one signal. Primary action + live status. Nothing else. */
  --signal: #ffd60a;
  --signal-dim: #e6bf00;
  --on-signal: #121000;

  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, monospace;

  --track-label: 0.18em;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--asphalt);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---- type -------------------------------------------------------------- */

.label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--chalk-soft);
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.88;
  margin: 0;
}

.display-sub {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
}

.prose { max-width: 60ch; color: var(--chalk-soft); line-height: 1.7; }
.prose p { margin: 0 0 1em; }

/* ---- header / footer --------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--asphalt) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; letter-spacing: 0.02em; line-height: 1; }
.brand span { color: var(--signal); }
.nav { display: flex; gap: 28px; }
@media (max-width: 480px) { .nav { gap: 16px; } }
.nav a { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: var(--track-label); color: var(--chalk-soft); transition: color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--chalk); }

.site-footer { border-top: 1px solid var(--hairline); margin-top: 96px; padding: 40px 0 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer a { color: var(--chalk); }
.site-footer a:hover { color: var(--signal); }

.demo-banner {
  display: none;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
  color: var(--chalk-soft);
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  text-align: center;
}
.demo-banner[data-show="true"] { display: block; }

/* ---- hero -------------------------------------------------------------- */

.hero { padding: clamp(56px, 10vw, 128px) 0 clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--hairline); }
.hero .display { font-size: clamp(3.5rem, 13vw, 11rem); }
.hero .display em { font-style: normal; color: var(--signal); }
.hero-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 32px; }
.hero-row .prose { font-size: 1.0625rem; }

/* ---- buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 32px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  border: 1px solid var(--hairline-lit);
  transition: background-color .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--on-signal); font-weight: 700; }
.btn-primary:hover { background: var(--signal-dim); border-color: var(--signal-dim); }
.btn-ghost { color: var(--chalk); }
.btn-ghost:hover { border-color: var(--chalk); }
.btn[aria-disabled="true"], .btn:disabled { background: var(--surface-lift); border-color: var(--surface-lift); color: var(--chalk-faint); cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }

/* ---- sections ---------------------------------------------------------- */

.section { padding: clamp(48px, 7vw, 96px) 0 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; border-bottom: 1px solid var(--hairline); padding-bottom: 16px; margin-bottom: 32px; }
.section-head .display-sub { font-size: clamp(2rem, 5vw, 3.5rem); }

/* ---- product grid ------------------------------------------------------ */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 32px 24px; }

.card { display: block; }
.card-media { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding-top: 14px; }
.card-name { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; line-height: 1.05; }
.card-price { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--chalk-soft); white-space: nowrap; }
.card-status { margin-top: 6px; }
.card-status.live { color: var(--signal); }

.grid-empty { grid-column: 1 / -1; padding: 64px 0; border-top: 1px solid var(--hairline); }
.grid-empty .display-sub { font-size: clamp(2rem, 6vw, 4rem); margin-top: 12px; }

/* ---- product page ------------------------------------------------------ */

.product { display: grid; gap: 40px; padding-top: 32px; }
@media (min-width: 900px) { .product { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; } }

.gallery-main { aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.gallery-thumbs button { width: 72px; flex: 0 0 auto; aspect-ratio: 4 / 5; background: var(--surface); border: 1px solid transparent; overflow: hidden; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--chalk); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-info .display { font-size: clamp(2.5rem, 7vw, 4.5rem); margin-top: 12px; }
.product-price { font-family: var(--font-display); font-weight: 700; font-size: 2rem; margin-top: 20px; }
.product-info .prose { margin-top: 20px; font-size: 0.9375rem; }

.picker { margin-top: 28px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.picker-head { display: flex; justify-content: space-between; align-items: baseline; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.swatch {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em;
  min-width: 48px; padding: 10px 14px;
  border: 1px solid var(--hairline-lit); color: var(--chalk);
  transition: border-color .2s, background-color .2s, color .2s;
}
.swatch:hover:not(:disabled) { border-color: var(--chalk-soft); }
.swatch[aria-pressed="true"] { border-color: var(--chalk); background: var(--chalk); color: var(--asphalt); }
.swatch:disabled { opacity: .28; text-decoration: line-through; cursor: not-allowed; }

.buy { margin-top: 32px; }
.buy .btn { width: 100%; padding: 20px; font-size: 0.75rem; }
.buy-note { margin-top: 12px; }

/* ---- manifesto --------------------------------------------------------- */

.manifesto { display: grid; gap: 24px; }
@media (min-width: 900px) { .manifesto { grid-template-columns: 5fr 7fr; gap: 64px; } }
.manifesto .display-sub { font-size: clamp(2.25rem, 6vw, 4.5rem); }
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.rules li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.rules .label { color: var(--signal); padding-top: 4px; }
.rules strong { display: block; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.375rem; line-height: 1; margin-bottom: 4px; }
.rules p { margin: 0; color: var(--chalk-soft); font-size: 0.9375rem; }

/* ---- cart -------------------------------------------------------------- */

.cart-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .cart-grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; } }
.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.cart-line { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hairline); align-items: start; }
.cart-thumb { display: block; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-what .label { margin-top: 6px; }
.cart-price { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; white-space: nowrap; }
.qty { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.qty .swatch { min-width: 40px; padding: 8px 10px; }
.cart-remove { color: var(--chalk-faint); margin-left: 8px; }
.cart-remove:hover { color: var(--chalk); }

.ship-form { display: grid; gap: 14px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field input, .field select {
  font: inherit; color: var(--chalk); background: var(--surface);
  border: 1px solid var(--hairline-lit); border-radius: 0; padding: 12px 14px; width: 100%; min-width: 0;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--chalk); }

.quote { margin-top: 28px; display: grid; gap: 16px; }
.quote-error { color: var(--chalk); border-left: 2px solid var(--chalk); padding-left: 12px; }
.rates { border: 0; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.rates legend { padding: 18px 0 10px; }
.rate { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--hairline); cursor: pointer; }
.rate .label { display: block; margin-top: 2px; }
.rate input { accent-color: var(--chalk); }
.totals { margin: 0; display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; align-items: baseline; }
.totals dd { margin: 0; }
.totals-total { border-top: 1px solid var(--hairline); padding-top: 12px; }
.totals-total dd { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; }
.quote .btn-block { padding: 20px; font-size: 0.75rem; }

/* ---- misc -------------------------------------------------------------- */

.skeleton { background: var(--surface); position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface-lift), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.notfound .display { font-size: clamp(3.5rem, 14vw, 10rem); margin: 20px 0 32px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; animation: none !important; }
}
