/* ==========================================================================
   String Frame — Base: reset, page frame, typography scale, section rhythm
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The [hidden] attribute is a UA style, so any author rule that sets display —
   a.card {display:block}, for one — silently defeats it. This guard keeps
   hidden meaning hidden, which the shop filters depend on. */
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--cobalt-hover); }

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

/* Fieldsets are used as form sections; strip the UA chrome so .card can
   style them like every other panel. */
fieldset { min-width: 0; margin: 0; border: 0; padding: 0; }
legend { padding: 0; }

/* Visible focus everywhere, since the design has no hover-only affordances
   that should be unreachable by keyboard. */
:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--text-on-ink);
  padding: 12px 18px;
  border-radius: var(--radius);
  font: 500 15px/1 var(--font-body);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  color: var(--text-on-ink);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Page frame ----------------------------------------------------------- */

/* Full-bleed page. Bands, rules and the footer reach the viewport edge at any
   window size; --pad-x keeps the content column itself at the 1440px canvas
   width and centred, so nothing shifts relative to the mockups. */
.page {
  width: 100%;
  background: var(--paper);
  overflow-x: clip;
}

.section {
  padding: var(--pt) var(--pad-x) var(--pb);
}

.section--ink {
  background: var(--ink);
  color: var(--text-on-ink);
}
.section--surface { background: var(--surface); }
.section--white   { background: var(--white); }

/* The hard 1.5px ink rules that separate every band. */
.section--rule-b { border-bottom: var(--bw) solid var(--rule); }
.section--rule-t { border-top: var(--bw) solid var(--rule); }

/* Exact desktop section rhythm. Below 1200px the tokens above take over. */
@media (min-width: 1200px) {
  .s-84       { --pt: 84px; --pb: 84px; }
  .s-76       { --pt: 76px; --pb: 76px; }
  .s-72       { --pt: 72px; --pb: 72px; }
  .s-64       { --pt: 64px; --pb: 64px; }
  .s-hero     { --pt: 84px; --pb: 88px; }
  .s-head     { --pt: 64px; --pb: 48px; }
  .s-head-44  { --pt: 64px; --pb: 44px; }
  .s-head-shop{ --pt: 48px; --pb: 44px; }
  .s-head-legal { --pt: 56px; --pb: 44px; }
  .s-cart     { --pt: 56px; --pb: 72px; }
  .s-checkout { --pt: 72px; --pb: 80px; }
  .s-grid     { --pt: 56px; --pb: 72px; }
  .s-body     { --pt: 64px; --pb: 80px; }
  .s-chips    { --pt: 56px; --pb: 24px; }
  .s-chips-sm { --pt: 32px; --pb: 24px; }
  .s-filter   { --pt: 28px; --pb: 28px; }
  .s-crumb    { --pt: 28px; --pb: 0; }
  .s-detail   { --pt: 32px; --pb: 72px; }
  .s-404      { --pt: 100px; --pb: 110px; }
}
@media (max-width: 1199px) {
  .s-crumb  { --pt: 24px; --pb: 0; }
  .s-filter { --pt: 24px; --pb: 24px; }
  .s-detail { --pt: 28px; }
}

/* --- Typography ----------------------------------------------------------- */

.eyebrow {
  font: 500 12px/1 var(--font-body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cobalt);
}
.eyebrow--muted { color: var(--text-caption); }
.eyebrow--soft  { color: var(--cobalt-soft); }
.eyebrow--onink { color: var(--text-on-ink-cap); font-size: 11px; }

/* Display / heading base: Space Grotesk 500, tight tracking. */
.display,
.h1, .h2, .h3, .h4, .h5 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.h3, .h4, .h5 { letter-spacing: -.005em; }

/* Poster caps are a typographic treatment, not a writing style. */
.caps { text-transform: uppercase; }

/* Size steps. Values are the exact desktop sizes; the --ds-* multipliers
   scale them down at narrower viewports. */
.fs-200 { font-size: calc(200px * var(--ds-xl)); line-height: .86; letter-spacing: -.03em; }
.fs-82  { font-size: calc(82px  * var(--ds-xl)); line-height: .96; }
.fs-76  { font-size: calc(76px  * var(--ds-xl)); line-height: .97; }
.fs-72  { font-size: calc(72px  * var(--ds-xl)); line-height: .97; }
.fs-68  { font-size: calc(68px  * var(--ds-xl)); line-height: .98; }
.fs-66  { font-size: calc(66px  * var(--ds-xl)); line-height: .98; }
.fs-62  { font-size: calc(62px  * var(--ds-xl)); line-height: .99; }
.fs-60  { font-size: calc(60px  * var(--ds-xl)); line-height: 1.02; }
.fs-56  { font-size: calc(56px  * var(--ds-xl)); line-height: 1.02; }
.fs-52  { font-size: calc(52px  * var(--ds-xl)); line-height: 1.02; }
.fs-48  { font-size: calc(48px  * var(--ds-xl)); line-height: 1.04; }
.fs-46  { font-size: calc(46px  * var(--ds-xl)); line-height: 1.04; }
.fs-44  { font-size: calc(44px  * var(--ds-xl)); line-height: 1.05; }
.fs-40  { font-size: calc(40px  * var(--ds-lg)); line-height: 1.06; }
.fs-36  { font-size: calc(36px  * var(--ds-lg)); line-height: 1.1; }
.fs-30  { font-size: calc(30px  * var(--ds-lg)); line-height: 1.15; }
.fs-28  { font-size: calc(28px  * var(--ds-lg)); line-height: 1.15; }
.fs-26  { font-size: calc(26px  * var(--ds-lg)); line-height: 1.15; }
.fs-24  { font-size: 24px; line-height: 1.1; }
.fs-22  { font-size: 22px; line-height: 1.2; }
.fs-20  { font-size: 20px; line-height: 1.2; }
.fs-19  { font-size: 19px; line-height: 1.3; }
.fs-18  { font-size: 18px; line-height: 1.2; }
.fs-17  { font-size: 17px; line-height: 1.3; }
.fs-16  { font-size: 16px; line-height: 1.3; }

.lh-1 { line-height: 1; }

/* Body copy */
.lede {
  font: 400 18px/1.6 var(--font-body);
  color: var(--text-muted);
  text-wrap: pretty;
}
.body {
  font: 400 17px/1.7 var(--font-body);
  color: var(--text-muted);
  text-wrap: pretty;
}
.body-sm {
  font: 400 16px/1.65 var(--font-body);
  color: var(--text-muted);
}
.small {
  font: 400 15px/1.6 var(--font-body);
  color: var(--text-muted);
}
.caption {
  font: 400 13px/1.5 var(--font-body);
  color: var(--text-caption);
}
.mono {
  font: 400 11px/1 var(--font-mono);
  color: var(--text-caption);
}

/* Plain body-text steps, for the many one-line labels in the design. */
.txt-13 { font: 400 13px/1.5 var(--font-body); }
.txt-14 { font: 400 14px/1.5 var(--font-body); }
.txt-15 { font: 400 15px/1.5 var(--font-body); }
.txt-16 { font: 400 16px/1.5 var(--font-body); }
.txt-17 { font: 400 17px/1.6 var(--font-body); }
.txt-18 { font: 400 18px/1.6 var(--font-body); }
.fw-500 { font-weight: 500; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }

.text-cobalt { color: var(--cobalt); }
.text-coral  { color: var(--coral); }
.text-muted  { color: var(--text-muted); }
.text-cap    { color: var(--text-caption); }
.text-ink    { color: var(--ink); }
.text-on-ink { color: var(--text-on-ink); }
.text-on-ink-muted { color: var(--text-on-ink-muted); }
.text-on-ink-cap   { color: var(--text-on-ink-cap); }

.on-ink .lede,
.on-ink .body,
.on-ink .body-sm,
.on-ink .small { color: var(--text-on-ink-muted); }

/* Prices are always Space Grotesk 500 cobalt. */
.price {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1;
  color: var(--cobalt);
}

/* Same numerals as .price, but inheriting the ink colour. */
.money {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1;
}

/* Star rating rendered as text, matching the design. */
.stars {
  font: 500 15px/1 var(--font-body);
  color: var(--cobalt);
  letter-spacing: .06em;
}
.stars--lg { font-size: 18px; letter-spacing: .08em; }

/* Measure helpers */
.mw-320 { max-width: 320px; }
.mw-380 { max-width: 380px; }
.mw-420 { max-width: 420px; }
.mw-460 { max-width: 460px; }
.mw-520 { max-width: 520px; }
.mw-560 { max-width: 560px; }
.mw-620 { max-width: 620px; }
.mw-660 { max-width: 660px; }
.mw-700 { max-width: 700px; }
.mw-720 { max-width: 720px; }
.mw-760 { max-width: 760px; }
.mw-820 { max-width: 820px; }

/* Vertical spacing utilities used inside content blocks. */
.mt-6  { margin-top: 6px; }
.mt-8  { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; }
.mt-22 { margin-top: 22px; }
.mt-24 { margin-top: 24px; }
.mt-26 { margin-top: 26px; }
.mt-28 { margin-top: 28px; }
.mt-30 { margin-top: 30px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-44 { margin-top: 44px; }
.mt-48 { margin-top: 48px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-28 { margin-bottom: 28px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mb-44 { margin-bottom: 44px; }

/* --- Generic layout helpers ---------------------------------------------- */

.stack     { display: grid; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; }
.gap-16 { gap: 16px; } .gap-18 { gap: 18px; } .gap-20 { gap: 20px; }
.gap-24 { gap: 24px; } .gap-28 { gap: 28px; } .gap-32 { gap: 32px; }
.gap-44 { gap: 44px; }

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.row--between { justify-content: space-between; }
.row--baseline { align-items: baseline; }
.row--top { align-items: flex-start; }
.row--end { align-items: flex-end; }

/* Section head: title left, supporting note or link right. */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
@media (min-width: 1200px) { .section-head { gap: 40px; } }
.section-head--tight { margin-bottom: 28px; }

/* Responsive card grids. Column counts step up with the viewport. */
.grid { display: grid; gap: 24px; }
.grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
@media (min-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}
.grid--28 { gap: 28px; }
.grid--20 { gap: 20px; }

/* Two-column split: content plus a narrower rail. */
.split {
  display: grid;
  gap: 32px;
  align-items: start;
}
@media (min-width: 1000px) {
  .split--rail-420 { grid-template-columns: 1fr 420px; gap: 64px; }
  .split--rail-420-56 { grid-template-columns: 1fr 420px; gap: 56px; }
  .split--rail-440 { grid-template-columns: 1fr 440px; gap: 64px; }
  .split--rail-480 { grid-template-columns: 1fr 480px; gap: 56px; }
  .split--rail-500 { grid-template-columns: 1fr 500px; gap: 56px; }
  .split--rail-400 { grid-template-columns: 1fr 400px; gap: 40px; }
  .split--rail-380 { grid-template-columns: 1fr 380px; gap: 64px; }
  .split--lead-420 { grid-template-columns: 420px 1fr; gap: 64px; }
  .split--lead-360 { grid-template-columns: 360px 1fr; gap: 64px; }
  .split--lead-340 { grid-template-columns: 340px 1fr; gap: 56px; }
  .split--lead-300 { grid-template-columns: 300px 1fr; gap: 56px; }
  .split--lead-280 { grid-template-columns: 280px 1fr; gap: 72px; }
  .split--even     { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split--center   { align-items: center; }
  .split--end      { align-items: end; }
}

/* Order helper so image-first blocks read sensibly when stacked. */
@media (max-width: 999px) {
  .stack-first { order: -1; }
}
