@font-face {
  font-family: "Geist";
  src: url("fonts/geist-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-sans-560.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e7eaee;
  --card: #f4f6f8;
  --ink: #121418;
  --muted: #3e4650;
  --faint: #5c656e;
  --line: #c9cfd6;
  --accent: #9a3412;
  --ceramic: #b7b2aa;
  --tee: #f7f7f6;
  --measure: 38rem;
  --page: min(1400px, calc(100% - 2.5rem));
  --art-ground: #fff;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", "iA Writer Quattro S", "Liberation Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; }

a:hover { color: var(--ink); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--card);
  padding: 0.5rem 0.8rem;
}

.skip:focus { top: 0.5rem; }

.site-head, .site-foot, main {
  width: var(--page);
  margin-inline: auto;
}

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}

.wordmark { white-space: nowrap; }

.wordmark {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}

.site-head nav {
  display: flex;
  gap: 1.25rem;
}

.site-head nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-head nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 1.5rem;
}
.hero h1 { font-size: clamp(2.8rem, 5.4vw, 4.6rem); max-width: 11ch; }
.catalog-cta {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--card);
  text-decoration: none;
  font-size: 0.95rem;
}
.catalog-cta:hover { outline: 2px solid var(--accent); outline-offset: 3px; }
.catalog-cta:active { transform: translateY(1px); }
.rule { padding: 2.5rem 0 1rem; border-top: 1px solid var(--line); max-width: 38rem; }
.rule p { color: var(--muted); font-size: 1.15rem; }
.card-story { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.45; }
.pair {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 2rem;
  align-items: center;
  padding: 1rem 0 3rem;
  border-top: 1px solid var(--line);
}
.journal-tease { padding: 2rem 0 1rem; border-top: 1px solid var(--line); max-width: 38rem; }
.journal-tease a { color: var(--ink); }
.piece-intro { max-width: 40rem; }
.piece h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); max-width: 16ch; }
.piece .products { max-width: 46rem; padding: 1.5rem 0 0.5rem; }
.piece-note { max-width: 40rem; padding: 1.5rem 0 3rem; }
.license { margin-top: 1.4rem; color: var(--faint); }
.license summary { cursor: pointer; }


.kicker, .product-kicker, .year {
  font-family: "Geist Mono", "iA Writer Mono S", "Liberation Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

h1 {
  margin: 0.35rem 0 1rem;
  font-size: clamp(3.1rem, 7vw, 6.2rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.lede, .intro {
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-art {
  background: var(--art-ground);
  padding: 1.5rem;
  border: 1px solid var(--line);
}

.hero-art svg { width: 100%; max-height: 68vh; }

.hero-art-link { display: block; }
.hero-caption { margin: 0.75rem 0 0; color: var(--faint); font-size: 0.92rem; }

.filters { display: flex; gap: 1rem; padding: 1.2rem 0 0; }
.filters a { color: var(--ink); text-decoration: none; }
.filters a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

.essay-thumb { display: flex; align-items: center; justify-content: center; background: var(--art-ground); border: 1px solid var(--line); padding: 0.35rem; height: 3.5rem; }
.essay-thumb svg { height: 100%; width: auto; max-width: 100%; }
.essay-buy { margin: 1rem 0 0; }
.buy-line { font-weight: 600; }

.steps {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 1.5rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.steps h2, .section-head h2, .essay h1, .rule h2, .pair h2, .journal-tease h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-weight: 600;
}

.steps p { color: var(--muted); margin: 0.4rem 0 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding-top: 1rem;
}

.section-head a { color: var(--ink); }

.home-grid, .catalog-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.9rem;
  padding: 1.25rem 0 3rem;
}

.home-grid .piece-card:nth-child(1) { grid-column: span 7; }
.home-grid .piece-card:nth-child(2) { grid-column: span 5; }
.home-grid .piece-card:nth-child(n + 3) { grid-column: span 3; }

.catalog-grid .piece-card { grid-column: span 4; }
.catalog-grid .piece-card:nth-child(1) { grid-column: span 7; }
.catalog-grid .piece-card:nth-child(2) { grid-column: span 5; }
.catalog-grid .piece-card:nth-last-child(1),
.catalog-grid .piece-card:nth-last-child(2) { grid-column: span 6; }

.piece-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-height: 16rem;
  padding: 0.9rem;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
}

.piece-card:hover { border-color: var(--ink); }

.piece-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 13rem;
  padding: 0.6rem;
  background: var(--art-ground);
  border: 1px solid var(--line);
}

.piece-art svg { height: 100%; width: auto; max-width: 100%; max-height: var(--art-max, 100%); }

.piece-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  align-items: baseline;
}

.piece-title { font-weight: 600; letter-spacing: -0.03em; }

.rights {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.filters {
  display: flex;
  gap: 1rem;
  padding: 1.2rem 0 0;
}

.filters a { color: var(--ink); text-decoration: none; }

.filters a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

.piece { padding: 2.2rem 0 3rem; }

.piece-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: start;
}

.credit, .brief, .story, .notice, .essay p {
  max-width: var(--measure);
}

.credit { color: var(--faint); margin-top: 0; }

.story { font-size: 1.2rem; color: var(--ink); }
.pitch { font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 0.6rem; }

.brief { color: var(--muted); }

.notice {
  font-size: 0.92rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  overflow-wrap: anywhere;
}

.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.preview-mug, .preview-tee {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.preview-mug, .preview-tee { align-items: center; }

.object {
  position: relative;
  width: 220px;
  height: 260px;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.mock {
  width: 220px;
  height: 260px;
  position: relative;
  z-index: 1;
}

.mug-print, .tee-print {
  position: absolute;
  display: flex;
  overflow: hidden;
  z-index: 2;
}

.print-fit { align-items: center; justify-content: center; }
.print-crop-x { align-items: center; justify-content: flex-start; }
.print-crop-y { align-items: flex-start; justify-content: flex-start; }

.mug-print svg, .tee-print svg {
  max-width: none;
  max-height: none;
  flex: none;
}

.buy-mug, .buy-tee, .unsold {
  align-self: start;
  padding: 0.7rem 0.95rem;
  background: var(--ink);
  color: var(--card);
  text-decoration: none;
  font-size: 0.95rem;
}

.unsold { background: transparent; color: var(--faint); border: 1px solid var(--line); }

.availability {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.availability-label {
  font-family: "Geist Mono", "iA Writer Mono S", "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.essay-list {
  list-style: none;
  margin: 1.5rem 0 3rem;
  padding: 0;
  border-top: 1px solid var(--line);
}

.essay-list li { border-bottom: 1px solid var(--line); }

.essay-list a {
  display: grid;
  grid-template-columns: 5rem minmax(14rem, 0.9fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 0;
  color: var(--ink);
  text-decoration: none;
}

.essay-list a:hover .essay-title { color: var(--accent); }

.essay-list .essay-title {
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.04em;
  font-weight: 600;
}

.essay-list .lede-line { color: var(--muted); }

.guide-list {
  list-style: none;
  margin: 1.5rem 0 3rem;
  padding: 0;
  border-top: 1px solid var(--line);
}

.guide-list li { border-bottom: 1px solid var(--line); }

.guide-list a {
  display: grid;
  grid-template-columns: minmax(14rem, 0.9fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: baseline;
  padding: 1.15rem 0;
  color: var(--ink);
  text-decoration: none;
}

.guide-list a:hover .essay-title { color: var(--accent); }

.guide-list .essay-title {
  font-size: clamp(1.4rem, 2vw, 2rem);
  letter-spacing: -0.04em;
  font-weight: 600;
}

.guide-list .lede-line { color: var(--muted); }

.essay { padding: 2rem 0 4rem; display: grid; grid-template-columns: minmax(0, 38rem) minmax(16rem, 1fr); gap: 3rem; }

.essay-copy p { color: var(--muted); }

.essay-copy .lede { color: var(--ink); font-size: 1.25rem; }

.essay-art {
  position: sticky;
  top: 5rem;
  background: var(--art-ground);
  border: 1px solid var(--line);
  padding: 1rem;
}

.guide { max-width: var(--measure); padding: 2rem 0 4rem; }
.guide .lede { color: var(--ink); font-size: 1.25rem; }
.guide p { color: var(--muted); }
.guide .stub-note {
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.75rem 1rem;
  margin: 0 0 1.5rem;
}
.guide-picks { list-style: none; padding: 0; }
.guide-picks a { color: var(--ink); }

.canvas {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding: 2rem 0 4rem;
}
.canvas .lede { color: var(--ink); font-size: 1.25rem; }
.canvas label { display: block; margin: 1rem 0 0.35rem; }
.canvas textarea, .canvas select, .canvas input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
}
.canvas textarea {
  min-height: 16rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.92rem;
}
.canvas-controls { display: grid; grid-template-columns: 1fr 8rem; gap: 1rem; }
.canvas-note { color: var(--muted); }
.canvas-hint { color: var(--muted); font-size: 0.92rem; margin: 0.5rem 0 0; }
.secret-warning {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid var(--accent);
  padding: 0.6rem 0.8rem;
  margin: 0.6rem 0 0;
}
.sample-undo { margin: 0.35rem 0 0; font-size: 0.92rem; }
.canvas-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; padding: 0.9rem 0 0; }
.secondary-button {
  font: inherit;
  padding: 0.7rem 0.95rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.secondary-button:disabled { opacity: 0.5; cursor: default; }
.primary-button {
  font: inherit;
  padding: 0.7rem 0.95rem;
  background: var(--ink);
  color: var(--card);
  border: 1px solid var(--ink);
  cursor: pointer;
}
.primary-button:disabled { opacity: 0.5; cursor: default; }
.order-note { flex-basis: 100%; color: var(--muted); font-size: 0.92rem; margin: 0; }
.order-status { flex-basis: 100%; margin: 0; }
.canvas-bars {
  min-height: 12rem;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1rem;
  display: flex;
  justify-content: center;
}
.canvas-bars svg { width: 100%; max-height: 32rem; height: auto; }
.canvas-theme { border: 1px solid var(--line); margin: 1rem 0 0; padding: 0 1rem 1rem; }
.canvas-theme legend { padding: 0 0.4rem; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem 1rem; }
.canvas .swatches input { padding: 0; height: 2.2rem; }

.site-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.92rem;
}

.site-foot a { color: var(--ink); }

@media (max-width: 900px) {
  .hero, .piece-layout, .essay, .steps, .pair, .essay-list a, .guide-list a, .canvas, .canvas-controls {
    grid-template-columns: 1fr;
  }

  .hero { min-height: auto; padding-top: 2rem; }

  .home-grid .piece-card,
  .catalog-grid .piece-card,
  .home-grid .piece-card:nth-child(1),
  .home-grid .piece-card:nth-child(2),
  .home-grid .piece-card:nth-child(n + 3),
  .catalog-grid .piece-card:nth-child(1),
  .catalog-grid .piece-card:nth-child(2),
  .catalog-grid .piece-card:nth-last-child(1),
  .catalog-grid .piece-card:nth-last-child(2) {
    grid-column: span 12;
  }

  .site-head { position: static; }

  .essay-art { position: static; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .home-grid .piece-card:nth-child(n + 3) { grid-column: span 6; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14161a;
    --card: #1c1f24;
    --ink: #f2f3f5;
    --muted: #c5cad1;
    --faint: #b7bec7;
    --line: #343a42;
    --accent: #f0a48c;
    color-scheme: dark;
  }

}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}
.crumbs a { color: var(--ink); }
.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.55rem;
  color: var(--faint);
}
.faq {
  max-width: var(--measure);
  padding: 1.5rem 0 2.5rem;
}
.faq h3 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 1.35rem 0 0.35rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-art { animation: rise-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.mockup-frame { width: 100%; max-width: 420px; height: auto; overflow: visible; }
.mockup { display: block; width: 100%; height: auto; }
.preview-art { grid-column: 1 / -1; margin: 0 0 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.art-card { background: var(--art-ground); border: 1px solid #d6d9de; padding: 1.5rem; display: flex; justify-content: center; }
.art-card svg { display: block; height: 340px; width: auto; max-width: 100%; }

.piece-split { display: grid; grid-template-columns: minmax(0, 1fr) 30rem; gap: 1.5rem 3rem; align-items: start; }
.piece-split > .piece-intro { grid-column: 1; grid-row: 1; }
.piece-split > .piece-note { grid-column: 1; grid-row: 2; padding: 1.5rem 0 3rem; }
.piece-split > .piece-float { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow-y: auto; }
.piece-split > .onward { grid-column: 1; grid-row: 3; }
.piece-float .products { max-width: none; padding: 0; gap: 0.6rem 0.8rem; }
.piece-float .preview-art { margin: 0 0 0.6rem; }
.piece-float .art-card { width: 100%; padding: 1rem; }
.piece-float .art-card svg { height: auto; width: 100%; max-height: 22rem; }
.piece-float .mockup-frame { max-width: none; }
@media (max-width: 900px) {
  .piece-split { display: flex; flex-direction: column; gap: 0; }
  .piece-split > .piece-float { position: static; max-height: none; overflow: visible; order: 2; }
  .piece-split > .piece-intro { order: 1; }
  .piece-split > .piece-note { order: 3; }
  .piece-split > .onward { order: 4; }
  .piece-split > .piece-float .art-card { order: 5; }
}

.onward { padding: 2rem 0 3rem; border-top: 1px solid var(--line); }
.onward h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -0.04em; }
.next-piece { font-weight: 600; }
.related-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; padding: 0; }
.related-list a { color: var(--ink); }
.license-slot { margin: 0 0 1.5rem; }
.license-slot .license { margin-top: 0; }
.zoom-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}
.zoom-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.zoom-view {
  width: min(92vw, 60rem);
  max-width: none;
  max-height: 92vh;
  padding: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  color: #14161a;
}
.zoom-view::backdrop { background: rgb(20 22 26 / 0.72); }
.zoom-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #d4d4d8;
  border-radius: 50%;
  background: #fff;
  color: #14161a;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.zoom-stage { display: flex; justify-content: center; cursor: zoom-out; }
.zoom-stage svg { width: 100%; height: auto; max-height: calc(92vh - 2rem); }
.rights-note { margin: 0 0 0.35rem; color: var(--faint); font-size: 0.92rem; }

/* ---------- Logo: bars typed in, caret keeps blinking ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; }
.logo-mark { width: 1.9rem; height: auto; overflow: visible; }
.logo-bar {
  transform-box: fill-box;
  transform-origin: left center;
  animation: logo-type 0.42s steps(5, end) both;
  animation-delay: calc(0.25s + var(--i) * 0.3s);
}
.wordmark:hover .logo-bar { animation-name: logo-retype; animation-delay: calc(var(--i) * 0.12s); animation-duration: 0.3s; }
.logo-caret { animation: logo-blink 1.05s steps(1, end) 1.6s infinite; }
.logo-word { font-size: 1.08rem; letter-spacing: -0.035em; }
.logo-tld { color: var(--faint); font-weight: 400; }
@keyframes logo-type { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes logo-retype { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes logo-blink { 50% { opacity: 0; } }

/* ---------- Home hero ---------- */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.home-hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
  margin: 0.9rem 0 1.25rem;
  font-weight: 600;
}
.home-hero h1 em { font-style: normal; color: var(--accent); }
.home-hero .lede { font-size: clamp(1.06rem, 1.3vw, 1.22rem); }
.kicker-dot {
  display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.5rem;
  background: var(--accent); vertical-align: 0.05em;
  animation: logo-blink 1.05s steps(1, end) infinite;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin-top: 1.8rem; }
.hero-actions .catalog-cta { margin-top: 0; }
.ghost-cta {
  padding: 0.75rem 1rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.ghost-cta:hover { background: var(--ink); color: var(--card); }
.hero-note { margin: 1.2rem 0 0; color: var(--faint); font-size: 0.9rem; }

/* ---------- The scene: typed, drawn, printed ---------- */
.scene {
  --ink: #121418; --card: #f4f6f8; --muted: #3e4650; --faint: #5c656e; --accent: #9a3412;
  color: var(--ink);
  margin: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(18, 20, 24, 0.04), 0 24px 60px -24px rgba(18, 20, 24, 0.28);
  padding: 0.85rem 0.85rem 1.1rem;
  min-width: 0;
}
.scene-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
.scene-step {
  width: 100%;
  font: 500 0.82rem/1 "Geist Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  background: var(--card);
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 0.5rem;
  cursor: pointer;
  transition: background 0.4s, color 0.4s;
}
.scene-step span { opacity: 0.55; margin-right: 0.25rem; }
.scene[data-phase="typed"] [data-step="typed"],
.scene[data-phase="drawn"] [data-step="drawn"],
.scene[data-phase="printed"] [data-step="printed"] { background: var(--ink); color: #fff; }

.scene-stage { display: grid; min-height: clamp(18rem, 34vw, 27rem); }
.scene-editor, .scene-products { grid-area: 1 / 1; transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.scene-editor { align-self: center; padding: 1.5rem clamp(0.5rem, 3vw, 2.5rem); }
.scene-file { margin: 0 0 1rem; font: 0.8rem "Geist Mono", monospace; color: var(--faint); display: flex; align-items: center; gap: 0.5rem; }
.scene-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #1f7a4d; }
.scene-code {
  margin: 0;
  font-family: "Geist Mono", "Liberation Mono", monospace;
  font-size: clamp(1rem, 2.1vw, 1.55rem);
  line-height: 2;
  white-space: pre;
  overflow: hidden;
}
.scene-code .ln { display: block; min-height: 2em; }
.scene-code .t {
  position: relative;
  color: var(--c);
  transition: color 0.7s ease, margin 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene-code .t::before {
  content: "";
  position: absolute;
  inset: -0.05em 0;
  background: var(--c);
  opacity: 0.13;
  border-radius: 2px;
  z-index: 0;
  transition: opacity 0.7s ease, inset 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene-caret {
  display: inline-block; width: 0.08em; height: 1.1em; margin-left: 1px;
  background: var(--accent); vertical-align: -0.18em;
  animation: logo-blink 0.9s steps(1, end) infinite;
}
.scene[data-phase="drawn"] .scene-code .t,
.scene[data-phase="printed"] .scene-code .t { color: transparent; margin-right: 0.22ch; }
.scene[data-phase="drawn"] .scene-code .t::before,
.scene[data-phase="printed"] .scene-code .t::before { opacity: 1; inset: 0.3em 0; }
.scene-file, .scene-dot { transition: opacity 0.6s; }
.scene[data-phase="drawn"] .scene-file { opacity: 0; }

.scene-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-items: end;
  opacity: 0;
  transform: translateY(1.5rem) scale(0.97);
  pointer-events: none;
}
.scene[data-phase="printed"] .scene-editor { opacity: 0; transform: scale(0.82) translateY(-6%); }
.scene[data-phase="printed"] .scene-products { opacity: 1; transform: none; }
.scene-tee, .scene-mug { position: relative; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s; }
.scene[data-phase="printed"] .scene-mug { transition-delay: 0.25s; }
.scene:not([data-phase="printed"]) .scene-tee, .scene:not([data-phase="printed"]) .scene-mug { transform: translateY(1rem); }
.scene-products svg { width: 100%; }
.scene-tag {
  position: absolute; left: 50%; bottom: 0.2rem; transform: translateX(-50%);
  font: 0.72rem "Geist Mono", monospace; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--faint);
}
.scene-caption { margin: 0.6rem 0.4rem 0; min-height: 1.5em; color: var(--muted); font-size: 0.95rem; text-align: center; }
.scene-caption span { display: none; }
.scene-caption em { font-style: normal; font-family: "Geist Mono", monospace; font-size: 0.92em; color: var(--ink); }
.scene[data-phase="typed"] .scene-caption-typed,
.scene[data-phase="drawn"] .scene-caption-drawn,
.scene[data-phase="printed"] .scene-caption-printed { display: inline; animation: rise-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ---------- Legend ---------- */
.legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--line);
}
.legend h2, .uses h2, .featured h2, .own-code h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); letter-spacing: -0.04em; line-height: 1.05; margin: 0.6rem 0 1rem; }
.legend-keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.legend-keys li {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.85rem;
  background: var(--card); padding: 0.9rem 1rem; border-radius: 10px;
}
.swatch { box-shadow: inset 0 0 0 1px var(--line); grid-row: span 2; width: 2.6rem; height: 0.8rem; align-self: center; background: var(--c); border-radius: 2px; }
.legend-label { font-weight: 600; }
.legend-keys code { font: 0.85rem "Geist Mono", monospace; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Worn. Poured. Given. ---------- */
.uses { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--line); }
.uses-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.use {
  display: flex; flex-direction: column;
  background: var(--card);
  border-radius: 14px;
  padding: 1rem 1.25rem 1.4rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s;
}
a.use:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(18, 20, 24, 0.35); color: var(--ink); }
.use h3 { font-size: 1.5rem; letter-spacing: -0.03em; margin: 0.8rem 0 0.35rem; }
.use p { margin: 0; color: var(--muted); }
.use-art { height: clamp(14rem, 22vw, 19rem); display: grid; place-items: center; }
.use-art > svg { width: 100%; height: 100%; }
.gift { position: relative; }
.gift-card {
  width: 62%;
  background: #fff;
  padding: 1rem;
  box-shadow: 0 18px 36px -20px rgba(18, 20, 24, 0.4);
  transform: rotate(-4deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.gift-card svg { max-height: 12rem; margin: 0 auto; }
.use-given:hover .gift-card { transform: rotate(-1deg) translateY(-4px); }
.gift-tag {
  position: absolute; right: 8%; bottom: 14%;
  background: var(--accent); color: #fff;
  font: 0.72rem/1.3 "Geist Mono", monospace; letter-spacing: 0.04em;
  padding: 0.5rem 0.7rem 0.5rem 1.1rem;
  clip-path: polygon(0.6rem 0, 100% 0, 100% 100%, 0.6rem 100%, 0 50%);
  transform: rotate(6deg);
}
.gift-links { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.gift-links li { border-top: 1px solid var(--line); }
.gift-links a { display: block; padding: 0.55rem 0; color: var(--ink); text-decoration: none; }
.gift-links a::after { content: " →"; color: var(--accent); }
.gift-links a:hover { color: var(--accent); }

/* ---------- Featured and your own code ---------- */
.featured { padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--line); }
.own-code {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  margin: 2rem 0 3rem;
  padding: clamp(2rem, 5vw, 4rem);
  background: #121418;
  color: #f4f6f8;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.own-code h2 { color: #fff; }
.own-code p { color: #c3cad2; font-size: 1.1rem; max-width: 34rem; }
.own-code .kicker { color: #9aa3ad; }
.own-code-art { background: #fff; border-radius: 10px; padding: 1rem; max-height: 22rem; overflow: hidden; transform: rotate(-2deg); }
.own-code-art svg { width: 100%; animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-30%); } }
.catalog-cta.light { background: #fff; color: #121418; }

@media (max-width: 900px) {
  .home-hero, .legend, .own-code { grid-template-columns: 1fr; }
  .uses-grid { grid-template-columns: 1fr; }
  .home-hero { padding-top: 1.5rem; }
  .scene-stage { min-height: 17rem; }
  .own-code-art { max-height: 12rem; }
}
@media (max-width: 520px) {
  .legend-keys { grid-template-columns: 1fr; }
  .scene-step { font-size: 0.7rem; padding: 0.6rem 0.2rem; }
  .scene-code { font-size: 0.95rem; }
  .logo-word { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-bar, .logo-caret, .kicker-dot, .scene-caret, .own-code-art svg { animation: none; }
  .scene *, .use, .gift-card { transition: none !important; }
}

/* ---------- Phones ---------- */
.essay-list .year { margin-left: 0.6rem; }

@media (max-width: 640px) {
  .site-head { padding: 0.8rem 0 0; gap: 0.2rem; }
  .site-head nav {
    width: 100%;
    gap: 1.1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .site-head nav::-webkit-scrollbar { display: none; }
  .site-head nav a { white-space: nowrap; padding: 0.7rem 0; flex: none; }
  .site-head nav a[href$="index.html"]:first-child { display: none; }

  .crumbs a, .site-foot a { display: inline-block; padding: 0.45rem 0; }
  .related-list a { display: inline-block; padding: 0.55rem 0; }
  .site-foot p:last-child { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }

  .home-grid, .catalog-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .home-grid .piece-card, .catalog-grid .piece-card,
  .home-grid .piece-card:nth-child(n), .catalog-grid .piece-card:nth-child(n) { grid-column: span 1; padding: 0.5rem; }
  .piece-card .card-story { display: none; }
  .piece-card .piece-meta { flex-wrap: wrap; gap: 0.15rem 0.5rem; }
  .piece-card .piece-title { width: 100%; font-size: 0.95rem; }

  .products { grid-template-columns: 1fr 1fr; gap: 0.5rem; }

  .essay-list a { grid-template-columns: 4.5rem minmax(0, 1fr); grid-template-rows: auto auto; gap: 0.25rem 0.9rem; }
  .essay-list .essay-thumb { grid-row: span 2; height: 4.5rem; }
  .essay-list .essay-title { font-size: 1.25rem; }
  .essay-list .lede-line { font-size: 0.95rem; }

  .legend-keys { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
  .legend-keys li { grid-template-columns: 1fr; padding: 0.7rem 0.75rem; }
  .swatch { grid-row: auto; width: 100%; height: 0.55rem; margin-bottom: 0.45rem; }
  .legend-keys code { font-size: 0.75rem; }

  .uses-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    margin-inline: -1.25rem;
    padding: 0 1.25rem 0.5rem;
    scrollbar-width: none;
  }
  .uses-grid::-webkit-scrollbar { display: none; }
  .uses-grid { align-items: flex-start; }
  .use { flex: 0 0 82%; scroll-snap-align: center; }
  .use-art { height: 13rem; }

  .scene { padding: 0.6rem 0.6rem 0.9rem; }
  .scene-step { font-size: 0.75rem; }
  .scene-stage { min-height: 15rem; }
  .scene-tag { font-size: 0.75rem; }
  .own-code { margin-inline: -0.25rem; padding: 1.5rem 1.25rem; }
  .own-code-art { max-height: 9rem; }
}
