/* The Branded House v3 - base: reset, type, nav, buttons, footer, cart drawer, forms. Tokens in tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 var(--fs-body)/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, h4, figure, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); }
main:focus { outline: none; }
[hidden] { display: none !important; }
.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; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-s); text-decoration: none; }
.skip:focus { top: 12px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* type */
h1, h2, h3, .display {
  font-family: var(--font-display); font-weight: 800; font-stretch: 125%;
  letter-spacing: var(--track-display); line-height: .92; text-wrap: balance;
}
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); font-stretch: 132%; font-weight: 850; }
.t-xxl { font-size: var(--fs-xxl); line-height: .88; }
.t-xl { font-size: var(--fs-xl); }
.t-lg { font-size: var(--fs-lg); line-height: 1; }
.lede { font-size: var(--fs-md); line-height: 1.5; color: var(--fg); max-width: 46ch; text-wrap: pretty; }
.muted { color: var(--fg-muted); }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--fg-muted); }
.prose { max-width: var(--w-text); }
.prose p + p { margin-top: 1em; }
.prose h2 { font-size: var(--fs-lg); margin: 2em 0 .6em; }

/* layout */
.wrap { width: min(100% - 2 * var(--gutter), var(--w-wide)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.page-head { padding: calc(72px + max(8vh, 56px)) 0 max(6vh, 40px); }
.page-head h1 { font-size: var(--fs-xxl); }
.page-head .lede { margin-top: 20px; }

/* buttons */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: var(--h); padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--fg);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { border-color: var(--fg); }
.btn:active { transform: scale(.97); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ink { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn--ink:hover { background: var(--ink-700); }
.btn--glass { background: var(--glass); border-color: var(--glass-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 1rem; }
.btn--sm { --h: 38px; padding: 0 16px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn .i, .i { width: 1.15em; height: 1.15em; flex: none; }
.link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .45em; }
.link svg { width: 1.1em; height: 1.1em; transition: transform var(--dur) var(--ease); }
.link:hover svg { transform: translateX(4px); }
.link:hover { text-decoration: underline; }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40; height: 72px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 0 var(--gutter);
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav.is-scrolled { background: rgba(246, 246, 243, .86); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); }
.nav__brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__seal { width: 44px; height: 44px; color: var(--fg); --seal-bg: var(--paper-0); }
.nav__word { font-family: var(--font-display); font-weight: 800; font-stretch: 118%; font-size: 1.05rem; letter-spacing: -.01em; }
.nav__links { display: flex; justify-content: center; gap: 4px; }
.nav__links a { padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: var(--fs-sm); transition: background-color var(--dur-fast) var(--ease); }
.nav__links a:hover { background: rgba(22, 24, 27, .06); }
.nav__links a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.nav__end { display: flex; align-items: center; gap: 6px; }
.nav__icon { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--fg); text-decoration: none; transition: background-color var(--dur-fast) var(--ease); }
.nav__icon:hover { background: rgba(22, 24, 27, .06); }
.nav__icon svg { width: 22px; height: 22px; }
.nav__count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.nav__quote { margin-left: 8px; }
.nav__menu { display: none; }
.sheet { position: fixed; inset: 72px 0 0; z-index: 39; background: var(--bg); padding: 24px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between; }
.sheet nav { display: flex; flex-direction: column; }
.sheet nav a { font-family: var(--font-display); font-weight: 800; font-stretch: 125%; font-size: 2.4rem; letter-spacing: -.02em; line-height: 1.15; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 980px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
  .nav__menu { display: inline-grid; }
  .nav__quote { display: none; }
}
@media (max-width: 420px) { .nav__word { display: none; } }

/* footer */
.foot { margin-top: var(--section-y); padding-top: max(10vh, 72px); border-top: 1px solid var(--line); overflow: hidden; }
.foot__inner { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.4fr; gap: 40px; }
.foot__lead { display: flex; gap: 20px; align-items: flex-start; }
.foot__lead p { max-width: 34ch; color: var(--fg-muted); }
.foot__seal { width: 88px; height: 88px; flex: none; color: var(--fg); --seal-bg: var(--paper-0); }
.foot__col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot__col a { text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.foot__col a:hover { text-decoration: underline; }
.foot__h { font-weight: 700; margin-bottom: 4px; }
.foot__small { color: var(--fg-muted); font-size: var(--fs-sm); }
.foot__giant {
  margin: max(8vh, 56px) 0 0; padding: 0 calc(var(--gutter) * .5);
  font-family: var(--font-display); font-weight: 900; font-stretch: 150%;
  font-size: 5.85vw; letter-spacing: -.045em; line-height: .8; white-space: nowrap;
  color: var(--fg); text-align: center;
}
.foot__base { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0 28px; color: var(--fg-muted); font-size: var(--fs-xs); }
@media (max-width: 860px) {
  .foot__inner { grid-template-columns: 1fr 1fr; }
  .foot__lead { grid-column: 1 / -1; }
  .foot__giant { font-stretch: 112%; white-space: normal; text-align: left; font-size: 15vw; }
}

/* cart drawer (sits outside .nav so backdrop-filter never traps it) */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(22, 24, 27, .32); opacity: 0; transition: opacity var(--dur) var(--ease); }
.scrim.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(440px, 100%);
  display: grid; grid-template-rows: auto 1fr auto; background: var(--card);
  box-shadow: -30px 0 80px -30px rgba(22, 24, 27, .35);
  transform: translateX(104%); transition: transform 420ms var(--ease);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 14px 24px; border-bottom: 1px solid var(--line); }
.drawer__title { font-size: 1.6rem; }
.drawer__body { overflow-y: auto; padding: 8px 24px; overscroll-behavior: contain; }
.drawer__foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.drawer__row { display: flex; justify-content: space-between; font-size: 1.1rem; }
.drawer__note { color: var(--fg-muted); font-size: var(--fs-sm); }
.line-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-item__img { width: 72px; height: 72px; border-radius: 10px; background: var(--bg-sunk); object-fit: contain; mix-blend-mode: multiply; }
.line-item__name { font-weight: 600; }
.line-item__meta { color: var(--fg-muted); font-size: var(--fs-sm); }
.line-item__end { display: grid; justify-items: end; gap: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; height: 34px; }
.qty button { width: 32px; height: 32px; border: 0; background: none; font-size: 1.1rem; border-radius: 999px; }
.qty span { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 0; color: var(--fg-muted); }
.empty strong { display: block; color: var(--fg); font-size: 1.2rem; margin-bottom: 6px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: var(--fs-sm); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* forms */
.field { display: grid; gap: 6px; }
.field > span, .field legend { font-weight: 600; font-size: var(--fs-sm); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--card); transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px rgba(22, 24, 27, .12); }
.field__hint { color: var(--fg-muted); font-size: var(--fs-xs); }
.field__err { color: var(--bad); font-size: var(--fs-xs); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.pill-set { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-grid; place-items: center; min-width: 48px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-weight: 600; font-size: var(--fs-sm); transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.pill input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill input:focus-visible + span { box-shadow: var(--focus); }

/* stage dots (track + account) */
.dots { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.dots li { list-style: none; display: grid; gap: 8px; font-size: var(--fs-xs); color: var(--fg-muted); }
.dots li::before { content: ""; height: 6px; border-radius: 3px; background: var(--paper-200); transition: background-color 400ms var(--ease); }
.dots li.is-done::before { background: var(--fg); }
.dots li.is-now::before { background: var(--accent); }
.dots li.is-now { color: var(--fg); font-weight: 700; }
@media (max-width: 640px) { .dots li span { display: none; } .dots li.is-now span { display: inline; white-space: nowrap; } }

/* proof devices: crop marks + colour bar (only on things that are proofs) */
.crop { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.crop::before, .crop::after { content: ""; position: absolute; background: var(--fg); }
.crop::before { width: 22px; height: 1px; top: 0; }
.crop::after { width: 1px; height: 22px; left: 0; }
.crop--tl { top: -12px; left: -12px; transform: translate(-10px, -10px); }
.crop--tr { top: -12px; right: -12px; transform: translate(10px, -10px) scaleX(-1); }
.crop--bl { bottom: -12px; left: -12px; transform: translate(-10px, 10px) scaleY(-1); }
.crop--br { bottom: -12px; right: -12px; transform: translate(10px, 10px) scale(-1); }
.cbar { display: flex; height: 10px; width: 120px; border-radius: 2px; overflow: hidden; }
.cbar i { flex: 1; }
.cbar i:nth-child(1) { background: var(--proc-c); } .cbar i:nth-child(2) { background: var(--proc-m); }
.cbar i:nth-child(3) { background: var(--proc-y); } .cbar i:nth-child(4) { background: var(--proc-k); }
.cbar i:nth-child(5) { background: #6d6f72; } .cbar i:nth-child(6) { background: #b9bab7; }

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