/* ==========================================================================
   Competition Gear – styles
   Mobile-first. Light, typographic, hairline structure.
   No gradients, no heavy shadows, no pill-shaped cards.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #0f0f0e;
  --ink-2: #3a3a37;
  --muted: #6e6e68;
  --line: #e3e2dc;
  --line-strong: #c9c8c0;
  --paper: #fafaf7;
  --surface: #ffffff;
  --stage: #efeee9;          /* 3D viewer background */
  --accent: #ff5a1f;         /* Signal orange */
  --accent-ink: #ffffff;
  --ok: #1f7a4d;
  --err: #c21d1d;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 2px;
  --gutter: 16px;
  --maxw: 1240px;
  --header-h: 60px;
  --section-y: 72px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --section-y: 104px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* honeypot */
.muted { color: var(--muted); }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px;
}
.skip-link:focus { top: 8px; }

/* ---------- 3. Typography helpers ---------- */
.eyebrow {
  font: 600 12px/1 var(--font-body);
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.section-title {
  font-weight: 800; font-stretch: 112%;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -.02em; text-transform: uppercase;
}
.section-sub { color: var(--ink-2); max-width: 46ch; margin-top: 12px; }
.mini-title { font: 700 13px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; margin: 24px 0 12px; }
.tag {
  display: inline-block; font: 700 11px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 6px; background: var(--ink); color: var(--paper); border-radius: var(--radius);
}
.hint, .microcopy { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink);
  font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:not(:disabled):hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost:not(:disabled):hover { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-ghost-inv { border-color: var(--paper); color: var(--paper); }
.btn-ghost-inv:hover { background: var(--paper); color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.link-btn {
  background: none; border: 0; padding: 0; margin-top: 12px; cursor: pointer;
  font-size: 14px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2);
}
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; background: none; cursor: pointer; border-radius: var(--radius); font-size: 16px;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--stage); }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 26px; height: 26px; color: var(--ink); }
.brand-mark .slash { fill: var(--accent); }
.brand-name { font: 700 15px/1 var(--font-display); font-stretch: 118%; text-transform: uppercase; letter-spacing: .01em; }
.brand-name b { font-weight: 900; margin-left: 3px; }
.brand { min-width: 0; }
@media (max-width: 420px) {
  .brand-name { font-size: 12px; font-stretch: 100%; }
  .brand-mark { width: 22px; height: 22px; }
  .header-row { gap: 6px; }
}

.main-nav { display: none; gap: 28px; }
.main-nav a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-2); }
.main-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }
@media (min-width: 900px) { .main-nav { display: flex; margin-right: 24px; } }

.header-actions { display: flex; align-items: center; gap: 4px; }
.lang-toggle {
  display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 2px; background: none; cursor: pointer; font: 600 12px/1 var(--font-body);
}
.lang-toggle span { padding: 6px 7px; color: var(--muted); }
.lang-toggle span.is-active { background: var(--ink); color: var(--paper); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: none; cursor: pointer;
  font: 600 14px/1 var(--font-body);
}
.cart-btn svg { width: 18px; height: 18px; }
.cart-label { display: none; }
@media (min-width: 600px) { .cart-label { display: inline; } }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center;
  background: var(--ink); color: var(--paper); font-size: 12px; border-radius: var(--radius);
}
.cart-count.has-items { background: var(--accent); }

/* ---------- 6. Hero ---------- */
.hero { padding-top: 48px; }
.hero-grid { display: grid; gap: 24px; }
.hero-title {
  font-weight: 850; font-stretch: 100%;
  font-size: clamp(2.75rem, 11vw, 6.6rem);
  line-height: .9; letter-spacing: -.035em; text-transform: uppercase;
}
.hero-title em { font-style: italic; color: var(--accent); }
.lead { font-size: 18px; color: var(--ink-2); max-width: 40ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 32px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 12px 0 0; }
.facts dt { font: 800 22px/1 var(--font-display); font-stretch: 110%; }
.facts dd { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

@media (min-width: 1024px) {
  .hero { padding-top: 72px; }
  .hero-grid { grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; }
  .hero-grid .eyebrow { grid-column: 1 / -1; }
  .hero-title { grid-column: 1 / span 8; }
  .hero-side { grid-column: 9 / span 4; padding-bottom: 10px; }
}

.color-strip {
  display: grid; grid-template-columns: repeat(15, 1fr);
  height: 72px; margin-top: 56px;
}
.color-strip a { background: var(--c); transition: transform .2s; transform-origin: bottom; }
.color-strip a:hover, .color-strip a:focus-visible { transform: scaleY(1.35); }
.color-strip a.is-light { box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 720px) { .color-strip { height: 120px; } }
.strip-caption { font-size: 13px; color: var(--muted); padding-top: 12px; }

/* ---------- 7. Value props ---------- */
.values { padding-block: var(--section-y); }
.value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
.value-list li { border-top: 2px solid var(--ink); padding-top: 18px; }
.num { font: 700 13px/1 var(--font-body); color: var(--accent); letter-spacing: .06em; }
.value-list h3 { font-weight: 800; font-stretch: 110%; font-size: 26px; text-transform: uppercase; margin: 14px 0 10px; letter-spacing: -.01em; }
.value-list p { color: var(--ink-2); max-width: 34ch; }
@media (min-width: 720px) { .value-list { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* ---------- 8. Configurator ---------- */
.configure { padding-bottom: var(--section-y); border-top: 1px solid var(--line); padding-top: 56px; }
.section-head { margin-bottom: 28px; }
.cfg-grid { display: grid; gap: 0; align-items: start; }

/* Viewer is sticky on every size, so the garment stays visible while options scroll. */
.viewer-col {
  position: sticky; top: var(--header-h); z-index: 5;
  background: var(--paper); padding-bottom: 8px;
  margin-inline: calc(var(--gutter) * -1);
}
.viewer {
  position: relative; height: 44svh; min-height: 280px; max-height: 460px;
  background: var(--stage); overflow: hidden; touch-action: none;
}
.viewer canvas { width: 100%; height: 100%; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }
.view-buttons { display: flex; padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
.view-buttons button {
  flex: 1; height: 40px; border: 0; background: none; cursor: pointer;
  font: 500 13px/1 var(--font-body); color: var(--muted); border-bottom: 2px solid transparent;
}
.view-buttons button:hover, .view-buttons button.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* "+" markers projected from 3D zone anchors */
.zone-markers { position: absolute; inset: 0; pointer-events: none; }
.zone-marker {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 50%; background: var(--surface); color: var(--ink);
  font: 600 18px/1 var(--font-body); cursor: pointer; transition: opacity .2s;
}
.zone-marker.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, .35); }
/* Filled placement: invisible tap target over the print, so the print itself stays clean. */
.zone-marker.is-filled { width: 56px; height: 56px; border: 0; background: transparent; font-size: 0; box-shadow: none; }
.zone-marker.is-hidden { opacity: 0; pointer-events: none; }

.cfg-panel { padding-top: 8px; }
.step { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 22px 0 26px; min-width: 0; }
.step:first-child { border-top: 0; }
.step legend {
  display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 0; margin-bottom: 14px; float: left;
  font: 800 18px/1 var(--font-display); font-stretch: 110%; text-transform: uppercase;
}
.step legend + * { clear: both; }
.step-n { font: 700 12px/1 var(--font-body); color: var(--accent); }
.legend-value { margin-left: auto; font: 500 13px/1 var(--font-body); text-transform: none; color: var(--muted); }
#prints-step { scroll-margin-top: calc(var(--header-h) + 44svh + 56px); }
@media (min-width: 1024px) { #prints-step { scroll-margin-top: calc(var(--header-h) + 16px); } }

/* Segmented radio controls */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1.5px solid var(--ink); border-radius: var(--radius); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center; min-height: 44px; padding: 0 8px; text-align: center;
  font: 500 14px/1.2 var(--font-body); cursor: pointer; transition: background-color .15s;
}
.seg label + label span { border-left: 1px solid var(--line-strong); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -4px; }
.garment-seg, .fit-seg, .style-seg { margin-top: 10px; }
.mini-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 16px 0 8px; }
.style-seg { border-width: 1px; }
.style-seg span { min-height: 38px; font-size: 13px; }
.garment-seg span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; }
.garment-seg b { font: 700 15px/1 var(--font-display); font-stretch: 110%; text-transform: uppercase; }
.seg-dot {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  background: var(--c, #141414); box-shadow: 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 2px rgba(255, 255, 255, .7);
}
.garment-seg + .hint { margin-top: 8px; }

/* Colour swatches */
.swatch-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.swatch-label + .swatches + .swatch-label { margin-top: 18px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px; }
.swatch {
  aspect-ratio: 1; border: 0; border-radius: var(--radius); cursor: pointer;
  background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Print placements */
.zones { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.zone-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.zone-row:first-child { border-top: 0; }
.zone-row.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.zone-select {
  flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 0; background: none; text-align: left; cursor: pointer; min-width: 0;
}
.zone-thumb {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--c, var(--stage));
  color: var(--muted); font-size: 18px;
}
.zone-thumb img { width: 80%; height: 80%; object-fit: contain; }
.zone-thumb.is-filled { border-style: solid; }
.zone-text { min-width: 0; }
.zone-name { display: block; font-weight: 600; font-size: 14px; }
.zone-status { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-remove { flex: none; margin-right: 6px; }

.zone-editor { margin-top: 14px; }
.zone-editor-title { font-size: 14px; margin-bottom: 10px; color: var(--ink-2); }
.zone-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.text-print { margin-top: 14px; padding: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 12px; }
.text-print .btn { justify-self: start; }
.name-number { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.name-number [data-nn-fields] { display: grid; gap: 12px; margin-top: 12px; }

/* Sizes */
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 560px) { .sizes { grid-template-columns: repeat(6, 1fr); } }
.size-cell { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); text-align: center; }
.size-cell.has-qty { border-color: var(--ink); }
.size-cell label { display: block; font: 700 13px/1 var(--font-body); padding-top: 10px; }
.size-cell input {
  width: 100%; border: 0; background: none; text-align: center; padding: 6px 0;
  font: 600 18px/1 var(--font-body); -moz-appearance: textfield;
}
.size-cell input::-webkit-inner-spin-button, .size-cell input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.size-step { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.size-step button { height: 32px; border: 0; background: none; cursor: pointer; font-size: 16px; }
.size-step button + button { border-left: 1px solid var(--line); }
.size-step button:hover { background: var(--stage); }
.tier-hint { margin-top: 12px; font-size: 14px; }
.tier-hint strong { color: var(--accent); }

/* Buy box + price lines (shared by cart & checkout) */
.buy-box { border-top: 2px solid var(--ink); padding-top: 18px; }
.price-lines { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 0 0 16px; font-size: 14px; }
.price-lines dt { color: var(--ink-2); }
.price-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.price-lines .is-discount { color: var(--ok); }
.price-lines .is-total { font: 800 22px/1.1 var(--font-display); font-stretch: 105%; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--line); }
.price-lines .is-small { font-size: 12px; color: var(--muted); }

@media (min-width: 1024px) {
  .cfg-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
  .viewer-col { top: calc(var(--header-h) + 16px); margin-inline: 0; padding-bottom: 0; }
  .viewer { height: calc(100vh - var(--header-h) - 96px); max-height: 760px; min-height: 480px; }
  .view-buttons { padding-inline: 0; }
  .cfg-panel { padding-top: 0; }
}

/* ---------- 9. Form fields ---------- */
.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.field > span:first-child { font-weight: 500; }
.field input, .field select, .field textarea, .inline-form input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
  font-size: 16px; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus, .inline-form input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row .field-s { max-width: 110px; }
.field-row:has(.field-s) { grid-template-columns: 1fr auto; }
.field-grid { display: grid; gap: 14px; }
@media (min-width: 600px) { .field-grid { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; margin-top: 12px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form-msg { font-size: 14px; margin-top: 8px; min-height: 1em; }
.form-msg.is-ok { color: var(--ok); }
.form-error, .form-msg.is-error { color: var(--err); }

/* Radio option list (delivery / payment) */
.options { display: grid; gap: 8px; }
.option {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
}
.option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.option input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.option-title { font-weight: 600; font-size: 14px; }
.option-sub { display: block; font-size: 12px; color: var(--muted); }
.option-price { font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- 10. Pricing & process ---------- */
.pricing { padding-block: var(--section-y); background: var(--surface); border-block: 1px solid var(--line); }
.pricing-grid { display: grid; gap: 32px; }
.pricing-grid .btn { margin-top: 24px; }
.tiers { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tiers th { text-align: left; font: 600 12px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 0 12px; border-bottom: 2px solid var(--ink); }
.tiers td { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.tiers td:nth-child(2) { font: 800 20px/1 var(--font-display); color: var(--accent); }
.tiers th:last-child, .tiers td:last-child { text-align: right; }
@media (min-width: 900px) { .pricing-grid { grid-template-columns: 5fr 7fr; gap: 64px; } }

.process { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 20px; }
.process li { border-left: 1px solid var(--line-strong); padding-left: 14px; }
.process h3 { font-size: 18px; font-weight: 800; text-transform: uppercase; margin: 10px 0 6px; }
.process p { font-size: 14px; color: var(--ink-2); }
@media (min-width: 900px) { .process { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 11. FAQ ---------- */
.faq { padding-block: var(--section-y); }
.faq-grid { display: grid; gap: 28px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 18px 32px 18px 0; position: relative;
  font-weight: 600; font-size: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 400; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { padding: 0 0 20px; color: var(--ink-2); max-width: 60ch; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: 5fr 7fr; gap: 64px; } }

/* ---------- 13. Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: var(--section-y); }
.footer-cta { display: grid; gap: 28px; padding-bottom: 64px; border-bottom: 1px solid #2c2c2a; }
.footer-title {
  font-weight: 850; font-stretch: 112%; text-transform: uppercase;
  font-size: clamp(2.6rem, 10vw, 7rem); line-height: .9; letter-spacing: -.03em;
}
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; align-self: end; }
@media (min-width: 900px) { .footer-cta { grid-template-columns: 1fr auto; } }

.footer-grid { display: grid; gap: 32px; padding-block: 48px; }
.footer-grid nav { display: grid; gap: 10px; align-content: start; }
.footer-grid a, .link-inv { color: #cfcfc8; text-decoration: none; font-size: 14px; }
.link-inv { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.footer-grid a:hover, .link-inv:hover { color: var(--paper); text-decoration: underline; }
.footer-label { font: 600 12px/1.4 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #8d8d86; margin-bottom: 4px; }
.newsletter .footer-label { display: block; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--paper); margin-bottom: 12px; }
.newsletter input { background: transparent; border-color: #4a4a46; color: var(--paper); }
.newsletter input:focus { border-color: var(--paper); box-shadow: 0 0 0 1px var(--paper); }
.site-footer .form-msg.is-ok { color: #8ee0b5; }
.site-footer .form-msg.is-error { color: #ff9b8a; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 20px 28px; border-top: 1px solid #2c2c2a; font-size: 12px; color: #8d8d86; }

/* ---------- 14. Dialogs ---------- */
dialog {
  border: 0; padding: 0; color: var(--ink); background: var(--paper);
  max-width: 100vw; max-height: 100dvh;
}
dialog::backdrop { background: rgba(15, 15, 14, .5); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line);
}
.dialog-head h2 { font-weight: 800; font-stretch: 110%; font-size: 20px; text-transform: uppercase; }

/* Right-hand drawer */
.drawer[open] {
  display: flex; flex-direction: column;
  margin: 0 0 0 auto; width: min(440px, 100vw); height: 100dvh;
  border-left: 1px solid var(--line);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 8px var(--gutter); }
.drawer-foot { padding: 16px var(--gutter) 20px; border-top: 1px solid var(--line); background: var(--surface); }
.cart-empty { padding: 48px 0; text-align: center; color: var(--muted); display: grid; gap: 16px; justify-items: center; }
.cart-item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 76px; height: 76px; object-fit: cover; background: var(--stage); }
.cart-item h3 { font: 600 15px/1.3 var(--font-body); }
.cart-meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; }
.cart-actions { display: flex; gap: 14px; }
.cart-actions button { background: none; border: 0; padding: 0; font-size: 13px; text-decoration: underline; cursor: pointer; color: var(--ink-2); }

/* Full sheet (checkout, AI) – full-screen on mobile, centred panel on desktop */
.sheet[open] { width: 100vw; height: 100dvh; overflow-y: auto; }
@media (min-width: 900px) {
  .sheet[open] { width: min(1080px, calc(100vw - 64px)); height: auto; max-height: calc(100dvh - 64px); margin: auto; border: 1px solid var(--line); }
  .sheet-narrow[open] { width: min(760px, calc(100vw - 64px)); }
}

/* Small modal */
.modal[open] { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; margin: auto; border: 1px solid var(--line); }
.modal-body { padding: 20px var(--gutter) 24px; display: grid; gap: 16px; }
.modal-body > .btn { justify-self: start; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ticks li::before { content: "→ "; color: var(--accent); font-weight: 700; }

/* Checkout layout */
.checkout { display: grid; }
.co-main { padding: 8px var(--gutter) 24px; }
.co-main fieldset { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 22px 0; min-width: 0; display: grid; gap: 14px; }
.co-main legend { font: 800 16px/1 var(--font-display); font-stretch: 108%; text-transform: uppercase; padding: 0; margin-bottom: 14px; }
.co-summary { padding: 22px var(--gutter) 28px; background: var(--surface); border-top: 1px solid var(--line); }
.co-summary h3 { font: 800 16px/1 var(--font-display); text-transform: uppercase; margin-bottom: 12px; }
.co-items { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; }
.co-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.discount { margin-bottom: 16px; }
.field-date { max-width: 260px; }
.co-done { padding: 48px var(--gutter); display: grid; gap: 16px; justify-items: start; max-width: 620px; }
.co-done h3 { font-weight: 800; font-stretch: 110%; font-size: clamp(1.6rem, 5vw, 2.4rem); text-transform: uppercase; }
@media (min-width: 900px) {
  .checkout { grid-template-columns: 7fr 5fr; }
  .co-summary { border-top: 0; border-left: 1px solid var(--line); position: sticky; top: 61px; align-self: start; }
}

/* AI studio */
.ai-body { padding: 16px var(--gutter) 28px; }
.ai-form { margin-top: 18px; }
.ai-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }
.ai-quota { font-size: 13px; color: var(--muted); }
.ai-results { border-top: 1px solid var(--line); margin-top: 24px; }
.ai-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-logo { margin: 0; border: 1px solid var(--line); background: var(--surface); display: grid; }
.ai-logo-preview { display: grid; grid-template-columns: 1fr 1fr; }
.ai-logo-preview div { aspect-ratio: 1; display: grid; place-items: center; padding: 12px; }
.ai-logo-preview div:last-child { background: var(--ink); }
.ai-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.ai-logo figcaption { padding: 10px; font-size: 13px; display: grid; gap: 8px; }
.ai-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-chips button {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius);
  padding: 9px 12px; font-size: 14px; cursor: pointer; text-align: left;
}
.ai-chips button:hover { border-color: var(--ink); }
.is-loading { position: relative; color: transparent !important; }
.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--paper);
  border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Size guide table */
.size-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.size-table th, .size-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.size-table th:first-child, .size-table td:first-child { text-align: left; }
.size-table caption { text-align: left; font-weight: 600; padding-bottom: 8px; }
.size-group { display: grid; gap: 18px; }
.size-group + .size-group { border-top: 2px solid var(--ink); padding-top: 18px; }
.size-group h3 { font: 800 16px/1 var(--font-display); font-stretch: 108%; text-transform: uppercase; }

/* ---------- 15. Toast ---------- */
.toast {
  position: fixed; inset: auto auto 20px 50%; margin: 0; border: 0; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 12px 16px; background: var(--ink); color: var(--paper); border-radius: var(--radius); font-size: 14px;
}
.toast:not(:popover-open) { display: none; }
.toast button { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
