/* Dirty Firemen. Two colours, one accent.
   Black and white are the brand. Nomex yellow is the wildland shirt. */
:root {
  --black: #000000;
  --white: #ffffff;
  --paper: #ede8dd;      /* the weathered table in the product photos */
  --paper-deep: #e1dacb;
  --ash: #9a978f;        /* secondary text on black */
  --soot: #4a4842;       /* secondary text on paper */
  --nomex: #f5c518;      /* wildland shirt yellow: price, tags, focus */
  --display: "Alfa Slab One", "Rockwell Extra Bold", Georgia, serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--nomex);
  outline-offset: 3px;
}
.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--nomex); color: var(--black); padding: 8px 12px; font-weight: 600;
}
.skip:focus { left: 8px; z-index: 10; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 3.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; max-width: var(--measure); }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  border-bottom: 2px solid var(--white);
}
.top .mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.top .mark img { width: 44px; height: 44px; }
.top .mark span { font-family: var(--display); font-size: 1.15rem; text-transform: uppercase; }
.top nav { display: flex; gap: clamp(14px, 2.5vw, 32px); font-weight: 600; font-size: 1rem; }
.top nav a { text-decoration: none; padding: 12px 0; border-bottom: 2px solid transparent; }
.top nav a[aria-current="page"], .top nav a:hover { border-bottom-color: var(--nomex); }
@media (max-width: 560px) {
  .top .mark span { display: none; }
  .top nav { gap: 14px; font-size: 0.95rem; }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: center;
  padding: clamp(32px, 6vw, 96px) var(--gutter);
  border-bottom: 2px solid var(--white);
}
.hero img { width: min(100%, 640px); margin: 0 auto; }
.hero h1 { margin-bottom: 0.4em; }
.hero p.lede { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ash); max-width: 38ch; }
.hero .tags { color: var(--ash); font-weight: 600; letter-spacing: 0.02em; margin-top: 1.5rem; }
.hero .tags span { display: block; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero p.lede { margin-inline: auto; }
}

/* Die-cut sticker tag: the one loud element on the page */
.sticker {
  display: inline-block;
  background: var(--nomex);
  color: var(--black);
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 6px 14px;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--black);
  transform: rotate(-3deg);
  text-decoration: none;
}
.sticker.quiet { background: var(--white); }

/* Shop */
.shop { background: var(--paper); color: var(--black); padding: clamp(32px, 6vw, 80px) var(--gutter); }
.shop header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(20px, 3vw, 40px); }
.shop header p { color: var(--soot); margin: 0; font-weight: 600; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.card { display: block; text-decoration: none; color: inherit; position: relative; }
.card .photo { aspect-ratio: 1; overflow: hidden; background: var(--paper-deep); border: 3px solid var(--black); }
.card .photo img { width: 100%; height: 100%; object-fit: cover; }
.card .sticker { position: absolute; top: 14px; left: -6px; }
.card h3 { margin-top: 14px; }
.card .price { font-weight: 600; font-size: 1.1rem; margin-top: 4px; }
.card:hover .photo, .card:focus-visible .photo { border-color: var(--soot); }

/* Product page */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gutter); padding: clamp(24px, 5vw, 72px) var(--gutter); }
.product .photo { border: 3px solid var(--white); position: relative; }
.product .photo .sticker { position: absolute; top: 18px; left: -8px; }
.product h1 { font-size: clamp(1.9rem, 4.2vw, 3.4rem); }
.product .price { font-family: var(--display); font-size: 1.6rem; color: var(--nomex); margin: 0.5em 0 1em; }
.product .desc p { white-space: pre-line; }
.product .buy { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.product .buy small { color: var(--ash); }
.product .contents { color: var(--ash); }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; } }

.btn {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.05rem;
  padding: 14px 26px;
  background: var(--white);
  color: var(--black);
  border: 3px solid var(--white);
  text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--white); }
.btn[aria-disabled="true"] { background: var(--soot); border-color: var(--soot); color: var(--white); cursor: default; }
.btn:hover:not([aria-disabled="true"]) { background: var(--nomex); border-color: var(--nomex); }

/* About and text pages */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); align-items: center; padding: clamp(32px, 6vw, 96px) var(--gutter); border-bottom: 2px solid var(--white); }
.about img { width: min(100%, 520px); margin: 0 auto; }
.about h2 { margin-bottom: 0.5em; }
.about a { color: var(--nomex); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about img { order: -1; width: min(70%, 360px); } }

.page { padding: clamp(32px, 6vw, 96px) var(--gutter); }
.page h1 { margin-bottom: 0.5em; }
.page h2 { font-size: clamp(1.3rem, 2.4vw, 2rem); margin: 1.6em 0 0.5em; }
.page a { color: var(--nomex); }
.page .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gutter); max-width: 1100px; }

.crumbs { padding: 16px var(--gutter) 0; color: var(--ash); font-weight: 600; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--nomex); }

/* Footer */
footer {
  border-top: 2px solid var(--white);
  padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  color: var(--ash); font-weight: 600;
}
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--nomex); }

@media (prefers-reduced-motion: no-preference) {
  .card .photo, .btn, .top nav a { transition: border-color 120ms, background-color 120ms; }
}

/* Cart, account, thanks */
.page.narrow { max-width: 760px; }
.page .lede { color: var(--ash); }
.top nav .count { display: inline-block; min-width: 1.4em; padding: 0 0.35em; margin-left: 4px; background: var(--nomex); color: var(--black); border-radius: 999px; font-size: 0.8rem; text-align: center; line-height: 1.4em; }
.lines { list-style: none; margin: 0 0 24px; padding: 0; }
.line { display: grid; grid-template-columns: 96px 1fr auto auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--soot); }
.line img { border: 2px solid var(--white); }
.line .what a { font-family: var(--display); text-transform: uppercase; text-decoration: none; }
.line .each { color: var(--ash); font-size: 0.95rem; }
.line .qty input { width: 4em; margin-left: 6px; padding: 8px; background: var(--black); color: var(--white); border: 2px solid var(--white); font: inherit; }
.line .line-total { font-weight: 600; }
.line .remove, .link { background: none; border: 0; color: var(--ash); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0; }
.line .remove:hover, .link:hover { color: var(--nomex); }
@media (max-width: 600px) { .line { grid-template-columns: 72px 1fr; } .line img { width: 72px; height: 72px; } .line .qty, .line .line-total, .line .remove { grid-column: 2; } }
.totals { max-width: 360px; margin-left: auto; }
.totals > div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { font-family: var(--display); font-size: 1.3rem; color: var(--nomex); border-top: 2px solid var(--white); margin-top: 6px; padding-top: 12px; }
.totals .btn { width: 100%; margin-top: 16px; text-align: center; cursor: pointer; }
.btn:disabled { background: var(--soot); border-color: var(--soot); cursor: wait; }
.note { color: var(--nomex); margin-top: 12px; }
.empty { color: var(--ash); }
.empty a, .thanks a, .who a { color: var(--nomex); }
.plain { list-style: none; padding: 0; margin: 8px 0; }
.account form { display: grid; gap: 16px; max-width: 420px; }
.account label { display: grid; gap: 6px; font-weight: 600; }
.account input { padding: 12px; background: var(--black); color: var(--white); border: 2px solid var(--white); font: inherit; font-size: 1.1rem; }
.account .btn { cursor: pointer; justify-self: start; }
.account h2 { font-size: clamp(1.3rem, 2.4vw, 2rem); margin: 2em 0 0.6em; }
.orders { list-style: none; padding: 0; margin: 0; }
.orders > li { padding: 16px 0; border-bottom: 1px solid var(--soot); display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.orders .when { color: var(--ash); font-weight: 600; grid-column: 1 / -1; }
.orders .sum { font-weight: 600; }

/* Checkout: Stripe's form inside our page */
.checkout-page { max-width: 1100px; }
.checkout-shell { background: var(--white); border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--black), 0 0 0 6px var(--nomex); padding: 8px; margin-top: 8px; }
.checkout-shell .empty, .checkout-shell .note { color: var(--soot); padding: 24px; }
