@import url("https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@400&family=Inter:wght@300..600&family=Spectral:wght@400;700&family=Zen+Kaku+Gothic+New:wght@300&display=swap");

:root {
  --ivory: #fffaf4;
  --paper: #fffdf9;
  --ink: #231d1d;
  --muted: #746967;
  --line: rgba(35, 29, 29, 0.16);
  --accent: #b8aa98;
  --canvas: #f4f0e8;
  --canvas-soft: #ebe4d8;
  --accent-dark: #6f6254;
  --shadow: 0 24px 70px rgba(57, 48, 40, 0.13);
  --serif: Spectral, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: Inter, "Segoe UI", sans-serif;
  --cjk: "Gowun Batang", Spectral, "Palatino Linotype", serif;
  --wordmark: "Zen Kaku Gothic New", sans-serif;

  /* Viewport aliases. Small-viewport units so the mobile browser URL bar
     collapsing mid-scroll never resizes the layout. */
  --1vh: 1svh;
  --1vw: 1svw;

  /* Responsive grid. Only --columns, --inset and --gutter are redefined at a
     breakpoint; every column-derived width re-resolves from --column. */
  --columns: 12;
  --inset: 4rem;
  --gutter: 1rem;
  --column: calc((100% - (var(--columns) - 1) * var(--gutter)) / var(--columns));
  --header-height: 4rem;
  /* Reserved height. app.js overwrites this with the header's measured
     height so anchor offsets stay correct if the nav wraps. */
  --header-height-actual: var(--header-height);

  /* Spacing ladder. Rescaled wholesale per breakpoint instead of being
     overridden component by component. */
  --space-4: 0.25rem;
  --space-8: 0.5rem;
  --space-12: 0.75rem;
  --space-16: 1rem;
  --space-20: 1.25rem;
  --space-24: 1.5rem;
  --space-32: 2rem;
  --space-40: 2.5rem;
  --space-48: 3rem;
  --space-64: 4rem;
  --space-72: 4.5rem;
  --space-96: 6rem;
  --space-112: 7rem;
  --space-128: 8rem;
  --space-top: 7rem;

  /* Type ladder. Fixed steps, no fluid clamp() — each breakpoint re-steps the
     sizes deliberately so type never drifts to an untested in-between value. */
  --text-label: 0.66rem;
  --text-fine: 0.72rem;
  --text-body: 0.86rem;
  --text-lede: 1.05rem;
  --display-sm: 2rem;
  --display-md: 3.2rem;
  --display-lg: 4.8rem;
  --display-hero: 2.3rem;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  /* Global type scale. Every size in this file is rem-based, so raising this
     rescales the entire site proportionally. 112.5% = 18px base. */
  font-size: 112.5%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 280px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 2%, rgba(184, 170, 152, 0.16), transparent 24rem),
    var(--canvas);
  font-family: var(--sans);
  line-height: 1.6;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  top: 1rem;
}

.prototype-banner {
  position: relative;
  z-index: 60;
  color: #fff;
  background: var(--ink);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry {
  position: relative;
  z-index: 50;
  display: grid;
  min-height: calc(var(--1vh) * 100);
  background: var(--ivory);
}

.entry-art {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent),
    linear-gradient(150deg, #2f2b27 0%, #706458 45%, #b8aa98 75%, #e7ded0 100%);
}

.entry-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.88) contrast(1.03);
}

.entry-art::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(120deg, rgba(52, 45, 38, 0.12), rgba(184, 170, 152, 0.2));
}

.entry-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.entry h1,
.wordmark,
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
}

.entry h1 {
  margin: 0;
  font-family: var(--wordmark);
  font-weight: 300;
  line-height: 0.94;
}

.entry-statement {
  max-width: 32rem;
  color: var(--muted);
  font-family: var(--serif);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-dark);
  font-family: var(--serif);
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3.1rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(111, 98, 84, 0.45);
  outline-offset: 3px;
}

.button-dark {
  color: #fff;
  background: var(--ink);
}

.button-soft {
  color: var(--ink);
  background: linear-gradient(110deg, #e8dfd1, #cfc2b1);
  box-shadow: 0 12px 30px rgba(111, 98, 84, 0.18);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.logo-space {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--accent-dark);
  border-radius: 50%;
}

.site-nav {
  display: flex;
}

.site-nav a {
  font-size: 0.85rem;
  text-decoration: none;
}


.section {
  margin-inline: auto;
}

.section-heading h2,
.split-heading h2 {
  margin: 0;
  line-height: 0.98;
}

.section-heading > p:last-child,
.split-heading > p {
  max-width: 42rem;
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 2rem;
  margin-bottom: 3rem;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.filter {
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.filter.is-active {
  color: white;
  background: var(--ink);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: var(--gutter);
}

.gallery-card[hidden] {
  display: none;
}

.gallery-card {
  grid-column: 1 / -1;
}

.piece-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--piece-media-width, min(48vw, 34rem))) minmax(14rem, 1fr);
  gap: var(--space-72);
  align-items: start;
}

.piece-layout-available {
  grid-template-columns: minmax(0, var(--piece-media-width, min(48vw, 34rem))) minmax(16rem, 26rem);
}

.piece-media {
  display: grid;
  gap: 0.65rem;
}

.piece-art {
  position: relative;
  display: grid;
  place-items: end start;
  overflow: hidden;
  aspect-ratio: var(--card-ratio, 4 / 5);
}

.piece-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.piece-art > span:not(.piece-image-controls) {
  position: relative;
  z-index: 1;
  margin: 1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(35, 29, 29, 0.66);
  color: rgba(255,255,255,0.9);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.piece-meta {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding-top: 0.4rem;
}

.piece-meta strong {
  font-family: var(--serif);
  font-size: 1.35rem;
}

.piece-meta > span:last-child {
  color: var(--muted);
  font-size: 0.85rem;
}

.status {
  width: fit-content;
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.piece-image-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 0.7rem;
  pointer-events: none;
}

.piece-dot-nav {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  transform: translateX(-50%);
  color: white;
  pointer-events: auto;
}

.piece-image-control {
  width: 0.48rem;
  height: 0.48rem;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--accent-dark);
  background: transparent;
  cursor: pointer;
}

.piece-image-controls .piece-image-control {
  color: white;
}

.piece-image-control.is-active {
  background: currentColor;
}

.piece-image-arrow {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1;
  pointer-events: auto;
}

.piece-contact-link {
  width: fit-content;
  margin: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.piece-fitting-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.piece-technique-list {
  display: grid;
  max-width: 26rem;
  gap: 0.45rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}

.piece-technique-list li {
  display: grid;
  grid-template-columns: 1.3rem 1fr;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.piece-technique-list li::before {
  color: var(--ink);
  content: "•";
}

.piece-inquiry {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.45rem;
}

.piece-fitting-note::before {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink);
  content: "FIT NOTE";
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.cjk-text {
  font-family: var(--cjk);
}

.piece-contact-link::after {
  content: " ↗";
}

.gallery-card-archive {
  margin-block: var(--space-72);
}

.gallery-card:not(.gallery-card-archive) + .gallery-card-archive {
  margin-top: max(var(--space-72), calc(var(--space-32) - var(--archive-pull, 0%)));
}

.archive-piece {
  position: relative;
  width: var(--archive-width, 45%);
  margin: var(--archive-pull, 0) 0 0 var(--archive-offset, 0);
}

.archive-piece img {
  display: block;
  width: 100%;
  height: auto;
}

.archive-piece figcaption {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.25;
}

.archive-index {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  left: 0.75rem;
  padding-left: 0.55rem;
  border-left: 1px solid white;
  color: white;
  background: transparent;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 5px rgba(35, 29, 29, 0.65);
}

.archive-sold {
  position: absolute;
  z-index: 1;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  place-items: center;
  width: 3.05rem;
  height: 3.05rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: white;
  font-family: var(--serif);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(35, 29, 29, 0.6);
}

.piece-photo-id {
  display: none;
}

.split-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-20);
  margin-block: var(--space-64);
}

.process-grid article {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding-top: 2.6rem;
}

.process-grid article::before {
  position: absolute;
  top: 0.75rem;
  left: 2.9rem;
  right: -1.2rem;
  height: 1px;
  background: var(--line);
  content: "";
}

.process-grid article:last-child::before {
  display: none;
}

.process-grid article > span {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 0.74rem;
}

.process-grid h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--display-sm);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.pricing-note {
  position: relative;
  display: grid;
  gap: 0.35rem;
  max-width: 34rem;
  margin-block: 3rem 7rem;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.pricing-note::before {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0;
  width: 1px;
  background: var(--ink);
  content: "";
}

.pricing-note p {
  margin: 0;
}

.pricing-note strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.pricing-note span {
  display: block;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  color: var(--ink);
  background: rgba(255,255,255,0.72);
}

.required-mark {
  color: var(--accent-dark);
}

.fine-print {
  color: var(--muted);
  font-size: 0.76rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: var(--space-112);
}

.contact-channels {
  display: grid;
}

.contact-channels a {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.contact-action-block {
  display: block;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-channels .contact-action-link,
.contact-form .button {
  display: inline-block;
  width: fit-content;
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-decoration: none;
  cursor: pointer;
}

.contact-action-link::after,
.contact-form .button::after {
  content: "  ↗";
  color: var(--accent-dark);
  font-weight: 400;
}

.contact-channels span {
  display: block;
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.05;
}

.contact-channels small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.16;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-top: 1rem;
}

.social-icon {
  display: inline-grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  opacity: 0.72;
}

.contact-channels .social-icon {
  border-bottom: 0;
}

.social-icon img {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.contact-form {
  display: grid;
  gap: 0;
  padding: var(--space-32);
  background: var(--canvas-soft);
  border-top: 1px solid var(--line);
}

.contact-form label {
  display: grid;
  grid-template-columns: 5.4rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.68rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: var(--serif);
  font-size: 0.8rem;
  letter-spacing: 0;
}

.contact-form select {
  appearance: none;
  padding-right: 1.25rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-dark) 50%),
    linear-gradient(135deg, var(--accent-dark) 50%, transparent 50%);
  background-position:
    calc(100% - 0.55rem) 55%,
    calc(100% - 0.25rem) 55%;
  background-size: 0.32rem 0.32rem, 0.32rem 0.32rem;
  background-repeat: no-repeat;
}

.contact-form select option {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--ivory);
}

.contact-form textarea {
  min-height: 5.8rem;
  resize: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  box-shadow: inset 0 -1px 0 var(--ink);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form .field-pair {
  display: contents;
}

.contact-form .measurement-fields {
  display: grid;
  gap: 0;
}

.contact-form .measurement-fields[hidden] {
  display: none;
}

.contact-form .button {
  justify-self: end;
  margin-top: 1rem;
}

.contact-form .fine-print {
  margin-top: 1.25rem;
  font-size: 0.64rem;
  line-height: 1.35;
}

.contact-payment-note {
  max-width: none;
  margin: 2rem 0 0 auto;
  font-size: 0.64rem;
  line-height: 1.35;
  text-align: right;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: var(--space-40) var(--inset);
  border-top: 1px solid var(--line);
  font-family: var(--serif);
}

.site-footer > div {
  display: flex;
  flex-direction: column;
}

.site-footer span {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.15;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.site-footer a {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

/* Policy pages (privacy, terms, shipping-returns, accessibility) */

.policy-body {
  background:
    radial-gradient(circle at 84% 0, rgba(184, 170, 152, 0.14), transparent 24rem),
    var(--canvas);
}

.policy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: var(--space-24) var(--inset);
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
}

.policy-header .wordmark {
  font-family: var(--wordmark);
  font-size: 0.86rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  line-height: 1;
  text-decoration: none;
}

.policy-header .wordmark strong {
  font-weight: 300;
}

.policy-header .text-link {
  font-family: var(--serif);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.policy-header .text-link::after {
  content: "  ↗";
  color: var(--accent-dark);
}

.policy-main {
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--space-96) var(--inset) var(--space-128);
  font-size: 0.9rem;
  line-height: 1.62;
}

.policy-main h1 {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-size: var(--display-md);
  font-weight: 400;
  line-height: 1.1;
}

.policy-updated {
  margin: 0.65rem 0 2.4rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.policy-lede {
  font-family: var(--serif);
  font-size: var(--text-lede);
  line-height: 1.5;
}

.policy-main h2 {
  margin: 2.4rem 0 0.65rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.policy-main ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.policy-main li {
  margin-bottom: 0.48rem;
}

.policy-main a {
  font-family: var(--serif);
  font-size: 0.86em;
  letter-spacing: 0.04em;
  text-underline-offset: 0.2em;
}

dialog {
  width: min(90vw, 62rem);
  padding: var(--space-64);
  border: 0;
  border-radius: 1.2rem;
  color: var(--ink);
  background: var(--ivory);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(30, 22, 24, 0.7);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
}

.qr-dialog {
  width: fit-content;
  max-width: min(90vw, 24rem);
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.qr-image {
  display: block;
  width: min(100%, 18rem);
  margin: 0 auto;
  background: white;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 1rem;
  max-width: 28rem;
  padding: 0.9rem 1rem;
  border-radius: 0.7rem;
  color: white;
  background: var(--ink);
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.entry-index {
  position: absolute;
  z-index: 5;
  left: 1.2rem;
  top: 9rem;
  display: grid;
  gap: 1.05rem;
  width: 10rem;
  color: #fffaf4;
}

.entry-index a {
  position: relative;
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  color: inherit;
  text-decoration: none;
}

.entry-index span {
  grid-row: 1 / span 2;
  font-family: var(--serif);
  font-size: 0.66rem;
}

.entry-index strong {
  font-family: var(--serif);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.entry-index small {
  font-family: var(--serif);
  font-size: 0.72rem;
}

.entry-index a::after {
  content: "";
  position: absolute;
  left: 1.35rem;
  right: 0;
  bottom: -0.18rem;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 220ms ease, transform 220ms ease;
}

.entry-index a:focus-visible::after {
  opacity: 0.8;
  transform: scaleX(1);
}

.nav-group {
  position: relative;
  display: grid;
  padding-left: 1.55rem;
}

.nav-number {
  position: absolute;
  left: 0;
  top: 0.08rem;
  font-family: var(--serif);
  font-size: 0.66rem;
}

.nav-group strong {
  margin-bottom: 0.15rem;
  font-family: var(--serif);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.15;
  text-transform: uppercase;
}

.nav-group a {
  width: fit-content;
  font-family: var(--serif);
  font-size: 0.76rem;
  line-height: 1.25;
}

.rail-detail {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.7rem;
  line-height: 1.25;
}

@media (min-width: 781px) {
  body {
    background: var(--canvas);
  }

  .prototype-banner {
    position: fixed;
    z-index: 80;
    right: 0.8rem;
    bottom: 0.6rem;
    padding: 0;
    color: rgba(35, 29, 29, 0.58);
    background: transparent;
    font-size: 0.68rem;
    text-align: right;
  }

  .entry {
    display: block;
    color: #fffaf4;
    background: #322d31;
  }

  .entry-art {
    position: absolute;
    inset: 0;
  }

  .entry-art::before {
    z-index: 1;
    background:
      linear-gradient(90deg, rgba(31, 25, 27, 0.38), rgba(31, 25, 27, 0.02) 55%),
      linear-gradient(0deg, rgba(31, 25, 27, 0.26), transparent 45%);
  }

  .entry-photo {
    filter: saturate(0.72) contrast(1.02) brightness(0.84);
  }

  .entry-content {
    position: absolute;
    z-index: 4;
    inset: 0;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
  }

  .entry-content .eyebrow {
    position: absolute;
    left: 1.2rem;
    top: 1rem;
    color: inherit;
    font-family: var(--serif);
    font-size: 0.63rem;
    letter-spacing: 0.18em;
  }

  .entry h1 {
    max-width: none;
    color: inherit;
    font-size: var(--display-hero);
    letter-spacing: 0.18em;
    line-height: 1;
  }

  .entry-statement {
    max-width: 28rem;
    margin: 1.1rem 0 1.4rem;
    color: inherit;
    font-family: var(--serif);
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .entry .button {
    min-height: auto;
    padding: 0.2rem 0;
    border: 0;
    border-bottom: 1px solid currentColor;
    border-radius: 0;
    color: inherit;
    background: transparent;
    font-family: var(--serif);
    font-size: 0.75rem;
    font-weight: 400;
  }

  .site-header {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: block;
    width: 220px;
    height: 100vh;
    padding: 1.2rem 1rem;
    border: 0;
    background: linear-gradient(90deg, rgba(244, 240, 232, 0.98), rgba(244, 240, 232, 0.8) 72%, transparent);
    backdrop-filter: none;
    opacity: 1;
    transition: opacity 500ms ease;
  }

  .site-header:focus-within {
    opacity: 1;
  }

  .wordmark {
    gap: 0.6rem;
    font-family: var(--serif);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }

  .logo-space {
    width: 1.25rem;
    height: 1.25rem;
  }

  .site-nav {
    flex-direction: column;
    gap: 1.25rem;
    margin-top: var(--space-128);
  }

  .site-nav a {
    display: grid;
    grid-template-columns: 1.4rem 1fr;
    gap: 0.2rem;
    width: 10rem;
    font-family: var(--serif);
    font-size: 0.76rem;
    line-height: 1.15;
  }

  .site-nav a::before {
    content: attr(data-index);
    font-size: 0.68rem;
  }

  .site-nav a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  main,
  .site-footer {
    margin-left: 220px;
  }

  .section {
    width: 100%;
    margin: 0;
    padding: var(--space-112) var(--space-20);
  }

  .section-heading,
  .split-heading {
    grid-template-columns: minmax(12rem, 0.7fr) 1.3fr;
    align-items: end;
    gap: 4rem;
  }

  .section-heading h2,
  .split-heading h2 {
    font-size: var(--display-lg);
  }

  .section-heading > p:last-child,
  .split-heading > p {
    max-width: 34rem;
    font-family: var(--serif);
    font-size: 0.9rem;
  }

  .filter-group {
    gap: 1.2rem;
    margin: 3rem 0 1.5rem;
  }

  .filter {
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--muted);
    background: transparent;
    font-family: var(--serif);
    font-size: 0.72rem;
    text-decoration: none;
  }

  .filter.is-active {
    color: var(--ink);
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 0.25em;
  }

  .gallery-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
  }

  .gallery-card {
    grid-column: 1 / -1;
  }

  .piece-art {
    min-height: 0;
    border-radius: 0;
    background: #d8d1c7;
  }

  .piece-meta {
    grid-template-columns: minmax(8rem, 0.7fr) 1.3fr;
    gap: 0.15rem 1rem;
    padding: 0.65rem 0 1rem;
    border-bottom: 1px solid var(--line);
  }

  .piece-meta .status {
    grid-row: span 2;
  }

  .piece-meta strong {
    font-size: 0.92rem;
  }

  .piece-meta > span:last-child {
    font-size: 0.7rem;
  }

  .process-grid {
    margin-block: 3rem 6rem;
  }

  .mto-section,
  .contact-section {
    background: var(--canvas-soft);
  }

  .gallery-section {
    background: var(--canvas);
  }

  .button {
    border-radius: 0;
  }

  .contact-layout {
    gap: 6rem;
  }
}

/* Tablet. Only the ladders are redefined — components pick up the new rhythm
   without a single per-component override. */
@media (max-width: 1050px) {
  :root {
    --inset: 2rem;
    --space-48: 2.5rem;
    --space-64: 3rem;
    --space-72: 3.5rem;
    --space-96: 4rem;
    --space-112: 5rem;
    --space-128: 5.5rem;
    --space-top: 5rem;
    --display-sm: 1.6rem;
    --display-md: 2.6rem;
    --display-lg: 3.4rem;
    --display-hero: 1.9rem;
  }

  .process-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .process-grid article::before {
    display: none;
  }
}

/* Mobile. The grid gets coarser (12 -> 6 columns) rather than being abandoned,
   and both ladders re-step. Layout below is expressed in those tokens. */
@media (max-width: 780px) {
  :root {
    --columns: 6;
    --inset: 1.25rem;
    --gutter: 0.75rem;
    --header-height: 6.35rem;
    --space-24: 1.25rem;
    --space-32: 1.5rem;
    --space-40: 1.75rem;
    --space-48: 2rem;
    --space-64: 2.5rem;
    --space-72: 2.5rem;
    --space-96: 3.2rem;
    --space-112: 4.5rem;
    --space-128: 4rem;
    --space-top: 4.5rem;
    --display-sm: 1.35rem;
    --display-md: 2rem;
    --display-lg: 2.5rem;
    --display-hero: 2.6rem;
  }

  html {
    scroll-padding-top: calc(var(--header-height-actual) + var(--space-8));
  }

  body {
    font-size: 0.96rem;
  }

  .prototype-banner {
    padding:
      0.35rem
      max(0.75rem, env(safe-area-inset-right))
      0.35rem
      max(0.75rem, env(safe-area-inset-left));
    font-size: 0.66rem;
    letter-spacing: 0.03em;
  }

  .entry {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 58%) minmax(0, 42%);
    min-height: calc(var(--1vh) * 100);
    height: calc(var(--1vh) * 100);
  }

  .entry-art {
    min-height: 0;
  }

  .entry-photo {
    object-position: center 18%;
  }

  .entry-content {
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding:
      var(--space-24)
      max(1.25rem, env(safe-area-inset-right))
      max(1.25rem, env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
  }

  .entry-content .eyebrow {
    margin-bottom: 0.45rem;
    font-size: var(--text-label);
  }

  .entry h1 {
    max-width: 12ch;
    font-size: var(--display-hero);
    line-height: 0.94;
    letter-spacing: 0.08em;
  }

  .entry-statement {
    width: 100%;
    margin: 0.8rem 0 1rem;
    font-size: var(--text-lede);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .entry .button {
    min-height: 44px;
    padding-inline: 1.1rem;
  }

  .entry-index,
  .rail-detail {
    display: none;
  }

  /* No toggle and no panel. The nav sits out in the open as a single row of
     links floating on a translucent wash, so content scrolls under it. */
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    min-height: var(--header-height);
    padding:
      max(0.7rem, env(safe-area-inset-top))
      max(var(--inset), env(safe-area-inset-right))
      0.6rem
      max(var(--inset), env(safe-area-inset-left));
    border-bottom: 0;
    background: rgba(244, 240, 232, 0.72);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
  }

  .wordmark {
    max-width: 100%;
    font-size: var(--text-body);
  }

  .logo-space {
    flex: 0 0 auto;
  }


  .site-nav {
    position: static;
    display: flex;
    flex-flow: row wrap;
    align-items: baseline;
    gap: 0 1.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  /* The numeral is rail furniture. In a floating row only the short section
     name earns its space, so the descriptor is clipped rather than removed:
     the anchor keeps its accessible name and is stretched over the whole
     group to stay a 44px target. */
  .nav-number {
    display: none;
  }

  .nav-group {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
  }

  .nav-group strong {
    margin: 0;
    color: var(--accent-dark);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .nav-group a {
    position: absolute;
    inset: 0;
    width: auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    text-indent: -999em;
  }

  .section {
    width: 100%;
  }

  .section-heading,
  .split-heading,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-32);
  }

  .section-heading h2,
  .split-heading h2 {
    font-size: var(--display-lg);
    overflow-wrap: anywhere;
  }

  .section {
    padding:
      var(--space-top)
      max(var(--inset), env(safe-area-inset-right))
      var(--space-top)
      max(var(--inset), env(safe-area-inset-left));
    scroll-margin-top: var(--header-height-actual);
  }

  .section-heading {
    gap: 0.8rem;
    margin-bottom: 2rem;
  }

  .filter-group {
    gap: 0.35rem 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
  }

  .filter-group::-webkit-scrollbar {
    display: none;
  }

  .filter {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .gallery-card {
    grid-column: 1 / -1;
  }

  .piece-art {
    min-height: 0;
    aspect-ratio: var(--card-ratio, 4 / 5);
  }

  .button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .process-grid article {
    min-height: auto;
  }

  .field-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-note {
    margin-bottom: 4.5rem;
  }

  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .piece-art {
    border-radius: 0;
  }

  .piece-layout,
  .piece-layout-available {
    grid-template-columns: minmax(0, 1fr);
  }

  .piece-layout,
  .piece-layout-available {
    gap: var(--space-16);
  }

  .piece-media,
  .piece-meta {
    min-width: 0;
  }

  .piece-fitting-note,
  .contact-payment-note {
    white-space: normal;
  }

  .contact-payment-note {
    text-align: left;
  }

  /* Keep the editorial stagger on mobile instead of flattening every piece to
     full width. The hand-tuned desktop values still drive the result: each
     width is remapped into a legible mobile band, each offset is reduced
     proportionally, and a min-width floor stops any piece collapsing on very
     narrow screens. Retuning a piece on desktop retunes it here too. */
  .archive-piece {
    --archive-offset-m: calc(var(--archive-offset, 0%) * 0.28);
    width: min(
      calc(52% + var(--archive-width, 45%) * 0.75),
      calc(100% - var(--archive-offset-m))
    );
    min-width: 12rem;
    margin: calc(var(--archive-pull, 0%) * 0.5) 0 0 var(--archive-offset-m);
  }

  .gallery-card:not(.gallery-card-archive) + .gallery-card-archive {
    margin-top: var(--space-72);
  }

  dialog {
    max-height: calc(var(--1vh) * 100 - var(--space-32));
    overflow-y: auto;
    padding:
      3.5rem
      max(1.25rem, env(safe-area-inset-right))
      max(1.25rem, env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
  }

}



/* At or below 361px the three section names no longer fit one line and the
   nav wraps to a second row. That is the intended graceful outcome; reserve
   the taller height so the header does not jump once the webfont swaps in.
   Anchor offsets are corrected at runtime via --header-height-actual. */
@media (max-width: 361px) {
  :root {
    --header-height: 8.8rem;
  }
}


@media (max-width: 780px) and (orientation: landscape) {
  .entry {
    grid-template-columns: 58% 42%;
    grid-template-rows: 1fr;
  }

  .entry-art {
    min-height: 100%;
  }

  .entry-content {
    padding-top: max(1rem, env(safe-area-inset-top));
  }

  .entry h1 {
    font-size: var(--display-hero);
  }

  .entry-statement {
    font-size: 0.9rem;
  }
}


/* Hover affordances only exist where a precise pointer does, so a tap on a
   touch screen can never latch a hover state that then has to be tapped away. */
@media (pointer: fine) {
  .button:hover {
    transform: translateY(-2px);
  }

  .site-nav a:hover {
    color: var(--accent-dark);
  }

  .piece-contact-link:hover,
  .contact-action-link:hover,
  .contact-form .button:hover {
    transform: none;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .social-icon:hover {
    background: transparent;
    opacity: 1;
  }

  .site-footer a:hover {
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }

  .entry-index a:hover::after {
    opacity: 0.8;
    transform: scaleX(1);
  }
}

@media (min-width: 781px) and (pointer: fine) {
  .site-header {
    opacity: 0.48;
  }

  .site-header:hover {
    opacity: 1;
  }

  .entry .button:hover {
    transform: none;
  }

  .site-nav a:hover {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
