/* Taana: shared system. Builds on tokens.css (link tokens.css first). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body), system-ui, sans-serif; font-size: 18px; line-height: 1.45;
  font-optical-sizing: auto; overflow-x: clip; -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 3px; }

/* ---------- type ---------- */
h1, h2, h3, .display {
  font-family: var(--font-display), system-ui, sans-serif; font-weight: 800;
  line-height: .88; letter-spacing: -.02em; margin: 0;
  overflow-wrap: normal; word-break: normal; hyphens: none;
}
.d-xl { font-size: clamp(56px, 12vw, 200px); }
.d-l { font-size: clamp(48px, 10vw, 180px); }
.d-m { font-size: clamp(40px, 6.4vw, 104px); }
.d-s { font-size: clamp(30px, 3.4vw, 48px); font-weight: 700; line-height: .95; }
.label, .kicker {
  font-family: var(--font-label), ui-monospace, monospace; text-transform: uppercase;
  letter-spacing: .18em; font-size: 12px; line-height: 1.5; font-weight: 400;
}
.label b, .label strong, .fig { font-weight: 700; }
.kicker { font-size: 13px; font-weight: 700; }
.body-l { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.45; max-width: 62ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* word masks for once-only rises (spans added by site.js) */
.w-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.w-mask > span { display: inline-block; }

/* ---------- layout ---------- */
.wrap { padding-inline: max(16px, 6vw); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 2vw, 32px); }
@media (max-width: 899px) { .grid { grid-template-columns: minmax(0, 1fr); } .grid > * { grid-column: 1 / -1 !important; } }

/* fields: each section owns one flat colour */
.f-cotton { background: var(--bg); color: var(--ink); }
.f-madder { background: var(--accent); color: var(--accent-ink); }
.f-indigo { background: var(--indigo); color: var(--indigo-ink); }
.f-turmeric { background: var(--turmeric); color: var(--turmeric-ink); }
.f-leaf { background: var(--leaf); color: var(--leaf-ink); }
.f-jute { background: var(--surface); color: var(--jute-ink); }

/* curved edges (only where the field colour changes); --curve is scrubbed by site.js */
.curve-top {
  --curve: clamp(48px, 9vw, 150px);
  position: relative; z-index: 2;
  margin-top: calc(-1 * clamp(48px, 9vw, 150px));
  border-top-left-radius: 50% var(--curve); border-top-right-radius: 50% var(--curve);
}
.curve-bottom {
  --curve: clamp(48px, 9vw, 150px);
  border-bottom-left-radius: 50% var(--curve); border-bottom-right-radius: 50% var(--curve);
}

/* ---------- controls ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius-control, 999px); border: 0;
  font-family: var(--font-display), system-ui, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur-quick) var(--ease-out), background-color var(--dur-quick) var(--ease-out);
}
.pill:hover { transform: translateY(-2px); }
.pill--madder { background: var(--accent); color: var(--accent-ink); }
.pill--cotton { background: var(--bg); color: var(--accent); }
.pill--indigo { background: var(--indigo); color: var(--indigo-ink); }
.pill--line { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.pill--big { min-height: 64px; padding: 0 36px; font-size: 20px; }
.pill .arr { font-family: var(--font-label); font-weight: 700; }

/* add to sample */
.add-sample {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 10px;
  border-radius: 999px; border: 2px solid currentColor; background: transparent; cursor: pointer;
  font-family: var(--font-label); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transition: background-color var(--dur-quick) var(--ease-out), color var(--dur-quick) var(--ease-out);
}
.add-sample::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--c, transparent); box-shadow: inset 0 0 0 2px currentColor;
}
.add-sample:hover { background: rgba(255,248,238,.18); }
.add-sample[aria-pressed="true"] { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* chips and discs */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 12px 4px 6px;
  border-radius: 999px; background: var(--bg); color: var(--ink);
  font-family: var(--font-label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
}
.chip i { width: 20px; height: 20px; border-radius: 50%; background: var(--c, var(--accent)); box-shadow: inset 0 0 0 1.5px rgba(35,48,94,.25); flex: none; }
.fact {
  display: inline-block; padding: 6px 10px; border-radius: 6px;
  font-family: var(--font-label); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
  background: var(--bg); color: var(--ink);
}
.sticker {
  display: grid; place-items: center; text-align: center; border-radius: 50%; aspect-ratio: 1;
  font-family: var(--font-label); font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  box-shadow: 2px 2px 0 rgba(35,48,94,.28);
}

/* photo tiles: radius 20, 6px rim, small tilt */
.tile {
  border-radius: var(--radius-media, 20px); overflow: hidden; border: 6px solid var(--rim, var(--bg));
  background: var(--surface); transform: rotate(var(--tilt, 0deg));
}
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }

/* paper: cotton with zigzag edges */
.paper { background: var(--bg); color: var(--ink); }
.zz-bottom { --s: 9px; -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%; padding-bottom: calc(var(--s) + 14px); }
.zz-top { --s: 9px; -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%; mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--s)) 100%; padding-top: calc(var(--s) + 14px); }
.drop { filter: drop-shadow(2px 2px 0 rgba(35,48,94,.28)); }
.hole { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px rgba(35,48,94,.35); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50; background: var(--bg); color: var(--ink);
  height: 72px; display: flex; align-items: center; gap: 24px; padding-inline: max(16px, 3vw);
  border-bottom: 2px solid var(--ink);
}
.site-head__mark { display: block; flex: none; margin-left: -10px; }
.site-head__mark img { height: 60px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); margin-left: auto; margin-right: 150px; }
.site-nav a { font-weight: 500; font-size: 17px; text-decoration: none; padding: 10px 0; position: relative; }
.site-nav a:not(.pill)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-quick) var(--ease-out); }
.site-nav a:not(.pill):hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav .pill { min-height: 48px; padding: 0 22px; font-size: 16px; }
.menu-btn { display: none; }
@media (max-width: 899px) {
  .site-head { height: 64px; gap: 10px; }
  .site-head__mark img { height: 48px; }
  .site-nav {
    position: fixed; inset: 64px 0 auto 0; margin: 0; display: none; flex-direction: column; align-items: flex-start;
    gap: 0; padding: 12px 16px 28px; background: var(--bg); border-bottom: 2px solid var(--ink);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.pill) { font-family: var(--font-display); font-weight: 800; font-size: 40px; letter-spacing: -.02em; line-height: 1; padding: 10px 0; }
  .site-nav .pill { display: none; }
  .head-ask { margin-left: auto; min-height: 44px !important; padding: 0 16px !important; font-size: 15px !important; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
    border: 2px solid var(--ink); background: transparent; cursor: pointer; margin-right: 78px; flex: none;
  }
  .menu-btn span { width: 18px; height: 2px; background: currentColor; box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor; }
}
@media (min-width: 900px) { .head-ask { display: none !important; } }
@media (max-width: 420px) {
  .site-head__mark img { height: 38px; }
  .head-ask { padding: 0 12px !important; font-size: 14px !important; }
}

/* ---------- the sample tag (all pages) ---------- */
.sample-tag { position: fixed; top: 0; right: max(16px, 2.4vw); z-index: 60; width: 128px; transform-origin: 50% 0; }
.sample-tag__string { display: block; width: 2px; height: 22px; margin: 0 auto; background: var(--ink); }
.sample-tag__btn {
  display: block; width: 100%; border: 0; cursor: pointer; text-align: center;
  padding: 10px 10px calc(var(--s, 9px) + 8px); background: var(--bg); color: var(--ink);
}
.sample-tag__card { filter: drop-shadow(2px 2px 0 rgba(35,48,94,.3)); }
.sample-tag__btn .hole { margin: 0 auto 6px; }
.sample-tag__count { display: block; font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: .9; letter-spacing: -.02em; color: var(--accent); }
.sample-tag__btn .label { display: block; font-size: 10px; letter-spacing: .14em; line-height: 1.35; }
.sample-tag.is-bump .sample-tag__card { animation: tag-bump var(--dur-standard) var(--ease-settle); }
@keyframes tag-bump { 0% { transform: rotate(-7deg) translateY(4px); } 100% { transform: rotate(0); } }
.sample-tag__panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(320px, calc(100vw - 32px));
  background: var(--bg); color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; padding: 18px;
  box-shadow: 4px 4px 0 var(--ink);
}
.sample-tag__panel[hidden] { display: none; }
.sample-tag__panel h2 { font-size: 26px; line-height: 1; margin-bottom: 10px; }
.sample-tag__list { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.sample-tag__list .chip { background: #fff3df; padding-right: 4px; }
.sample-tag__list .chip button { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; }
.sample-tag__empty { font-size: 15px; color: var(--muted); }
.sample-tag__panel .pill { width: 100%; }
@media (max-width: 899px) {
  .sample-tag { width: 76px; right: 10px; }
  .sample-tag__string { height: 8px; }
  .sample-tag__btn { padding: 6px 4px calc(var(--s, 6px) + 4px); }
  .sample-tag__btn .hole { width: 10px; height: 10px; margin-bottom: 2px; }
  .sample-tag__count { font-size: 26px; }
  .sample-tag__btn .label { font-size: 8px; letter-spacing: .08em; }
  .sample-tag .zz-bottom { --s: 6px; }
}

/* ---------- ask field (every page closes on it) ---------- */
.ask { padding-block: clamp(120px, 14vw, 220px) clamp(72px, 9vw, 140px); min-height: 80svh; display: flex; align-items: center; }
.ask__inner { width: 100%; }
.ask h2 { font-size: clamp(56px, 12vw, 210px); grid-column: 1 / 11; }
.ask__body { grid-column: 1 / 7; margin-top: 36px; font-size: clamp(18px, 1.5vw, 22px); max-width: 50ch; }
.ask__do { grid-column: 1 / 7; margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ask__picks { grid-column: 8 / 13; align-self: end; margin-top: 36px; }
.ask__picks .label { display: block; margin-bottom: 10px; }
.ask__picks ul { display: flex; flex-wrap: wrap; gap: 8px; }
.ask__picks:not(.has-picks) { display: none; }

/* ---------- footer: an indigo bale label ---------- */
.site-foot { position: relative; padding: clamp(72px, 9vw, 140px) max(16px, 6vw) 40px; }
.site-foot__grid { align-items: end; row-gap: 48px; }
.site-foot__label {
  grid-column: 1 / 8; padding: 18px 26px 28px; border-radius: 6px; transform: rotate(-2deg);
}
.site-foot__label img { width: 100%; height: auto; }
.site-foot__label .row { display: flex; justify-content: space-between; gap: 16px; border-top: 2px dashed rgba(35,48,94,.4); padding-top: 12px; margin-top: 4px; }
.site-foot__find { grid-column: 9 / 13; }
.site-foot__find h2 { font-size: clamp(44px, 5vw, 80px); margin-bottom: 18px; }
.site-foot__find address { font-style: normal; font-size: 17px; max-width: 34ch; margin-bottom: 24px; }
.site-foot__rows { border-top: 1px solid rgba(255,248,238,.45); }
.site-foot__rows li { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; border-bottom: 1px solid rgba(255,248,238,.45); }
.site-foot__rows a { text-decoration: none; font-family: var(--font-label); font-size: 14px; letter-spacing: .08em; padding: 12px 0; }
.site-foot__rows a:hover { color: var(--turmeric); }
.site-foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 28px; }
.site-foot__links a { text-decoration: none; font-weight: 500; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.site-foot__links a:hover { text-decoration: underline; text-decoration-color: var(--turmeric); text-underline-offset: 5px; }
.site-foot__small { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; border-top: 1px solid rgba(255,248,238,.3); }

/* move slots: let the moves take the room they need */
[data-move-slot] { position: relative; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* the board's pinned objects lean past a phone's edge on purpose */
#numbers, #colour, #projects { overflow-x: clip; }
