/* ==========================================================================
   Charan Cheedella · portfolio
   Mobile first. Breakpoints: 640 (large phone), 960 (tablet), 1200 (desktop).
   ========================================================================== */

/* Fallbacks shaped like Unbounded, so headings wrap the same before and after the web font arrives.
   Arial Black is ~18% narrower than Unbounded; Roboto Black (Android) ~31%. */
@font-face {
  font-family: 'Unbounded Fallback';
  src: local('Arial Black'), local('Arial-Black');
  font-weight: 100 900;
  size-adjust: 118%;
  ascent-override: 84%;
  descent-override: 20%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'Unbounded Fallback Android';
  src: local('Roboto Black'), local('Roboto-Black'), local('Roboto Bold'), local('Roboto-Bold');
  font-weight: 100 900;
  size-adjust: 128%;
  ascent-override: 77%;
  descent-override: 19%;
  line-gap-override: 0%;
}

:root {
  /* paper: fine grain + slow tonal blotches, drawn once as SVG noise */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .27 0 0 0 0 .19 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.32'/%3E%3C/svg%3E");
  --blotch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.011' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .47 0 0 0 0 .33 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)' opacity='.14'/%3E%3C/svg%3E");
  --laid: repeating-linear-gradient(0deg, rgba(110, 90, 60, 0.035) 0 1px, transparent 1px 5px);

  --wall: #e9e5dc;
  --paper: #f7f4ec;
  --ink: #161616;
  --ink-2: #34322e;
  --mute: #646057;
  --line: rgba(22, 22, 22, 0.14);
  --seam: rgba(22, 22, 22, 0.28);

  --cloth: #2230ff;
  --rust: #b52829;
  --gold: #d9a441;
  --green: #2f6b4a;
  --olive: #6d7a3a;
  --kraft: #d6bf94;

  --pad: clamp(18px, 4.2vw, 40px);
  --block: clamp(84px, 13vh, 168px);
  --head: 64px;

  --display: 'Unbounded', 'Unbounded Fallback', 'Unbounded Fallback Android', sans-serif;
  --text: 'Instrument Sans', system-ui, sans-serif;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 12px);
}

body {
  background: var(--wall);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100svh;
}

body.locked { overflow: hidden; }

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

::selection { background: var(--cloth); color: var(--paper); }

:focus-visible { outline: 2px solid var(--cloth); outline-offset: 3px; border-radius: 4px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 100px;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

/* a dashed seam between sections */
.seam { height: 0; border-top: 1.5px dashed var(--seam); margin: 0 var(--pad); }

.ulink { border-bottom: 1.5px solid currentColor; padding-bottom: 1px; transition: color 0.25s; }
.ulink:hover { color: var(--cloth); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.4s var(--spring);
}
.btn:hover { background: var(--ink); color: var(--wall); }
.btn:active { transform: scale(0.97); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--cloth); border-color: var(--cloth); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ==========================================================================
   Header + menu
   ========================================================================== */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--head);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--pad);
  font-weight: 500;
  transition: background 0.35s, box-shadow 0.35s;
}
.top.scrolled {
  background: rgba(233, 229, 220, 0.9);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(22, 22, 22, 0.08);
}

.brand { font-weight: 600; letter-spacing: -0.01em; }

.nav { display: none; gap: 24px; }
.nav a { position: relative; padding: 4px 0; }
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover::after, .nav a.on::after { transform: none; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 100px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.menu-btn b { display: grid; gap: 4px; width: 16px; }
.menu-btn b::before, .menu-btn b::after { content: ''; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 0.4s var(--ease); }
.menu-open .menu-btn b::before { transform: translateY(2.75px) rotate(45deg); }
.menu-open .menu-btn b::after { transform: translateY(-2.75px) rotate(-45deg); }
.menu-open .menu-btn { color: var(--paper); border-color: rgba(247, 244, 236, 0.4); }
.menu-open .top { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu-open .brand { color: var(--paper); }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  padding: calc(var(--head) + 24px) var(--pad) calc(28px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease), visibility 0s 0.7s;
}
.menu-open .sheet { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.7s var(--ease); }
.sheet::before {
  /* the hem of the curtain */
  content: '';
  position: absolute;
  left: var(--pad); right: var(--pad); top: calc(var(--head) + 6px);
  border-top: 1.5px dashed rgba(247, 244, 236, 0.22);
}
.sheet ol { display: grid; gap: 2px; counter-reset: s; }
.sheet ol a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 8px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 9vw, 44px);
  letter-spacing: -0.045em;
  line-height: 1.05;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), color 0.25s;
}
.sheet ol a::before {
  counter-increment: s;
  content: counter(s, decimal-leading-zero);
  font-family: var(--text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(247, 244, 236, 0.45);
}
.sheet ol a:active { color: #8f97ff; }
.menu-open .sheet ol a { opacity: 1; transform: none; }
.menu-open .sheet ol li:nth-child(1) a { transition-delay: 0.12s; }
.menu-open .sheet ol li:nth-child(2) a { transition-delay: 0.16s; }
.menu-open .sheet ol li:nth-child(3) a { transition-delay: 0.2s; }
.menu-open .sheet ol li:nth-child(4) a { transition-delay: 0.24s; }
.menu-open .sheet ol li:nth-child(5) a { transition-delay: 0.28s; }
.menu-open .sheet ol li:nth-child(6) a { transition-delay: 0.32s; }
.menu-open .sheet ol li:nth-child(7) a { transition-delay: 0.36s; }
.sheet .sheet-foot { margin-top: auto; display: grid; gap: 14px; font-size: 15px; }
.sheet .sheet-foot a { color: rgba(247, 244, 236, 0.75); }
.sheet .sheet-foot .row { display: flex; flex-wrap: wrap; gap: 10px 22px; }

/* ==========================================================================
   Section shell
   ========================================================================== */
section.block { padding: var(--block) var(--pad); }

.kicker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 34px;
}
.kicker h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 9vw, 72px);
  letter-spacing: -0.05em;
  line-height: 0.98;
}
.kicker .sub { color: var(--mute); font-weight: 500; }

.sew { opacity: 0; transform: translateY(22px) rotate(-0.5deg); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
.sew.in { opacity: 1; transform: none; }
.no-js .sew { opacity: 1; transform: none; }
/* full-bleed strips slide in flat: even half a degree of tilt pokes past the screen edge */
.ribbon-wrap.sew, .kind.sew, .kind-tabs.sew { transform: translateY(22px); }
.ribbon-wrap.sew.in, .kind.sew.in, .kind-tabs.sew.in { transform: none; }

/* ---------- cloth hosts ---------- */
.cloth-host { position: relative; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.cloth-host.over { cursor: grab; }
.cloth-host.drag { cursor: grabbing; }
.cloth-host canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.rod {
  visibility: hidden; /* shown once the cloth has placed it, so it never jumps */
  position: absolute;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(#3a3a3a, #121212);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  z-index: 2;
  pointer-events: none;
}
.rod::before, .rod::after { content: ''; position: absolute; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: #121212; }
.rod::before { left: -8px; }
.rod::after { right: -8px; }
.rod.thin { height: 4px; }
.rod.thin::before, .rod.thin::after { width: 12px; height: 12px; top: -4px; }
/* a wooden dowel for the photo print */
.rod.wood { height: 8px; background: linear-gradient(#d2ab76, #a37a47); box-shadow: 0 6px 12px rgba(80, 50, 10, 0.2); }
.rod.wood::before, .rod.wood::after { width: 10px; height: 14px; top: -3px; border-radius: 3px; background: #8e683b; }
.rod.wood::before { left: -4px; }
.rod.wood::after { right: -4px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.stage { height: 100svh; min-height: 560px; }

.controls {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px 22px;
  flex-wrap: wrap;
  color: var(--mute);
  font-size: 14px;
}
.controls .cue { display: none; margin-left: auto; align-items: center; gap: 8px; }
.controls .cue i {
  display: block;
  width: 1.5px;
  height: 26px;
  background: linear-gradient(var(--ink) 50%, transparent 50%) 0 0 / 100% 200%;
  animation: thread 1.8s var(--ease) infinite;
}
@keyframes thread { to { background-position: 0 -100%; } }
.controls .hint-fine { display: none; }
.hero-note { flex-basis: 100%; max-width: 34ch; margin-bottom: 4px; font-size: 17px; line-height: 1.45; color: var(--ink-2); }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; gap: 40px; }

.print { height: min(118vw, 600px); margin: 0 calc(var(--pad) * -1); }

.about-copy .lede {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 5.6vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.035em;
}
.about-copy .lede em { font-style: normal; color: var(--cloth); }
.about-copy .more { margin-top: 22px; max-width: 54ch; color: var(--ink-2); font-size: 17px; }

.facts { margin-top: 30px; border-top: 1.5px solid var(--ink); max-width: 560px; }
.facts li { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1.5px dashed var(--line); font-size: 15px; }
.facts li span:first-child { color: var(--mute); font-weight: 600; }

.patch-board { margin-top: 38px; }
.patch-board .hint { color: var(--mute); font-size: 14px; margin-bottom: 16px; }
.patches { display: flex; flex-wrap: wrap; gap: 12px 12px; align-items: center; }

.patch {
  --x: 0px; --y: 0px; --r: 0deg;
  position: relative;
  display: inline-grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--paper);
  padding: 14px 18px;
  border-radius: 100px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  transition: transform 0.5s var(--spring), box-shadow 0.3s;
  /* satin thread texture and a raised edge */
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0 2px, rgba(0, 0, 0, 0.05) 2px 4px);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.18), 0 2px 0 rgba(0, 0, 0, 0.18), 0 14px 22px -14px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.patch::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  border: 1.5px dashed rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
.patch.round { width: 82px; height: 82px; padding: 0; border-radius: 50%; }
.patch.square { border-radius: 16px; padding: 20px 20px; }
.patch.blue { background-color: var(--cloth); }
.patch.ink { background-color: var(--ink); }
.patch.rust { background-color: var(--rust); }
.patch.green { background-color: var(--green); }
.patch.gold { background-color: var(--gold); color: var(--ink); text-shadow: none; }
.patch.gold::before { border-color: rgba(22, 22, 22, 0.4); }
.patch.cream { background-color: var(--paper); color: var(--ink); text-shadow: none; }
.patch.cream::before { border-color: rgba(22, 22, 22, 0.35); }
.patch.grab { cursor: grab; }
.patch.dragging { cursor: grabbing; transition: none; z-index: 5; box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.18), 0 2px 0 rgba(0, 0, 0, 0.18), 0 26px 30px -14px rgba(0, 0, 0, 0.5); }

/* ==========================================================================
   Work: woven labels
   ========================================================================== */
.labels { display: grid; grid-template-columns: 1fr; gap: 14px; }

.label {
  --c: var(--cloth);
  --on: var(--paper);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px 30px;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.018) 0 2px, transparent 2px 4px);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 12px 26px -16px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 0;
  transition: transform 0.6s var(--spring), background-color 0.3s, color 0.3s, opacity 0.9s var(--ease);
  isolation: isolate;
}
/* coloured selvedge down the left edge */
.label::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 10px;
  border-radius: 4px 0 0 4px;
  background-color: var(--c);
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 5px);
  transition: width 0.45s var(--ease);
  z-index: -1;
}
.label::before {
  content: '';
  position: absolute;
  inset: 8px 8px 8px 18px;
  border: 1.5px dashed rgba(22, 22, 22, 0.2);
  border-radius: 2px;
  pointer-events: none;
  transition: border-color 0.3s;
}
.label .meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.label .meta span:last-child { color: var(--mute); transition: color 0.3s; }
.label h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin: 26px 0 10px;
}
.label p { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 36ch; transition: color 0.3s; }
.label .foot { margin-top: auto; padding-top: 22px; display: flex; justify-content: space-between; align-items: end; gap: 12px; font-size: 13px; }
.label .stack { color: var(--mute); transition: color 0.3s; }
.label .live { position: relative; z-index: 2; font-weight: 600; white-space: nowrap; border-bottom: 1.5px solid currentColor; padding: 6px 0 1px; }
/* the whole label links to the case study */
.label .stretch::after { content: ''; position: absolute; inset: 0; z-index: 1; }

@media (hover: hover) {
  .label.in:hover { transform: rotate(-1.6deg) translateY(-4px); color: var(--on); }
  .label.in:hover::after { width: 100%; border-radius: 4px; }
  .label:hover::before { border-color: color-mix(in srgb, var(--on) 40%, transparent); }
  .label:hover p, .label:hover .stack, .label:hover .meta span:last-child { color: color-mix(in srgb, var(--on) 78%, transparent); }
}

.c-rust { --c: var(--rust); }
.c-blue { --c: var(--cloth); }
.c-ink { --c: var(--ink); }
.c-gold { --c: var(--gold); --on: var(--ink); }
.c-green { --c: var(--green); }
.c-kraft { --c: var(--kraft); --on: var(--ink); }
.c-olive { --c: var(--olive); }

/* ==========================================================================
   Leadership: pennants
   ========================================================================== */
.org { display: grid; gap: 22px; }
.org + .org { margin-top: 72px; }
.pennant { height: 400px; margin: 0 calc(var(--pad) * -1); }

.org h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 7.4vw, 50px);
  letter-spacing: -0.05em;
  line-height: 1.02;
}
.org .role { margin: 12px 0 18px; font-weight: 600; }
.org .role span { color: var(--mute); font-weight: 500; }
.org .body { max-width: 56ch; font-size: 17px; color: var(--ink-2); }

.club-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; max-width: 620px; }
.club-tags li {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px rgba(22, 22, 22, 0.12);
  transition: transform 0.4s var(--spring);
}
.club-tags li:nth-child(odd) { transform: rotate(-1.2deg); }
.club-tags li:nth-child(3n) { transform: rotate(1.4deg); }
.club-tags li:hover { transform: rotate(0) translateY(-2px); }

.running { margin-top: 26px; max-width: 600px; border-top: 1.5px solid var(--ink); }
.running a {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 4px 12px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1.5px dashed var(--line);
  font-size: 15px;
  transition: color 0.25s, padding 0.4s var(--ease);
}
.running a span:first-child { color: var(--mute); font-weight: 600; font-size: 13px; }
.running a span:nth-child(3) { color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
.running a:hover { color: var(--cloth); padding-left: 6px; }

.org .links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 22px; font-weight: 600; }

/* ==========================================================================
   Journey: care labels on a ribbon
   ========================================================================== */
.ribbon-wrap { margin: 0 calc(var(--pad) * -1); }
.ribbon {
  position: relative;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding: 0 var(--pad) 26px;
  filter: drop-shadow(0 10px 9px rgba(0, 0, 0, 0.13));
  /* the ribbon is a background so it runs the full scroll width */
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 5px) 0 10px / 100% 12px no-repeat local,
    linear-gradient(var(--ink), var(--ink)) 0 10px / 100% 12px no-repeat local;
}
.ribbon::-webkit-scrollbar { display: none; }
/* clip-path on a label would swallow its own shadow, so the ribbon casts them */
.ribbon > .care { flex: none; width: 210px; scroll-snap-align: start; }
.ribbon-hint { margin-top: 2px; font-size: 14px; color: var(--mute); }
.care {
  position: relative;
  padding: 50px 16px 36px;
  background-color: #fbfaf6;
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.02) 0 1px, transparent 1px 3px);
  text-align: center;
  transform-origin: 50% 0;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.7s var(--spring);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px));
}
@media (hover: hover) { .care:hover { transform: rotate(0deg) translateY(4px); } }
/* folded hem, stitched onto the ribbon */
.care::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 30px;
  background: #efede6;
  border-bottom: 1.5px dashed rgba(22, 22, 22, 0.25);
}
.care .type { font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.care h3 { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -0.03em; line-height: 1.15; margin: 10px 0 4px; }
.care .place { font-size: 12.5px; color: var(--mute); }
.care dl { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.care dt { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); margin-top: 8px; }
.care dt:first-child { margin-top: 0; }
.care dd { font-weight: 500; }
.care dd.grade { color: var(--rust); font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.care .icons { display: flex; justify-content: center; gap: 10px; margin-top: 16px; opacity: 0.55; }
.care .icons svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.4; }
.care.ink-tag { background-color: var(--ink); color: var(--paper); background-image: none; }
.care.ink-tag::before { background: #222; border-color: rgba(255, 255, 255, 0.25); }
.care.ink-tag .type, .care.ink-tag .place, .care.ink-tag dt { color: #a29e95; }
.care.ink-tag dl { border-color: rgba(255, 255, 255, 0.14); }
.care.ink-tag .icons svg { stroke: var(--paper); }


/* ==========================================================================
   Testimonials: one sheet pegged to a line, name tags to choose
   ========================================================================== */
.t-head { display: grid; gap: 18px; margin-bottom: 30px; }
.t-head .kicker { margin-bottom: 0; }
.t-ctrl { display: flex; align-items: center; gap: 12px; }
.t-count { margin-right: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--mute); }
.t-count b { color: var(--ink); }
.t-ctrl button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.t-ctrl button:hover { background: var(--ink); color: var(--wall); }

.kind { position: relative; padding-top: 26px; }
/* the line runs edge to edge behind the sheet */
.kind::before {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(var(--pad) * -1);
  right: calc(var(--pad) * -1);
  height: 2px;
  background: #6d5a3d;
}

.kind-sheet {
  --swing: 0deg;
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 44px 24px 26px;
  background-color: #fbf7ec;
  background-image: var(--grain), var(--blotch), var(--laid);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 22px 34px -22px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(150, 120, 70, 0.08);
  transform-origin: 50% 0;
  transform: rotate(var(--swing));
  transition: height 0.55s var(--ease);
  touch-action: pan-y;
}
.kind-sheet.swing { animation: sheet-swing 1.1s var(--spring); }
@keyframes sheet-swing {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(var(--dir, 1.4deg)); }
  60% { transform: rotate(calc(var(--dir, 1.4deg) * -0.45)); }
  100% { transform: rotate(0deg); }
}
/* two wooden pegs */
.kind-sheet::before, .kind-sheet::after {
  content: '';
  position: absolute;
  top: -22px;
  width: 14px;
  height: 44px;
  border-radius: 3px;
  background:
    linear-gradient(#8a6a40, #8a6a40) 50% 18px / 18px 3px no-repeat,
    linear-gradient(90deg, #c49a64, #e0b984 45%, #b98d57);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2);
}
.kind-sheet::before { left: 18%; }
.kind-sheet::after { right: 18%; }

.kw { display: none; }
.kw.on { display: block; animation: kw-in 0.6s var(--ease) both; }
.no-js .kw { display: block; }
.no-js .kw + .kw { margin-top: 34px; padding-top: 34px; border-top: 1.5px dashed var(--line); }
@keyframes kw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kw blockquote { font-size: 17px; line-height: 1.65; color: #26241f; text-wrap: pretty; }
.kw figcaption { margin-top: 24px; padding-top: 16px; border-top: 1.5px dashed var(--line); }
.kw figcaption b { display: block; font-size: 16px; }
.kw figcaption span { display: block; margin-top: 2px; font-size: 14px; color: var(--mute); }

/* name tags */
.kind-tabs {
  display: flex;
  gap: 10px;
  margin: 30px calc(var(--pad) * -1) 0;
  padding: 4px var(--pad) 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding: 0 var(--pad);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.kind-tabs::-webkit-scrollbar { display: none; }
.kind-tabs button { flex: none; scroll-snap-align: start; }
.kind-tabs button {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 56px;
  padding: 10px 16px 10px 18px;
  border: 0;
  border-radius: 3px;
  background-color: var(--paper);
  background-image: var(--grain);
  box-shadow: inset 0 0 0 1.5px rgba(22, 22, 22, 0.1), 0 6px 14px -10px rgba(0, 0, 0, 0.35);
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s, transform 0.5s var(--spring);
}
/* stitched edge on each tag */
.kind-tabs button::before { content: ''; position: absolute; inset: 5px; border: 1.5px dashed rgba(22, 22, 22, 0.16); border-radius: 2px; pointer-events: none; transition: border-color 0.3s; }
.kind-tabs b { font-size: 14px; white-space: nowrap; }
.kind-tabs span { font-size: 12.5px; color: var(--mute); white-space: nowrap; transition: color 0.3s; }
.kind-tabs button[aria-selected="true"] { background-color: var(--cloth); color: var(--paper); transform: translateY(-2px); }
.kind-tabs button[aria-selected="true"]::before { border-color: rgba(247, 244, 236, 0.4); }
.kind-tabs button[aria-selected="true"] span { color: rgba(247, 244, 236, 0.75); }
@media (hover: hover) { .kind-tabs button:not([aria-selected="true"]):hover { transform: translateY(-2px); } }

/* moving on its own: a thread fills along the selected tag until the next one */
.auto .kind-tabs button[aria-selected="true"]::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  height: 2px;
  border-radius: 2px;
  background: rgba(247, 244, 236, 0.9);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}
.auto .kind-tabs button[aria-selected="true"] { padding-bottom: 16px; }
/* the same thread, sewn along the bottom of the sheet where you're reading */
.kind-progress { display: none; }
.auto .kind-progress {
  display: block;
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 12px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(22, 22, 22, 0.12) 0 8px, transparent 8px 13px);
}
.auto .kind-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--cloth) 0 8px, transparent 8px 13px);
  /* revealed, not stretched, so the stitches keep their length */
  clip-path: inset(0 calc((1 - var(--p, 0)) * 100%) 0 0);
}
.auto.paused .kind-tabs button[aria-selected="true"]::after { opacity: 0.55; }

/* ==========================================================================
   Off the clock
   ========================================================================== */
.off-grid { display: grid; gap: 54px; }
.spools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 12px; align-items: end; }
.spool { display: grid; justify-items: center; gap: 12px; text-align: center; font-size: 14px; font-weight: 600; }
.spool i { position: relative; display: block; width: 56px; height: 68px; transition: transform 0.6s var(--spring); }
@media (hover: hover) { .spool:hover i { transform: rotate(-8deg) translateY(-4px); } }
/* thread wound on the spool */
.spool i::before {
  content: '';
  position: absolute;
  left: 7px; right: 7px; top: 9px; bottom: 9px;
  background-color: var(--c);
  background-image: repeating-linear-gradient(170deg, rgba(255, 255, 255, 0.16) 0 1.5px, rgba(0, 0, 0, 0.08) 1.5px 3px);
  box-shadow: inset -6px 0 8px rgba(0, 0, 0, 0.18), inset 6px 0 8px rgba(255, 255, 255, 0.12);
}
/* wooden flanges */
.spool i::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#c9a26c, #a87f4c) top / 100% 10px no-repeat,
    linear-gradient(#c9a26c, #a87f4c) bottom / 100% 10px no-repeat;
  border-radius: 3px;
}
.spool small { display: block; color: var(--mute); font-weight: 500; font-size: 12px; margin-top: -8px; }

.langs-title { font-weight: 600; margin-bottom: 12px; }
.langs li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1.5px dashed var(--line); font-weight: 600; }
.langs li:first-child { border-top: 1.5px solid var(--ink); }
.langs li small { display: block; font-weight: 500; font-size: 13px; color: var(--mute); }
.stitches { display: flex; gap: 6px; }
.stitches b { width: 20px; height: 4px; border-radius: 2px; background: rgba(22, 22, 22, 0.12); }
.stitches b.on { background: var(--cloth); }

/* ==========================================================================
   Contact: luggage tag
   ========================================================================== */
.contact-grid { display: grid; gap: 48px; }
.contact-copy h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 12vw, 104px);
  letter-spacing: -0.06em;
  line-height: 0.95;
}
.contact-copy h2 em { font-style: normal; color: var(--cloth); }
.contact-copy > p { margin: 20px 0 26px; color: var(--ink-2); max-width: 42ch; font-size: 17px; }
.direct { border-top: 1.5px solid var(--ink); max-width: 480px; }
.direct a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 0;
  border-bottom: 1.5px dashed var(--line);
  font-weight: 500;
  word-break: break-word;
  transition: color 0.25s, padding 0.4s var(--ease);
}
.direct a span { color: var(--mute); font-size: 14px; flex: none; }
.direct a:hover { color: var(--cloth); padding-left: 6px; }
.contact-copy .btn { margin-top: 26px; }

.tag-wrap { position: relative; }
.tag-wrap svg.string { display: none; }
.tag {
  position: relative;
  background-color: var(--kraft);
  background-image:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18), transparent 60%);
  clip-path: polygon(40px 0, 100% 0, 100% 100%, 40px 100%, 0 calc(100% - 40px), 0 40px);
  padding: 28px 20px 24px 62px;
}
.tag-shadow { filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.2)); transform: rotate(-1deg); transition: transform 0.8s var(--spring); }
.tag-shadow:focus-within { transform: rotate(0deg); }
/* reinforced eyelet */
.tag .eyelet {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--wall);
  box-shadow: 0 0 0 5px #c2a978, inset 0 2px 3px rgba(0, 0, 0, 0.3);
}
.tag .tag-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 2px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b5a3b;
  border-bottom: 1.5px solid rgba(22, 22, 22, 0.5);
  padding-bottom: 10px;
  margin-bottom: 6px;
}
.tag .tag-head span { white-space: nowrap; }
.tag label { display: block; padding-top: 14px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #5f4f33; }
.tag input, .tag textarea {
  width: 100%;
  border: 0;
  border-bottom: 1.5px dashed rgba(22, 22, 22, 0.4);
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 17px; /* 16px+ stops iOS zooming into the field */
  color: var(--ink);
  padding: 8px 0 8px;
  outline: none;
  resize: none;
  -webkit-appearance: none;
  appearance: none;
}
.tag textarea { line-height: 32px; padding-top: 4px; background-image: repeating-linear-gradient(transparent 0 31px, rgba(22, 22, 22, 0.25) 31px 32px); border-bottom: 0; }
.tag input:focus { border-bottom-color: var(--cloth); border-bottom-style: solid; }
.tag input::placeholder, .tag textarea::placeholder { color: rgba(22, 22, 22, 0.4); }
.tag .send { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.tag .status { font-size: 14px; font-weight: 500; color: #5f4f33; }
.tag .status.err { color: var(--rust); }
.tag .status a { border-bottom: 1.5px solid currentColor; }

/* sent: the tag gets a stamp */
.tag .stamp {
  position: absolute;
  right: 26px;
  bottom: 96px;
  padding: 8px 14px;
  border: 2.5px solid var(--cloth);
  border-radius: 6px;
  color: var(--cloth);
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(-9deg) scale(1.6);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s var(--spring), opacity 0.2s;
  mix-blend-mode: multiply;
}
.tag.sent .stamp { opacity: 0.9; transform: rotate(-9deg) scale(1); }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot {
  padding: 34px var(--pad) calc(30px + env(safe-area-inset-bottom));
  display: grid;
  gap: 18px;
  font-size: 14px;
  color: var(--mute);
}
.foot .row { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot a { color: var(--ink); font-weight: 500; }
.foot a:hover { color: var(--cloth); }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.case-hero { padding: calc(var(--head) + 28px) var(--pad) 0; display: grid; gap: 26px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--mute); transition: color 0.25s; }
.back:hover { color: var(--ink); }
.case-hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 10.5vw, 104px);
  letter-spacing: -0.055em;
  line-height: 0.96;
  margin-top: 18px;
}
.case-hero .lede { margin-top: 20px; font-size: 18px; color: var(--ink-2); max-width: 56ch; }
.case-meta { margin-top: 28px; border-top: 1.5px solid var(--ink); max-width: 640px; }
.case-meta li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1.5px dashed var(--line); font-size: 15px; }
.case-meta li span:first-child { color: var(--mute); font-weight: 600; }
.case-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }

.swatch { height: 340px; margin: 0 calc(var(--pad) * -1); }

.case-body { padding: 72px var(--pad) 40px; display: grid; gap: 56px; }
.case-sec h2 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; margin-bottom: 16px; }
.case-sec p { color: var(--ink-2); font-size: 17px; max-width: 64ch; }
.ticks { display: grid; gap: 0; border-top: 1.5px solid var(--ink); max-width: 720px; }
.ticks li { position: relative; padding: 13px 0 13px 30px; border-bottom: 1.5px dashed var(--line); font-size: 16px; color: var(--ink-2); }
.ticks li::before {
  /* a sewing button in the project's colour */
  content: '';
  position: absolute;
  left: 2px;
  top: 17px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 50%, var(--paper) 0 1.4px, transparent 1.7px),
    radial-gradient(circle at 64% 50%, var(--paper) 0 1.4px, transparent 1.7px),
    var(--c, var(--cloth));
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.16), 0 1px 1px rgba(0, 0, 0, 0.18);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 3px; background: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(22, 22, 22, 0.12); }

.figure { margin-top: 6px; }
.figure figcaption { margin-top: 10px; font-size: 13px; color: var(--mute); }
.diagram { width: 100%; height: auto; background: var(--paper); border-radius: 4px; box-shadow: 0 12px 26px -18px rgba(0, 0, 0, 0.35); }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; background: #d8d3c8; box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.5); }

.next-case {
  display: block;
  margin: 40px var(--pad) 0;
  padding: 26px 0 32px;
  border-top: 1.5px solid var(--ink);
  transition: color 0.3s;
}
.next-case small { display: block; color: var(--mute); font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.next-case b { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(28px, 8vw, 64px); letter-spacing: -0.05em; line-height: 1.02; }
.next-case b i { display: inline-block; margin-left: 0.25em; font-style: normal; font-size: 0.6em; transition: transform 0.5s var(--spring); }
.next-case:hover { color: var(--cloth); }
.next-case:hover b i { transform: translateX(8px); }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--head) var(--pad); }
.lost h1 { font-family: var(--display); font-weight: 800; font-size: clamp(90px, 28vw, 240px); letter-spacing: -0.07em; line-height: 0.9; color: var(--cloth); }
.lost p { margin: 18px auto 28px; max-width: 34ch; color: var(--ink-2); font-size: 17px; }

/* ==========================================================================
   >= 640px · large phones / small tablets
   ========================================================================== */
@media (min-width: 640px) {
  .labels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .label { min-height: 250px; }
  .ribbon > .care { width: 220px; }
  .care h3 { font-size: 18px; }
  .spools { grid-template-columns: repeat(6, auto); justify-content: start; gap: 26px 22px; }
  .spool { width: 88px; }
  .tag { clip-path: polygon(60px 0, 100% 0, 100% 100%, 60px 100%, 0 calc(100% - 60px), 0 60px); padding: 34px 32px 30px 96px; }
  .tag .eyelet { left: 28px; width: 28px; height: 28px; margin-top: -14px; box-shadow: 0 0 0 7px #c2a978, inset 0 2px 3px rgba(0, 0, 0, 0.3); }
  .patch { font-size: 14px; padding: 16px 22px; }
  .patch.round { width: 96px; height: 96px; }
  .photos { gap: 14px; }
}

/* ==========================================================================
   >= 960px · tablets landscape / laptops
   ========================================================================== */
@media (min-width: 960px) {
  :root { --head: 72px; }
  .nav { display: flex; }
  .menu-btn, .sheet { display: none; }

  .kicker { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 44px; }

  .controls .hint-touch, .hero-note { display: none; }
  .controls .cue { display: inline-flex; }
  .controls .hint-fine { display: inline; }

  .about-grid { grid-template-columns: minmax(320px, 0.85fr) 1.15fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
  .print { height: clamp(560px, 82vh, 720px); margin: 0; position: sticky; top: calc(var(--head) + 10px); }

  .labels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

  .t-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
  .t-count { margin-right: 0; min-width: 52px; text-align: right; }
  .kind-sheet { padding: 60px 64px 44px; }
  .auto .kind-progress { left: 64px; right: 64px; bottom: 18px; }
  .kw blockquote { font-size: 21px; line-height: 1.6; letter-spacing: -0.005em; }
  .kind-tabs { flex-wrap: wrap; justify-content: center; overflow: visible; margin: 34px 0 0; padding: 0; }

  .ribbon-wrap { margin: 0; }
  .ribbon { flex-wrap: wrap; justify-content: center; gap: 22px; overflow: visible; padding: 0 0 10px; background: none; }
  .ribbon::before {
    content: '';
    position: absolute;
    left: calc(var(--pad) * -1);
    right: calc(var(--pad) * -1);
    top: 10px;
    height: 14px;
    background-color: var(--ink);
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 5px);
  }
  .ribbon-hint { display: none; }
  .label { padding: 24px 26px 22px 34px; }

  .org { grid-template-columns: minmax(300px, 0.8fr) 1.2fr; gap: clamp(32px, 5vw, 90px); align-items: center; }
  .org.flip { grid-template-columns: 1.2fr minmax(300px, 0.8fr); }
  .org.flip .pennant { order: 2; }
  .org + .org { margin-top: 10vh; }
  .pennant { height: clamp(480px, 64vh, 620px); margin: 0; }


  .off-grid { grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 110px); align-items: end; }

  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 100px); align-items: center; }
  .tag-wrap { padding-left: 70px; }
  .tag-wrap svg.string { display: block; position: absolute; z-index: 2; left: 0; top: 50%; width: 120px; height: 120px; margin-top: -60px; overflow: visible; pointer-events: none; }
  .tag-shadow { transform: rotate(-1.5deg); }
  @media (hover: hover) { .tag-shadow:hover { transform: rotate(0deg); } }

  .foot { grid-template-columns: 1fr auto; align-items: center; }

  .case-hero { grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: clamp(32px, 5vw, 90px); padding-top: calc(var(--head) + 40px); }
  .swatch { height: clamp(460px, 66vh, 600px); margin: 0; }
  .case-body { grid-template-columns: 240px 1fr; gap: 64px 48px; padding-top: 110px; }
  .case-sec { display: contents; }
  .case-sec h2 { margin: 2px 0 0; font-size: 18px; }
}

/* ==========================================================================
   >= 1200px · desktop
   ========================================================================== */
@media (min-width: 1200px) {
  .wrap { max-width: 1440px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sew { opacity: 1; transform: none; }
  .controls .cue i { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
