/* PrimeBuild Hardware. Design system: see DESIGN.md (shelf-edge ticket system). */
:root {
  /* colour (OKLCH, hex fallback in DESIGN.md) */
  --bg: oklch(0.94 0.002 100);
  --surface: oklch(1 0 0);
  --fg: oklch(0.19 0.006 95);
  --muted: oklch(0.45 0.008 95);
  --border: oklch(0.86 0.004 100);
  --ink: oklch(0.17 0.005 95);
  --ink-2: oklch(0.24 0.005 95);
  --on-ink: oklch(0.95 0.004 95);
  --on-ink-muted: oklch(0.72 0.006 95);
  --accent: oklch(0.88 0.18 98);
  --accent-fg: oklch(0.17 0.005 95);

  /* type */
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;
  --step-cap: 0.8125rem;
  --step-body: 1.0625rem;
  --step-lead: 1.3125rem;
  --step-h3: 1.875rem;
  --step-h2: clamp(2.25rem, 5vw, 3rem);
  --step-display: clamp(2.75rem, 7.4vw, 4.5rem);

  /* space, edges */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --edge: 2px solid var(--ink);
  --rail: 8px;
  --radius-btn: 2px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--step-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, dl, dd, figure, address { margin: 0; }
address { font-style: normal; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
h1 { font-size: var(--step-display); line-height: 0.92; }
h2 { font-size: var(--step-h2); line-height: 0.95; }
h3 { font-size: var(--step-h3); line-height: 1; font-weight: 800; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: var(--accent-fg); padding: 8px 12px; }

a:focus-visible, .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--accent);
}

.cap {
  font: 600 var(--step-cap)/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Header: a black shelf rail */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--on-ink); }
.top-row { display: flex; align-items: center; gap: var(--s5); min-height: 60px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand .wordmark { display: none; font: 900 1.5rem/1 var(--font-display); text-transform: uppercase; }
.brand.no-logo img { display: none; }
.brand.no-logo .wordmark { display: inline; }
.nav { display: none; gap: var(--s5); margin-left: auto; }
.nav a { color: var(--on-ink-muted); text-decoration: none; font-size: 0.95rem; padding: var(--s2) 0; }
.nav a:hover { color: var(--on-ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.top-call {
  margin-left: auto; text-decoration: none; white-space: nowrap;
  font: 600 1rem/1 var(--font-mono); font-variant-numeric: tabular-nums; word-spacing: -0.3em;
  background: var(--accent); color: var(--accent-fg);
  padding: 10px 12px; border-radius: var(--radius-btn);
}
.top-call .cap { display: none; margin-right: 6px; font-size: 0.7rem; }
.top-call:hover { background: var(--on-ink); }
@media (min-width: 960px) {
  .nav { display: flex; }
  .top-call { margin-left: var(--s4); }
  .top-call .cap { display: inline; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  border: var(--edge); border-radius: var(--radius-btn);
  font: 600 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap;
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--ink); color: var(--accent); }
.btn-secondary { background: var(--surface); color: var(--fg); }
.btn-secondary:hover { background: var(--ink); color: var(--on-ink); }
.btn:active { transform: translateY(1px); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Photos and their empty state */
.photo { position: relative; overflow: hidden; background: var(--ink-2); border: var(--edge); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-empty img { display: none; }
.dev .photo.is-empty::after {
  content: attr(data-file);
  position: absolute; left: 10px; bottom: 8px; right: 10px;
  font: 500 0.75rem/1.3 var(--font-mono); color: var(--on-ink-muted); word-break: break-all;
}
html:not(.dev) .photo.optional.is-empty { display: none; }

/* First screen */
.intro { padding: var(--s7) 0 var(--s9); }
.intro-grid { display: grid; gap: var(--s7); }
.intro-copy h1 { max-width: 11ch; }
.lead { margin-top: var(--s5); max-width: 40ch; font-size: var(--step-lead); line-height: 1.45; color: var(--muted); }
.intro-copy .actions { margin-top: var(--s6); }
.intro-media { position: relative; }
.intro-media .photo { aspect-ratio: 4 / 3; }

/* The store ticket: signature move */
.ticket {
  position: relative; z-index: 2;
  width: min(100% - 24px, 340px);
  margin: -56px 0 0 12px;
  background: var(--accent); color: var(--accent-fg);
  border: var(--edge);
}
.ticket-head, .label-strip {
  display: flex; justify-content: space-between; gap: var(--s3);
  background: var(--ink); color: var(--accent);
  padding: 6px 12px;
  font: 600 0.72rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.ticket-body { padding: var(--s3) var(--s4) var(--s2); }
.ticket-field { font: 600 var(--step-cap)/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.ticket-big { font: 900 3rem/0.95 var(--font-display); font-variant-numeric: tabular-nums; margin-top: 2px; }
.ticket-note { font-size: 0.9rem; font-weight: 500; min-height: 1.4em; margin-top: var(--s1); }
.ticket-rows { margin-top: var(--s3); border-top: 1px solid oklch(0.17 0.005 95 / 0.35); }
.ticket-rows div { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 0; border-bottom: 1px solid oklch(0.17 0.005 95 / 0.35); font-size: 0.92rem; }
.ticket-rows dt { font: 600 0.75rem/1.6 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.ticket-rows dd { font-weight: 600; text-align: right; }
.ticket-rows a { text-decoration: none; font-family: var(--font-mono); }
.barcode { font: 400 2.6rem/1 "Libre Barcode 39", monospace; margin-top: var(--s2); overflow: hidden; white-space: nowrap; }

@media (min-width: 960px) {
  .intro { padding: var(--s8) 0 120px; }
  .intro-grid { grid-template-columns: 5fr 7fr; align-items: center; gap: var(--s8); }
  .ticket { position: absolute; left: -40px; bottom: -96px; margin: 0; }
}

/* Stock: the shelf */
.stock { padding: var(--s9) 0; background: var(--surface); border-top: var(--edge); }
.stock-head { display: grid; gap: var(--s4); margin-bottom: var(--s6); }
.stock-head p { color: var(--muted); max-width: 46ch; }
.stock-head a { color: var(--fg); font-family: var(--font-mono); font-weight: 600; }
@media (min-width: 960px) { .stock-head { grid-template-columns: 5fr 7fr; align-items: end; gap: var(--s8); } }

.shelf { list-style: none; margin: 0; padding: 0; border-top: var(--rail) solid var(--ink); }
.label {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  column-gap: var(--s4); row-gap: var(--s2);
  padding: var(--s4) 0;
  border-bottom: var(--rail) solid var(--ink);
}
.code {
  grid-column: 1 / -1; justify-self: start;
  background: var(--accent); color: var(--accent-fg);
  font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.1em;
  padding: 5px 8px;
}
.label-text p { color: var(--muted); margin-top: var(--s1); max-width: 52ch; }
.thumb { width: 96px; aspect-ratio: 1; }
@media (min-width: 720px) {
  .label { grid-template-columns: 90px 1fr 180px; padding: var(--s3) 0; column-gap: var(--s6); }
  .code { grid-column: auto; align-self: start; margin-top: 8px; }
  .label-text { display: grid; grid-template-columns: minmax(220px, 1fr) 1.3fr; gap: var(--s5); align-items: baseline; }
  .label-text p { margin-top: 0; }
  .thumb { width: 180px; aspect-ratio: 3 / 2; }
}

/* Bricks, blocks and pavers */
.bricks { padding: var(--s9) 0; border-top: var(--edge); }
.bricks-grid { display: grid; gap: var(--s7); align-items: start; }
.bricks-copy { display: grid; gap: var(--s5); }
.bricks-copy > p { color: var(--muted); max-width: 52ch; }
.bricks-copy a { color: var(--fg); font-family: var(--font-mono); font-weight: 600; }
.price-list { width: 100%; border-collapse: collapse; border-top: var(--rail) solid var(--ink); }
.price-list thead th { font: 600 var(--step-cap)/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: var(--s3) 0; text-align: left; }
.price-list thead th:last-child, .price-list td { text-align: right; }
.price-list tbody th, .price-list td { padding: var(--s3) 0; border-top: 1px solid var(--border); }
.price-list tbody th { font-weight: 600; text-align: left; }
.price-list tbody th span { display: block; font: 400 var(--step-cap)/1.4 var(--font-mono); color: var(--muted); }
.price-list td { font: 600 1.125rem/1 var(--font-mono); white-space: nowrap; padding-left: var(--s4); }
.price-list tbody tr:last-child > * { border-bottom: var(--rail) solid var(--ink); }
.bulk { display: grid; gap: var(--s2); }
.bulk p { max-width: 52ch; }
.bricks-photo { aspect-ratio: 3 / 4; }
.lighting { background: var(--surface); }
.lighting-photo { aspect-ratio: 3 / 2; }
.light-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.light-list li { font: 600 var(--step-cap)/1 var(--font-mono); letter-spacing: 0.06em; border: var(--edge); padding: 8px 10px; }
@media (min-width: 960px) { .lighting .bricks-grid { align-items: center; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 960px) { .bricks-grid { grid-template-columns: 7fr 5fr; gap: var(--s8); } }

/* Buying */
.buying { background: var(--ink); color: var(--on-ink); padding: var(--s9) 0; }
.buying-grid { display: grid; gap: var(--s7); align-items: center; }
.buying-copy { display: grid; gap: var(--s4); justify-items: start; max-width: 60ch; }
.buying-copy h2 { margin-bottom: var(--s2); }
.buying .photo { aspect-ratio: 4 / 3; border-color: var(--on-ink); }
.buying-copy p { color: var(--on-ink-muted); font-size: 1.125rem; }
.buying-copy p:first-child { color: var(--on-ink); font-size: var(--step-lead); line-height: 1.45; }
.buying-copy .actions { margin-top: var(--s3); }
.buying-copy .btn { border-color: var(--accent); }
.buying-copy .btn-secondary { background: transparent; color: var(--on-ink); }
.buying-copy .btn:hover { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.buying a:focus-visible { box-shadow: 0 0 0 2px var(--on-ink), 0 0 0 5px var(--accent); }
@media (min-width: 960px) { .buying-grid { grid-template-columns: 6fr 6fr; gap: var(--s8); } }

/* Prime Family */
.family { padding: var(--s9) 0; }
.family-head { display: grid; gap: var(--s4); margin-bottom: var(--s6); }
.family-head p { color: var(--muted); max-width: 46ch; }
@media (min-width: 960px) { .family-head { grid-template-columns: 5fr 7fr; align-items: end; gap: var(--s8); } }
.gallery { display: grid; gap: var(--s3); grid-template-columns: repeat(2, 1fr); }
.gallery .photo { aspect-ratio: 1; }
.gallery .g1 { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.gallery .g10 { grid-column: 1 / -1; }
.gallery .g11 { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
@media (min-width: 960px) {
  .gallery { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 180px; gap: var(--s4); }
  .gallery .photo { aspect-ratio: auto; }
  .gallery .g1 { grid-column: 1 / 4; grid-row: span 2; }
  .gallery .g2 { grid-column: 4 / 6; }
  .gallery .g3 { grid-column: 6 / 7; }
  .gallery .g4 { grid-column: 4 / 5; }
  .gallery .g5 { grid-column: 5 / 7; }
  .gallery .g6, .gallery .g8 { grid-column: 1 / 4; grid-row: span 2; }
  .gallery .g7, .gallery .g9 { grid-column: 4 / 7; grid-row: span 2; }
  .gallery .g10 { grid-column: 1 / 3; grid-row: span 2; }
  .gallery .g11 { grid-column: 3 / 7; grid-row: span 2; }
  .gallery .g12 { grid-column: 1 / 4; grid-row: span 3; }
  .gallery .g13 { grid-column: 4 / 7; grid-row: span 3; }
}
/* No photos yet: hide the whole section on the live site */
html:not(.dev) .family:not(:has(.photo:not(.is-empty))) { display: none; }

/* Product clips */
.clips-head { display: grid; gap: var(--s2); margin: var(--s8) 0 var(--s5); }
.clips-head h3 { font-size: var(--step-h3); }
.clips-head p { color: var(--muted); max-width: 52ch; }
.clips {
  list-style: none; margin: 0; padding: 0 0 var(--s2);
  display: grid; grid-auto-flow: column; grid-auto-columns: min(72vw, 280px); gap: var(--s4);
  overflow-x: auto; scroll-snap-type: x mandatory;
}
.clip { scroll-snap-align: start; }
.clip video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--ink); border: var(--edge); }
.clip-label { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s2); font-weight: 600; }
@media (min-width: 960px) { .clips { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

/* Visit */
.visit { background: var(--surface); border-top: var(--edge); padding: var(--s9) 0; }
.storefront { margin-bottom: var(--s8); }
.storefront .photo { aspect-ratio: 16 / 9; }
.storefront figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s3); font-weight: 500; }
@media (min-width: 960px) { .storefront .photo { aspect-ratio: 21 / 9; } .storefront img { object-position: center 10%; } }
.visit-grid { display: grid; gap: var(--s7); align-items: start; }
.visit address { margin-top: var(--s5); font-size: var(--step-lead); line-height: 1.4; font-weight: 500; }
.hours-label { margin-top: var(--s6); max-width: 460px; border: var(--edge); }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 12px var(--s4); border-top: 1px solid var(--border); text-align: left; font-weight: 400; }
.hours tr:first-child th, .hours tr:first-child td { border-top: 0; }
.hours td { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours tr.is-today { background: var(--accent); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; }
.hours tr.is-today th::after { content: " (today)"; font-weight: 400; }
#contacts { margin-top: var(--s5); }
.contacts th { font-weight: 600; }
.contacts a { font-weight: 600; text-decoration: none; display: inline-block; padding: 4px 0; }
.contacts a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.visit .actions { margin-top: var(--s6); }
.visit .store { aspect-ratio: 4 / 3; }
@media (min-width: 960px) { .visit-grid { grid-template-columns: 5fr 7fr; gap: var(--s8); } }

/* Message form */
.message { padding: var(--s9) 0; border-top: var(--edge); }
.message-grid { display: grid; gap: var(--s6); align-items: start; }
.message .muted { margin-top: var(--s4); max-width: 40ch; }
.form { background: var(--surface); border: var(--edge); }
.form-body { display: grid; gap: var(--s4); padding: var(--s5) var(--s4); justify-items: stretch; }
.form-body .btn { justify-self: start; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: var(--s4); }
.field label { font: 600 var(--step-cap)/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: 400 1rem/1.4 var(--font-body); color: var(--fg);
  background: var(--surface); border: var(--edge); border-radius: 0;
}
.field textarea { resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { background: oklch(0.98 0.002 100); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--accent); }
.field input:user-invalid, .field textarea:user-invalid { border-color: oklch(0.55 0.19 28); }
.hp { position: absolute; left: -9999px; }
@media (min-width: 720px) { .field-row { grid-template-columns: 1fr 1fr; } .form-body { padding: var(--s6); } }
@media (min-width: 960px) { .message-grid { grid-template-columns: 5fr 7fr; gap: var(--s8); } }

/* Footer */
.foot { background: var(--ink); color: var(--on-ink-muted); padding: var(--s6) 0; font-size: 0.9rem; }
.foot-row { display: grid; gap: var(--s2); }
.foot a { text-decoration: none; color: var(--on-ink); }
.foot a:hover { color: var(--accent); }
@media (min-width: 960px) { .foot-row { grid-template-columns: auto 1fr auto; gap: var(--s6); } .foot-row p:nth-child(2) { text-align: center; } }

@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Total Eclipse Black Friday block special (27 Nov to 24 Dec 2026) */
.eclipse { background: var(--ink); color: var(--on-ink); border-bottom: var(--rail) solid var(--accent); padding: var(--s7) 0; overflow: hidden; }
.eclipse-grid { display: grid; gap: var(--s6); align-items: center; }
.eclipse-art { width: min(400px, 92vw); height: auto; justify-self: center; margin: -32px 0 -40px; }
.eclipse-copy { display: grid; gap: var(--s5); }
.eclipse-kicker { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font: 600 clamp(0.9375rem, 2vw, 1.125rem)/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-ink-muted); }
.eclipse-kicker span:first-child { background: var(--accent); color: var(--accent-fg); padding: var(--s1) var(--s3); }
.eclipse-kicker span:last-child { color: var(--on-ink); }
.eclipse h2 { font: 900 clamp(3.5rem, 13vw, 7.5rem)/0.88 var(--font-display); text-transform: uppercase; letter-spacing: 0.005em; color: var(--on-ink); }
.eclipse h2 span { display: block; color: var(--accent); }
.eclipse-copy > p { max-width: 46ch; color: var(--on-ink); font-size: var(--step-lead); line-height: 1.45; }
.eclipse-tickets { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.eclipse-tickets li { background: var(--accent); color: var(--accent-fg); border: var(--edge); display: grid; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); }
.eclipse-tickets .code { justify-self: start; background: var(--ink); color: var(--accent); }
.eclipse-tickets .code { font-size: 1rem; }
.eclipse-tickets del { font: 500 clamp(0.875rem, 2vw, 1.0625rem)/1 var(--font-mono); opacity: 0.75; }
.eclipse-tickets strong { font: 900 clamp(2.25rem, 8.5vw, 4rem)/0.95 var(--font-display); font-variant-numeric: tabular-nums; }
.eclipse .actions { display: flex; flex-wrap: wrap; gap: var(--s3); }
.btn-ghost { background: transparent; color: var(--on-ink); border-color: var(--on-ink); }
.btn-ghost:hover { background: var(--on-ink); color: var(--ink); }
.price-list del { font-weight: 500; font-size: var(--step-cap); color: var(--muted); margin-right: var(--s2); }
.price-list .sale { background: var(--accent); color: var(--accent-fg); padding: 2px var(--s1); }
@media (min-width: 960px) {
  .eclipse { padding: var(--s8) 0; }
  .eclipse-grid { grid-template-columns: 5fr 7fr; gap: var(--s6); }
  .eclipse-art { width: 118%; max-width: 640px; margin: -48px -12% -48px -6%; }
}
@media (max-width: 599px) {
  .eclipse-tickets { grid-template-columns: 1fr; }
  .eclipse-tickets li { display: flex; align-items: center; gap: var(--s3); }
  .eclipse-tickets del { margin-left: auto; }
}
