/* ============================================================================
   Straps and Stories - store stylesheet
   Palette, typography and the mark are LOCKED by brand/BRAND_BRIEF.md.
   Do not add a colour here that is not oxblood, ink or cream (or a neutral
   step between them). "The product is the colour" - the identity stays
   near-neutral so a green lizard, a cognac gator and a black croc can all sit
   inside it without fighting.

   THEME RULE: every colour gets its value on bare :root first. The dark blocks
   only REDEFINE tokens. Nothing is defined for the first time inside a media
   query, so a browser that ignores the query still renders a complete page.
   ========================================================================= */

:root {
  /* --- the three locked colours ------------------------------------- */
  --oxblood: #7A2B31;
  --ink:     #14110F;
  --cream:   #F3EFE7;

  /* --- roles (light) ------------------------------------------------- */
  --ground:  #F3EFE7;   /* cream paper */
  --panel:   #FBF9F5;   /* a card lifted off the paper */
  --panel-2: #EDE7DB;   /* a recessed well */
  --fg:      #14110F;
  --fg-mute: #6B6259;
  --fg-dim:  #8C8377;
  --line:    rgba(20,17,15,.16);
  --line-hi: rgba(20,17,15,.30);

  /* Oxblood as ACCENT TEXT. 8.3:1 on cream - safe for body-size type.
     The dark theme swaps in a lighter tint of the SAME hue, because
     #7A2B31 on ink is 2.0:1 and unreadable. Same colour, legible ground. */
  --accent:     #7A2B31;
  --accent-on:  #F3EFE7;   /* text that sits ON the accent */
  --accent-fill: #7A2B31;  /* button and rule fills */
  --accent-soft: rgba(122,43,49,.10);

  --shadow: 0 1px 2px rgba(20,17,15,.05), 0 8px 24px -16px rgba(20,17,15,.35);

  /* --- metrics ------------------------------------------------------- */
  --pad: 20px;
  --wrap: 720px;
  --r: 3px;              /* leather is cut square. corners stay nearly so */
  --tight: -0.035em;     /* the locked wordmark tracking */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:  #14110F;
    --panel:   #1D1917;
    --panel-2: #262120;
    --fg:      #F3EFE7;
    --fg-mute: #A79E93;
    --fg-dim:  #857C72;
    --line:    rgba(243,239,231,.16);
    --line-hi: rgba(243,239,231,.30);
    --accent:      #D5868D;
    --accent-on:   #F3EFE7;
    --accent-fill: #963640;
    --accent-soft: rgba(213,134,141,.12);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -16px rgba(0,0,0,.9);
  }
}

:root[data-theme="dark"] {
  --ground:  #14110F;
  --panel:   #1D1917;
  --panel-2: #262120;
  --fg:      #F3EFE7;
  --fg-mute: #A79E93;
  --fg-dim:  #857C72;
  --line:    rgba(243,239,231,.16);
  --line-hi: rgba(243,239,231,.30);
  --accent:      #D5868D;
  --accent-on:   #F3EFE7;
  --accent-fill: #963640;
  --accent-soft: rgba(213,134,141,.12);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -16px rgba(0,0,0,.9);
}

/* Theme-swapped images. CSS cannot change an <img>'s src, so both files ship
   and one of the pair is hidden. Used for the lockup and for the mark - the
   oxblood mark is 2:1 on ink and has to become the cream one on a dark ground.
   Declared once here; every .on-light / .on-dark pair on the site obeys it. */
.on-dark { display: none; }
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none; }
  :root:not([data-theme="light"]) .on-dark  { display: block; }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font: 400 16px/1.55 "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; text-align: left; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.only-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent-fill); color: var(--accent-on); padding: 10px 16px;
}
.skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------ headings */
h1, h2, h3, .wordish {
  font-weight: 600;
  letter-spacing: var(--tight);
  text-transform: lowercase;   /* the decision that matters, per the brief */
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(30px, 8vw, 44px); }
h2 { font-size: clamp(23px, 5.6vw, 30px); }
h3 { font-size: 18px; line-height: 1.2; }

/* Proper nouns and Latin binomials must NOT be lowercased. */
.cap-ok { text-transform: none; }

.eyebrow {
  font-size: 10.5px; font-weight: 600; letter-spacing: .19em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}
.eyebrow.mute { color: var(--fg-dim); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* Newsreader is the companion serif, LONG-FORM ONLY. It never appears in the
   logo and it is not a UI face. */
.prose {
  font-family: Newsreader, Georgia, "Times New Roman", serif;
  font-size: 17.5px; line-height: 1.65; color: var(--fg-mute);
}
.prose b, .prose strong { color: var(--fg); font-weight: 600; }
.prose em { font-style: italic; }
.lede { font-size: 19px; line-height: 1.55; color: var(--fg-mute); }

.sci { font-style: italic; text-transform: none; }
.hkd { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- header */
.hd {
  position: sticky; top: 0; z-index: 40;
  background: var(--ground);   /* fallback first - color-mix is the enhancement */
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (backdrop-filter: blur(1px)) { .hd { background: var(--ground); } }
.hd .in {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--wrap); margin: 0 auto; padding: 11px var(--pad);
}
/* The stacked lockup is the brand; the horizontal lockup is what the brief
   nominates for a website header. */
.lockup { height: 26px; width: auto; }
.hd .home { display: block; flex: 0 0 auto; }
.hd .sp { flex: 1 1 auto; }
.hd nav { display: flex; align-items: center; gap: 4px; }
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 38px; padding: 0 10px; border-radius: var(--r);
  font-size: 12.5px; font-weight: 500; color: var(--fg-mute);
  text-decoration: none; letter-spacing: 0;
}
.iconbtn:hover { background: var(--panel-2); color: var(--fg); }
.cartbtn { font-weight: 600; color: var(--fg); }
.cartbtn .n {
  display: none; margin-left: 6px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--accent-fill); color: var(--accent-on);
  font-size: 11px; font-weight: 600; line-height: 19px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cartbtn.has .n { display: inline-block; }

/* ------------------------------------------------------------ sections */
main { display: block; }
.sect { padding: 52px 0; }
.sect.tight { padding: 34px 0; }
.sect + .sect { border-top: 1px solid var(--line); }
.sect .wrap > h2 + .lede,
.sect .wrap > h2 + .prose { margin-top: 14px; }

/* --------------------------------------------------------------- hero */
.hero { padding: 44px 0 40px; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { max-width: 34em; }
.hero .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--r); border: 1.5px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  text-decoration: none; text-align: center; line-height: 1.2;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn.primary { background: var(--accent-fill); color: var(--accent-on); border-color: var(--accent-fill); }
.btn.primary:hover { opacity: .88; }
.btn.ghost { border-color: var(--line-hi); color: var(--fg); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn.sm { padding: 10px 15px; font-size: 13.5px; }

/* --------------------------------------------------------- the six grid */
.six { display: grid; gap: 12px; margin-top: 26px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .six { grid-template-columns: 1fr 1fr; } }
.card {
  display: block; text-decoration: none; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); }
.card .nm { font-size: 20px; font-weight: 600; letter-spacing: var(--tight); text-transform: lowercase; }
.card .sci { display: block; margin-top: 3px; font-size: 13px; color: var(--fg-dim); }
.card .cut {
  margin-top: 11px; font-size: 11px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent);
}
.card .bl { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--fg-mute); }
.card .pr {
  margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.card .pr .v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card .pr .go { font-size: 12.5px; color: var(--fg-dim); }

/* ------------------------------------------------------------ the proof */
.proof { display: grid; gap: 12px; margin-top: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .proof { grid-template-columns: repeat(3, 1fr); } }
.proof .p {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent-fill);
  border-radius: var(--r); padding: 16px 16px 17px;
}
.proof .p h3 { margin-bottom: 7px; }
.proof .p p { font-size: 14.5px; line-height: 1.55; color: var(--fg-mute); margin: 0; }

/* ----------------------------------------------------------- spec table */
.spec { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14.5px; }
.spec th, .spec td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 40%; font-weight: 500; color: var(--fg-mute); padding-right: 14px; }
.spec td { color: var(--fg); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------------------------------------------- the honesty chip
   Every number this business has not yet confirmed carries one of these.
   It is deliberately loud. A store that will take real money must never let
   a placeholder pass for a fact. Grep the source for "tbc" to find them all. */
.tbc {
  display: inline-block; vertical-align: baseline;
  padding: 1px 6px 2px; border: 1px dashed var(--accent); border-radius: 2px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .11em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap;
  font-family: "IBM Plex Sans", sans-serif; font-style: normal;
}
.tbcnote {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r);
  background: var(--accent-soft); border: 1px solid var(--accent-soft);
  font-size: 13.5px; line-height: 1.5; color: var(--fg-mute);
}
.tbcnote b { color: var(--fg); font-weight: 600; }

/* ------------------------------------------------------------ buy block */
.buy {
  margin-top: 30px; background: var(--panel); border: 1px solid var(--line-hi);
  border-radius: var(--r); padding: 20px; box-shadow: var(--shadow);
}
.buy .price {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.buy .price .v {
  font-size: 30px; font-weight: 600; letter-spacing: var(--tight);
  font-variant-numeric: tabular-nums;
}
.buy .price .cur { font-size: 14px; color: var(--fg-dim); font-weight: 500; }
.buy .price .of { font-size: 13.5px; color: var(--fg-mute); }

.fld { margin-top: 16px; }
.fld > label, .fld > .lg {
  display: block; margin-bottom: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-mute);
}
.fld .hint { margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--fg-dim); }
select, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line-hi);
  border-radius: var(--r); background: var(--ground); color: var(--fg);
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 17px center, right 12px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--fg-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label {
  position: relative; display: inline-flex; align-items: center;
  padding: 9px 14px; border: 1.5px solid var(--line-hi); border-radius: var(--r);
  font-size: 14px; cursor: pointer; background: var(--ground);
}
.chips input { position: absolute; opacity: 0; width: 0; height: 0; }
/* .on is set by store.js. :has() does the same job on its own, but a chip that
   gives no feedback when you tap it is a broken form, so this does not rely on
   one selector being supported. */
.chips label.on,
.chips label:has(input:checked) {
  border-color: var(--accent-fill); background: var(--accent-soft); font-weight: 600;
}
.chips label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.buy .btn { margin-top: 20px; }
.buy .after { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--fg-dim); }

/* -------------------------------------------------------------- cart */
.line {
  display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line);
}
.line:first-child { border-top: 1px solid var(--line); }
.line .m { flex: 1 1 auto; min-width: 0; }
.line .m .nm { font-size: 17px; font-weight: 600; letter-spacing: var(--tight); text-transform: lowercase; }
.line .m .op { margin-top: 5px; font-size: 13px; line-height: 1.5; color: var(--fg-mute); }
.line .m .rm {
  margin-top: 8px; padding: 0; font-size: 12.5px; color: var(--fg-dim);
  text-decoration: underline; text-underline-offset: 3px;
}
.line .m .rm:hover { color: var(--accent); }
.line .r { flex: 0 0 auto; text-align: right; }
.line .r .v { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border: 1px solid var(--line-hi); border-radius: var(--r); }
.qty button { width: 32px; height: 30px; text-align: center; font-size: 16px; color: var(--fg-mute); }
.qty button:hover { color: var(--accent); }
.qty .q { min-width: 26px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }

.tot { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 4px; }
.tot .l { font-size: 15px; color: var(--fg-mute); }
.tot .v { font-size: 26px; font-weight: 600; letter-spacing: var(--tight); font-variant-numeric: tabular-nums; }
.tot.sub .v { font-size: 17px; font-weight: 500; }

.pay { margin-top: 26px; }
.pay .or {
  display: flex; align-items: center; gap: 12px; margin: 22px 0;
  font-size: 11px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; color: var(--fg-dim);
}
.pay .or::before, .pay .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.empty { padding: 46px 0; text-align: center; }
.empty .mk { width: 34px; margin: 0 auto 16px; opacity: .55; }
.empty p { color: var(--fg-mute); }

/* -------------------------------------------------------------- forms */
.form { margin-top: 8px; }
.form .grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .form .grid2 { grid-template-columns: 1fr 1fr; } }
.req { color: var(--accent); }
.errmsg {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r);
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 13.5px; line-height: 1.5;
}
.okmsg {
  padding: 22px; border-radius: var(--r); background: var(--panel);
  border: 1px solid var(--line-hi); border-left: 3px solid var(--accent-fill);
}
.okmsg h3 { margin-bottom: 9px; }
.okmsg p { font-size: 14.5px; line-height: 1.6; color: var(--fg-mute); }
.okmsg .ref {
  display: inline-block; margin-top: 4px; padding: 7px 12px; border-radius: var(--r);
  background: var(--panel-2); font-size: 15px; font-weight: 600;
  letter-spacing: .06em; font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- disclosure */
details.dis { border-top: 1px solid var(--line); }
details.dis:last-of-type { border-bottom: 1px solid var(--line); }
details.dis > summary {
  list-style: none; cursor: pointer; padding: 15px 0; padding-right: 26px;
  position: relative; font-size: 16px; font-weight: 600; letter-spacing: -.015em;
}
details.dis > summary::-webkit-details-marker { display: none; }
details.dis > summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 19px; font-weight: 400; color: var(--accent);
}
details.dis[open] > summary::after { content: "\2212"; }
details.dis .bd { padding: 0 0 17px; font-size: 14.5px; line-height: 1.6; color: var(--fg-mute); }
details.dis .bd b { color: var(--fg); font-weight: 600; }

/* -------------------------------------------------------------- footer */
.ft { border-top: 1px solid var(--line); padding: 44px 0 56px; margin-top: 8px; }
.ft .mk { width: 42px; margin-bottom: 20px; }
.ft .cols { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .ft .cols { grid-template-columns: 1fr 1fr; } }
.ft h4 {
  margin: 0 0 10px; font-size: 10.5px; font-weight: 600; letter-spacing: .17em;
  text-transform: uppercase; color: var(--fg-dim);
}
.ft ul { list-style: none; margin: 0; padding: 0; }
.ft li { margin-bottom: 7px; }
.ft a { font-size: 14.5px; color: var(--fg-mute); text-decoration: none; }
.ft a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ft .fine {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.6; color: var(--fg-dim);
}
.ft .fine p { margin-bottom: .7em; }

/* -------------------------------------------------------- the story rule
   A single oxblood rule. The brief lists "rules" as one of oxblood's roles. */
.rule { height: 2px; width: 46px; background: var(--accent-fill); border: 0; margin: 0 0 22px; }

/* ------------------------------------------------------------- photo slot
   There is no product photography yet. Rather than a stock image or a fake
   render, every photo slot states plainly what belongs there. */
.shot {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r);
  background: var(--panel-2); border: 1px dashed var(--line-hi);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 22px; text-align: center;
}
.shot .mk { width: 26px; opacity: .45; }
.shot .cp { font-size: 12.5px; line-height: 1.5; color: var(--fg-dim); max-width: 30ch; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }
