/* GPU4U — the simple shop.
   Pressroom's palette (cream paper, ink, vermilion, forest) with the volume turned
   down: flat color, two typefaces, the two caps, one pop-up. */

@font-face { font-family: "Barlow Condensed"; src: url("./assets/fonts/barlow-condensed-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("./assets/fonts/dm-sans-variable.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }

:root {
  --paper: #f2ebd9;
  --paper-2: #e9e0ca;
  --ink: #17130f;
  --text: #3a342a;
  --muted: #6b6253;
  --red: #d8362b;        /* large type and shapes */
  --red-deep: #c22f25;   /* buttons and small text: passes AA on paper */
  --forest: #1f4a35;
  --line: rgba(23, 19, 15, .14);
  --on-ink: #b9ae9a;

  --display: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
  --sans: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --pad: clamp(20px, 4.6vw, 72px);

  /* kit skin */
  --sq-scrim: rgba(23, 19, 15, .58);
  --sq-panel-bg: var(--paper);
  --sq-panel-fg: var(--text);
  --sq-panel-border: 0;
  --sq-panel-radius: 12px;
  --sq-panel-shadow: 0 40px 80px -24px rgba(23, 19, 15, .55);
  --sq-panel-w: 520px;
  --sq-toast-bg: var(--ink);
  --sq-toast-fg: var(--paper);
  --sq-toast-border: 0;
  --sq-toast-radius: 6px;
  --sq-focus: var(--red-deep);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "kern" 1, "liga" 1; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, dl, dd, figure, fieldset { margin: 0; }
ul { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--red); color: var(--paper); }

.skip { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 12px 16px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; border-radius: 6px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border: 1.5px solid var(--ink); border-radius: 6px;
  font: 600 .9375rem/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .16s var(--ease), background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--red-deep); border-color: var(--red-deep); color: var(--paper); }
.btn-line { background: transparent; color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover { background: var(--ink); border-color: var(--ink); }
  .btn-line:hover { background: var(--ink); color: var(--paper); }
}

/* ------------------------------------------------------- strip and header */
.strip { padding: 9px var(--pad); background: var(--ink); color: var(--paper); text-align: center; font-size: .875rem; }
.strip button { padding: 0; border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 24px; }
.strip[hidden] { display: none; }

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px; height: 68px; padding-inline: var(--pad);
  background: var(--paper); border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
html.is-scrolled .top { border-bottom-color: var(--line); }
.logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.logo svg { width: 104px; height: auto; fill: currentColor; }
.top-nav { display: flex; gap: 4px; margin-left: auto; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-weight: 500; font-size: .9375rem; text-decoration: none; color: var(--text); border-radius: 6px; transition: color .15s ease; }
@media (hover: hover) and (pointer: fine) { .top-nav a:hover { color: var(--red-deep); } }
.top .btn { min-height: 42px; padding: 0 18px; }

/* -------------------------------------------------------------------- hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(24px, 4vw, 64px);
  padding: clamp(36px, 6vw, 88px) var(--pad) clamp(56px, 8vw, 120px);
  max-width: 1480px; margin-inline: auto;
}
.kicker { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero h1 {
  margin-top: 14px;
  font-size: clamp(3.75rem, 2rem + 8.4vw, 9.5rem); line-height: .86; letter-spacing: -.005em; text-transform: uppercase;
}
.hero h1::first-line { color: var(--ink); }
.hero h1 { color: var(--red); }
.lede { margin-top: clamp(18px, 2.2vw, 28px); max-width: 36ch; font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(22px, 2.6vw, 34px); }

.hero-art { position: relative; aspect-ratio: 1 / .9; width: 100%; max-width: 640px; justify-self: center; }
.hero { overflow-x: clip; }
.dot { position: absolute; right: 3%; top: 3%; width: 78%; aspect-ratio: 1; border-radius: 50%; background: var(--forest); }
.hero-cap { position: absolute; height: auto; filter: drop-shadow(0 26px 22px rgba(23, 19, 15, .3)); -webkit-user-drag: none; user-select: none; }
.hero-red { width: 86%; right: -3%; top: 17%; transform: rotate(-5deg); }
.hero-green { width: 46%; left: -1%; bottom: 0; transform: rotate(7deg); z-index: 2; }

/* one quiet entrance, on load only */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .hero-copy > :nth-child(4) { animation-delay: .2s; }
  .dot { animation: pop .8s var(--ease) both; }
  .hero-red { animation: land-red .9s .08s var(--ease) both; }
  .hero-green { animation: land-green .9s .2s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translate3d(0, 16px, 0); } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
@keyframes land-red { from { opacity: 0; transform: translate3d(0, 26px, 0) rotate(-1deg); } }
@keyframes land-green { from { opacity: 0; transform: translate3d(0, 26px, 0) rotate(2deg); } }

/* -------------------------------------------------------------------- caps */
.caps, .worn, .next { max-width: 1480px; margin-inline: auto; padding: 0 var(--pad) clamp(64px, 9vw, 128px); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; padding-bottom: 16px; margin-bottom: clamp(20px, 3vw, 36px); border-bottom: 1.5px solid var(--ink); }
.sec-head h2 { font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); line-height: .95; text-transform: uppercase; }
.sec-head p { color: var(--muted); }
[id] { scroll-margin-top: 84px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3.2vw, 48px); }
.shot { position: relative; aspect-ratio: 5 / 4; border-radius: 12px; overflow: hidden; background: var(--paper-2); }
.card[data-cap="red"] .shot { background: #ecdccb; }
.card[data-cap="green"] .shot { background: #e2dfc8; }
.chip { position: absolute; left: 14px; top: 14px; z-index: 2; padding: 7px 10px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.chip[hidden] { display: none; }
.shot-img {
  position: absolute; left: 8%; top: 9%; width: 84%; height: 82%; object-fit: contain;
  opacity: 0; transition: opacity .25s ease, transform .6s var(--ease);
  filter: drop-shadow(0 22px 18px rgba(23, 19, 15, .24));
}
.shot-img.is-on { opacity: 1; }
.shot-photo { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; filter: none; }
/* a portrait in a landscape panel: each photo says where its cap is with --pos */
.shot-worn, .thumbs img { object-position: var(--pos, 50% 50%); }
@media (hover: hover) and (pointer: fine) {
  .card:hover .shot-img.is-on:not(.shot-photo) { transform: translate3d(0, -6px, 0) rotate(-1.5deg) scale(1.02); }
}
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs button { width: 68px; height: 54px; padding: 4px; border: 1.5px solid transparent; border-radius: 6px; background: var(--paper-2); cursor: pointer; overflow: hidden; transition: border-color .15s ease, transform .16s var(--ease); }
.thumbs button:active { transform: scale(.96); }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.thumbs button[data-kind="photo"] { padding: 0; }
.thumbs button[data-kind="photo"] img { object-fit: cover; }

/* colour picker under the thumbnails */
.colours { margin-top: 14px; }
.colour-now { font-size: .875rem; color: var(--muted); }
.colour-now b { font-weight: 600; color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.swatch {
  width: 30px; height: 30px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(23, 19, 15, .2); background: var(--sw);
  transition: box-shadow .15s ease, transform .16s var(--ease);
}
.swatch.is-camo { background: radial-gradient(circle at 30% 35%, #9e7853 0 22%, transparent 23%), radial-gradient(circle at 70% 65%, #2a2a22 0 20%, transparent 21%), radial-gradient(circle at 72% 28%, #6b5a3e 0 15%, transparent 16%), #415446; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.swatch:active { transform: scale(.92); }
.swatch:focus-visible { outline: 2px solid var(--sq-focus); outline-offset: 4px; }
@media (pointer: coarse) { .swatch { width: 36px; height: 36px; } }
.qty.colour-select { width: 100%; max-width: 420px; }

.info { padding-top: 18px; }
.info h3 { font-size: clamp(1.875rem, 1.3rem + 1.9vw, 2.875rem); line-height: .95; letter-spacing: .005em; }
.sub { margin-top: 8px; color: var(--muted); }
.price { margin-top: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.price.is-set { font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.actions .btn { min-width: 180px; }
.more { margin-top: 14px; font-size: .9375rem; }
.more summary { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; list-style: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: "+"; margin-left: 8px; font-weight: 500; text-decoration: none; display: inline-block; }
.more[open] summary::after { content: "–"; }
.more ul { margin-top: 8px; display: grid; gap: 6px; max-width: 46ch; }
.more li { position: relative; padding-left: 16px; }
.more li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* ---------------------------------------------------------------- on heads */
.tryon { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(20px, 3.2vw, 48px); align-items: start; }
.tryon-main { display: grid; gap: 10px; }
.tryon-stage { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--paper-2); cursor: pointer; }
/* photos are stacked; the one for the current photo and cap is faded in */
.tryon img[data-hat] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; opacity: 0; transition: opacity .3s ease; }
.tryon img[data-hat].is-on { opacity: 1; }
.tryon-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.tryon-count { margin-right: auto; padding: 8px 10px; border-radius: 6px; background: rgba(23, 19, 15, .72); color: var(--paper); font-size: .8125rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.tryon-arrow {
  pointer-events: auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 6px; background: var(--paper); color: var(--ink); cursor: pointer;
  transition: transform .16s var(--ease), background-color .15s ease, color .15s ease;
}
.tryon-arrow:active { transform: scale(.95); }
.tryon-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tryon-thumbs button {
  position: relative; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden;
  background: var(--paper-2); cursor: pointer; opacity: .62;
  transition: opacity .15s ease, transform .16s var(--ease);
}
.tryon-thumbs button:active { transform: scale(.97); }
.tryon-thumbs button[aria-pressed="true"] { opacity: 1; outline: 2px solid var(--ink); outline-offset: 2px; }
.shot { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .tryon-arrow:hover { background: var(--ink); color: var(--paper); }
  .tryon-thumbs button:hover { opacity: 1; }
}
.tryon-pick { display: flex; gap: 10px; margin-top: 12px; }
.tryon-pick button {
  display: grid; justify-items: center; gap: 2px; width: 112px; padding: 8px 8px 10px;
  border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper-2); cursor: pointer;
  font-size: .875rem; font-weight: 600; color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease, transform .16s var(--ease);
}
.tryon-pick button:active { transform: scale(.97); }
.tryon-pick button[aria-pressed="true"] { border-color: var(--ink); background: var(--paper); }
.tryon-pick img { width: 100%; aspect-ratio: 800 / 641; object-fit: contain; }
.tryon-name { margin-top: 22px; font-family: var(--display); font-weight: 800; font-size: clamp(1.875rem, 1.3rem + 1.9vw, 2.875rem); line-height: .95; color: var(--ink); }
.tryon-note { margin-top: 8px; color: var(--muted); }
.tryon-side .btn { margin-top: 16px; min-width: 180px; }
.worn-note { margin-top: 18px; max-width: 44ch; font-size: .8125rem; color: var(--muted); }

/* --------------------------------------------------------- drawing board */
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px) clamp(14px, 2vw, 28px); }
.next-grid figure { display: grid; gap: 12px; }
.next-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: var(--paper-2); }
.next-grid figcaption { display: grid; gap: 3px; }
.next-grid figcaption b { font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: .01em; color: var(--ink); }
.next-grid figcaption span { font-size: .9375rem; color: var(--muted); }
.idea-btn { margin-top: 12px; }
.pick.pick-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick-2 img { max-width: 150px; aspect-ratio: 3 / 2; }
.fits label > span { align-content: center; padding: 12px 6px; text-align: center; }
.pick small { font-size: .75rem; line-height: 1.3; color: var(--muted); }
.pair { display: flex; gap: 16px; }
.next-say { display: grid; align-content: center; aspect-ratio: 3 / 2; padding: clamp(18px, 2.4vw, 34px); border-radius: 12px; background: var(--ink); color: #d8cfbd; }
.next-say b { display: block; margin-bottom: 10px; font-family: var(--display); font-weight: 800; font-size: clamp(1.625rem, 1rem + 1.7vw, 2.5rem); line-height: .95; text-transform: uppercase; color: var(--paper); }

/* ------------------------------------------------------------------- about */
.about { background: var(--ink); color: var(--on-ink); }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 96px); padding: clamp(56px, 8vw, 112px) max(var(--pad), calc((100vw - 1480px) / 2 + var(--pad))); }
/* the full logo keeps its own cream ground, so it sits on the dark section like a label */
.about-logo { width: min(280px, 68%); height: auto; margin-bottom: clamp(24px, 3vw, 36px); border-radius: 12px; }
.about h2 { color: var(--paper); font-size: clamp(2.25rem, 1.4rem + 3vw, 4rem); line-height: .95; text-transform: uppercase; }
.about-copy p { margin-top: 18px; max-width: 46ch; color: #d8cfbd; }
.about-copy .btn { margin-top: 26px; }
.about .btn-solid { background: var(--red-deep); border-color: var(--red-deep); }
@media (hover: hover) and (pointer: fine) { .about .btn-solid:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); } }
.facts div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid rgba(242, 235, 217, .18); }
.facts div:last-child { border-bottom: 1px solid rgba(242, 235, 217, .18); }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--on-ink); padding-top: 4px; }
.facts dd { color: var(--paper); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding: 22px max(var(--pad), calc((100vw - 1480px) / 2 + var(--pad))) 28px; background: var(--ink); color: var(--on-ink); font-size: .875rem; border-top: 1px solid rgba(242, 235, 217, .12); }

/* ------------------------------------------------------------------ pop-up */
.note { padding: clamp(24px, 5vw, 40px); }
.note h2 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.25rem); line-height: .95; text-transform: uppercase; padding-right: 36px; }
.note-lede { margin-top: 12px; }
.pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; }
.pick legend, .field-label { padding: 0; margin-bottom: 8px; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field-label { display: block; margin-top: 20px; }
.pick label { position: relative; cursor: pointer; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pick label > span { display: grid; justify-items: center; gap: 2px; height: 100%; padding: 10px 6px 12px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper-2); transition: border-color .15s ease, background-color .15s ease, transform .16s var(--ease); }
.pick img { width: 100%; max-width: 96px; aspect-ratio: 800 / 641; object-fit: contain; }
.pick .both { position: relative; display: block; width: 100%; max-width: 96px; aspect-ratio: 800 / 641; }
.pick .both img { position: absolute; width: 72%; max-width: none; }
.pick .both img:first-child { left: 0; top: 0; }
.pick .both img:last-child { right: 0; bottom: 0; }
.pick b { font-size: .875rem; font-weight: 600; color: var(--ink); }
.pick input:checked + span { border-color: var(--ink); background: var(--paper); }
.pick input:focus-visible + span { outline: 2px solid var(--sq-focus); outline-offset: 2px; }
.pick label:active > span { transform: scale(.98); }
.note-price { margin-top: 10px; font-weight: 600; color: var(--ink); }
.qty { width: 96px; height: 50px; padding: 0 12px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fbf7ec; color: var(--ink); font: 400 1rem/1 var(--sans); cursor: pointer; }
.qty:focus { outline: 2px solid var(--sq-focus); outline-offset: 2px; }
.qty-hint { margin-top: 6px; font-size: .875rem; color: var(--muted); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.row input { min-width: 0; height: 50px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 6px; background: #fbf7ec; color: var(--ink); font: 400 1rem/1 var(--sans); }
.row input::placeholder { color: #8a8070; }
.row input:focus { outline: 2px solid var(--sq-focus); outline-offset: 2px; }
.row input[aria-invalid="true"] { border-color: var(--red-deep); }
.row .btn { min-height: 50px; }
.error { margin-top: 10px; font-size: .9375rem; font-weight: 500; color: var(--red-deep); }
.preview { margin: 18px 0 22px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 6px; font-size: .9375rem; color: var(--muted); }
.preview b { color: var(--ink); }
.sq-x { color: var(--ink); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { max-width: 520px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .tryon { grid-template-columns: minmax(0, 1fr); }
  .next-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .top-nav { display: none; }
  .top .btn { margin-left: auto; }
  .actions .btn { flex: 1 1 100%; }
  .hero-cta .btn { flex: 1 1 auto; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: 84px minmax(0, 1fr); }
  .next-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot-img, .tryon img[data-hat] { transition: opacity .2s ease; transform: none !important; }
}

/* the pop-up puts focus on its title, which needs no ring */
.note h2:focus { outline: 0; }

/* the hidden attribute must win over .btn's display */
[hidden] { display: none !important; }
