/* ==========================================================================
   Wolf Valley Direct — wolfvalleydirect.com
   Design system + components.

   Built as a deliberate evolution of wolfvalleypreowned.com:
   - Texas flag blue/red kept, but demoted from "the whole palette" to accents
     over a warm Hill Country earth-tone base (mesquite / saddle / tan / sand).
   - One Western-inflected slab face (Bitter) reserved for hero moments only;
     Oswald keeps the UI voice, Source Sans 3 keeps the reading voice.
   - Lone Star used structurally (dividers, bullets, badges, watermarks).
   - Every token declared below is actually used. No dead tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* -- Brand: Texas flag, used as accent ---------------------------------- */
  --star-blue:      #002868;
  --star-blue-deep: #001A46;
  --star-blue-lift: #0A3A8C;
  --lone-red:       #BF0A30;
  --lone-red-deep:  #8E0722;
  --lone-red-lift:  #D91E42;

  /* -- Brand: Hill Country earth, the new material layer ------------------ */
  --rust:      #A8431E;
  --mesquite:  #6B4A2F;
  --saddle:    #8C6239;
  --tan:       #C9A87C;
  --sand:      #E7DAC6;
  --cream:     #FBF6EE;
  --cream-sink:#F3EADB;
  --paper:     #FFFFFF;

  /* -- Warm neutrals (tinted, not gray) ----------------------------------- */
  --ink:      #17130F;
  --ink-soft: #2A231C;
  --n-900: #241E18;
  --n-800: #3A322A;
  --n-700: #574C41;
  --n-600: #756860;
  --n-500: #948780;
  --n-400: #B5A99F;
  --n-300: #D4C9BC;
  --n-200: #E6DDD1;
  --n-100: #F2EBE1;

  /* -- Semantic ------------------------------------------------------------ */
  --ok:      #1F7A45;
  --ok-bg:   #E9F5EE;
  --warn:    #B2650E;
  --warn-bg: #FBF0DF;
  --bad:     #A81E1E;
  --bad-bg:  #F9EBEB;

  /* -- Type ---------------------------------------------------------------- */
  --font-display: 'Bitter', Georgia, 'Times New Roman', serif;
  --font-ui:      'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, monospace;

  /* Fluid modular scale, ratio ~1.25, clamped between 400px and 1400px */
  --fs-2xs: clamp(0.6875rem, 0.66rem + 0.14vw, 0.75rem);
  --fs-xs:  clamp(0.75rem,  0.72rem + 0.16vw, 0.8125rem);
  --fs-sm:  clamp(0.875rem, 0.85rem + 0.16vw, 0.9375rem);
  --fs-md:  clamp(1rem,     0.97rem + 0.18vw, 1.0625rem);
  --fs-lg:  clamp(1.125rem, 1.06rem + 0.32vw, 1.3125rem);
  --fs-xl:  clamp(1.375rem, 1.24rem + 0.62vw, 1.75rem);
  --fs-2xl: clamp(1.75rem,  1.50rem + 1.10vw, 2.5rem);
  --fs-3xl: clamp(2.25rem,  1.80rem + 2.00vw, 3.5rem);
  --fs-4xl: clamp(2.75rem,  1.95rem + 3.40vw, 4.75rem);

  --lh-tight: 1.08;
  --lh-snug:  1.25;
  --lh-body:  1.65;

  --tr-tight: -0.02em;
  --tr-wide:  0.06em;
  --tr-wider: 0.14em;

  /* -- Space (4px base, geometric-ish) ------------------------------------ */
  --s-1:  0.25rem;   /*  4 */
  --s-2:  0.5rem;    /*  8 */
  --s-3:  0.75rem;   /* 12 */
  --s-4:  1rem;      /* 16 */
  --s-5:  1.5rem;    /* 24 */
  --s-6:  2rem;      /* 32 */
  --s-7:  3rem;      /* 48 */
  --s-8:  4rem;      /* 64 */
  --s-9:  6rem;      /* 96 */
  --s-10: 8rem;      /* 128 */

  /* Section rhythm scales with viewport */
  --section-y: clamp(var(--s-7), 5vw, var(--s-9));

  /* -- Radius -------------------------------------------------------------- */
  --r-xs:   3px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-pill: 999px;

  /* -- Elevation: layered (ambient + key), warm-tinted --------------------- */
  --sh-1: 0 1px 2px rgba(23,19,15,.05), 0 1px 1px rgba(23,19,15,.04);
  --sh-2: 0 2px 4px rgba(23,19,15,.05), 0 4px 12px rgba(23,19,15,.07);
  --sh-3: 0 4px 8px rgba(23,19,15,.06), 0 12px 28px rgba(23,19,15,.10);
  --sh-4: 0 8px 16px rgba(23,19,15,.08), 0 24px 56px rgba(23,19,15,.16);
  --sh-inset: inset 0 1px 0 rgba(255,255,255,.55);
  --ring: 0 0 0 3px rgba(0,40,104,.18);
  --ring-red: 0 0 0 3px rgba(191,10,48,.20);

  /* -- Motion -------------------------------------------------------------- */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --t-fast: 140ms;
  --t-med:  240ms;
  --t-slow: 420ms;

  /* -- Layout -------------------------------------------------------------- */
  --wrap: 1340px;
  --wrap-narrow: 780px;
  --gutter: clamp(var(--s-4), 3vw, var(--s-7));

  /* Live header height — measured by JS, so nothing sticky uses a magic
     number the way the preowned site's `top: 98px` does. */
  --header-h: 132px;
}

/* --------------------------------------------------------------------------
   2. RESET / BASE
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
  /* clip, not hidden: hidden on <html> would kill position:sticky. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--n-800);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* No overflow property here — the clip lives on <html>. Setting overflow on
     both <html> and <body> turns <body> into the scroll container and silently
     breaks the sticky header and sticky filter bar. */
}

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

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--tr-tight);
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--s-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--star-blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--star-blue);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.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;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   3. TEXAN MOTIFS
   Reusable decorative primitives so "Texan" is structural, not just color.
   -------------------------------------------------------------------------- */

/* Lone Star glyph. Used as bullet, divider centerpiece, badge, watermark. */
.star {
  display: inline-block;
  width: 1em; height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--star-mask) center / contain no-repeat;
          mask: var(--star-mask) center / contain no-repeat;
}
:root {
  --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.6l2.83 7.3 7.82.38-6.11 4.9 2.06 7.55L12 17.5l-6.6 4.23 2.06-7.55-6.11-4.9 7.82-.38z'/%3E%3C/svg%3E");
}

/* Rule with a star set into it — the section divider. */
.star-rule {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--tan);
  margin-block: var(--s-4);
}
.star-rule::before,
.star-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor 22%, currentColor 78%, transparent);
}
.star-rule .star { font-size: 0.9rem; color: var(--lone-red); }
.star-rule--tight { margin-block: var(--s-3); }
.star-rule--center::before, .star-rule--center::after { max-width: 120px; }

/* Corrugated metal — the actual material these buildings are roofed in.
   Used as a low-contrast band texture, never as a dominant surface. */
.tex-corrugate {
  --corr: rgba(255,255,255,.05);
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 6px,
    var(--corr) 6px 7px,
    transparent 7px 13px,
    rgba(0,0,0,.05) 13px 14px
  );
}

/* Faint star field, for dark hero/CTA panels. */
.tex-starfield {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M30 18l1.9 4.9 5.2.25-4.07 3.27 1.37 5.03L30 28.63 25.6 31.45l1.37-5.03L22.9 23.15l5.2-.25zM90 78l1.9 4.9 5.2.25-4.07 3.27 1.37 5.03L90 88.63l-4.4 2.82 1.37-5.03-4.07-3.27 5.2-.25z' fill='%23ffffff' fill-opacity='.045'/%3E%3C/svg%3E");
}

/* Branding-iron badge: angular stamped mark for trust signals. */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--saddle);
  background: var(--sand);
  border: 1.5px solid var(--tan);
  border-radius: var(--r-xs);
  box-shadow: var(--sh-inset);
}

/* --------------------------------------------------------------------------
   4. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  min-height: 48px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: var(--paper);
  background: linear-gradient(180deg, var(--lone-red-lift), var(--lone-red));
  border-color: var(--lone-red-deep);
  box-shadow: var(--sh-2), var(--sh-inset);
}
.btn--primary:hover {
  background: linear-gradient(180deg, var(--lone-red), var(--lone-red-deep));
  box-shadow: var(--sh-3);
  transform: translateY(-1px);
}

.btn--dark {
  color: var(--paper);
  background: linear-gradient(180deg, var(--star-blue-lift), var(--star-blue));
  border-color: var(--star-blue-deep);
  box-shadow: var(--sh-2), var(--sh-inset);
}
.btn--dark:hover {
  background: linear-gradient(180deg, var(--star-blue), var(--star-blue-deep));
  box-shadow: var(--sh-3);
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--cream);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.4);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.7); }

.btn--outline {
  color: var(--mesquite);
  background: var(--paper);
  border-color: var(--tan);
  box-shadow: var(--sh-1);
}
.btn--outline:hover { border-color: var(--saddle); color: var(--ink); box-shadow: var(--sh-2); }

.btn--sm { min-height: 40px; padding: var(--s-2) var(--s-4); font-size: var(--fs-2xs); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; transform: none; box-shadow: none;
}

/* --------------------------------------------------------------------------
   5. HEADER
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  box-shadow: var(--sh-2);
}

.header-strip {
  background: linear-gradient(90deg, var(--star-blue-deep), var(--star-blue) 45%, var(--star-blue-lift));
  color: rgba(255,255,255,.94);
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
}
.header-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2) var(--s-3);
  min-height: 38px;
  padding-block: var(--s-2);
  text-align: center;
}
/* Without min-width:0 this span refuses to shrink below its content width,
   which pushed the whole document past the viewport on a 390px phone. */
.header-strip .wrap > span { min-width: 0; }
.header-strip .star { font-size: .8em; color: var(--tan); }

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 84px;
  padding-block: var(--s-3);
}

.logo-link { display: inline-flex; align-items: center; gap: var(--s-3); flex: none; text-decoration: none; }
.logo { height: 56px; width: auto; }

/* Text wordmark, used until a Direct-specific logo asset exists. The shared
   Wolf Valley Sheds logo bakes in a different phone number, so it is
   deliberately NOT used here. */
.brandmark { display: flex; align-items: center; gap: var(--s-3); }
.brandmark-star {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  color: var(--paper);
  background: linear-gradient(160deg, var(--star-blue-lift), var(--star-blue-deep));
  border-radius: var(--r-sm);
  box-shadow: var(--sh-2), var(--sh-inset);
}
.brandmark-star .star { font-size: 24px; color: var(--cream); }
.brandmark-text { display: grid; line-height: 1; }
.brandmark-text b {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: var(--tr-tight);
  color: var(--ink);
}
.brandmark-text span {
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--rust);
  margin-top: 3px;
}
.site-footer .brandmark-text b { color: var(--paper); }
.site-footer .brandmark-text span { color: var(--tan); }
.site-footer .brandmark { margin-bottom: var(--s-4); }

.main-nav { display: flex; align-items: center; gap: var(--s-5); }
.main-nav a {
  position: relative;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--n-800);
  text-decoration: none;
  padding-block: var(--s-2);
  transition: color var(--t-fast) var(--ease);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--lone-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* The nav's call button exists for the mobile drawer. On desktop the header
   already shows the number, so showing both is just noise. */
.main-nav .btn { display: none; }
.main-nav .btn::after { display: none; }

.header-cta { display: flex; align-items: center; gap: var(--s-3); }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone svg { width: 18px; height: 18px; color: var(--lone-red); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px; height: 48px;
  padding: 0 12px;
  background: none;
  border: 1.5px solid var(--n-200);
  border-radius: var(--r-sm);
}
.hamburger span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform var(--t-med) var(--ease), opacity var(--t-fast) var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  color: var(--cream);
  /* Photograph first, gradient only as the scrim that keeps the type legible.
     The preowned site used a flat gradient rectangle here; a real building on
     real Texas ground does more work than any gradient can. */
  background:
    linear-gradient(100deg,
      rgba(12,10,8,.94) 0%,
      rgba(12,10,8,.86) 34%,
      rgba(12,10,8,.55) 62%,
      rgba(12,10,8,.42) 100%),
    var(--hero-photo, url('img/hero.webp')) center 62% / cover no-repeat,
    linear-gradient(150deg, var(--ink) 0%, var(--star-blue-deep) 55%, var(--mesquite) 100%);
  overflow: hidden;
}
.hero::after {
  /* Lone Star watermark, bottom-right, barely there. */
  content: "";
  position: absolute;
  right: -4%;
  bottom: -22%;
  width: min(46vw, 520px);
  aspect-ratio: 1;
  background: currentColor;
  -webkit-mask: var(--star-mask) center / contain no-repeat;
          mask: var(--star-mask) center / contain no-repeat;
  opacity: .05;
  z-index: -1;
  pointer-events: none;
}

.hero .wrap {
  padding-block: clamp(var(--s-8), 9vw, var(--s-10));
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--sand);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
}
.hero-eyebrow .star { color: var(--lone-red-lift); font-size: .95em; }

.hero h1 {
  max-width: 16ch;
  color: var(--paper);
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero h1 em {
  font-style: normal;
  color: var(--tan);
}

.hero-sub {
  max-width: 54ch;
  margin-top: var(--s-5);
  font-size: var(--fs-lg);
  color: rgba(251,246,238,.86);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid rgba(255,255,255,.16);
}
.proof {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
}
.proof-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px; height: 38px;
  color: var(--tan);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-xs);
}
.proof-mark .star { font-size: 15px; }
.proof-mark svg { width: 18px; height: 18px; }
.proof-text strong {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--paper);
}
.proof-text span { font-size: var(--fs-xs); color: rgba(251,246,238,.66); }

/* --------------------------------------------------------------------------
   7. SECTIONS
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section-y); }
.section--sink { background: var(--cream-sink); }
.section--paper { background: var(--paper); }

.section-head {
  max-width: var(--wrap-narrow);
  margin-bottom: var(--s-7);
}
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .star-rule { justify-content: center; }

.section-kicker {
  display: block;
  margin-bottom: var(--s-2);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--rust);
}
.section-lede {
  margin-top: var(--s-3);
  font-size: var(--fs-lg);
  color: var(--n-700);
}

/* --------------------------------------------------------------------------
   8. FILTER BAR
   -------------------------------------------------------------------------- */

.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 60;
  background: rgba(251,246,238,.92);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--n-200);
  border-bottom-width: 2px;
  border-bottom-color: var(--tan);
}
.filter-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-3);
}

.filter-tabs {
  display: flex;
  gap: var(--s-1);
  padding: var(--s-1);
  background: var(--n-100);
  border: 1px solid var(--n-200);
  border-radius: var(--r-sm);
}
.filter-tab {
  padding: var(--s-2) var(--s-4);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--n-700);
  background: none;
  border: 0;
  border-radius: var(--r-xs);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.filter-tab:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.filter-tab[aria-selected="true"] {
  color: var(--paper);
  background: var(--star-blue);
  box-shadow: var(--sh-1);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  min-width: 0;
}
.field > label {
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--n-600);
}

.select, .input, .textarea {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  min-height: 46px;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--n-300);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.select {
  appearance: none;
  padding-right: var(--s-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23756860' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-4) center;
  background-size: 16px;
}
.select:hover, .input:hover, .textarea:hover { border-color: var(--n-400); }
.select:focus, .input:focus, .textarea:focus {
  outline: none;
  border-color: var(--star-blue);
  box-shadow: var(--ring);
}
.textarea { min-height: 110px; resize: vertical; padding-block: var(--s-3); }

.filter-spacer { flex: 1 1 auto; }

.filter-count {
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: var(--tr-wide);
  color: var(--n-700);
  white-space: nowrap;
}
.filter-count b { color: var(--ink); }

.filter-reset {
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-xs);
  color: var(--rust);
  background: none;
  border: 0;
  border-radius: var(--r-xs);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.filter-reset:hover { color: var(--lone-red); background: var(--n-100); }

/* --------------------------------------------------------------------------
   9. BUILDING GRID + CARD
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
  transition: transform var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-4);
  border-color: var(--tan);
}

/* -- Media / slideshow ---------------------------------------------------- */
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--n-100);
  overflow: hidden;
}
.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* cover, not contain — kills the letterboxing that made preowned cards
     look ragged when photo aspect ratios varied. */
  object-fit: cover;
  /* Some wolfvalleypreowned.com photos carry EXIF rotation. Honour it
     explicitly rather than relying on the UA default. */
  image-orientation: from-image;
  background: var(--n-100);
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
}
.card-media img.is-active { opacity: 1; }

.media-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  color: var(--paper);
  background: rgba(23,19,15,.42);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--r-pill);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease), background-color var(--t-fast) var(--ease);
}
.media-nav svg { width: 18px; height: 18px; }
.media-nav--prev { left: var(--s-3); }
.media-nav--next { right: var(--s-3); }
.card:hover .media-nav, .media-nav:focus-visible { opacity: 1; }
.media-nav:hover { background: var(--star-blue); }

.media-dots {
  position: absolute;
  left: 0; right: 0; bottom: var(--s-3);
  display: flex;
  justify-content: center;
  gap: var(--s-1);
  padding-inline: var(--s-4);
}
.media-dot {
  width: 7px; height: 7px;
  padding: 0;
  background: rgba(255,255,255,.5);
  border: 0;
  border-radius: var(--r-pill);
  box-shadow: 0 1px 2px rgba(0,0,0,.4);
  transition: width var(--t-med) var(--ease), background-color var(--t-fast) var(--ease);
}
.media-dot.is-active { width: 20px; background: var(--paper); }

.card-flags {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
  max-width: calc(100% - var(--s-6));
}
.flag {
  padding: 4px var(--s-2);
  font-family: var(--font-ui);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--paper);
  border-radius: var(--r-xs);
  box-shadow: var(--sh-1);
}
.flag--new      { background: var(--star-blue); }
.flag--preowned { background: var(--saddle); }
.flag--repo     { background: var(--rust); }
.flag--deal     { background: var(--lone-red); }

.media-count {
  position: absolute;
  top: var(--s-3); right: var(--s-3);
  padding: 3px var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: .04em;
  color: var(--paper);
  background: rgba(23,19,15,.55);
  border-radius: var(--r-xs);
  backdrop-filter: blur(4px);
}

/* -- Body ----------------------------------------------------------------- */
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--s-3);
  padding: var(--s-5);
}

.card-title {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--n-600);
}
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--n-400); }
.card-serial {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: .03em;
  color: var(--n-500);
  word-break: break-all;
}
.card-desc {
  font-size: var(--fs-sm);
  color: var(--n-700);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* -- Price block ---------------------------------------------------------- */
.price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-2) var(--s-3);
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px dashed var(--n-300);
}
.price-now {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: var(--tr-tight);
  color: var(--ink);
}
.price-was {
  font-size: var(--fs-sm);
  color: var(--n-500);
  text-decoration: line-through;
}
.price-rto {
  width: 100%;
  font-size: var(--fs-xs);
  color: var(--mesquite);
}
.price-rto b { color: var(--rust); font-weight: 600; }
.price-call {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--mesquite);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  padding: 0 var(--s-5) var(--s-5);
}
.card-actions .btn--block { grid-column: 1 / -1; }

/* -- Skeletons ------------------------------------------------------------ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--n-100);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  translate: -100% 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { translate: 100% 0; } }

.card--skeleton { pointer-events: none; }
.card--skeleton:hover { transform: none; box-shadow: var(--sh-2); }
.card--skeleton .sk-media { aspect-ratio: 4 / 3; border-radius: 0; }
.card--skeleton .sk-line { height: 12px; margin-bottom: var(--s-2); }
.card--skeleton .sk-line:nth-child(1) { width: 72%; height: 18px; }
.card--skeleton .sk-line:nth-child(2) { width: 45%; }
.card--skeleton .sk-line:nth-child(3) { width: 90%; }
.card--skeleton .sk-line:nth-child(4) { width: 60%; }

/* -- Empty / error states ------------------------------------------------- */
.state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  padding: var(--s-9) var(--s-5);
  text-align: center;
  color: var(--n-600);
  background: var(--paper);
  border: 1.5px dashed var(--n-300);
  border-radius: var(--r-lg);
}
.state .star { font-size: 2rem; color: var(--tan); }
.state h3 { color: var(--n-800); }

.load-more-wrap {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  margin-top: var(--s-7);
}

/* --------------------------------------------------------------------------
   10. MODAL (detail + checkout)
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(23,19,15,.62);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-med) var(--ease), visibility var(--t-med);
}
.modal.is-open { opacity: 1; visibility: visible; }

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--cream);
  border: 1px solid var(--tan);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-4);
  translate: 0 12px;
  scale: .985;
  transition: translate var(--t-med) var(--ease-out), scale var(--t-med) var(--ease-out);
}
.modal.is-open .modal-panel { translate: 0 0; scale: 1; }

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  background: linear-gradient(180deg, var(--cream) 78%, transparent);
}
.modal-head h3 { font-size: var(--fs-xl); }
.modal-head p { margin: var(--s-1) 0 0; font-size: var(--fs-sm); color: var(--n-600); }

.modal-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  color: var(--n-700);
  background: var(--paper);
  border: 1px solid var(--n-200);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
}
.modal-close:hover { color: var(--ink); border-color: var(--n-400); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body { padding: 0 var(--s-6) var(--s-6); }

/* --------------------------------------------------------------------------
   11. FORMS
   -------------------------------------------------------------------------- */

.form-grid {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid .col-2 { grid-column: 1 / -1; }

.field-req { color: var(--lone-red); }
.field-help { font-size: var(--fs-xs); color: var(--n-600); }
.field-error {
  display: none;
  font-size: var(--fs-xs);
  color: var(--bad);
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(168,30,30,.14);
}
.field.has-error .field-error { display: block; }

/* Honeypot — must stay reachable to bots but invisible and out of the
   a11y tree for humans. Not display:none; some bots skip those. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

.form-note {
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-xs);
  color: var(--n-700);
  background: var(--sand);
  border-left: 3px solid var(--tan);
  border-radius: var(--r-xs);
}

.form-status {
  display: none;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  font-size: var(--fs-sm);
  border-radius: var(--r-sm);
  border: 1px solid transparent;
}
.form-status.is-shown { display: flex; }
.form-status--ok  { color: var(--ok);   background: var(--ok-bg);   border-color: rgba(31,122,69,.28); }
.form-status--bad { color: var(--bad);  background: var(--bad-bg);  border-color: rgba(168,30,30,.28); }
.form-status--info{ color: var(--warn); background: var(--warn-bg); border-color: rgba(178,101,14,.28); }

/* -- Checkout summary ----------------------------------------------------- */
.summary {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-5);
  background: var(--paper);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  font-size: var(--fs-sm);
}
.summary-row--total {
  padding-top: var(--s-3);
  border-top: 1.5px solid var(--n-200);
  font-family: var(--font-ui);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--ink);
}
.summary-row span:last-child { font-variant-numeric: tabular-nums; }

/* -- Payment intent chooser ----------------------------------------------- */
.choice-set { display: grid; gap: var(--s-3); }
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--paper);
  border: 1.5px solid var(--n-300);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.choice:hover { border-color: var(--tan); }
.choice:has(input:checked) {
  border-color: var(--star-blue);
  box-shadow: var(--ring);
}
.choice input { margin-top: 4px; accent-color: var(--star-blue); width: 18px; height: 18px; flex: none; }
.choice > span:not(.choice-price) { display: grid; gap: 3px; min-width: 0; }
.choice-label {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--ink);
}
.choice-desc { display: block; font-size: var(--fs-xs); color: var(--n-600); line-height: 1.45; }
.choice-price {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--rust);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   12. VALUE / PROCESS / CTA BANDS
   -------------------------------------------------------------------------- */

.value-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.value {
  padding: var(--s-6);
  background: var(--paper);
  border: 1px solid var(--n-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.value:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.value-mark {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: var(--s-4);
  color: var(--rust);
  background: var(--sand);
  border: 1.5px solid var(--tan);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-inset);
}
.value-mark svg { width: 24px; height: 24px; }
.value h3 { margin-bottom: var(--s-2); font-size: var(--fs-lg); }
.value p { font-size: var(--fs-sm); color: var(--n-700); }

.steps {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--s-6) var(--s-5) var(--s-5);
  background: var(--paper);
  border: 1px solid var(--n-200);
  border-top: 3px solid var(--lone-red);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: calc(-1 * var(--s-4));
  left: var(--s-5);
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--paper);
  background: var(--star-blue);
  border: 3px solid var(--cream-sink);
  border-radius: var(--r-pill);
}
.step h3 { margin: var(--s-3) 0 var(--s-2); font-size: var(--fs-md); }
.step p { font-size: var(--fs-sm); color: var(--n-700); }

.cta-band {
  position: relative;
  isolation: isolate;
  color: var(--cream);
  background: linear-gradient(135deg, var(--star-blue-deep), var(--star-blue) 40%, var(--mesquite) 130%);
  border-block: 3px solid var(--lone-red);
  overflow: hidden;
}
.cta-band .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  padding-block: var(--section-y);
}
.cta-copy { max-width: 56ch; }
.cta-copy h2 { color: var(--paper); }
.cta-copy p { margin-top: var(--s-3); color: rgba(251,246,238,.82); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  color: rgba(251,246,238,.72);
  background: var(--ink);
}
.footer-top {
  display: grid;
  gap: var(--s-7);
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  padding-block: var(--s-8) var(--s-7);
}
.footer-logo { height: 48px; width: auto; margin-bottom: var(--s-4); }
.footer-brand p { font-size: var(--fs-sm); max-width: 40ch; }

.footer-col h4 {
  margin-bottom: var(--s-4);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--tr-wider);
  text-transform: uppercase;
  color: var(--tan);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: rgba(251,246,238,.72);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--paper); }
.footer-col a .star { font-size: .6em; color: var(--lone-red); opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.footer-col a:hover .star { opacity: 1; }

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: var(--s-4);
  font-size: var(--fs-xs);
  color: rgba(251,246,238,.5);
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer-bar .star { color: var(--lone-red); font-size: .8em; }
.footer-sites { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.footer-sites a { color: rgba(251,246,238,.6); text-decoration: none; }
.footer-sites a:hover { color: var(--tan); }

/* --------------------------------------------------------------------------
   14. FLOATING CALL
   -------------------------------------------------------------------------- */

.floating-call {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  background: linear-gradient(180deg, var(--lone-red-lift), var(--lone-red));
  border: 1.5px solid var(--lone-red-deep);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-4);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.floating-call:hover { transform: translateY(-2px) scale(1.02); }
.floating-call svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   15. RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .header-cta .header-phone { display: none; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-2) var(--gutter) var(--s-5);
    background: var(--paper);
    border-top: 1px solid var(--n-200);
    box-shadow: var(--sh-3);
    clip-path: inset(0 0 100% 0);
    transition: clip-path var(--t-med) var(--ease-out);
  }
  .main-nav[data-open="true"] { clip-path: inset(0 0 0 0); }
  .main-nav a { padding: var(--s-4) 0; border-bottom: 1px solid var(--n-100); }
  .main-nav a::after { display: none; }
  .main-nav .btn { display: inline-flex; margin-top: var(--s-4); border-bottom: 0; }

  .filter-bar .wrap { gap: var(--s-2); }
  .filter-tabs { width: 100%; }
  .filter-tab { flex: 1; text-align: center; }
  .field { flex: 1 1 160px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 640px) {
  :root { --header-h: 116px; }
  .grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .card-actions { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; text-align: left; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { flex: 1 1 100%; }
  .modal-panel { max-height: 92vh; border-radius: var(--r-lg); }
  .modal-head, .modal-body { padding-inline: var(--s-5); }
}

@media (max-width: 420px) {
  /* Give the big display type room to breathe on a small phone rather than
     letting a single long word define the page width. */
  :root { --fs-4xl: clamp(2.125rem, 1.5rem + 3vw, 2.75rem); }
  .floating-call { right: var(--s-4); bottom: var(--s-4); padding: var(--s-3); }
  .floating-call span { display: none; }
  .logo { height: 44px; }
  .header-strip .wrap { font-size: 10px; letter-spacing: .08em; }
  .brandmark-star { width: 40px; height: 40px; }
  .brandmark-star .star { font-size: 20px; }
  .hero h1 { max-width: none; }
}

/* --------------------------------------------------------------------------
   16. PREFERENCES / PRINT
   -------------------------------------------------------------------------- */

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

@media print {
  .site-header, .filter-bar, .floating-call, .card-actions, .cta-band, .modal { display: none !important; }
  body { background: #fff; color: #000; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #999; }
}
