/* Frères et Sœur — design tokens, reset, type, primitives. Shared by store pages. */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6dc;
  --paper-3: #ddd5c6;
  --card: #fbf9f5;
  --ink: #141312;
  --ink-2: #2b2926;
  --muted: #5f5950;
  --line: rgba(20, 19, 18, .14);
  --line-2: rgba(20, 19, 18, .3);
  --night: #0f0e0d;
  --night-2: #1c1a18;
  --on-night: #f4f1ea;
  --on-night-muted: #b9b2a6;
  --blood: #831100;
  --blood-2: #a3260f;
  --ok: #2f6b3a;
  --warn: #8a5d00;
  --err: #a3260f;

  --tee-black: #000000;
  --tee-white: #ffffff;
  --tee-grey: #5c5c5c;
  --tee-burgundy: #831100;
  --tee-green: #38571a;
  --tee-blue: #0042a9;
  --tee-purple: #7a219e;

  --f-display: "Averia Serif Libre", Georgia, "Times New Roman", serif;
  --f-ui: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --f-hand: "Covered By Your Grace", "Segoe Print", cursive;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1480px;
  --header-h: 68px;
  --strip-h: 34px;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --hard: 5px 5px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 16px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-family: var(--f-display); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--blood); color: var(--paper); }
:focus-visible { outline: 2px solid var(--blood); outline-offset: 3px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper);
  padding: 10px 16px; transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- layout */
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(64px, 10vw, 140px); position: relative; }
.section--tight { padding-block: clamp(40px, 6vw, 80px); }
.night { background: var(--night); color: var(--on-night); }
.night .muted { color: var(--on-night-muted); }
.stack > * + * { margin-top: var(--s, 16px); }

/* ---------------------------------------------------------------- type */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.night .eyebrow { color: var(--on-night-muted); }
.hand { font-family: var(--f-hand); color: var(--blood); font-weight: 400; letter-spacing: 0; line-height: 1; }
.night .hand { color: #e2a089; }
.display {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.045em;
  line-height: .9;
}
.h1 { font-size: clamp(44px, 8vw, 112px); }
.h2 { font-size: clamp(36px, 6vw, 84px); }
.h3 { font-size: clamp(26px, 3.4vw, 44px); }
.lead { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }
.price { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price s { color: var(--muted); font-size: .86em; margin-left: 6px; }
.prose p + p { margin-top: 1em; }
.prose { font-size: 17px; line-height: 1.7; max-width: 68ch; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --bg: var(--ink); --fg: var(--paper); --bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font-family: var(--f-ui); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { background: var(--blood); border-color: var(--blood); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn--ghost:hover { --fg: var(--paper); background: var(--ink); border-color: var(--ink); }
.night .btn--ghost { --fg: var(--paper); --bd: var(--paper); }
.night .btn--ghost:hover { background: var(--paper); color: var(--ink); }
.btn--light { --bg: var(--paper); --fg: var(--ink); --bd: var(--paper); }
.btn--hard { box-shadow: var(--hard); }
.btn--hard:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); background: var(--ink); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: 11.5px; }
.btn .arrow { transition: transform .25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.link-u {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; padding-bottom: 4px;
}
.link-u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform-origin: right; transition: transform .45s var(--ease);
}
.link-u:hover::after { transform: scaleX(0); transform-origin: left; }
.link-u:hover::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  animation: underline-in .45s .2s var(--ease) both;
}
@keyframes underline-in { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }
.link-u svg { width: 12px; height: 12px; transition: transform .25s var(--ease-out); }
.link-u:hover svg { transform: translateX(3px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  transition: background .2s;
}
.icon-btn:hover { background: rgba(20, 19, 18, .07); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; }
.field > span, .label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 0;
  font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(131, 17, 0, .14); }
.input[aria-invalid="true"] { border-color: var(--err); }
.field .hint { font-size: 13px; color: var(--muted); }
.field .error { font-size: 13px; color: var(--err); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card);
  font-weight: 600; font-size: 13px; letter-spacing: .02em;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .2s, color .2s;
}
.chip:hover { transform: translate(-2px, -2px); box-shadow: var(--hard-sm); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--ink); color: var(--paper); }
.chip .count { font-family: var(--f-mono); font-size: 11px; opacity: .6; }

.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1.5px solid var(--ink);
  border-radius: 999px; background: var(--paper); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 700;
}
.badge--sale { background: var(--blood); color: var(--paper); border-color: var(--blood); }
.badge--dark { background: var(--ink); color: var(--paper); }

.swatch {
  --c: #000; width: 22px; height: 22px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); position: relative; flex: none;
}
.swatch[data-light] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 300;
  transform: translate(-50%, 180%); padding: 12px 20px; max-width: calc(100vw - 32px);
  background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: var(--hard); font-weight: 600; font-size: 14px; transition: transform .35s var(--ease-out);
}
.toast.show { transform: translate(-50%, 0); }
.toast[data-type="error"] { background: #fbe9e5; border-color: var(--err); color: var(--err); box-shadow: 5px 5px 0 var(--err); }

/* ---------------------------------------------------------------- skeleton */
.skel { background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2)); background-size: 200% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { to { background-position: -200% 0; } }

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

/* Pointer trail (js/fx/cursor.js): above everything, never takes clicks, inverted against what is under it. */
.cursor-trail { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2147483000; pointer-events: none; mix-blend-mode: difference; opacity: 0; transition: opacity .25s; }
.cursor-trail.is-on { opacity: 1; }
@media print { .cursor-trail { display: none; } }

/* Password show / hide toggle (passwordToggles in js/lib/util.js) */
.pw-wrap { position: relative; display: block; min-width: 0; }
.pw-wrap > input { width: 100%; padding-right: 48px; }
.pw-toggle { position: absolute; top: 0; right: 0; bottom: 0; width: 46px; display: grid; place-items: center; padding: 0; background: none; border: 0; color: inherit; opacity: .55; cursor: pointer; }
.pw-toggle:hover, .pw-toggle:focus-visible { opacity: 1; }
.pw-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
.pw-toggle svg { width: 20px; height: 20px; }
