/* ==========================================================================
   JM Monument — Design System
   Palette: navy + gold "stele" identity (from brand/01_horizontal_lockup.svg)
   Type: Cinzel (display, Trajan-style) + Source Sans 3 (body, high legibility)
   Audience skews older — base type is 18px, touch targets >=48px, high contrast.
   ========================================================================== */

:root {
  /* Brand palette */
  --navy-900: #12203a;
  --navy-800: #1b2a4a;
  --navy-700: #253860;
  --gold-500: #c8a84b;
  --gold-400: #d6bc70;
  --gold-100: #f3e9cf;
  --cream-50: #f5f0e6;
  --cream-100: #ede7d9;

  /* Neutrals (granite) */
  --stone-900: #1c1c1e;
  --stone-700: #47474b;
  --stone-500: #6f6f74;
  --stone-300: #a9a9ad;
  --stone-100: #e4e3e0;
  --white: #ffffff;

  /* Semantic */
  --color-bg: var(--cream-50);
  --color-surface: var(--white);
  --color-text: var(--stone-900);
  --color-text-muted: var(--stone-700);
  --color-heading: var(--navy-800);
  --color-accent: var(--gold-500);
  --color-border: var(--stone-100);
  --color-focus: #2f6fed;

  /* Type */
  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.95rem);
  --step-0: clamp(1.125rem, 1.1rem + 0.15vw, 1.2rem);
  --step-1: clamp(1.35rem, 1.25rem + 0.4vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.5rem + 0.8vw, 2.2rem);
  --step-3: clamp(2.1rem, 1.8rem + 1.4vw, 3rem);
  --step-4: clamp(2.6rem, 2.1rem + 2.2vw, 4rem);

  /* Spacing (8px rhythm) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --container: 1240px;
  --shadow-card: 0 8px 24px rgba(18, 32, 58, 0.12);
  --shadow-lift: 0 16px 40px rgba(18, 32, 58, 0.22);
}

/* ---- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-heading); line-height: 1.25; margin: 0 0 var(--space-2); font-weight: 600; }
p { margin: 0 0 var(--space-2); max-width: 68ch; }
ul { margin: 0; padding: 0; }
button { font: inherit; }

/* Visible focus ring everywhere — critical for an older, keyboard/switch-using audience */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.skip-link {
  position: absolute;
  left: 0; top: 0;
  transform: translateY(-120%);
  background: var(--navy-800);
  color: var(--white);
  padding: var(--space-2) var(--space-3);
  z-index: 200;
  border-radius: 0 0 var(--radius-md) 0;
  transition: transform 150ms ease;
}
.skip-link:focus { transform: translateY(0); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-3); }
@media (min-width: 768px) { .container { padding-inline: var(--space-4); } }

section { padding-block: var(--space-6); }
.section-tight { padding-block: var(--space-5); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: var(--step--1);
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.section-head { max-width: 62ch; margin-bottom: var(--space-4); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-accent); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-400); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.7); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }
.btn-outline-dark:hover { background: var(--navy-800); color: var(--white); }
.btn-block { width: 100%; }

/* ---- Top utility bar ---------------------------------------------------------- */
.utility-bar {
  background: var(--navy-900);
  color: var(--cream-100);
  font-size: var(--step--1);
}
.utility-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding-block: 0.5rem;
  flex-wrap: wrap;
}
.utility-bar a { text-decoration: none; }
.utility-bar a:hover { color: var(--gold-400); }
.utility-bar__left, .utility-bar__right { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.sale-banner { background: var(--gold-500); color: var(--navy-900); text-align: center; font-size: var(--step--1); padding-block: 0.55rem; }
.sale-banner a { color: var(--navy-900); font-weight: 700; }
[data-gs-price] s { opacity: 0.6; font-size: 0.8em; margin-right: 0.15em; }

/* ---- Header / nav ---------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-2);
}
.brand-logo { display: block; height: 76px; width: auto; flex-shrink: 0; }
.brand-logo img { height: 100%; width: auto; }

.main-nav { display: none; }
.main-nav ul { display: flex; gap: var(--space-4); list-style: none; }
.main-nav a {
  display: inline-block;
  padding: 0.5rem 0.1rem;
  text-decoration: none;
  font-weight: 600;
  color: var(--navy-800);
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--color-accent); }

.cart-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--navy-800);
  cursor: pointer;
  flex-shrink: 0;
}
.cart-toggle svg { width: 26px; height: 26px; }
.cart-toggle__count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold-500);
  color: var(--navy-900);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(18,32,58,0.5);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.cart-backdrop.is-open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh;
  width: min(420px, 100vw);
  background: var(--white);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 250ms ease;
  box-shadow: var(--shadow-lift);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.cart-drawer__head h2 { margin: 0; font-size: var(--step-1); }
.cart-drawer__close {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; color: var(--navy-800);
}
.cart-drawer__close svg { width: 20px; height: 20px; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: var(--space-3); display: grid; gap: var(--space-3); align-content: start; }
.cart-drawer__foot { padding: var(--space-3); border-top: 1px solid var(--color-border); display: grid; gap: var(--space-2); }
.cart-drawer__subtotal { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-size: var(--step-1); color: var(--navy-800); }

.cart-item { display: flex; justify-content: space-between; gap: var(--space-2); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border); }
.cart-item__name { font-weight: 700; margin: 0; }
.cart-item__meta { font-size: var(--step--1); color: var(--color-text-muted); margin: 0.2em 0; }
.cart-item__price { font-size: var(--step--1); margin: 0; }
.cart-item__controls { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.cart-item__remove { background: none; border: none; color: var(--color-text-muted); text-decoration: underline; cursor: pointer; font-size: var(--step--1); padding: 0.3rem; }

.qty-stepper { display: flex; align-items: center; gap: 0.5rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.qty-btn { width: 32px; height: 32px; border: none; background: var(--cream-100); cursor: pointer; font-size: 1.1rem; font-weight: 700; color: var(--navy-800); }
.qty-value { min-width: 1.5em; text-align: center; font-weight: 600; }

/* Cart page */
.cart-page-grid { display: grid; gap: var(--space-4); }
@media (min-width: 900px) { .cart-page-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
.summary-card { position: sticky; top: 90px; }
.summary-row { display: flex; justify-content: space-between; padding: 0.4rem 0; }
.summary-total { font-family: var(--font-display); font-size: var(--step-1); color: var(--navy-800); border-top: 1px solid var(--color-border); margin-top: var(--space-2); padding-top: var(--space-2); }
.checkout-confirm { text-align: center; padding: var(--space-4); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--navy-800);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
  background: var(--white);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  font-weight: 600;
  color: var(--navy-800);
  border-bottom: 1px solid var(--color-border);
  min-height: 48px;
}
.mobile-nav a[aria-current="page"] { color: var(--gold-500); }

@media (min-width: 1100px) {
  .main-nav { display: block; }
  .nav-toggle, .mobile-nav { display: none !important; }
}
.main-nav a { white-space: nowrap; }

/* ---- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(200,168,75,0.18), transparent 60%),
    repeating-linear-gradient(115deg, #17233d 0px, #17233d 2px, #142035 2px, #142035 4px),
    linear-gradient(160deg, var(--navy-900), var(--navy-800) 55%, var(--navy-700));
  overflow: clip;
}
.hero__inner {
  padding-block: var(--space-5) var(--space-6);
  display: grid;
  gap: var(--space-5);
}
.hero__crest {
  width: 76px;
  height: auto;
  opacity: 0.9;
  margin-bottom: var(--space-3);
}
.hero h1 { color: var(--white); font-size: var(--step-4); max-width: 16ch; }
.hero__lede { font-size: var(--step-1); max-width: 46ch; color: var(--cream-100); }
.hero__ctas { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }

.hero__proof {
  position: relative;
  justify-self: start;
  background: var(--white);
  color: var(--stone-900);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  max-width: 360px;
}
.hero__proof img { border-radius: var(--radius-sm); }
.hero__proof-images { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hero__proof-item { position: relative; display: block; }
.hero__proof-item img { height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.hero__proof-tag {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  background: var(--navy-900);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2em 0.55em;
  border-radius: 3px;
}
.hero__proof-caption { padding-top: var(--space-1); font-size: var(--step--1); color: var(--color-text-muted); }
.hero__proof-caption strong { color: var(--navy-800); }

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; align-items: center; padding-block: var(--space-6); }
}

/* Page (interior) header banner, used on product/about/contact pages */
.page-banner {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding-block: var(--space-5);
}
.page-banner h1 { color: var(--white); margin-bottom: var(--space-1); }
.page-banner p { color: var(--cream-100); margin: 0; }
.breadcrumb { font-size: var(--step--1); color: var(--gold-400); margin-bottom: var(--space-2); }
.breadcrumb a { color: var(--gold-400); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---- Trust bar ---------------------------------------------------------- */
.trust-bar { background: var(--navy-800); color: var(--white); padding-block: var(--space-3); }
.trust-bar .container {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.trust-item svg { width: 28px; height: 28px; color: var(--gold-400); }
.trust-item span { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.02em; }
@media (min-width: 700px) { .trust-bar .container { grid-template-columns: repeat(4, 1fr); } }

/* ---- Category tiles (Polaris-style routing row) ---------------------------------------------------------- */
.tile-row { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 760px) { .tile-row { grid-template-columns: repeat(3, 1fr); } }

.tile {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  isolation: isolate;
}
.tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(18,32,58,0.92) 0%, rgba(18,32,58,0.35) 55%, rgba(18,32,58,0.05) 100%);
  z-index: 1;
}
.tile:hover img { transform: scale(1.05); }

/* Product-style tile: isolated cutout photos over the brand gradient, for tiles with no full-bleed photo */
.tile--product { background: linear-gradient(160deg, var(--navy-900), var(--navy-800) 60%, var(--navy-700)); }
.tile--product .tile__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5%;
  padding: 14% 8% 34%;
}
.tile--product .tile__cutout {
  position: static;
  width: 48%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.5));
  transition: transform 400ms ease;
}
.tile--product .tile__cutout--a { transform: rotate(-4deg); }
.tile--product .tile__cutout--b { transform: rotate(4deg); margin-top: 10%; }
.tile--product:hover .tile__cutout--a { transform: rotate(-4deg) scale(1.04); }
.tile--product:hover .tile__cutout--b { transform: rotate(4deg) scale(1.04); }
.tile__content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-3); }
.tile__eyebrow { font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-400); font-weight: 700; }
.tile h3 { color: var(--white); font-size: var(--step-1); margin: 0.2em 0 0.4em; }
.tile p { color: var(--cream-100); font-size: var(--step--1); margin-bottom: 0.6em; }
.tile__link { font-weight: 700; font-size: var(--step--1); display: inline-flex; align-items: center; gap: 0.35em; }
.tile:focus-visible { outline-offset: 4px; }

/* ---- Founder / story ---------------------------------------------------------- */
.story {
  display: grid;
  gap: var(--space-4);
}
.story img { border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.story blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--navy-800);
  line-height: 1.5;
}
.story blockquote::before { content: "\201C"; color: var(--gold-500); }
.story blockquote::after { content: "\201D"; color: var(--gold-500); }
.story cite { display: block; margin-top: var(--space-2); font-style: normal; font-weight: 700; color: var(--color-text-muted); font-size: var(--step--1); letter-spacing: 0.03em; }
@media (min-width: 860px) { .story { grid-template-columns: 0.85fr 1.15fr; align-items: center; } }

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(135deg, var(--stone-100), var(--stone-100) 10px, #ecebe6 10px, #ecebe6 20px);
  border: 2px dashed var(--stone-300);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--step--1);
  padding: var(--space-3);
  aspect-ratio: 4 / 3;
}

/* ---- Cards ---------------------------------------------------------- */
.card-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 760px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) { .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
}
.card img { border-radius: var(--radius-sm); margin-bottom: var(--space-2); aspect-ratio: 4/3; object-fit: cover; }
.card h3 { font-size: var(--step-1); margin-bottom: 0.4em; }

/* Pricing / SKU card */
.price-card { display: flex; flex-direction: column; }
.price-card .price { font-family: var(--font-display); font-size: var(--step-2); color: var(--navy-800); margin: 0.2em 0 0.6em; }
.price-card ul { list-style: none; margin: 0 0 var(--space-3); display: grid; gap: 0.5rem; }
.price-card li { display: flex; gap: 0.6rem; align-items: flex-start; }
.price-card li svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--gold-500); margin-top: 0.15em; }
.price-card .btn { margin-top: auto; }
.price-card .fine-print { font-size: var(--step--1); color: var(--color-text-muted); margin-top: var(--space-1); }

/* Steps (how it works) */
.steps { display: grid; gap: var(--space-3); counter-reset: step; }
@media (min-width: 700px) { .steps.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-left: 3rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

/* Before / after */
.compare { display: grid; gap: var(--space-3); align-items: center; }
@media (min-width: 800px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare figure { margin: 0; }
.compare img { border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.compare figcaption { text-align: center; margin-top: var(--space-1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--step--1); color: var(--color-text-muted); }

/* Embedded videos */
.video-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 900px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
.video-card { margin: 0; }
.video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card figcaption { margin-top: var(--space-1); text-align: center; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }

/* Before / after slider */
.ba { --pos: 50%; position: relative; aspect-ratio: 4 / 3; width: 100%; max-width: 760px; margin-inline: auto; overflow: hidden; border-radius: var(--radius-md); box-shadow: var(--shadow-card); background: var(--stone-100); touch-action: pan-y; user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ba > img:first-child { transform: scale(1.12) translate(-1.9%, 1.4%); }
.ba__before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag {
  position: absolute; bottom: 0.7rem; padding: 0.25em 0.7em; border-radius: 3px;
  background: var(--navy-900); color: var(--white);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none;
}
.ba__tag--before { left: 0.7rem; }
.ba__tag--after { right: 0.7rem; }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--white); box-shadow: 0 0 6px rgba(0,0,0,0.4); pointer-events: none; }
.ba__knob {
  position: absolute; top: 50%; left: var(--pos); width: 48px; height: 48px; margin: -24px 0 0 -24px;
  border-radius: 50%; background: var(--gold-500); color: var(--navy-900); border: 3px solid var(--white);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0,0,0,0.45); pointer-events: none;
}
.ba__knob svg { width: 26px; height: 26px; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba:focus-within .ba__knob { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.ba-caption { text-align: center; margin-top: var(--space-2); color: var(--color-text-muted); font-size: var(--step--1); }
.hero__proof .ba { box-shadow: none; max-width: none; border-radius: var(--radius-sm); }
.hero__proof .ba__knob { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.hero__proof .ba__knob svg { width: 20px; height: 20px; }

/* Service-area band */
.service-band { background: var(--cream-100); text-align: center; }
.service-band h2 { margin-bottom: var(--space-1); }

/* ---- Grave Saver size finder ---------------------------------------------------------- */
.size-finder { display: grid; gap: var(--space-3); align-items: start; }
@media (min-width: 860px) { .size-finder { grid-template-columns: 1.1fr 0.9fr; } }

.field-row { display: grid; gap: var(--space-2); grid-template-columns: 1fr; margin-bottom: var(--space-3); }
@media (min-width: 560px) { .field-row { grid-template-columns: repeat(3, 1fr); } }
.field label { display: block; font-weight: 600; margin-bottom: 0.35em; font-size: var(--step--1); }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0.6em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.edge-fieldset { border: none; padding: 0; margin: 0 0 var(--space-2); }
.edge-fieldset legend { font-weight: 700; font-family: var(--font-display); color: var(--navy-800); padding: 0; margin-bottom: 0.5rem; }
.edge-option {
  display: flex;
  align-items: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.4em 0;
  cursor: pointer;
}
.edge-option input { width: 20px; height: 20px; accent-color: var(--navy-800); flex-shrink: 0; }

.size-finder__result { display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; border: 2px solid var(--color-border); }
.size-finder__result.is-ok { border-color: var(--gold-500); background: var(--white); }
.size-finder__result.is-warning { border-color: #b3541e; background: #fdf3ec; }
.size-finder__result.is-empty { border-style: dashed; }
.sf-result__eyebrow { font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.sf-result__model { font-family: var(--font-display); font-size: var(--step-2); color: var(--navy-800); margin: 0; }
.sf-result__desc { margin: 0; }
.sf-result__warning-text { color: #8a3d15; font-weight: 600; margin: 0; }
.sf-result .hero__ctas { margin-top: var(--space-1); }

.model-grid { display: grid; gap: var(--space-2); grid-template-columns: 1fr; }
@media (min-width: 560px) { .model-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .model-grid { grid-template-columns: repeat(4, 1fr); } }

.model-card {
  display: block;
  cursor: pointer;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--white);
  padding: var(--space-2);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.model-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.model-card__body { display: flex; flex-direction: column; gap: 0.3rem; }
.model-card__name { font-family: var(--font-display); font-weight: 700; color: var(--navy-800); font-size: var(--step-0); }
.model-card__dims { font-weight: 700; color: var(--color-text-muted); }
.model-card__desc { font-size: var(--step--1); color: var(--color-text-muted); }
.model-card__price { font-family: var(--font-display); color: var(--gold-500); font-size: var(--step-1); margin-top: 0.3rem; }
.model-card:has(input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.model-card:has(input:checked) { border-color: var(--gold-500); box-shadow: var(--shadow-card); background: var(--gold-100); }

/* ---- Custom designer ---------------------------------------------------------- */
.designer { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 960px) { .designer { grid-template-columns: 1fr 1.1fr; } }
.designer__controls { display: grid; gap: var(--space-3); }
.designer fieldset { border: none; padding: 0; margin: 0; }
.designer legend { font-family: var(--font-display); font-weight: 700; color: var(--navy-800); margin-bottom: 0.5rem; padding: 0; }
.designer select, .designer input[type="text"] {
  width: 100%; min-height: 48px; padding: 0.5em 0.7em;
  border: 1px solid var(--stone-300); border-radius: var(--radius-sm); font: inherit; background: var(--white);
}
.designer label.field-label { display: block; font-weight: 600; margin-bottom: 0.3em; font-size: var(--step--1); }
.seg { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.4em 1em;
  border: 2px solid var(--color-border); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; font-weight: 600;
}
.seg input:checked + span { border-color: var(--gold-500); background: var(--gold-100); }
.seg input:focus-visible + span { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--stone-300); flex-shrink: 0; }
.designer__preview { position: sticky; top: 100px; }
.preview-stage {
  background: linear-gradient(180deg, #cfd8c4, #a9b99a 70%, #8fa27f);
  border-radius: var(--radius-md); padding: var(--space-3); box-shadow: var(--shadow-card);
}
.preview-stage svg { width: 100%; height: auto; display: block; }
.preview-summary { margin-top: var(--space-2); }
.preview-summary dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0 0 var(--space-2); }
.preview-summary dt { font-weight: 700; color: var(--color-text-muted); }
.preview-summary dd { margin: 0; }

/* Photo viewer inside a card (foot markers page) */
.mini-gallery { margin-bottom: var(--space-2); }
.mini-gallery__stage { position: relative; background: var(--cream-100); border-radius: var(--radius-sm); overflow: hidden; }
.card .mini-gallery__stage img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; margin: 0; border-radius: 0; display: block; }
.mini-gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(18,32,58,0.75); color: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.mini-gallery__nav:hover { background: var(--navy-900); }
.mini-gallery__nav--prev { left: 8px; }
.mini-gallery__nav--next { right: 8px; }
.mini-gallery__count { text-align: center; font-size: var(--step--1); font-weight: 700; color: var(--color-text-muted); margin: 0.5rem auto; }
.mini-gallery__thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mini-gallery__thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); background: none; cursor: pointer; overflow: hidden; }
.mini-gallery__thumbs button[aria-current="true"] { border-color: var(--gold-500); }
.card .mini-gallery__thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; margin: 0; border-radius: 0; display: block; }

/* Photo gallery: 6-col grid so 3 + 2 rows fill evenly */
.gallery { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 620px) { .gallery { grid-template-columns: repeat(6, 1fr); } .gallery figure { grid-column: span 3; } }
@media (min-width: 960px) { .gallery figure { grid-column: span 2; } .gallery figure:nth-child(4) { grid-column: 2 / span 2; } .gallery figure:nth-child(5) { grid-column: 4 / span 2; } }
@media (min-width: 960px) { .gallery--even figure:nth-child(4), .gallery--even figure:nth-child(5) { grid-column: span 2; } }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.gallery figcaption { margin-top: var(--space-1); text-align: center; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }

/* Wholesale request form */
.wholesale-form { max-width: 820px; margin-inline: auto; display: grid; gap: var(--space-4); }
.wholesale-form fieldset { border: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.wholesale-form legend { font-family: var(--font-display); font-weight: 700; color: var(--navy-800); font-size: var(--step-1); padding: 0; margin-bottom: var(--space-1); }
.wholesale-form .field label { display: block; font-weight: 600; margin-bottom: 0.3em; }
.wholesale-form input[type="text"], .wholesale-form input[type="email"], .wholesale-form input[type="tel"],
.wholesale-form input[type="number"], .wholesale-form input[type="date"], .wholesale-form select, .wholesale-form textarea {
  width: 100%; min-height: 48px; padding: 0.55em 0.7em; font: inherit;
  border: 1px solid var(--stone-300); border-radius: var(--radius-sm); background: var(--white);
}
.wholesale-form [aria-invalid="true"] { border-color: #b3261e; border-width: 2px; }
.field-grid { display: grid; gap: var(--space-2); grid-template-columns: 1fr; }
@media (min-width: 640px) { .field-grid { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.qty-grid { display: grid; gap: var(--space-2); grid-template-columns: 1fr 1fr; }
@media (min-width: 760px) { .qty-grid { grid-template-columns: repeat(4, 1fr); } }
.qty-grid label .field-hint { display: block; font-weight: 400; }
.field-hint { font-size: var(--step--1); color: var(--color-text-muted); margin: 0.3em 0 0; }
.field-error { color: #b3261e; font-weight: 600; font-size: var(--step--1); margin: 0.35em 0 0; }
.error-summary { border: 2px solid #b3261e; background: #fdf1f0; border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.error-summary h3 { font-size: var(--step-0); color: #8a1c15; margin: 0 0 0.5em; }
.error-summary ul { margin: 0; padding-left: 1.2em; }
.error-summary a { color: #8a1c15; }

/* Contact / CTA band */
.cta-band { background: var(--navy-800); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--cream-100); margin-inline: auto; }
.cta-band .hero__ctas { justify-content: center; }

/* Contact page layout */
.contact-grid { display: grid; gap: var(--space-4); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-detail { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.contact-detail svg { width: 26px; height: 26px; color: var(--gold-500); flex-shrink: 0; }
.contact-detail h3 { font-size: var(--step-0); margin-bottom: 0.2em; }
.placeholder-note { font-size: var(--step--1); color: var(--color-text-muted); font-style: italic; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: var(--cream-100); padding-block: var(--space-5) var(--space-3); }
.footer-grid { display: grid; gap: var(--space-4); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h3 { color: var(--white); font-size: var(--step-0); margin-bottom: var(--space-2); }
.footer-grid ul { list-style: none; display: grid; gap: 0.6rem; }
.footer-grid a { color: var(--cream-100); text-decoration: none; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-brand img { height: 56px; width: auto; margin-bottom: var(--space-2); padding: 6px 12px; background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-card); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--step--1);
  color: var(--stone-300);
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
