/* ============================================================
   TRADECRAFT — Design System
   Sand/cream ground · dark warm ink · amber trade accent
   Utilitarian grotesque type · LIGHT THEME ONLY
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Archivo:wght@400;500;600;700&display=swap');

:root {
  /* ---- Color: warm sand ground, dark ink, amber accent ---- */
  --cream:        #FAF6EE;   /* page ground — warm sand */
  --cream-deep:   #F1EADC;   /* deeper sand band */
  --ivory:        #FFFFFF;   /* cards / surfaces */
  --ink:          #211A11;
  --ink-soft:     #6A5F4E;
  --ink-faint:    #A2947C;
  --line:         #E5DCC9;

  /* primary accent — deep indigo (replaces the default amber/gold) */
  --gold:         #23395F;
  --gold-deep:    #17263F;
  --gold-soft:    #E4E8EF;

  /* secondary accent — terracotta (badges, wishlist, errors) */
  --blush:        #AC4A2B;
  --blush-deep:   #7E3018;
  --blush-soft:   #F5DFD2;

  /* tertiary accent — market green (success, status) */
  --sage:         #5A7A4E;
  --sage-deep:    #3D5734;
  --sage-soft:    #E4EAD6;

  --clay:         #23395F;

  /* ---- Type ---- */
  --serif:  'Bricolage Grotesque', 'Archivo', Helvetica, Arial, sans-serif; /* headings */
  --roman:  'Archivo', Helvetica, Arial, sans-serif;
  --sans:   'Archivo', Helvetica, Arial, sans-serif;

  /* ---- Geometry — squarer, utilitarian ---- */
  --r-sm: 5px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-xl: 20px;
  --shadow-sm: 0 2px 10px rgba(48,36,18,.07);
  --shadow-md: 0 10px 34px rgba(48,36,18,.13);
  --shadow-lg: 0 22px 60px rgba(48,36,18,.20);

  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Global horizontal-scroll guard — clip (not hidden) keeps sticky working */
html, body { overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Typographic scale ---- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.05; letter-spacing: -0.015em; }

.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.display {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.display em { font-style: normal; font-weight: 500; }

.script { font-style: normal; font-weight: 400; }
em, i { font-style: normal; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-deep); }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.wide { max-width: 1480px; }

/* ============================================================
   BUTTONS — squared, sturdy
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 16px 30px; border-radius: var(--r-md);
  min-height: 48px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .3s, color .3s, box-shadow .3s;
  white-space: nowrap; cursor: pointer;
}
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: #3A2E1D; box-shadow: var(--shadow-md); }

.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); box-shadow: 0 12px 30px rgba(23,38,63,.28); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-blush { background: var(--blush); color: #fff; }
.btn-blush:hover { background: var(--blush-deep); transform: translateY(-2px); }

.btn-sm { padding: 11px 20px; font-size: 11px; min-height: 44px; }
.btn-lg { padding: 19px 38px; font-size: 14px; }
.btn-block { width: 100%; }

/* Link with animated underline */
.link-u { position: relative; font-weight: 500; }
.link-u::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

/* ============================================================
   IMAGE PLACEHOLDERS — branded, graceful fallback
   ============================================================ */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.4) 0 2px, transparent 2px 22px),
    var(--ph-grad, linear-gradient(140deg, var(--gold-soft), var(--blush-soft) 55%, var(--sage-soft)));
  display: flex; align-items: center; justify-content: center;
}
.ph::after {
  content: attr(data-label);
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(48,36,18,.55);
  padding: 7px 13px; border: 1px solid rgba(48,36,18,.2);
  border-radius: 100px; background: rgba(255,255,255,.6);
  backdrop-filter: blur(2px); text-align: center; max-width: 80%;
}
.ph-blush { --ph-grad: linear-gradient(140deg, var(--blush-soft), #FFFDF8 50%, var(--gold-soft)); }
.ph-sage  { --ph-grad: linear-gradient(140deg, var(--sage-soft), #FFFDF8 50%, var(--gold-soft)); }
.ph-gold  { --ph-grad: linear-gradient(140deg, var(--gold-soft), #FFFDF8 55%, var(--blush-soft)); }
.ph-dark  { --ph-grad: linear-gradient(140deg, #211A11, #3A2E1D 60%, #211A11); }
.ph-dark::after { color: rgba(250,246,238,.65); border-color: rgba(250,246,238,.3); background: rgba(33,26,17,.4); }
.ph[data-label=""]::after { display: none; }

/* ============================================================
   CARDS / CHIPS / BADGES
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; letter-spacing: .02em; font-weight: 500;
  padding: 8px 16px; border-radius: 100px;
  background: var(--ivory); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft); transition: all .25s; cursor: pointer; white-space: nowrap;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--gold); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--cream); box-shadow: none; }

.badge {
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  padding: 5px 10px; border-radius: var(--r-sm);
}
.badge-best { background: var(--gold); color: #fff; }
.badge-new  { background: var(--sage); color: #fff; }
.badge-low  { background: var(--blush-deep); color: #fff; }

/* Category tag on product cards */
.cat-tag {
  font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
  color: var(--gold-deep);
}

/* ============================================================
   FORMS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }
.input {
  background: var(--ivory); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 16px; color: var(--ink); transition: border .25s, box-shadow .25s; width: 100%;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(35,57,95,.13); }
.input::placeholder { color: var(--ink-faint); }

/* ============================================================
   SPEC SHEET — category-aware attribute table
   ============================================================ */
.spec-sheet { border: 1.5px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--ivory); }
.spec-row { display: grid; grid-template-columns: 42% 58%; }
.spec-row + .spec-row { border-top: 1px solid var(--line); }
.spec-row dt {
  padding: 12px 16px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-soft); background: var(--cream); border-right: 1px solid var(--line);
  display: flex; align-items: center;
}
.spec-row dd { padding: 12px 16px; font-size: 14.5px; color: var(--ink); font-weight: 500; }

/* ============================================================
   MOTION
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes ringPop { to { opacity: 1; transform: scale(1); } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

@keyframes riseIn { from { transform: translateY(22px); } to { transform: none; } }

/* Content is ALWAYS visible (opacity never animated from 0) so it renders
   reliably even in throttled/hidden iframes. Entrance is a transform-only
   enhancement layered on top. */
.reveal { opacity: 1; }
.reveal.in { animation: riseIn .7s cubic-bezier(.2,.8,.2,1); }

[data-d="1"] { animation-delay: .05s; }
[data-d="2"] { animation-delay: .10s; }
[data-d="3"] { animation-delay: .15s; }
[data-d="4"] { animation-delay: .20s; }
[data-d="5"] { animation-delay: .25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

::selection { background: var(--gold-soft); color: var(--ink); }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--cream-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 100px; border: 3px solid var(--cream-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Utility */
.center { text-align: center; }
.muted { color: var(--ink-soft); }

.brand-grad {
  background: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold) 60%, var(--blush) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  display: inline-block;
  padding: 0.06em 0.22em 0.06em 0.04em;
  margin: -0.06em -0.22em -0.06em -0.04em;
}
.divider { height: 1px; background: var(--line); border: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   TAP TARGETS — icon buttons & qty steppers
   ============================================================ */
.icobtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 100px; flex-shrink: 0; transition: background .2s; }
.icobtn:hover { background: var(--cream-deep); }
.qbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 100px; flex-shrink: 0; transition: background .2s; }
.qbtn:hover { background: var(--cream-deep); }

@media (max-width: 720px) {
  .chip { padding: 12px 18px; min-height: 44px; }
  .qbtn { width: 44px; height: 44px; }
  .cur-opt { padding: 12px 16px !important; min-height: 44px; }
  .announce { font-size: 10.5px !important; letter-spacing: .1em !important; padding: 8px 12px !important; }
  .search-pill { min-height: 48px; }
  select.input { min-height: 44px; }
  .tab-btn { min-height: 48px; }
}
