/* Monochrome, to match the logo: white thread on black, geometric sans type. */
:root {
  --black: #0b0b0b;
  --paper: #faf9f7;
  --white: #ffffff;
  --ink: #141414;
  --muted: #666260;
  --line: #e3e0dc;
  --soft: #f1efec;
  --on-dark-muted: #b9b6b2;
  --font: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--font);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.8rem); font-weight: 300; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 300; }
h3 { font-size: 1.15rem; font-weight: 500; }

.eyebrow, .label {
  text-transform: uppercase; letter-spacing: .24em; font-size: .74rem; font-weight: 500;
}

/* Wordmark in the logo's lettering, for places too small for the logo image. */
.logo { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; margin: 0; }
.logo span { font-size: 1.55rem; letter-spacing: .14em; font-weight: 400; padding-left: .14em; }
.logo small { font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; margin-top: 5px; padding-left: .26em; opacity: .8; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 5vw, 64px);
  background: var(--black); color: var(--white);
}
.site-header nav { display: flex; gap: 24px; flex-wrap: wrap; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; }
.site-header nav a { text-decoration: none; color: var(--on-dark-muted); }
.site-header nav a:hover { color: var(--white); }

.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  background: var(--black); color: var(--white); text-decoration: none; border: 1px solid var(--black);
  font: 500 .8rem var(--font); letter-spacing: .18em; text-transform: uppercase;
  cursor: pointer; text-align: center;
}
.btn:hover { background: #2a2a2a; border-color: #2a2a2a; }
.btn.ghost { background: transparent; color: var(--black); }
.btn.ghost:hover { background: var(--black); color: var(--white); }
.on-dark .btn { background: var(--white); color: var(--black); border-color: var(--white); }
.on-dark .btn:hover { background: #ddd; border-color: #ddd; }
.on-dark .btn.ghost { background: transparent; color: var(--white); }
.on-dark .btn.ghost:hover { background: var(--white); color: var(--black); }

.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(40px, 7vw, 88px) clamp(16px, 5vw, 64px) clamp(48px, 8vw, 104px);
  background: var(--black); color: var(--white);
}
.hero .eyebrow { color: var(--on-dark-muted); margin: 0 0 18px; }
.hero h1 .soft { color: var(--on-dark-muted); }
.lede { font-size: 1.08rem; color: var(--on-dark-muted); max-width: 32em; font-weight: 300; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-logo { justify-self: center; width: min(100%, 300px); height: auto; }

.values {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line); background: var(--white);
}
.values div { padding: 30px clamp(16px, 4vw, 48px); border-right: 1px solid var(--line); }
.values div:last-child { border-right: 0; }
.values h3 { text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; margin-bottom: 8px; }
.values p { margin: 0; color: var(--muted); font-size: .95rem; font-weight: 300; }

.section { padding: clamp(48px, 8vw, 96px) clamp(16px, 5vw, 64px); }
.section.alt { background: var(--soft); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin: 0; font-weight: 300; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.card {
  all: unset; cursor: pointer; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line);
  transition: border-color .2s ease;
}
.card:hover { border-color: var(--black); }
.card:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }
.card-media { aspect-ratio: 4 / 5; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-text { padding: 16px 18px 20px; }
.card-text h3 { margin-bottom: 6px; font-weight: 400; font-size: 1.05rem; }
.card-text p { margin: 0; color: var(--muted); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }

/* Shown until real photos are added: the logo's thread circle on a dark ground. */
.placeholder {
  position: relative; width: 100%; height: 100%; min-height: 220px; display: grid; place-items: center;
  background: var(--c, #1a1a1a); color: var(--white); overflow: hidden;
}
.placeholder::before {
  content: ""; position: absolute; width: 62%; aspect-ratio: 1;
  border: 1.5px solid rgba(255,255,255,.75);
  border-radius: 48% 52% 50% 46% / 50% 46% 54% 50%;
  transform: rotate(-8deg);
}
.placeholder::after {
  content: ""; position: absolute; width: 1.5px; height: 70%;
  background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)) top / 100% 30% no-repeat,
              linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.85)) bottom / 100% 30% no-repeat;
}
.placeholder span { position: relative; letter-spacing: .18em; font-size: 1.3rem; padding-left: .18em; background: var(--c, #1a1a1a); }
/* `tone` in products.json picks a shade; the names are kept from the first theme. */
.tone-indigo { --c: #161616; }
.tone-rose { --c: #2a2827; }
.tone-sage { --c: #3a3836; }
.tone-terracotta { --c: #222; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; }
.steps li::before {
  content: counter(s); font-size: 1.1rem; font-weight: 300;
  width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 10px;
  border: 1.5px solid var(--black); border-radius: 48% 52% 50% 46% / 50% 46% 54% 50%;
}
.steps b { font-weight: 500; text-transform: uppercase; letter-spacing: .16em; font-size: .82rem; }
.steps span { color: var(--muted); font-size: .95rem; font-weight: 300; }

.measure dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 32px; margin: 0; }
.measure dl div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.measure dt { font-weight: 500; }
.measure dd { margin: 2px 0 0; color: var(--muted); font-size: .94rem; font-weight: 300; }

.cta { text-align: center; background: var(--black); color: var(--white); }
.cta p { color: var(--on-dark-muted); max-width: 36em; margin: 0 auto 28px; font-weight: 300; }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 44px clamp(16px, 5vw, 64px); background: var(--black); color: var(--on-dark-muted); font-size: .9rem;
}
.footer-brand { display: flex; align-items: center; gap: 20px; }
.footer-brand img { width: 74px; height: auto; }
.footer-brand p { margin: 0; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--white); }

.product-dialog {
  width: min(920px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  padding: 0; border: 0; border-radius: 4px; background: var(--paper); color: var(--ink);
}
.product-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.close-row { position: sticky; top: 0; display: flex; justify-content: flex-end; height: 0; z-index: 2; }
.close-row button {
  margin: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.product-body { display: grid; grid-template-columns: 1fr 1fr; }
.gallery-main { aspect-ratio: 4 / 5; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; }
.thumbs button { all: unset; cursor: pointer; width: 64px; flex: none; overflow: hidden; }
.info { padding: 32px 28px; }
.info .code { margin: 0 0 6px; font-size: .74rem; letter-spacing: .24em; color: var(--muted); }
.info h2 { font-size: 1.7rem; padding-right: 32px; }
.info .price { font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; margin-top: -4px; }
.info ul { padding-left: 1.1em; color: var(--muted); font-weight: 300; }
.order-form fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.order-form legend { font-weight: 500; margin-bottom: 8px; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span {
  display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .88rem; cursor: pointer; background: var(--white);
}
.choices input:checked + span { border-color: var(--black); background: var(--black); color: var(--white); }
.choices input:focus-visible + span { outline: 2px solid var(--black); outline-offset: 2px; }
.notes { display: block; margin-bottom: 20px; }
.notes span { display: block; font-weight: 500; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }
.notes textarea {
  width: 100%; font: inherit; font-size: .95rem; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--white); resize: vertical;
}
.info .btn { width: 100%; }
.hint { font-size: .85rem; color: var(--muted); text-align: center; }

/* Policy and contact pages */
.page { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 16px; }
.page h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.page h2 { font-size: .85rem; font-weight: 500; text-transform: uppercase; letter-spacing: .2em; margin-top: 2.2em; }
.page p { font-weight: 300; }
.page .updated { color: var(--muted); font-size: .9rem; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 300; }
.contact-list b { display: block; font-weight: 500; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 2px; }
.contact-list [data-optional]:not(.filled) { display: none; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { order: -1; width: min(48vw, 190px); }
  .lede { margin-inline: auto; }
  .actions { justify-content: center; }
  .values { grid-template-columns: 1fr; }
  .values div { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .values div:last-child { border-bottom: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .product-body { grid-template-columns: 1fr; }
  .gallery-main { aspect-ratio: 1; }
  .site-header { justify-content: center; }
  .site-header nav { gap: 12px; font-size: .66rem; letter-spacing: .06em; justify-content: center; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .info { padding: 24px 18px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-text { padding: 10px 12px 14px; }
  .card-text h3 { font-size: .95rem; }
  .card-text p { font-size: .68rem; }
  .placeholder { min-height: 0; }
  .placeholder span { font-size: .95rem; }
}
