/* ============================================================
   Quigley Farms — production stylesheet
   Direction: 02 Rustic farm-market (see /design/02-rustic/ for origin).
   All tokens live in :root. Components extend the mockup with everything
   needed for real pages: variant cards, configurators, payment element,
   product grids, collections, about, success.
   ============================================================ */

:root {
  /* palette */
  --paper:      #f5ead2;
  --paper-2:    #ebdcb3;
  --surface:    #fffdf5;
  --surface-2:  #f8efd7;
  --ink:        #2b1c10;
  --ink-2:      #5c4426;
  --ink-3:      #7d6444;
  --muted:      #8a7a5a;
  --line:       #c9b68b;
  --line-soft:  #dcc999;
  --rust:       #b45230;
  --rust-dark:  #7d391d;
  --sage:       #6d7a45;
  --sage-soft:  #cdd2b0;
  --gold:       #d3a442;
  --cream-dark: #e6d5a5;
  --error:      #9c3720;

  /* typography */
  --f-slab:     "Roboto Slab", "Libre Caslon Text", Georgia, serif;
  --f-hand:     "Caveat", "Brush Script MT", cursive;
  --f-body:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* spacing */
  --s-0: 4px;  --s-1: 8px;  --s-2: 12px; --s-3: 16px;
  --s-4: 24px; --s-5: 32px; --s-6: 48px; --s-7: 64px;
  --s-8: 96px; --s-9: 128px;

  /* primitives */
  --radius: 3px;
  --radius-lg: 6px;
  --shadow-sm: 0 2px 0 var(--line-soft);
  --shadow-md: 0 2px 0 var(--line-soft), 0 6px 24px rgba(43, 28, 16, 0.08);
  --shadow-lg: 0 2px 0 var(--line-soft), 0 10px 40px rgba(43, 28, 16, 0.12);
  --layout-max: 1180px;
  --layout-narrow: 760px;
}

/* ------ Reset / base ------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  background-image:
    radial-gradient(rgba(139,97,30,0.05) 1px, transparent 1px),
    radial-gradient(rgba(139,97,30,0.04) 1px, transparent 1px);
  background-size: 22px 22px, 31px 31px;
  background-position: 0 0, 11px 15px;
  color: var(--ink);
  font-family: var(--f-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 2px; }

button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; top: -48px; left: 0;
  padding: 10px 16px;
  background: var(--ink); color: var(--paper);
  z-index: 100; font-weight: 500;
  letter-spacing: 0.02em;
}
.skip:focus { top: 0; }

.muted { color: var(--muted); }
.error { color: var(--error); }
[hidden] { display: none !important; }

/* ------ Typography ------ */
h1, h2, h3, h4 {
  font-family: var(--f-slab);
  font-weight: 700;
  margin: 0 0 0.5em;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--ink-2); }
p:last-child { margin-bottom: 0; }

.lede { font-size: 1.12rem; color: var(--ink-2); max-width: 50ch; }

.hand {
  font-family: var(--f-hand);
  font-weight: 700;
  color: var(--rust);
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0 0 var(--s-2);
}

.eyebrow {
  font-family: var(--f-slab);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 var(--s-3);
}

/* ------ Layout primitives ------ */
.container { width: min(var(--layout-max), 100% - 2.5rem); margin-inline: auto; }
.container-narrow { width: min(var(--layout-narrow), 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: var(--s-8); }
.section-tight { padding-block: var(--s-6); }

/* ------ Header ------ */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 3px double var(--line);
}
.site-header .bar {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin-inline: auto;
  min-height: 82px;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4);
}
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand img { width: 44px; height: 44px; }
.brand-stack { display: flex; flex-direction: column; line-height: 1; }
.brand-word {
  font-family: var(--f-slab);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}
.brand-tag {
  font-family: var(--f-hand);
  font-size: 1.05rem;
  color: var(--rust);
  margin-top: 2px;
}
.site-header nav {
  display: flex; gap: var(--s-5);
  flex-wrap: wrap; justify-content: flex-end;
}
.site-header nav a {
  font-weight: 500;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: var(--rust); border-bottom-color: var(--rust); }

.banner {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 6px var(--s-4);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.banner a { color: var(--gold); border-bottom: 1px solid var(--gold); }

@media (max-width: 640px) {
  .site-header .bar { padding-block: var(--s-3); min-height: 0; flex-direction: column; align-items: flex-start; }
  .site-header nav { justify-content: flex-start; gap: var(--s-4); }
}

/* ------ Buttons ------ */
.btn {
  display: inline-block;
  padding: 14px 24px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-slab);
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--ink-2), 0 5px 14px rgba(43,28,16,0.18);
  transition: transform 0.08s, box-shadow 0.08s, background 0.15s;
  text-align: center;
}
.btn:hover { background: var(--rust); box-shadow: 0 3px 0 var(--rust-dark), 0 5px 14px rgba(180,82,48,0.24); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-2); }
.btn:disabled { background: var(--muted); box-shadow: 0 3px 0 #6b5b3a; cursor: not-allowed; }
.btn-lg { padding: 16px 28px; font-size: 0.95rem; }
.btn-block { display: block; width: 100%; }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-link {
  display: inline-block;
  font-family: var(--f-slab); font-weight: 500; color: var(--ink);
  border-bottom: 2px solid var(--rust);
  padding-bottom: 3px;
  transition: color 0.15s, border-color 0.15s;
}
.btn-link:hover { color: var(--rust); }

/* ------ Stamp / badge ------ */
.stamp {
  display: inline-block;
  padding: 8px 14px;
  background: var(--rust);
  color: var(--surface);
  font-family: var(--f-slab);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 2px solid var(--rust);
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--rust);
  transform: rotate(-4deg);
}
.stamp.dark { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.stamp.sage { background: var(--sage); border-color: var(--sage); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--sage); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--sage-soft);
  color: var(--ink);
  font-family: var(--f-slab);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 3px;
}

/* ------ Divider ------ */
.divider {
  display: block; width: 100%; height: 40px; color: var(--line);
  margin-block: var(--s-5);
}

/* ------ Hero variants ------ */
.hero {
  position: relative;
  padding: var(--s-7) 0 var(--s-5);
}
.hero-split {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: center;
}
.hero-copy h1 { margin-bottom: var(--s-4); }
.hero-cta-row { display: flex; gap: var(--s-4); align-items: center; margin-top: var(--s-5); flex-wrap: wrap; }
.hero-photo {
  margin: 0; position: relative;
  border: 10px solid var(--surface);
  box-shadow: var(--shadow-lg);
  transform: rotate(0.5deg);
}
.hero-photo img { width: 100%; aspect-ratio: 5/4; object-fit: cover; }
.hero-photo figcaption { position: absolute; top: -18px; right: -18px; }

.hero-center {
  text-align: center;
  padding: var(--s-8) 0 var(--s-6);
}
.hero-center h1 { margin: 0 auto var(--s-3); max-width: 22ch; }
.hero-center .lede { margin: 0 auto; }

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-photo { transform: none; }
}

/* ------ Section headers ------ */
.section-head {
  text-align: center;
  margin-bottom: var(--s-6);
  width: min(var(--layout-max), 100% - 2.5rem);
  margin-inline: auto;
}
.section-head.left { text-align: left; }

/* ------ Product grid & cards ------ */
.product-grid {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-5);
}
.product-grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .product-grid.two { grid-template-columns: 1fr; } }

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-media {
  position: relative; overflow: hidden; background: var(--paper-2);
  display: block;
}
.product-card-media img {
  width: 100%; aspect-ratio: 5/4; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-media img { transform: scale(1.04); }
.product-card-media .stamp { position: absolute; top: 16px; left: 16px; }
.product-card-body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.product-card-body h3 { margin: 0 0 var(--s-1); }
.product-card-hand { margin-bottom: var(--s-3); color: var(--sage); font-size: 1.35rem; }
.product-card-sub { color: var(--ink-2); margin-bottom: var(--s-3); }
.product-card-list {
  list-style: none; padding: 0; margin: 0 0 var(--s-4);
  font-size: 0.92rem; color: var(--ink-2);
}
.product-card-list li {
  padding: 4px 0 4px 22px; position: relative;
}
.product-card-list li::before {
  content: "✽"; position: absolute; left: 0; top: 4px; color: var(--rust);
}
.product-card-price {
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line);
  font-size: 0.95rem; color: var(--ink-2);
}
.product-card-price strong {
  font-family: var(--f-slab); color: var(--ink); font-size: 1.15em;
}
.product-card .btn { margin-top: var(--s-3); }

/* ------ Story band ------ */
.story {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin: 0 auto var(--s-7);
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.story-media { margin: 0; border: 8px solid var(--paper); box-shadow: 0 0 0 1px var(--line); transform: rotate(-1deg); }
.story-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.story-copy h2 { margin-bottom: var(--s-4); }
.sign-off { font-size: 1.3rem; color: var(--ink-2); margin-top: var(--s-4); }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; padding: var(--s-4); gap: var(--s-5); }
  .story-media { transform: none; }
}

/* ------ Klaviyo / notify section ------ */
.notify {
  padding: var(--s-8) var(--s-4);
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(180,82,48,0.04) 10px 11px);
}
.notify-card {
  max-width: 640px; margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: var(--s-6);
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.notify-card::before, .notify-card::after {
  content: "";
  position: absolute; inset: 6px;
  border: 1px dashed var(--line);
  pointer-events: none;
}
.notify-card h2 { margin: 0 0 var(--s-3); }
.notify-card > p, .notify-card > * { position: relative; z-index: 1; }
.corner-sprig {
  position: absolute; top: 14px; right: 14px;
  width: 50px; height: 50px; color: var(--sage);
  opacity: 0.7;
}

/* Klaviyo's injected form keeps its own styling; we just constrain the
   container width so it fits the section. */
.klaviyo-form-holder { margin: var(--s-4) auto 0; max-width: 540px; }
.klaviyo-form-holder .klaviyo-form { margin: 0 auto; }

/* Our own fallback email form (used if Klaviyo script hasn't loaded) */
.email-form { display: flex; gap: var(--s-2); margin: var(--s-4) 0 var(--s-2); }
.email-form input {
  flex: 1;
  padding: 12px 14px;
  font: inherit; background: var(--paper);
  border: 2px solid var(--line); color: var(--ink);
  border-radius: var(--radius);
}
.email-form input:focus-visible { outline: none; border-color: var(--rust); }
.fine { font-size: 0.85rem; color: var(--muted); margin: 0; }

@media (max-width: 560px) {
  .email-form { flex-direction: column; }
}

/* ------ Forms — configurator shared ------ */
.field-group {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  padding: var(--s-5);
  margin-block: var(--s-4);
}
.field-group h2 {
  font-size: 1.35rem;
  margin: 0 0 var(--s-3);
}
.field-group .help { color: var(--muted); font-size: 0.92rem; margin: -4px 0 var(--s-3); }

/* Batch cards */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-2);
}
.batch-card {
  position: relative; cursor: pointer;
  padding: var(--s-3) var(--s-4);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 132px;
}
.batch-card:hover { border-color: var(--line-soft); }
.batch-card input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; border-radius: inherit;
}
.batch-card:has(input:checked) {
  border-color: var(--rust);
  background: var(--surface);
}
.batch-card:has(input:focus-visible) {
  outline: 2px solid var(--rust); outline-offset: 3px;
}
.batch-card[aria-disabled="true"] {
  cursor: not-allowed; opacity: 0.55;
  background: var(--paper-2);
}
.batch-card-label { font-family: var(--f-slab); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.batch-card-pickup { color: var(--ink-2); font-size: 0.92rem; }
.batch-card-stock {
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.batch-card-stock.low { color: var(--rust); font-weight: 500; }
.batch-card-stock.sold-out { color: var(--error); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; }

.feed-pill {
  display: inline-block; padding: 3px 10px;
  background: var(--sage-soft); color: var(--ink);
  font-family: var(--f-slab);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: 99px; font-weight: 500;
  align-self: flex-start;
}
.feed-pill.grain { background: var(--cream-dark); color: var(--ink-2); }

/* Variant cards */
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-2);
}
.variant-card {
  position: relative;
  display: block;
  padding: var(--s-3) var(--s-4);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.variant-card:hover { border-color: var(--line-soft); }
.variant-card input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; border-radius: inherit;
}
.variant-card:has(input:checked) {
  border-color: var(--rust); background: var(--surface);
}
.variant-card:has(input:focus-visible) {
  outline: 2px solid var(--rust); outline-offset: 3px;
}
.variant-card-body { display: flex; flex-direction: column; gap: 4px; }
.variant-card-label { font-weight: 500; font-family: var(--f-slab); font-size: 1.05rem; color: var(--ink); }
.variant-card-price { color: var(--ink-2); font-size: 0.92rem; }

/* Cut fieldsets (lamb) */
.cut-fieldset {
  border: none; padding: 0; margin: 0 0 var(--s-4);
  border-top: 1px dashed var(--line);
  padding-top: var(--s-4);
}
.cut-fieldset:first-of-type { border-top: 0; padding-top: 0; }
.cut-fieldset legend {
  font-family: var(--f-slab);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0;
  margin-bottom: var(--s-2);
  color: var(--rust);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.radio-row, .checkbox-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.radio-row label, .checkbox-row label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.15s, border-color 0.15s;
}
.radio-row label:has(input:checked),
.checkbox-row label:has(input:checked) {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--ink);
}
.radio-row input, .checkbox-row input { accent-color: var(--rust); }
.radio-row input:focus-visible, .checkbox-row input:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; border-radius: 2px; }

.inline-fields { display: flex; gap: var(--s-3); flex-wrap: wrap; }

.cuts-diagram {
  margin: 0 0 var(--s-4);
  padding: var(--s-3);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.cuts-diagram img { width: 100%; max-width: 520px; margin: 0 auto; display: block; }
.cuts-diagram figcaption {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: var(--s-2);
  font-family: var(--f-hand);
  font-size: 1.2rem;
}

/* Text inputs */
.input-field, .select-field {
  display: flex; flex-direction: column;
  gap: 6px;
  font-size: 0.92rem; color: var(--ink-2);
}
.input-field input, .input-field textarea, .select-field select {
  font: inherit;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
}
.input-field textarea { resize: vertical; min-height: 80px; }
.input-field input:focus-visible,
.input-field textarea:focus-visible,
.select-field select:focus-visible {
  outline: none; border-color: var(--rust);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

/* Order summary + payment */
.order-summary {
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
}
.summary-row { display: flex; justify-content: space-between; padding-block: 4px; font-size: 0.95rem; }
.summary-total {
  border-top: 2px solid var(--ink);
  margin-top: var(--s-2); padding-top: var(--s-2);
  font-family: var(--f-slab); font-size: 1.1rem;
}
.summary-note { margin: var(--s-2) 0 0; color: var(--muted); font-size: 0.85rem; }

.payment-element {
  margin: var(--s-3) 0 var(--s-3);
  min-height: 48px;
  padding: var(--s-3);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.payment-message { min-height: 1.3em; font-size: 0.92rem; margin: 0 0 var(--s-2); color: var(--ink-2); }
.payment-message[data-kind="error"] { color: var(--error); }
.fine-print { font-size: 0.85rem; color: var(--muted); margin-top: var(--s-3); }

/* Product detail layout (lamb + chicken) */
.product-layout {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--s-6);
  align-items: start;
  padding-top: var(--s-5);
}
.product-media {
  position: sticky; top: 110px;
  display: flex; flex-direction: column; gap: var(--s-2);
}
.product-media-main {
  margin: 0;
  border: 8px solid var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}
.product-media-main img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  display: block;
}
.product-media-main .stamp { position: absolute; top: -16px; right: -16px; }
.product-media-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.product-media-thumbs .thumb {
  padding: 0; border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden; background: var(--paper-2);
  transition: border-color 0.15s;
}
.product-media-thumbs .thumb.is-active { border-color: var(--rust); }
.product-media-thumbs .thumb:hover { border-color: var(--sage); }
.product-media-thumbs .thumb img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.product-detail h1 { margin-bottom: var(--s-2); }
.product-detail .hand { margin-bottom: var(--s-4); }
.product-detail .lede { margin-bottom: var(--s-5); }

@media (max-width: 860px) {
  .product-layout { grid-template-columns: 1fr; gap: var(--s-5); }
  .product-media { position: static; }
}

/* ------ Collections ------ */
.collections-grid {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-4);
}
.collection-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: var(--s-5);
  display: flex; flex-direction: column;
  gap: var(--s-2);
  transition: box-shadow 0.2s, transform 0.2s;
}
.collection-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.collection-card h3 { margin: 0; }
.collection-card .count { color: var(--muted); font-size: 0.88rem; }
.collection-card .btn-link { margin-top: auto; align-self: flex-start; }

/* ------ About ------ */
.about-hero {
  padding: var(--s-7) 0 var(--s-4);
}
.about-hero .container-narrow { text-align: center; }
.about-hero h1 { margin-bottom: var(--s-3); }
.about-band {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin: var(--s-6) auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: center;
}
.about-band.flip .about-band-copy { order: 2; }
.about-band-media { margin: 0; border: 8px solid var(--surface); box-shadow: var(--shadow-md); transform: rotate(-0.7deg); }
.about-band.flip .about-band-media { transform: rotate(0.7deg); }
.about-band-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-band-copy h2 { margin-bottom: var(--s-3); }
.about-band-copy p { max-width: 52ch; }

.family {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin: var(--s-7) auto;
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.family-placeholder {
  margin: var(--s-5) auto;
  padding: var(--s-6);
  max-width: 520px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--paper);
}
.family-placeholder::before {
  content: "👤"; display: block; font-size: 2.5rem; margin-bottom: var(--s-2); opacity: 0.5;
}

@media (max-width: 800px) {
  .about-band { grid-template-columns: 1fr; }
  .about-band.flip .about-band-copy { order: 0; }
  .about-band-media { transform: none; }
}

/* ------ Success page ------ */
.success-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: var(--s-7);
  text-align: center;
  max-width: 620px;
  margin: var(--s-7) auto;
  position: relative;
}
.success-card::before, .success-card::after {
  content: ""; position: absolute; inset: 6px;
  border: 1px dashed var(--line); pointer-events: none;
}
.success-icon {
  width: 72px; height: 72px;
  margin: 0 auto var(--s-3);
  background: var(--sage-soft); color: var(--ink);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 2rem;
  position: relative; z-index: 1;
}
.success-card > * { position: relative; z-index: 1; }
.success-card .hand { color: var(--sage); font-size: 1.8rem; margin-bottom: var(--s-2); }
.success-detail {
  background: var(--paper);
  padding: var(--s-3); border-radius: var(--radius);
  margin: var(--s-3) 0;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.82rem; color: var(--ink-2);
  word-break: break-all;
}

/* ------ Footer ------ */
.site-footer {
  background: var(--ink);
  color: var(--paper-2);
  padding: var(--s-7) var(--s-4) var(--s-4);
  border-top: 4px double var(--gold);
  margin-top: var(--s-8);
}
.foot-inner {
  max-width: var(--layout-max); margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--s-5);
}
.foot-col p { margin: 0 0 6px; color: var(--paper-2); }
.foot-col a { color: var(--paper); border-bottom: 1px solid transparent; }
.foot-col a:hover { border-bottom-color: var(--gold); color: var(--gold); }
.foot-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-slab); color: var(--paper);
  font-weight: 700; font-size: 1.05rem;
}
.foot-brand img { width: 30px; height: 30px; filter: brightness(0) invert(1); opacity: 0.9; }
.foot-label {
  font-family: var(--f-hand); font-size: 1.15rem; color: var(--gold);
  margin: 0 0 4px;
}
.foot-tiny {
  max-width: var(--layout-max); margin: var(--s-6) auto 0;
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  text-align: center;
  color: var(--cream-dark);
}
.foot-tiny a { color: var(--gold); border-bottom: 1px solid var(--gold); }

@media (max-width: 720px) {
  .foot-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .foot-inner { grid-template-columns: 1fr; }
}

/* ------ Motion ------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-photo, .story-media, .about-band-media, .about-band.flip .about-band-media { transform: none; }
}
