/* ==========================================================================
   Wear Human — design system
   Dark editorial "digital museum": near-black walls, bone type, hairline
   architecture, sharp edges, one vermilion signal.
   ========================================================================== */

:root {
  color-scheme: dark;
  /* Surfaces (legacy names kept so every template inherits the theme) */
  --paper: #000000;        /* page / wall */
  --paper-2: #0B0B0B;      /* recessed panel */
  --paper-3: #171717;      /* raised / hover */
  --card: #0E0E0E;         /* card / input */
  --night: #000000;
  --night-2: #0A0A0A;

  /* Type */
  --ink: #FFFFFF;          /* primary text (bone) */
  --ink-2: #CFCFCF;
  --muted: #8C8C8C;
  --faint: #5A5A5A;

  --line: rgba(255,255,255, .11);
  --line-2: rgba(255,255,255, .22);
  --line-3: rgba(255,255,255, .4);
  --accent: #FFFFFF;        /* black & white only: the 'accent' is pure white */
  --accent-soft: rgba(255,255,255,.12);

  /* Status (monochrome): filled = done, outlined = waiting, dim = stopped */
  --ok-bg: #FFFFFF;                  --ok: #000000;
  --warn-bg: rgba(255,255,255,.14);  --warn: #FFFFFF;
  --bad-bg: rgba(255,255,255,.06);   --bad: #FFFFFF;
  --info-bg: rgba(255,255,255,.1);   --info: #D6D6D6;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --grotesk: 'Outfit', 'Helvetica Neue', Arial, sans-serif; /* geometric, echoes the wordmark */

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.32, .72, 0, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --gutter: clamp(16px, 3.4vw, 48px);
  --max: 1600px;
  --radius: 0px;
  --radius-sm: 0px;
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, figure, blockquote, dl { margin: 0; }
em, i, cite { font-style: normal; } /* no italics anywhere: sans only */
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: #FFFFFF; color: #000000; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* Film grain — fixed layer only */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: screen;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Architectural column lines — fixed layer */
.grid-lines { position: fixed; inset: 0 var(--gutter); z-index: 1; pointer-events: none; display: grid; grid-template-columns: repeat(4, 1fr); }
.grid-lines span { border-left: 1px solid rgba(255,255,255,.035); }
.grid-lines span:last-child { border-right: 1px solid rgba(255,255,255,.035); }
.grid-lines span:nth-child(n+5) { display: none; }
@media (min-width: 1024px) {
  .grid-lines { grid-template-columns: repeat(6, 1fr); }
  .grid-lines span:nth-child(n+5) { display: block; }
}

.wrap { position: relative; width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Brand ─────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: var(--ink); }
.brand__drop { font-family: var(--grotesk); font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Logos: set ONE dimension; aspect-ratio keeps the true proportion. Never stretched. */
.logo { display: block; flex: none; fill: currentColor; overflow: visible; }
.logo--long { height: 16px; width: auto; aspect-ratio: 2312.39 / 285.53; }
.logo--icon { height: 18px; width: auto; aspect-ratio: 406.76 / 217.28; }
.logo--fill { width: 100%; height: auto; }

/* ── Type ──────────────────────────────────────────────────────────── */
.serif { font-family: var(--grotesk); font-weight: 400; } /* legacy class, sans */
.mono { font-family: var(--mono); font-feature-settings: 'zero', 'tnum'; }
.display { font-family: var(--grotesk); font-weight: 300; font-stretch: 100%; font-size: clamp(44px, 8vw, 132px); line-height: .88; letter-spacing: -.035em; text-transform: uppercase; }
.h1 { font-family: var(--grotesk); font-weight: 300; font-size: clamp(34px, 5.2vw, 84px); line-height: .92; letter-spacing: -.03em; text-transform: uppercase; }
.h2 { font-family: var(--grotesk); font-weight: 300; font-size: clamp(28px, 3.6vw, 56px); line-height: .95; letter-spacing: -.025em; text-transform: uppercase; }
.h3 { font-family: var(--grotesk); font-weight: 400; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.1; letter-spacing: -.015em; }
/* Thin-weight contrast inside headlines — the editorial mix */
.display em, .h1 em, .h2 em, .h3 em { font-family: var(--grotesk); font-style: normal; font-weight: 200; color: var(--muted); }
.heavy { font-family: var(--grotesk); font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; }
.br::before { content: '( '; } .br::after { content: ' )'; }
.cap { font-family: var(--grotesk); font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.lede { font-size: clamp(15px, 1.1vw, 17px); line-height: 1.65; color: var(--ink-2); max-width: 38em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }

.eyebrow, .label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--grotesk); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; background: var(--accent); }
.eyebrow--plain::before { display: none; }

/* ── Buttons: sharp, with a wipe fill ─────────────────────────────── */
.btn {
  --b-bg: var(--ink); --b-fg: var(--paper);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 22px;
  min-height: 48px; padding: 0 18px 0 20px; background: var(--b-bg); color: var(--b-fg);
  font-family: var(--grotesk); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--b-bg); transition: color .5s var(--ease-io);
}
.btn::before {
  /* Hover: colours stay put; a hairline sweeps in from the left and exits right */
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 9px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; pointer-events: none;
}
.btn:hover::before { animation: btn-line .9s var(--ease-io) forwards; }
@keyframes btn-line {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: left; }
  51%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}
@media (prefers-reduced-motion: reduce) { .btn:hover::before { animation: none; } }
.btn:active { transform: translateY(1px); }
.btn__icon { display: inline-grid; place-items: center; width: 14px; height: 14px; transition: transform .55s var(--ease-io); }
.btn:hover .btn__icon { transform: translate(3px, -3px); }
.btn--paper, .btn--ghost { --b-bg: transparent; --b-fg: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .4s var(--ease); }
.btn--paper:hover, .btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn--light { --b-bg: var(--ink); --b-fg: var(--paper); }
.btn--accent { --b-bg: var(--ink); --b-fg: var(--paper); }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 10.5px; gap: 14px; }
.btn--plain { justify-content: center; }
.btn[disabled], .btn.is-disabled { opacity: .4; pointer-events: none; }

.link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px;
  transition: background-size .6s var(--ease-io), color .3s var(--ease);
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--ink); }
.link.small { font-size: 10.5px; }

/* ── Badges & chips ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; line-height: 1.4;
  background: var(--paper-3); color: var(--ink-2); white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; background: currentColor; }
.badge--published, .badge--delivered, .badge--paid, .badge--approved, .badge--active, .badge--live { background: var(--ok-bg); color: var(--ok); }
.badge--submitted, .badge--pending, .badge--pending_payment, .badge--changes_requested { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.badge--rejected, .badge--cancelled, .badge--refunded, .badge--disabled, .badge--failed { background: transparent; color: var(--muted); text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--line-2); }
.badge--sent_to_production, .badge--shipped, .badge--onboarding { background: var(--info-bg); color: var(--info); }
.badge--draft, .badge--archived, .badge--hidden { background: var(--paper-3); color: var(--muted); }
.badge--founding { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge--founding::before { background: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; flex: none; white-space: nowrap;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line); transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--line-3); color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip--sm { padding: 5px 9px; font-size: 10px; }

/* ── Garment render ────────────────────────────────────────────────── */
.tee { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.tee svg { width: 100%; height: 100%; }
.tee--photo img { width: 100%; height: 100%; object-fit: cover; }

/* Artist mark (square) */
.mark { display: inline-grid; place-items: center; flex: none; overflow: hidden; background: var(--paper-3); }
.mark img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.mark--art img { transform: scale(1.8); filter: none; }
.mark--sm { width: 28px; height: 28px; font-size: 11px; }
.mark--md { width: 40px; height: 40px; font-size: 13px; }
.mark--lg { width: 72px; height: 72px; font-size: 22px; }
.mark--initials { font-family: var(--grotesk); color: var(--ink-2); }

/* ── Forms ─────────────────────────────────────────────────────────── */
.field { display: grid; gap: 8px; }
.field > label, .field-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.field .hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 0;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink); font-size: 15px; line-height: 1.4; appearance: none;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.textarea { min-height: 130px; resize: vertical; }
.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8l4-3.5' fill='none' stroke='%23ECE8E0' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select option { background: var(--paper-2); color: var(--ink); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); background: var(--paper-3); }
.input:disabled, .textarea:disabled { opacity: .55; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--bad); }
.field-error { color: var(--ink); font-size: 12.5px; margin: 0; }
.field-error::before { content: '— '; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.form-grid { display: grid; gap: 20px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid--2 { grid-template-columns: 1fr; } }
.span-2 { grid-column: 1 / -1; }

.file-drop {
  position: relative; display: grid; gap: 6px; place-items: center; text-align: center;
  padding: 24px 16px; border: 1px dashed var(--line-2); background: var(--card); cursor: pointer;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.file-drop:hover, .file-drop.is-over { border-color: var(--ink); background: var(--paper-3); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop__title { font-size: 14px; }
.file-drop__meta { font-size: 12px; color: var(--muted); }
.file-drop__preview { width: 100%; max-height: 180px; object-fit: contain; }

/* Flash messages */
.flashes { position: fixed; z-index: 95; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.flash {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  background: var(--ink); color: var(--paper); font-size: 14px; line-height: 1.45;
  animation: flash-in .7s var(--ease) both;
}
.flash--error { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.flash button { margin-left: auto; opacity: .7; }
.flash.is-out { animation: flash-out .5s var(--ease) both; }
@keyframes flash-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes flash-out { to { opacity: 0; transform: translateY(8px); } }

/* ── Motion primitives ─────────────────────────────────────────────── */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Image mask reveal: frame wipes open, image settles from a slight zoom */
.js [data-mask] { clip-path: inset(100% 0 0 0); transition: clip-path 1.25s var(--ease-io); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-mask] > * { transform: scale(1.18); transition: transform 1.6s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-mask].is-in { clip-path: inset(0 0 0 0); }
.js [data-mask].is-in > * { transform: none; }
/* Split-line headline rise */
.js [data-lines] .ln { display: block; overflow: hidden; }
.js [data-lines] .ln > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 100ms); }
.js [data-lines].is-in .ln > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-mask], .js [data-mask] > *, .js [data-lines] .ln > span { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* Panels (sharp, hairline) */
.bezel { border: 1px solid var(--line); background: var(--paper-2); }
.bezel > .core { background: var(--paper-2); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); display: grid; gap: 14px; justify-items: center; }
.empty .h3 { color: var(--ink); }

/* Custom cursor (fine pointers only) */
.cursor { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor__dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--ink); mix-blend-mode: difference; }
.cursor__ring {
  position: absolute; width: 84px; height: 84px; margin: -42px 0 0 -42px; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  transform: scale(0); transition: transform .45s var(--ease-io);
}
.cursor.is-label .cursor__ring { transform: scale(1); }
.cursor.is-label .cursor__dot { opacity: 0; }

/* Round arrow buttons (sliders) */
.arrow-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-3); color: var(--ink); transition: background-color .4s var(--ease), color .4s var(--ease), opacity .3s var(--ease); }
.arrow-btn:hover { background: var(--ink); color: var(--paper); }
.arrow-btn[disabled] { opacity: .3; pointer-events: none; }

/* Layered tee mockup: background colour + shared transparent tee + artwork */
.tee--layers { display: block; background: var(--tee-bg, #ABABAB); container-type: size; overflow: hidden; }
.tee-l { position: absolute; left: 50%; top: 50%; width: min(100cqw, 100cqh); aspect-ratio: 1; transform: translate(-50%, -50%); isolation: isolate; }
.tee--layers .tee-l__base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tee--layers .tee-l__art { position: absolute; object-fit: fill; mix-blend-mode: multiply; }
