/* Original Printworks
   Art direction follows balolo.de: warm neutrals, colour comes from the work,
   generous whitespace, no heavy shadows, hairline borders. */

/* Fraunces for display: an old-style with deliberate wonk, a close relative of
   the hand-drawn woodblock wordmark. Archivo for text: a grotesque with enough
   character to sit beside it. Latin subsets only, self-hosted, 102KB together. */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #fbfaf8;
  --surface: #ffffff;
  --ink: #191817;
  --muted: #6b665e;
  --rule: #e5e1d9;

  /* Brand yellow. A surface colour only. Never type on white. */
  --accent: #ffcc00;
  --accent-ink: #191817;
  --btn-ink: #ffffff;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-2: 1.875rem;
  --step-3: clamp(2rem, 4.4vw, 3.25rem);

  --gap: clamp(1.75rem, 4vw, 3rem);
  --band: clamp(3.5rem, 8vw, 6.5rem);
  --wrap: 1180px;

  --sans: 'Archivo', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: 'Fraunces', ui-serif, Georgia, "Times New Roman", serif;
}

/* Light only, by decision. The work is printed on white paper and the mockups
   are shot on pale walls, so a dark ground fights the product. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--ink); color: var(--ground); padding: 10px 16px;
}
.skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------- chrome */

.site-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px var(--gap);
  /* Clears the fixed badge, which floats above this row on narrow screens. */
  padding: 118px clamp(18px, 4vw, 40px) 20px;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 780px) {
  .site-head { padding: 26px clamp(18px, 4vw, 40px) 26px 232px; justify-content: flex-end; }
}

/* The wordmark rides along as a small badge rather than a full sticky bar. */
.brand {
  position: fixed; top: 12px; left: 12px; z-index: 60;
  display: block; line-height: 0;
  background: var(--ground);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 11px 15px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 18px rgb(0 0 0 / 0.05);
}
.brand img { width: clamp(112px, 30vw, 150px); height: auto; }

/* Shrinks as the page scrolls. Where scroll timelines are unsupported the
   badge simply stays at full size, which is a perfectly good outcome. */
@supports (animation-timeline: scroll()) {
  .brand {
    animation: badge-pad linear both;
    animation-timeline: scroll();
    animation-range: 0 200px;
  }
  .brand img {
    animation: badge-logo linear both;
    animation-timeline: scroll();
    animation-range: 0 200px;
  }
  @keyframes badge-pad {
    to { padding: 8px 11px; border-radius: 11px; }
  }
  @keyframes badge-logo {
    to { width: 88px; }
  }
}

/* min-width:0 lets the nav shrink and wrap. Without it the flex item keeps its
   max-content width and overflows the viewport on narrow screens. */
.nav { display: flex; flex-wrap: wrap; gap: 8px 22px; min-width: 0; }
.nav a {
  font-size: var(--step--1); color: var(--muted); text-decoration: none;
  letter-spacing: 0.04em; padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.site-foot {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
  margin-top: var(--band);
  padding: var(--band) clamp(18px, 4vw, 40px);
  border-top: 1px solid var(--rule);
}
.foot-lead { font-size: var(--step-1); letter-spacing: -0.01em; }
.foot-nav { display: flex; gap: 20px; }
.foot-nav a { font-size: var(--step--1); color: var(--muted); }

.fine { font-size: var(--step--1); color: var(--muted); }

/* ------------------------------------------------------------ elements */

/* Yellow ground with dark ink. High contrast, and it matches the mark. */
.btn {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  padding: 13px 26px; text-decoration: none;
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--accent);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: #e6b800; border-color: #e6b800; }

.btn-quiet { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-quiet:hover { background: var(--accent); border-color: var(--accent); }

.h-rule {
  font-size: var(--step-2); font-weight: 600;
  padding-bottom: 14px; border-bottom: 1px solid var(--rule);
}
.h-rule.sub { margin-top: var(--band); }

.band {
  max-width: var(--wrap);
  margin: var(--band) auto 0;
  padding: 0 clamp(18px, 4vw, 40px);
  display: flex; flex-direction: column; gap: var(--gap);
}

.intro, .lede { color: var(--muted); max-width: 62ch; font-size: var(--step-1); line-height: 1.5; }

/* ---------------------------------------------------------------- hero */

.hero {
  max-width: var(--wrap);
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
  padding: 0 clamp(18px, 4vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap);
  align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); }
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero h1 { font-size: var(--step-3); font-weight: 650; }
.hero-img img { border: 1px solid var(--rule); }

/* ---------------------------------------------------------------- grid */

/* Two up on phones. A single column made the catalogue feel much shorter than
   it is and buried everything below the fold. */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
}
@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--gap);
  }
}

.card { text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.card-img { display: block; overflow: hidden; background: var(--surface); border: 1px solid var(--rule); }
.card-img img { transition: transform 0.4s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; }
.card-title { font-size: 0.8125rem; font-weight: 500; }
.card-price { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
@media (min-width: 700px) {
  .card-title, .card-price { font-size: var(--step--1); }
}

/* --------------------------------------------------------- collections */

/* Cards carry their own borders. A 1px gap over a tinted background would
   paint the empty cells left by an incomplete final row. */
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.coll {
  background: var(--ground); padding: 24px 22px; border: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 8px; text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.coll:hover { border-color: var(--ink); }
.coll:hover { background: var(--surface); }
.coll-title { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; }
.coll-blurb { font-size: var(--step--1); color: var(--muted); line-height: 1.5; }

/* ------------------------------------------------------------- product */

.crumbs {
  max-width: var(--wrap); margin: 24px auto 0; padding: 0 clamp(18px, 4vw, 40px);
  font-size: var(--step--1); color: var(--muted); display: flex; gap: 8px;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.product {
  max-width: var(--wrap);
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  padding: 0 clamp(18px, 4vw, 40px);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap);
  align-items: start;
}
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2.5rem, 5vw, 4.5rem); }
}
/* Gallery. CSS only: radio inputs drive which shot is visible, so it works
   without JavaScript and stays keyboard operable. */
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.g-main { position: relative; }
.g-main img { border: 1px solid var(--rule); }
.g-main .shot { display: none; }
.gallery input:nth-of-type(1):checked ~ .g-main .shot:nth-of-type(1),
.gallery input:nth-of-type(2):checked ~ .g-main .shot:nth-of-type(2),
.gallery input:nth-of-type(3):checked ~ .g-main .shot:nth-of-type(3),
.gallery input:nth-of-type(4):checked ~ .g-main .shot:nth-of-type(4),
.gallery input:nth-of-type(5):checked ~ .g-main .shot:nth-of-type(5) { display: block; }

.g-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.g-thumbs label {
  width: 74px; cursor: pointer; display: block; line-height: 0;
  border: 1px solid var(--rule); transition: border-color 0.15s ease;
}
.g-thumbs label:hover { border-color: var(--muted); }
.gallery input:nth-of-type(1):checked ~ .g-thumbs label:nth-of-type(1),
.gallery input:nth-of-type(2):checked ~ .g-thumbs label:nth-of-type(2),
.gallery input:nth-of-type(3):checked ~ .g-thumbs label:nth-of-type(3),
.gallery input:nth-of-type(4):checked ~ .g-thumbs label:nth-of-type(4),
.gallery input:nth-of-type(5):checked ~ .g-thumbs label:nth-of-type(5) {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--accent);
}
.gallery input:focus-visible ~ .g-thumbs label { outline: 2px solid var(--accent); outline-offset: 2px; }
.product-info { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.product-info h1 { font-size: var(--step-2); font-weight: 600; }
.price { font-size: var(--step-1); color: var(--ink); font-variant-numeric: tabular-nums; }
.price-note { color: var(--muted); font-size: var(--step--1); }
.copy { max-width: 52ch; }

.spec { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 42ch; }
.spec li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
}
.spec li span { color: var(--muted); }

/* ---------------------------------------------------------------- misc */

/* Persistent route to Etsy. A pill rather than a bar, so it stays out of the
   way of the work. */
.sticky-cta {
  position: fixed; z-index: 55;
  right: 16px; bottom: 16px; left: 16px;
  display: flex; justify-content: center;
  pointer-events: none;
}
.sticky-cta a {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid rgb(0 0 0 / 0.08);
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.08), 0 10px 28px rgb(0 0 0 / 0.14);
  transition: transform 0.15s ease, background 0.15s ease;
}
.sticky-cta a:hover { background: #e6b800; transform: translateY(-1px); }

@media (min-width: 700px) {
  .sticky-cta { left: auto; right: 22px; bottom: 22px; }
}

/* Clear the pill so it never sits on top of the last line of the footer. */
.site-foot { padding-bottom: calc(var(--band) + 64px); }

.trust { border-top: 1px solid var(--rule); padding-top: var(--gap); }
.trust-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: var(--gap);
}
.trust-grid li { display: flex; flex-direction: column; gap: 5px; }
.trust-h { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.trust-d { font-size: var(--step--1); color: var(--muted); line-height: 1.5; }

.prose { max-width: 68ch; }
.prose p { max-width: 62ch; }
.note { max-width: 72ch; }
.note h2 { font-size: var(--step-1); font-weight: 600; }
.note p { color: var(--muted); max-width: 62ch; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .card:hover .card-img img { transform: none; }
}
