/* ============================================================
   i let my shirts do the talking
   one typeface. two colours. nothing else.
   ============================================================ */

:root {
  --ink: #000;
  --paper: #fff;
  --grey: #6b6b6b;
  --hair: #e6e6e6;
  --font: "Helvetica Neue", Helvetica, Arial, "Inter", sans-serif;
  --measure: 64rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.4;
  font-size: 17px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

/* ---------- shared layout ---------- */

main { display: block; }

section { padding: clamp(3rem, 8vw, 7rem) 1.5rem; }

.hero,
.examples,
.manifesto { max-width: var(--measure); margin: 0 auto; }

/* ---------- hero ---------- */

.hero {
  text-align: left;
  border-bottom: 1px solid var(--ink);
  padding-top: clamp(2rem, 4vw, 3.25rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.75rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  max-width: 16ch;
  margin-bottom: 1rem;
}

.lede {
  max-width: 36rem;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--ink);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  padding: 0.8rem 1.6rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--paper); color: var(--ink); }

.link-btn {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  color: var(--grey);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

/* ---------- maker ---------- */

.maker {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: var(--measure);
  margin: 0 auto;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.preview-pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

/* ---------- the shirt (pure css) ---------- */

.shirt {
  position: relative;
  width: min(26rem, 100%);
  max-width: 100%;
  aspect-ratio: 1707 / 1627;
  --shirt-bg: var(--ink);
  --shirt-fg: var(--paper);
}
.shirt[data-colorway="white"] {
  --shirt-bg: var(--paper);
  --shirt-fg: var(--ink);
}

.shirt-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.shirt-path {
  fill: var(--shirt-bg);
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linejoin: round;
}

/* the print area: the words sit across the chest — the upper-half band of the
   print file (a 3:2 box). same band the print generator uses, so the on-screen
   shirt matches what actually prints. */
.shirt-print-wrap {
  position: absolute;
  top: 24%;
  left: 29%;
  width: 42%;
  aspect-ratio: 3 / 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shirt-print {
  width: 100%;
  color: var(--shirt-fg);
  font-weight: 700;
  text-align: center;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-size: 1.4rem; /* js sets the real px size to fill the box */
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

/* download + share, centred under the shirt */
.shirt-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}
.shirt-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.shirt-action:hover { background: var(--ink); color: var(--paper); }
.shirt-action svg { width: 1.15rem; height: 1.15rem; display: block; }

.shirt-toast {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--grey);
  height: 1.1em;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.shirt-toast.is-on { opacity: 1; color: var(--ink); }

/* ---------- controls ---------- */

.controls { display: flex; flex-direction: column; gap: 1rem; }

.field-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  color: var(--grey);
  margin-bottom: 0.35rem;
  display: block;
}

textarea,
select {
  font: inherit;
  width: 100%;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 0.7rem 0.8rem;
  border-radius: 0;
}
textarea {
  resize: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
textarea:focus,
select:focus { outline: 2px solid var(--ink); outline-offset: 2px; }

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -0.4rem;
  font-size: 0.9rem;
  color: var(--grey);
}

/* colour toggle */
.toggle {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.swatch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--hair);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.swatch:hover { border-color: var(--ink); }
.swatch input { accent-color: var(--ink); }
.swatch:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

select { width: auto; min-width: 6rem; }

.buy-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.price { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }

.fine { font-size: 0.85rem; color: var(--grey); }
.fine--rules { margin-top: 0.5rem; max-width: 30rem; }

/* ---------- about the shirt ---------- */

.about {
  max-width: var(--measure);
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
}
.about h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1rem;
}
.about p {
  max-width: 42rem;
  font-size: 1.15rem;
  line-height: 1.45;
}

/* ---------- inline checkout ---------- */

.checkout {
  max-width: 36rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
}
.checkout h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 0.75rem;
}
.checkout-summary {
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.checkout-off {
  border: 1px solid var(--ink);
  padding: 1rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}
.pay-form { display: flex; flex-direction: column; gap: 1.5rem; }
.pay-block { display: flex; flex-direction: column; gap: 0.5rem; }
.pay-form .btn { align-self: flex-start; }
.pay-error { color: var(--ink); font-weight: 700; min-height: 1.2em; margin: 0; }
.checkout > .link-btn { margin-top: 1.5rem; }

/* ---------- examples ---------- */

.examples h2 {
  font-size: clamp(2rem, 7vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin-bottom: 1rem;
}
.section-lede { color: var(--grey); margin-bottom: 2.5rem; max-width: 34rem; }

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}

/* each tile is a little shirt on an alternating black/white ground */
.example {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 1.1rem;
  background: var(--paper);
  border: none;
  cursor: pointer;
  transition: opacity 0.12s ease;
}
.example:nth-child(even) { background: var(--ink); }
.example .shirt { width: 100%; }
.example:hover { opacity: 0.65; }

/* ---------- manifesto ---------- */

.manifesto { text-align: center; border-top: 1px solid var(--ink); }
.manifesto p {
  font-size: clamp(1.6rem, 5.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  max-width: 46rem;
  margin: 0 auto;
  line-height: 1.02;
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid var(--ink);
  font-size: 0.85rem;
  color: var(--grey);
  text-transform: lowercase;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .maker { grid-template-columns: 1fr; }
  .preview-pane { min-height: 0; order: -1; }
  .shirt { width: 17rem; }
}
