/* ForgeFox Workshop shop front, v4: Christmas red, cream and forest green (ref 028).
   Flat, confident colour bands; one hand-built vector village (R15); our own renders for every
   product picture (R13). Roles: red = the brand band, cream = the page, green = the second band
   and the icon tiles, brass = the one action colour (flat, never a gradient), berry = headings on
   cream. Display: Fraunces (soft, 700). Text: Figtree. Both OFL, self-hosted and subset. */

@font-face {
  font-family: 'Fraunces Soft';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/fraunces-700-soft-subset.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 400 750;
  font-display: swap;
  src: url('/fonts/figtree-var-subset.woff2') format('woff2');
}

:root {
  --red: #a3121c;
  --red-deep: #7a0c14;
  --cream: #f6efe3;
  --paper: #fffaf2;
  --green: #1d4d3a;
  --green-deep: #143a2b;
  --brass: #c9a24a;
  --brass-hover: #d8b55f;
  --berry: #9e1b1e;          /* headings on cream */
  --ink: #221c19;            /* text on cream */
  --ink-soft: #4d4541;
  --line: rgb(34 28 25 / 0.14);
  --on-dark: #f6efe3;
  --on-dark-soft: rgb(246 239 227 / 0.84);
  --night: #0b0a08;          /* behind product photos taken in the dark */

  /* names the product pages and the waiting list form already use */
  --gold: var(--brass);
  --glass-shadow: 0 1px 0 rgb(34 28 25 / 0.05), 0 14px 32px -16px rgb(70 20 20 / 0.28);

  --display: 'Fraunces Soft', 'Iowan Old Style', Georgia, serif;
  --sans: 'Figtree', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;

  /* spacing scale (4pt) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  /* type scale */
  --t-xs: 14px; --t-sm: 15px; --t-base: 17px; --t-md: 20px; --t-lg: 24px; --t-xl: 32px; --t-2xl: 40px;
  --t-hero: clamp(44px, 12vw, 112px);

  --gutter: 16px;
  --max: 1160px;
  --wrap: calc(var(--max) + 2 * var(--gutter));   /* a section: content --max wide, gutters outside */
  --radius-card: 28px;
  --radius-btn: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 var(--t-base)/1.55 var(--sans);
  background: var(--cream);
  overflow-x: hidden;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* "glass" is the old class name the product pages still carry: now it is one paper card. */
.glass {
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- header: cream, the wordmark in berry ---------- */
.top {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--s3) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 23px;
  letter-spacing: -0.02em;
  color: var(--berry);
  text-decoration: none;
  padding: var(--s1) 0;
}
.wordmark span { font-weight: 700; }

/* ---------- buttons: flat brass, ink text ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--s6);
  border-radius: var(--radius-btn);
  background: var(--brass);
  color: var(--ink);
  font: 700 18px/1.1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  box-shadow: 0 2px 0 rgb(34 28 25 / 0.22);
  transition: background-color 160ms ease-out, transform 120ms ease-out;
}
.btn:hover { background: var(--brass-hover); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgb(34 28 25 / 0.22); }

/* ---------- hero: the red band ---------- */
.hero { position: relative; overflow-x: clip; }   /* the glow may spill sideways; never the page */
.hero-band {
  position: relative;
  background: var(--red);
  color: var(--on-dark);
  padding: var(--s6) var(--gutter) 0;
  /* clip left, top and right, but let the bauble hang 400px down into the cream (R1) */
  clip-path: inset(0 0 -400px 0);
  z-index: 1;
}
.stars {
  position: absolute;
  top: var(--s3);
  right: 0;
  width: 60%;
  max-width: 560px;
  height: auto;
  aspect-ratio: 4 / 3;
  fill: var(--on-dark);
  opacity: 0.55;
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding-right: 132px;          /* the string and the bauble live in this column on phones */
}
.hero h1 {
  font-size: var(--t-hero);
  line-height: 0.96;
  letter-spacing: -0.035em;
  margin-bottom: var(--s4);
  color: var(--on-dark);
}
.hero-sub {
  font-size: var(--t-md);
  line-height: 1.35;
  font-weight: 500;
  color: var(--on-dark-soft);
  margin-bottom: var(--s5);
  max-width: 22ch;
}
.hero-note { margin-top: var(--s3); font-size: var(--t-sm); color: var(--on-dark-soft); max-width: 30ch; }
.hero-note a { color: var(--on-dark); font-weight: 700; text-underline-offset: 3px; }
.hero-banner {
  margin-top: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius-btn);
  background: var(--cream);
  color: var(--red-deep);
  font-weight: 700;
  max-width: 34ch;
}
.hero-banner[hidden] { display: none; }
.hero-band :focus-visible { outline-color: var(--on-dark); }

.village {
  display: block;
  position: relative;
  z-index: 1;
  width: calc(100% + 2 * var(--gutter));
  max-width: none;
  height: 172px;
  margin: var(--s2) calc(-1 * var(--gutter)) -1px;
  object-fit: cover;
  object-position: 0 100%;
}

/* the bauble on its brass string: hangs from the top of the band, breaks into the cream */
.hero-bauble {
  --w: 168px;
  --drop: 92px;                  /* how far it hangs into the cream band */
  position: absolute;
  z-index: 3;
  right: calc(var(--gutter) - 6px);
  bottom: calc(-1 * var(--drop));
  width: var(--w);
  margin: 0;
  isolation: isolate;
}
.hero-bauble::before {           /* the string, up to the top of the band (clipped there) */
  content: '';
  position: absolute;
  left: calc(50% - 1px);
  bottom: 98%;
  width: 2px;
  height: 1200px;
  background: var(--brass);
}
.hero-bauble::after {            /* warm light from the bauble itself, only while it is lit (R9) */
  content: '';
  position: absolute;
  z-index: -1;
  left: -45%;
  right: -45%;
  top: 8%;
  bottom: -2%;
  background: radial-gradient(closest-side at 50% 55%, rgb(255 196 104 / 0.55), rgb(255 170 80 / 0.18) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
}
.hero-bauble img { display: block; width: 100%; height: auto; }
.hero-bauble .bauble-lit {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-bauble[data-light='on'] .bauble-lit,
.hero-bauble[data-light='on']::after { opacity: 1; }

/* ---------- under the hero: the switch, then what it is ---------- */
.hero-after {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--s5) var(--gutter) var(--s7);
  display: grid;
  gap: var(--s4);
  justify-items: start;
}
.light-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  min-height: 48px;
  padding: var(--s1) 0;
  margin-bottom: var(--s5);
  padding-right: 30px;                   /* room for the rays */
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 var(--t-base)/1.2 var(--sans);
  cursor: pointer;
}
.light-switch[hidden] { display: none; }
.switch-track {
  position: relative;
  flex: none;
  width: 60px;
  height: 34px;
  border-radius: 17px;
  background: #857b71;                   /* 3.6:1 on cream, so the off state is visible too */
  transition: background-color 260ms ease-out;
}
.switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgb(34 28 25 / 0.35);
  transition: transform 260ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
.switch-track::after {             /* three little brass rays while the light is on */
  content: '';
  position: absolute;
  left: calc(100% + 6px);
  top: 3px;
  width: 20px;
  height: 28px;
  background: var(--brass);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 28'%3E%3Cpath d='M3 9 9 3M5 14h9M3 19l6 6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 28'%3E%3Cpath d='M3 9 9 3M5 14h9M3 19l6 6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 260ms ease-out, transform 260ms ease-out;
}
.light-switch[aria-checked='true'] .switch-track::after { opacity: 1; transform: none; }
.light-switch[aria-checked='true'] .switch-track { background: var(--green); box-shadow: none; }
.light-switch[aria-checked='true'] .switch-thumb { transform: translateX(26px); background: #ffe2a6; }
.light-switch:focus-visible { outline-offset: 4px; border-radius: 12px; }

.made-title { font-size: var(--t-2xl); line-height: 1.02; color: var(--berry); max-width: 12ch; }
.lede { font-size: var(--t-base); color: var(--ink-soft); max-width: 36ch; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); color: var(--ink-soft); font-weight: 600; }
.price-big { font-family: var(--display); font-weight: 700; font-size: var(--t-xl); line-height: 1; color: var(--berry); letter-spacing: -0.02em; }
.price-big[hidden] { display: none; }
.price-big:not([hidden]) + span::before { content: '· '; }

/* ---------- the three steps: one row, two hand-drawn brass arrows ---------- */
.steps {
  list-style: none;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--s5) var(--gutter);
  display: grid;
  grid-template-columns: 1fr 22px 1fr 22px 1fr;
  align-items: center;
  gap: var(--s2);
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat,
              linear-gradient(var(--line), var(--line)) var(--gutter) 100% / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  font-weight: 700;
  font-size: var(--t-sm);
  line-height: 1.25;
  text-align: center;
  color: var(--green);
}
.steps li { grid-row: 1; text-wrap: balance; }
.steps li:nth-child(1) { grid-column: 1; }
.steps li:nth-child(2) { grid-column: 3; }
.steps li:nth-child(3) { grid-column: 5; }
.steps::before, .steps::after {
  content: '';
  grid-row: 1;
  width: 22px;
  height: 12px;
  background: var(--brass);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12'%3E%3Cpath d='M1 6.4c5-.6 11-.7 18-.4M14.5 1.5 20 6l-5.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 12'%3E%3Cpath d='M1 6.4c5-.6 11-.7 18-.4M14.5 1.5 20 6l-5.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.steps::before { grid-column: 2; }
.steps::after { grid-column: 4; }

/* ---------- product shortcuts: soft-3D icons on green tiles ---------- */
.quick {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--s6) var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}
.quick-link {
  display: grid;
  justify-items: center;
  gap: var(--s2);
  padding: var(--s2);
  border-radius: 24px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-md);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.quick-link:hover span:last-child { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.icon-tile {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 26px;
  background: var(--green);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 10px 22px -12px rgb(20 58 43 / 0.7);
  overflow: hidden;
}
.icon-tile img { display: block; width: 100%; height: 100%; }

/* ---------- products ---------- */
.shop {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--s7) var(--gutter) var(--s8);
  display: grid;
  gap: var(--s5);
}
h2 { font-size: var(--t-2xl); line-height: 1.05; }
.shop > h2 { color: var(--berry); margin-bottom: var(--s1); }

.card {
  position: relative;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 176px;
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: box-shadow 200ms ease-out;
}
.card:hover { box-shadow: 0 1px 0 rgb(34 28 25 / 0.05), 0 20px 40px -18px rgb(70 20 20 / 0.4); }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.card-main .card-photo { height: 236px; object-position: 50% 38%; }
.card-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--night);
}
.card-body { display: grid; align-content: start; gap: var(--s2); padding: var(--s5) var(--s5) 68px var(--s5); }
.card-title { font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: -0.015em; line-height: 1.1; text-wrap: balance; }
.card-text { font-size: 16px; line-height: 1.5; color: var(--ink-soft); }

.chip {                                       /* a price tag, red with cream text */
  position: absolute;
  right: var(--s4);
  bottom: var(--s4);
  padding: 7px 14px;
  border-radius: 10px;
  background: var(--red);
  color: var(--on-dark);
  font-weight: 750;
  font-size: var(--t-base);
  line-height: 1.2;
  font-variant-numeric: lining-nums;
}
.chip[hidden] { display: none; }
.tab {
  position: absolute;
  left: var(--s3);
  top: var(--s3);
  z-index: 1;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--green);
  color: var(--on-dark);
  font-weight: 700;
  font-size: var(--t-xs);
}

/* ---------- the green band: how it works (and the waiting list, when the printers are full) ---------- */
.green-band {
  position: relative;
  background: var(--green);
  color: var(--on-dark);
  padding: var(--s7) var(--gutter) var(--s8);
}
.green-band::before {                         /* a soft snow-drift edge, cream into green */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 1px);
  height: 26px;
  background: var(--green);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V15C150 9 260 4 420 8s280 13 460 11 300-14 420-15c60 0 110 3 140 5v22z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V15C150 9 260 4 420 8s280 13 460 11 300-14 420-15c60 0 110 3 140 5v22z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.busy-band::after {                          /* and a cream drift back out at its foot */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 26px;
  background: var(--cream);
  transform: scaleX(-1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V15C150 9 260 4 420 8s280 13 460 11 300-14 420-15c60 0 110 3 140 5v22z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V15C150 9 260 4 420 8s280 13 460 11 300-14 420-15c60 0 110 3 140 5v22z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.green-band :focus-visible { outline-color: var(--on-dark); }
.busy, .how { max-width: var(--max); margin: 0 auto; }
.busy { display: grid; gap: var(--s3); }
.busy-band[hidden] { display: none; }
.busy-band { margin-top: var(--s5); padding-bottom: var(--s7); }
.busy-band + .steps { margin-top: var(--s5); }
.busy h2 { font-size: var(--t-2xl); color: var(--on-dark); max-width: 14ch; }
.busy-line { color: var(--on-dark-soft); max-width: 44ch; }
.how h2 { color: var(--on-dark); }
.how-list { list-style: none; margin: var(--s5) 0 0; padding: 0; }
.how-list li { padding: var(--s4) 0; border-top: 1px solid rgb(246 239 227 / 0.2); color: var(--on-dark-soft); max-width: 60ch; }
.how-list strong { color: var(--on-dark); font-weight: 700; }
.cutoff {
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 2px solid var(--brass);
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--on-dark);
  max-width: 20ch;
  text-wrap: balance;
}

/* ---------- footer: the deepest green ---------- */
.foot {
  background: var(--green-deep);
  color: var(--on-dark-soft);
  padding: var(--s6) var(--gutter) calc(var(--s6) + env(safe-area-inset-bottom));
  display: grid;
  gap: var(--s3);
  font-size: var(--t-sm);
  border-radius: 0;
  box-shadow: none;
}
.foot > * { max-width: var(--max); width: 100%; margin-inline: auto; }
.foot-name { font-family: var(--display); font-weight: 700; font-size: var(--t-md); color: var(--on-dark); }
.foot a { color: var(--on-dark); text-underline-offset: 3px; }
.foot-links { display: flex; gap: var(--s5); }
.foot-links a { display: inline-block; padding: 10px 0; }
.foot :focus-visible { outline-color: var(--on-dark); }

/* ---------- small phones (360): a slimmer bauble so the headline keeps "A memory" together ---------- */
@media (max-width: 379px) {
  .hero-copy { padding-right: 104px; }
  .hero-bauble { --w: 148px; --drop: 84px; }
  .hero .btn { padding: 0 var(--s5); }
}

/* ---------- wider screens ---------- */
@media (min-width: 860px) {
  :root { --gutter: 40px; }
  .top { padding-block: var(--s4); }
  .wordmark { font-size: 26px; }
  .hero-band { padding-top: var(--s7); }
  .hero-copy { padding-right: 420px; }
  .hero-sub { font-size: var(--t-lg); }
  .hero-copy { padding-bottom: var(--s5); }      /* keep the note clear of the rooftops */
  .village { height: 240px; margin-top: 0; }
  .hero-bauble { --w: 290px; --drop: 120px; right: max(var(--gutter), calc(50% - var(--max) / 2 + 60px)); }
  /* Full width, so the % in the padding is the page width (as for .hero-bauble's right):
     column 1 lines up with the headline, column 2 sits under the bauble at any width. */
  .hero-after {
    max-width: none;
    grid-template-columns: minmax(0, 1fr) 290px;
    column-gap: var(--s7);
    padding-top: var(--s5);
    padding-left: max(var(--gutter), calc(50% - var(--max) / 2));
    padding-right: max(var(--gutter), calc(50% - var(--max) / 2 + 60px));
  }
  .hero-after > * { grid-column: 1; }
  .light-switch { grid-column: 2; grid-row: 1 / span 3; justify-self: center; align-self: start; margin: 112px 0 0; }
  .made-title { font-size: 56px; }
  .lede { font-size: 19px; }
  .steps { font-size: var(--t-base); grid-template-columns: auto 22px auto 22px auto; justify-content: center; gap: var(--s5); }
  .quick { display: none; }                    /* the top nav does this job on wide screens */
  .shop { grid-template-columns: 1.15fr 1fr; gap: var(--s5); padding-top: var(--s8); }
  .shop > h2 { grid-column: 1 / -1; font-size: 56px; }
  .card-main { grid-row: span 3; min-height: 0; }
  .card-main .card-photo { height: auto; aspect-ratio: 4 / 3; }
  .card-main .card-title { font-size: var(--t-xl); }
  .card-main .card-text { font-size: var(--t-base); max-width: 44ch; }
  .card-side { grid-template-columns: 36% 1fr; min-height: 0; }
  .green-band { padding-block: var(--s8) var(--s9); }
  .how { display: grid; grid-template-columns: 1fr 1.3fr; gap: var(--s5) var(--s8); align-items: start; }
  .how h2 { font-size: 56px; }
  .how-list { margin-top: 0; grid-row: span 2; }
  .cutoff { font-size: 34px; margin-top: 0; }
  .busy { grid-template-columns: 1fr 1.3fr; column-gap: var(--s8); align-items: start; }
  .busy h2 { font-size: 56px; grid-row: span 3; }
  .foot { grid-template-columns: 1fr auto; column-gap: var(--s6); padding-inline: max(var(--gutter), calc(50% - var(--max) / 2)); }
  .foot > * { grid-column: 1; max-width: none; }
  .foot-links { grid-column: 2; grid-row: 1 / 4; flex-direction: column; gap: 0; }
}
