/* ============ Tokens ============ */
:root {
  --oat: #F4ECDF;
  --cream: #FBF6EE;
  --paper: #FFFCF7;
  --sand: #EADBC3;
  --sand-2: #DCC6A4;
  --bark: #33241C;
  --bark-2: #5C4536;
  --muted: #76604F;
  --clay: #C4643C;
  --clay-btn: #B4552F;
  --clay-deep: #9A4424;
  --marigold: #E3A42B;
  --sage: #8FA27E;
  --turquoise: #3AAFB0;
  --lavender: #9C8BC9;
  --line: rgba(51, 36, 28, 0.14);
  --radius: 22px;
  --shadow: 0 1px 0 rgba(51, 36, 28, 0.05), 0 18px 40px -18px rgba(51, 36, 28, 0.35);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 68px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--oat);
  color: var(--bark);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* soft paper grain */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .14 0 0 0 0 .1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--bark); color: var(--cream); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); }
.section { position: relative; padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--bark-2); font-size: 1.1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 10px;
  height: 13px;
  background: currentColor;
  clip-path: path("M5 0C5 0 0 6 0 8.5a5 5 0 0 0 10 0C10 6 5 0 5 0z");
}
.small, .fine { font-size: 0.88rem; color: var(--muted); }
.fine { margin: 12px 0 0; }

/* ============ Buttons & chips ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85em 1.45em;
  border: 2px solid var(--bark);
  border-radius: 999px;
  background: var(--clay-btn);
  color: #FFF8F0;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--bark);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--bark); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--bark); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: var(--paper); color: var(--bark); }
.btn-small { padding: 0.5em 1em; font-size: 0.92rem; box-shadow: 2px 2px 0 var(--bark); }
.btn-small:hover { box-shadow: 4px 4px 0 var(--bark); }
.btn-big { font-size: 1.1rem; padding: 1em 1.8em; width: 100%; margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 0.5em 1.1em;
  border-radius: 999px;
  border: 2px solid var(--bark);
  background: transparent;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.chip:hover { background: var(--sand); }
.chip[aria-pressed="true"] { background: var(--bark); color: var(--cream); }

.dots { display: inline-flex; }
.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--paper);
  margin-left: -5px;
  box-shadow: 0 0 0 1px var(--line);
}
.dot:first-child { margin-left: 0; }

.text-link { font-weight: 700; color: var(--clay-deep); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.link-btn { background: none; border: 0; padding: 4px 0; font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 4px; }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 236, 223, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(51, 36, 28, 0.4); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background:
    radial-gradient(circle at 30% 65%, var(--lavender) 0 22%, transparent 23%),
    radial-gradient(circle at 68% 72%, var(--turquoise) 0 16%, transparent 17%),
    radial-gradient(circle at 60% 35%, var(--marigold) 0 18%, transparent 19%),
    var(--clay);
  border: 2px solid var(--bark);
  transform: rotate(-12deg);
  transition: transform 0.4s;
}
.logo:hover .logo-mark { transform: rotate(200deg); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; position: relative; }
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  border-radius: 3px;
  background: var(--clay);
  transform: scaleX(0);
  transition: transform 0.25s;
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; }
.burger, .burger::before, .burger::after {
  display: block;
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--bark);
  transition: transform 0.25s;
  position: relative;
}
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -7px; }
.burger::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 7vw, 90px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); font-weight: 700; margin-bottom: 0.3em; }
.hero h1 em { font-style: italic; font-weight: 600; color: var(--clay-deep); }
.squiggle {
  padding-bottom: 0.08em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 10'%3E%3Cpath d='M0 6 Q7.5 0 15 6 T30 6 T45 6 T60 6' fill='none' stroke='%23E3A42B' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 100% / 40px 9px;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--bark-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 34px; }
.hero-facts { display: flex; gap: 28px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 0.95rem; }
.hero-facts strong { display: block; font-family: var(--display); font-size: 1.7rem; color: var(--bark); line-height: 1.1; font-variation-settings: "SOFT" 100; }

.hero-stage { position: relative; display: grid; place-items: center; min-height: 520px; }
.blob {
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 30% 30%, rgba(227, 164, 43, 0.45), transparent 55%),
    radial-gradient(circle at 75% 60%, rgba(156, 139, 201, 0.45), transparent 55%),
    radial-gradient(circle at 40% 80%, rgba(58, 175, 176, 0.35), transparent 55%),
    var(--sand);
  border-radius: 42% 58% 63% 37% / 45% 42% 58% 55%;
  animation: morph 14s ease-in-out infinite alternate;
}
@keyframes morph {
  50% { border-radius: 58% 42% 35% 65% / 55% 60% 40% 45%; transform: rotate(8deg) scale(1.03); }
  100% { border-radius: 38% 62% 55% 45% / 62% 38% 62% 38%; transform: rotate(-6deg); }
}
.hero-shirt {
  position: relative;
  z-index: 2;
  width: min(460px, 86%);
  aspect-ratio: 400 / 440;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 30px;
  transition: transform 0.35s cubic-bezier(.2, .8, .3, 1.3);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.hero-shirt:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.02); }
.hero-shirt:active { transform: scale(0.97); }
.hero-shirt canvas, .preview-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 22px 22px rgba(51, 36, 28, 0.28));
}
.polaroid {
  margin: 0;
  background: var(--paper);
  padding: 10px 10px 34px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  position: relative;
}
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.polaroid figcaption {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--bark-2);
}
.hero-polaroid { position: absolute; z-index: 1; width: 34%; bottom: 10%; left: -4%; transform: rotate(-9deg); }
.hero-polaroid img { object-position: 50% 45%; }
.spin-badge {
  position: absolute;
  z-index: 3;
  width: 118px;
  right: 2%;
  top: 6%;
  animation: spin 18s linear infinite;
  pointer-events: none;
}
.spin-badge circle { fill: var(--marigold); stroke: var(--bark); stroke-width: 2; }
.spin-badge text { font: 800 12.5px var(--body); letter-spacing: 0.14em; text-transform: uppercase; fill: var(--bark); }
.spin-badge .badge-drop { fill: var(--clay-btn); stroke: var(--bark); stroke-width: 2; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-palette {
  position: absolute;
  z-index: 3;
  bottom: 2%;
  right: 4%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 2px solid var(--bark);
  border-radius: 999px;
  padding: 6px 8px 6px 16px;
  box-shadow: 3px 3px 0 var(--bark);
  font-weight: 700;
  font-size: 0.92rem;
}

/* ============ Marquee ============ */
.marquee-clip { overflow: hidden; padding: 16px 0; margin: -16px 0; }
.marquee { background: var(--bark); color: var(--oat); overflow: hidden; padding: 14px 0; transform: rotate(-1.2deg); margin: 0 -10px; }
.marquee-track { display: flex; width: max-content; animation: slide 36s linear infinite; }
.marquee span {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 1.35rem;
  font-style: italic;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  gap: 44px;
  white-space: nowrap;
}
.marquee span::after { content: "✺"; font-style: normal; color: var(--marigold); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ============ Shop ============ */
.shop-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-track { width: 46px; height: 26px; border-radius: 99px; background: var(--sand-2); border: 2px solid var(--bark); position: relative; transition: background 0.2s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 2px solid var(--bark); transition: transform 0.2s; }
.switch input:checked + .switch-track { background: var(--sage); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--marigold); outline-offset: 2px; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 28px; }
.card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--bark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--bark);
  transition: transform 0.25s cubic-bezier(.2, .8, .3, 1.2), box-shadow 0.25s;
  animation: card-in 0.5s both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } }
.card:hover { transform: translate(-3px, -5px) rotate(-0.6deg); box-shadow: 8px 9px 0 var(--bark); }
.card:nth-child(even):hover { transform: translate(-3px, -5px) rotate(0.6deg); }
.card-media { position: relative; aspect-ratio: 4 / 5; background: var(--tint, var(--sand)); overflow: hidden; border-bottom: 2px solid var(--bark); }
.card-media img, .card-media canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s, transform 0.6s; }
.card-media canvas { inset: 7%; width: 86%; height: 86%; }
.card-media .alt { opacity: 0; }
.card:hover .card-media img { transform: scale(1.04); }
.card:hover .card-media .alt { opacity: 1; }
.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--paper);
  border: 1.5px solid var(--bark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.tag-flip { top: auto; left: auto; bottom: 12px; right: 12px; background: var(--marigold); }
.card.is-sold .card-media img, .card.is-sold .card-media canvas { filter: grayscale(0.5) brightness(0.95); }
.card.is-sold .tag { background: var(--bark); color: var(--cream); }
.card-body { padding: 16px 18px 18px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; }
.card-body h3 { margin: 0; font-size: 1.28rem; }
.card-open { all: unset; cursor: pointer; }
.card-open::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.card-open:focus-visible::after { outline: 3px solid var(--marigold); outline-offset: -5px; border-radius: var(--radius); }
.price { font-family: var(--display); font-weight: 700; font-size: 1.25rem; font-variation-settings: "SOFT" 100; }
.meta { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.92rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 20px; border: 2px dashed var(--sand-2); border-radius: var(--radius); }

/* ============ Product dialog ============ */
.piece {
  width: min(1000px, 100% - 24px);
  max-height: min(92vh, 900px);
  padding: 0;
  border: 2px solid var(--bark);
  border-radius: 28px;
  background: var(--cream);
  color: var(--bark);
  box-shadow: 8px 8px 0 var(--bark);
  overflow: auto;
}
.piece[open] { animation: pop 0.35s cubic-bezier(.2, .8, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.97); } }
.piece::backdrop { background: rgba(51, 36, 28, 0.55); backdrop-filter: blur(4px); }
.piece-inner { display: grid; grid-template-columns: 1.1fr 1fr; }
.piece-media { background: var(--tint, var(--sand)); padding: 20px; display: grid; gap: 12px; align-content: start; }
.piece-main { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; border-radius: 16px; background: rgba(255, 252, 247, 0.4); }
.piece-thumbs { display: flex; gap: 10px; }
.piece-thumbs button { width: 64px; height: 64px; padding: 0; border-radius: 12px; border: 2px solid transparent; overflow: hidden; background: none; }
.piece-thumbs button[aria-current="true"] { border-color: var(--bark); }
.piece-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.piece-info { padding: 34px 32px 30px; }
.piece-info h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.piece-price { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.piece-price .price { font-size: 1.8rem; }
.status { font-size: 0.85rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--sage); color: var(--bark); }
.status.sold { background: var(--sand-2); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 20px 0 24px; padding: 16px 0; border-block: 1.5px dashed var(--line); }
.specs dt { font-weight: 700; color: var(--muted); font-size: 0.9rem; }
.specs dd { margin: 0; display: flex; align-items: center; gap: 8px; }
.piece-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.piece-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--bark);
  background: var(--paper);
  font-size: 1.5rem;
  line-height: 1;
}
.claim-form { margin-top: 20px; padding: 18px; border-radius: 18px; background: var(--paper); border: 1.5px solid var(--line); display: grid; gap: 12px; }

/* ============ Dye Lab ============ */
.lab { background: var(--sand); }
.wave { position: absolute; left: 0; right: 0; height: 40px; }
.wave-top {
  top: -39px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 V20 C 25 0 50 0 75 18 S 125 38 150 18 S 190 4 200 14 V40 Z' fill='%23EADBC3'/%3E%3C/svg%3E") 0 0 / 400px 40px repeat-x;
}
.lab-grid { display: grid; grid-template-columns: minmax(300px, 430px) 1fr; gap: 32px; align-items: start; }
.lab-grid > * { min-width: 0; }
.lab-preview {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  background: var(--paper);
  border: 2px solid var(--bark);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 5px 5px 0 var(--bark);
}
.preview-stage {
  aspect-ratio: 400 / 440;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.7), transparent 65%),
    var(--oat);
  padding: 6%;
}
.concept-name { display: flex; align-items: center; gap: 8px; margin-top: 16px; border-bottom: 2px dashed var(--sand-2); }
.concept-name input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 4px 0;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}
.concept-name input:focus { outline: none; }
.concept-name:focus-within { border-bottom-color: var(--clay); }
.pencil { color: var(--muted); }
.preview-side { min-width: 0; }
.preview-meta { margin: 8px 0 14px; color: var(--muted); font-size: 0.95rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.step {
  border: 2px solid var(--bark);
  border-radius: 24px;
  background: var(--paper);
  padding: 22px 22px 24px;
  margin: 0 0 20px;
  min-width: 0;
}
.step legend {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding: 0;
}
.step legend + * { clear: both; }
.num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 46% 54% 50% 50% / 58% 52% 48% 42%;
  background: var(--marigold);
  border: 2px solid var(--bark);
  font-size: 1.05rem;
}
.hint { color: var(--bark-2); font-size: 0.95rem; }

.tiles { display: grid; gap: 10px; }
.garment-tiles { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.fold-tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.tile-input { position: absolute; opacity: 0; pointer-events: none; }
.tile {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: var(--oat);
  cursor: pointer;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  transition: transform 0.15s, background 0.2s;
}
.tile:hover { transform: translateY(-2px); background: var(--sand); }
.tile svg { width: 46px; height: 50px; fill: var(--sand-2); stroke: var(--bark); stroke-width: 14; stroke-linejoin: round; }
.tile-input:checked + .tile { border-color: var(--bark); background: var(--paper); box-shadow: 3px 3px 0 var(--bark); }
.tile-input:checked + .tile svg { fill: var(--clay); }
.tile-input:focus-visible + .tile { outline: 3px solid var(--marigold); outline-offset: 2px; }
.fold-tiles .tile { padding: 8px 8px 10px; }
.fold-tiles canvas { width: 100%; aspect-ratio: 1; border-radius: 12px; display: block; }
.tile small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span {
  display: block;
  height: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--oat);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.seg small { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; }
.seg input:checked + span { border-color: var(--bark); background: var(--paper); box-shadow: 3px 3px 0 var(--bark); }
.seg input:focus-visible + span { outline: 3px solid var(--marigold); outline-offset: 2px; }
.seg-small span { padding: 10px 12px; font-size: 0.95rem; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 12px 10px; margin-bottom: 16px; }
.swatch {
  position: relative;
  aspect-ratio: 1;
  border: 2px solid rgba(51, 36, 28, 0.25);
  border-radius: 46% 54% 52% 48% / 55% 46% 54% 45%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35), transparent 45%),
    var(--c);
  transition: transform 0.15s;
}
.swatch:nth-child(3n) { border-radius: 55% 45% 47% 53% / 44% 56% 44% 56%; }
.swatch:nth-child(4n+1) { border-radius: 50% 50% 42% 58% / 58% 42% 58% 42%; }
.swatch:hover { transform: scale(1.1) rotate(-6deg); }
.swatch[aria-pressed="true"] { border-color: var(--bark); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--bark); }
.swatch .order {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bark);
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 800;
}
.swatch-label { font-size: 0.72rem; font-weight: 700; text-align: center; display: block; margin-top: 4px; color: var(--bark-2); }
.swatch-wrap { display: grid; }
.palette-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.92rem; }
.palette-label { font-weight: 700; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 4px;
  border-radius: 99px;
  background: var(--oat);
  border: 1.5px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
}
.pill i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); }
.pill button { border: 0; background: none; padding: 0 6px 0 2px; font-size: 1rem; line-height: 1; color: var(--muted); }
.custom-color { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; margin-left: auto; }
.custom-color input { width: 30px; height: 30px; border: 2px solid var(--bark); border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.custom-color input::-webkit-color-swatch-wrapper { padding: 0; }
.custom-color input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.custom-color input::-moz-color-swatch { border: 0; border-radius: 50%; }

.range { display: grid; gap: 4px; margin-bottom: 18px; }
.range-label { font-weight: 700; }
.range input { width: 100%; accent-color: var(--clay-btn); height: 28px; }
.range-ends { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 700; font-size: 0.95rem; }
.field em { color: var(--clay-deep); font-style: normal; }
.field small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #FFFEFB;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--bark); box-shadow: 0 0 0 4px rgba(227, 164, 43, 0.35); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--clay-deep); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.other-field { margin-top: 14px; }
.warn { background: #FBEBD2; border: 1.5px solid var(--marigold); border-radius: 14px; padding: 12px 14px; font-size: 0.92rem; }

.sent {
  grid-column: 2;
  text-align: center;
  background: var(--paper);
  border: 2px solid var(--bark);
  border-radius: 28px;
  padding: 56px 28px;
  box-shadow: 5px 5px 0 var(--bark);
}
.sent h3 { font-size: 2.2rem; }
.sent:focus { outline: none; }
.sent-splash { position: relative; height: 120px; margin-bottom: 12px; }
.sent-splash i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90px;
  height: 90px;
  margin: -45px;
  border-radius: 46% 54% 52% 48% / 55% 46% 54% 45%;
  mix-blend-mode: multiply;
  animation: splash 1.1s cubic-bezier(.2, .8, .3, 1.2) both;
}
.sent-splash i:nth-child(1) { background: var(--clay); --x: -40px; --y: -8px; }
.sent-splash i:nth-child(2) { background: var(--turquoise); --x: 36px; --y: -14px; animation-delay: 0.1s; }
.sent-splash i:nth-child(3) { background: var(--lavender); --x: -6px; --y: 22px; animation-delay: 0.2s; }
.sent-splash i:nth-child(4) { background: var(--marigold); --x: 10px; --y: -30px; width: 50px; height: 50px; margin: -25px; animation-delay: 0.3s; }
@keyframes splash { from { transform: translate(0, 0) scale(0); } to { transform: translate(var(--x), var(--y)) scale(1); } }

/* ============ Process ============ */
.process { background: var(--bark); color: var(--oat); }
.process .eyebrow { color: var(--marigold); }
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.process-demo { display: grid; gap: 14px; }
.process-demo canvas {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 32px;
  border: 2px solid var(--oat);
  background: var(--cream);
  display: block;
}
.melt-slider { display: grid; gap: 6px; font-weight: 700; }
.melt-slider input { width: 100%; accent-color: var(--marigold); height: 30px; }
.process-demo .link-btn { justify-self: start; color: var(--sand); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 16px 18px 16px 70px;
  border-radius: 20px;
  border: 2px solid transparent;
  transition: background 0.35s, border-color 0.35s, opacity 0.35s;
  opacity: 0.55;
}
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--oat);
  font-family: var(--display);
  font-weight: 700;
}
.steps li.active { opacity: 1; background: rgba(244, 236, 223, 0.07); border-color: rgba(244, 236, 223, 0.25); }
.steps li.active::before { background: var(--marigold); color: var(--bark); border-color: var(--marigold); }
.steps h3 { margin: 0 0 4px; font-size: 1.3rem; }
.steps p { margin: 0; color: var(--sand); }

/* ============ Care ============ */
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card-panel { background: var(--paper); border: 2px solid var(--bark); border-radius: 28px; padding: clamp(24px, 4vw, 40px); box-shadow: 5px 5px 0 var(--bark); }
.card-panel h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.fiber-tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 20px 0; }
.fiber-tags li { padding: 6px 14px; border-radius: 99px; font-weight: 700; background: var(--sand); border: 1.5px solid var(--bark); }
.fiber-tags li:nth-child(3n+1) { background: #E4E9D8; }
.fiber-tags li:nth-child(3n+2) { background: #EFE0D7; }
.care-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.care-list li { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 1.05rem; }
.care-list span {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 46% 54% 50% 50% / 58% 52% 48% 42%;
  background: var(--oat);
  border: 2px solid var(--bark);
  font-size: 1.2rem;
}

/* ============ About ============ */
.about { background: var(--cream); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-photos { position: relative; min-height: 460px; }
.about-photos .polaroid { position: absolute; width: 52%; }
.tilt-l { left: 0; top: 4%; transform: rotate(-8deg); }
.tilt-r { right: 2%; top: 0; transform: rotate(6deg); z-index: 1; }
.tilt-s { left: 22%; bottom: 0; transform: rotate(-2deg); z-index: 2; }
.about-photos .polaroid { transition: transform 0.3s; }
.about-photos .polaroid:hover { transform: rotate(0) scale(1.05); z-index: 3; }
.about-copy p { font-size: 1.1rem; color: var(--bark-2); }

/* ============ FAQ ============ */
details {
  border: 2px solid var(--bark);
  border-radius: 20px;
  background: var(--paper);
  margin-bottom: 14px;
  transition: box-shadow 0.2s;
}
details[open] { box-shadow: 4px 4px 0 var(--bark); }
summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 60px 18px 22px;
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--marigold);
  border: 2px solid var(--bark);
  font-size: 1.2rem;
  transition: transform 0.25s;
}
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 22px 20px; margin: 0; color: var(--bark-2); }

/* ============ Footer ============ */
.site-footer { background: var(--bark); color: var(--sand); padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: start; }
.site-footer .logo { color: var(--oat); margin-bottom: 8px; }
.site-footer .logo-mark { border-color: var(--oat); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--oat); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: var(--marigold); }
.copyright { grid-column: 1 / -1; font-size: 0.88rem; opacity: 0.75; margin: 20px 0 0; padding-top: 20px; border-top: 1px solid rgba(234, 219, 195, 0.2); }

/* ============ Toast & reveal ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  background: var(--bark);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 99px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(.2, .8, .3, 1.2), visibility 0.35s;
  pointer-events: none;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .3, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero-grid, .process-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-stage { min-height: 0; padding: 20px 0 50px; }
  .hero-shirt { width: min(420px, 78%); }
  .about-photos { min-height: 380px; max-width: 520px; width: 100%; margin: 0 auto; }
  .lab-grid { grid-template-columns: 1fr; }
  .sent { grid-column: 1; }
  .lab-preview {
    top: var(--header-h);
    z-index: 10;
    display: grid;
    grid-template-columns: 124px 1fr;
    gap: 4px 14px;
    padding: 12px;
    border-radius: 20px;
    box-shadow: 3px 3px 0 var(--bark);
  }
  .preview-stage { padding: 4%; border-radius: 14px; }
  .concept-name { margin-top: 0; }
  .concept-name input { font-size: 1.25rem; }
  .preview-meta { margin: 4px 0 8px; font-size: 0.85rem; }
  .preview-actions { gap: 6px; }
  .preview-actions .btn-small { padding: 0.35em 0.75em; font-size: 0.82rem; }
  .lab-preview .fine { display: none; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 22px;
    background: var(--oat);
    border-bottom: 2px solid var(--bark);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { padding: 12px 4px; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 10px; }
  .care-grid { grid-template-columns: 1fr; }
  .piece-inner { grid-template-columns: 1fr; }
  .piece-info { padding: 24px 22px 26px; }
  .piece-main { aspect-ratio: 1; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { width: calc(100% - 32px); }
  .hero-polaroid { width: 40%; left: 0; }
  .spin-badge { width: 92px; }
  .hero-palette { right: 50%; transform: translateX(50%); bottom: 0; white-space: nowrap; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-body { padding: 12px 12px 14px; grid-template-columns: 1fr; }
  .card-body h3 { font-size: 1.05rem; }
  .card-body .price { font-size: 1.05rem; }
  .card:hover { transform: none; box-shadow: 4px 4px 0 var(--bark); }
  .meta { font-size: 0.8rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .seg { grid-template-columns: 1fr; }
  .step { padding: 18px 16px 20px; }
  .lab-preview { grid-template-columns: 96px 1fr; }
  .preview-actions #copy-link { display: none; }
  .custom-color { margin-left: 0; }
  .about-photos { min-height: 300px; }
  .marquee span { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
