/* ============================================================
   STRIDE & STONE — Design tokens + components
   Single source of truth. Loaded on every page after the
   Tailwind Play CDN + js/tailwind-config.js.
   Extracted from homepage-preview.html — do not redesign,
   only centralize so values never drift across pages.
   ============================================================ */

:root {
  /* --- Brand color (also mirrored in js/tailwind-config.js) --- */
  --slate-deep: #2A2D2E;   /* surfaces, ink */
  --bone:       #F4F1EC;   /* page background */
  --granite:    #8A8680;   /* muted labels */
  --terracotta: #B86F4A;   /* accent, hover */
  --moss:       #6B7355;   /* secondary accent / confirmations */

  /* Logo ink — the wordmark SVG ships these exact values; preserve. */
  --logo-ink:        #252829;
  --logo-ampersand:  #AF6441;

  /* Image placeholder block (premium neutral, per brand brief) */
  --placeholder: #3a3d3e;

  /* --- Opacity steps used throughout the homepage --- */
  --ink-90:  rgba(42,45,46,0.90);
  --ink-80:  rgba(42,45,46,0.80);
  --ink-75:  rgba(42,45,46,0.75);
  --ink-65:  rgba(42,45,46,0.65);
  --ink-40:  rgba(42,45,46,0.40);
  --hairline:        rgba(42,45,46,0.12);
  --hairline-soft:   rgba(42,45,46,0.08);
  --hairline-strong: rgba(42,45,46,0.40);

  --bone-85: rgba(244,241,236,0.85);
  --bone-70: rgba(244,241,236,0.70);
  --bone-65: rgba(244,241,236,0.65);
  --bone-55: rgba(244,241,236,0.55);
  --bone-45: rgba(244,241,236,0.45);
  --bone-20: rgba(244,241,236,0.20);
  --bone-hairline: rgba(244,241,236,0.12);

  /* --- Type families --- */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Jost', system-ui, sans-serif;
  --font-serif:   'Fraunces', Georgia, serif;

  /* --- Easing --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------- Base ---------------------------------- */
html { scroll-behavior: smooth; }
body {
  background: var(--bone);
  color: var(--slate-deep);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--slate-deep); color: var(--bone); }

/* ----------------------------- Typography helpers ------------------------- */
.font-display { font-family: var(--font-display); font-weight: 300; }
.font-serif   { font-family: var(--font-serif); }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--granite);
}

/* Shared heading scale (Jost display, clamp). Mirrors homepage inline usage.
   NB: names avoid Tailwind's h-1/h-2/h-3/size-* height utilities, which
   would otherwise collide and cap these headings at a few pixels tall. */
.h-display {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}
.title-hero    { font-size: clamp(2.5rem, 6vw, 5.25rem); line-height: 1.02; }
.title-section { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.title-sub     { font-size: clamp(2rem, 4vw, 3rem); }

/* ----------------------------- Reveal animation --------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp 1s var(--ease) forwards; }

/* ------------------------------- Nav link --------------------------------- */
.nav-link { position: relative; padding-bottom: 3px; }
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }

/* ------------------------------- Link arrow ------------------------------- */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.74rem;
  text-decoration: none; color: var(--slate-deep); background: none;
  border: 0; cursor: pointer;
}
.link-arrow .arrow { transition: transform 0.4s var(--ease); display: inline-block; }
.link-arrow:hover .arrow { transform: translateX(6px); }

/* -------------------------------- Buttons --------------------------------- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--slate-deep); color: var(--bone);
  padding: 0.95rem 1.6rem;
  font-family: var(--font-display); font-weight: 400;
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  transition: background 0.3s ease; text-decoration: none;
  border: 0; cursor: pointer;
}
.btn-primary:hover { background: var(--terracotta); color: var(--bone); }
.btn-primary .arrow { transition: transform 0.4s var(--ease); display: inline-block; }
.btn-primary:hover .arrow { transform: translateX(6px); }
.btn-bone { background: var(--bone); color: var(--slate-deep); }
.btn-bone:hover { background: var(--terracotta) !important; color: var(--bone) !important; }
.btn-block { width: 100%; justify-content: center; }

/* -------------------------------- Divider --------------------------------- */
.divider { height: 1px; background: var(--hairline); }

/* --------------------------- Nav scrolled state --------------------------- */
#site-header.scrolled {
  background-color: rgba(244,241,236,0.92) !important;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline-soft);
}

/* ------------------------------- Image fill ------------------------------- */
.img-fill {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}

/* --------------------------- Category card hover -------------------------- */
.cat-desc {
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s, transform 0.5s;
}
.cat-card:hover .cat-desc,
.cat-card:focus-visible .cat-desc { opacity: 1; transform: translateY(0); }
.cat-card img { transition: transform 1.2s ease-out; }
.cat-card:hover img { transform: scale(1.035); }

/* -------------------------------- Cert badge ------------------------------ */
.cert-badge {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bone-70); border: 1px solid var(--bone-20);
  padding: 6px 12px;
}

/* ------------------------------- Mobile menu ------------------------------ */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* ============================================================
   IMAGE PLACEHOLDER — neutral block with a discreet label.
   Usage: <div class="ph" data-label="The Trail Shell"></div>
   Premium read comes from type + space, not stock photography.
   ============================================================ */
.ph {
  position: relative;
  background: var(--placeholder);
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem; text-align: center;
  font-family: var(--font-display); font-weight: 400;
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(244,241,236,0.32);
}
/* subtle tonal variation so grids don't read as flat tiles */
.ph.ph-2 { background: #34383a; }
.ph.ph-3 { background: #41433f; }

/* ============================================================
   PRODUCT CARD (PLP)
   ============================================================ */
.product-card { display: block; text-decoration: none; color: inherit; }
.product-card .pc-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--placeholder);
}
.product-card .pc-media .ph { position: absolute; inset: 0; }
.product-card .pc-media .badge {
  position: absolute; top: 0.85rem; left: 0.85rem;
  font-family: var(--font-display);
  font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--bone-85);
  background: rgba(42,45,46,0.45); backdrop-filter: blur(4px);
  padding: 5px 10px;
}
.product-card .pc-media .quick {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.9rem; text-align: center;
  font-family: var(--font-display); font-weight: 400;
  font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--bone); background: rgba(42,45,46,0.55); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(100%);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.product-card:hover .pc-media .quick,
.product-card:focus-visible .pc-media .quick { opacity: 1; transform: translateY(0); }
.product-card .pc-meta { padding-top: 1rem; }
.product-card .pc-name {
  font-family: var(--font-display); font-weight: 300;
  font-size: 1.05rem; letter-spacing: 0.01em;
}
.product-card .pc-cat {
  font-family: var(--font-display); font-weight: 400;
  font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--granite); margin-bottom: 0.35rem;
}
.product-card .pc-price {
  font-family: var(--font-display); font-weight: 300;
  letter-spacing: 0.04em; color: var(--ink-80); margin-top: 0.25rem;
}

/* Color dots (display only) */
.color-dots { display: flex; align-items: center; gap: 7px; margin-top: 0.7rem; }
.color-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(42,45,46,0.25); display: inline-block;
}

/* ============================================================
   FILTER BAR (visual only)
   ============================================================ */
.filter-chip {
  font-family: var(--font-display); font-weight: 400;
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.55rem 1.05rem; border: 1px solid var(--hairline-strong);
  color: var(--slate-deep); background: transparent;
  cursor: pointer; transition: all 0.3s var(--ease); white-space: nowrap;
}
.filter-chip:hover { border-color: var(--slate-deep); }
.filter-chip[aria-pressed="true"] {
  background: var(--slate-deep); color: var(--bone); border-color: var(--slate-deep);
}

/* ============================================================
   PDP — size + color selectors (non-functional)
   ============================================================ */
.size-btn {
  min-width: 3.1rem; padding: 0.7rem 0.85rem;
  border: 1px solid var(--hairline-strong); background: transparent;
  font-family: var(--font-display); font-weight: 300;
  font-size: 0.82rem; letter-spacing: 0.08em; color: var(--slate-deep);
  cursor: pointer; transition: all 0.25s var(--ease);
}
.size-btn:hover { border-color: var(--slate-deep); }
.size-btn[aria-pressed="true"] {
  background: var(--slate-deep); color: var(--bone); border-color: var(--slate-deep);
}
.swatch-btn {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid rgba(42,45,46,0.25); padding: 0; cursor: pointer;
  transition: transform 0.25s var(--ease);
}
.swatch-btn:hover { transform: scale(1.08); }
.swatch-btn[aria-pressed="true"] { outline: 1px solid var(--slate-deep); outline-offset: 3px; }

/* PDP gallery thumbnails */
.thumb-btn {
  position: relative; aspect-ratio: 1 / 1; padding: 0; border: 1px solid transparent;
  background: var(--placeholder); cursor: pointer; transition: border-color 0.25s;
  overflow: hidden;
}
.thumb-btn[aria-pressed="true"] { border-color: var(--slate-deep); }

/* ============================================================
   JOURNAL CARD
   ============================================================ */
.journal-card { display: block; text-decoration: none; color: inherit; }
.journal-card .jc-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--placeholder); }
.journal-card .jc-media .ph { position: absolute; inset: 0; }
.journal-card .jc-media img { transition: transform 1.2s ease-out; }
.journal-card:hover .jc-media img { transform: scale(1.035); }
.journal-card .jc-title {
  font-family: var(--font-display); font-weight: 300;
  font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.01em; margin-top: 0.9rem;
}
.journal-card:hover .jc-title { color: var(--terracotta); }
.journal-card .jc-meta {
  font-family: var(--font-display); font-weight: 400;
  font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--granite);
}

/* ============================================================
   STYLE GUIDE — swatch + spec helpers
   ============================================================ */
.sg-swatch { border: 1px solid var(--hairline); }
.sg-swatch .chip { aspect-ratio: 5 / 3; }
.sg-swatch .body { padding: 1rem 1.1rem 1.2rem; }
.sg-swatch .name { font-family: var(--font-display); font-weight: 300; font-size: 1.25rem; }
.sg-swatch dl { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; margin-top: 0.6rem; }
.sg-swatch dt { font-family: var(--font-display); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--granite); }
.sg-swatch dd { font-family: var(--font-display); font-weight: 300; font-size: 0.82rem; margin: 0; }

.clearspace {
  position: relative; border: 1px dashed var(--hairline-strong);
  display: flex; align-items: center; justify-content: center; padding: 2.5rem;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.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;
}
/* Visible, on-brand focus ring for keyboard users (extends homepage's
   nav-link focus-visible underline to all interactive elements). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 1px;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--slate-deep); color: var(--bone);
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; padding: 0.7rem 1.1rem; transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; animation: none !important; }
  .cat-card img, .journal-card img { transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
