/* Three Sided Soul. One typeface (Archivo, run wide for display), black, print cream, Pantone 172 orange. */

:root {
  --black: #000;
  --cream: #dccba3;   /* the cream ink on the shirts */
  --bone: #f1e9d6;    /* body text */
  --dim: rgb(241 233 214 / 0.64);
  --line: rgb(220 203 163 / 0.28);
  --orange: #fd4a15;
  --charcoal: #2c2f34;
  --olive: #484f30;

  --wide: 125%;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --cut: clamp(2rem, 5vw, 5rem); /* height of the diagonal between sections */
  --bar: 4rem;
}

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

html {
  background: var(--black);
  color: var(--bone);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 106.25%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar);
}

body { margin: 0; min-height: 100svh; }
/* The hero strokes run off the right edge on purpose; this stops them causing sideways scroll. */
main, .foot { overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

.display {
  font-stretch: var(--wide);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin: 0;
}

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

/* The slash-shaped button */
.slash-btn {
  display: inline-block;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  text-decoration: none;
}
.slash-btn > span {
  display: block;
  padding: 1rem 2.25rem;
  background: var(--orange);
  color: var(--black);
  font-stretch: var(--wide);
  font-weight: 700;
  font-size: 0.95rem;
  transform: skewX(-14deg);
  transition: background-color 0.15s, transform 0.15s;
}
.slash-btn > span > span { display: block; transform: skewX(14deg); }
.slash-btn:hover > span { background: var(--cream); }
.slash-btn:active > span { transform: skewX(-14deg) scale(0.98); }
.slash-btn:disabled { cursor: not-allowed; }
.slash-btn:disabled > span { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line); }
.slash-btn--block { display: block; width: 100%; text-align: center; }
.slash-btn--block > span { margin: 0 0.6rem; }

/* Top bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  height: var(--bar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgb(0 0 0 / 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bar__home { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.bar__mark { width: 2.1rem; }
.bar__word { width: clamp(9.5rem, 22vw, 14rem); }
.bar__cart {
  background: none; border: 0; cursor: pointer; padding: 0.6rem 0;
  font-stretch: var(--wide); font-weight: 600; font-size: 0.9rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.bar__count {
  min-width: 1.6rem; height: 1.6rem; padding: 0 0.4rem;
  display: grid; place-items: center;
  background: var(--orange); color: var(--black);
  font-weight: 800; font-size: 0.8rem;
  transform: skewX(-14deg);
}
.bar__count[data-empty="true"] { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line); }

/* Hero */
.hero {
  position: relative;
  min-height: calc(92svh - var(--bar));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 3rem var(--gutter) calc(var(--cut) + 3rem);
  isolation: isolate;
}
.hero__head { position: relative; }
/* Sized to the headline so the strokes sit behind it and stay clear of the text below */
.hero__slashes {
  position: absolute; z-index: -1;
  top: 50%; right: calc(var(--gutter) * -1 - 2vw);
  height: 128%; width: auto; max-width: none;
  transform: translateY(-50%);
}
.hero h1 { font-size: clamp(2.75rem, 10.5vw, 9.5rem); color: var(--cream); max-width: 11ch; }
.hero__lede { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 30rem; font-size: 1.1rem; }
.hero__lede p + p { margin-top: 0.75rem; }
.hero__lead { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-weight: 600; line-height: 1.25; color: var(--bone); text-wrap: balance; }
.hero__jump { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.hero__jump a {
  font-stretch: var(--wide); font-weight: 600; font-size: 0.95rem;
  text-decoration: underline; text-decoration-color: var(--orange);
  text-decoration-thickness: 2px; text-underline-offset: 0.4em;
}
.hero__jump a:hover { color: var(--orange); }

@media (prefers-reduced-motion: no-preference) {
  .hero__slashes { animation: strike 0.9s cubic-bezier(0.7, 0, 0.2, 1) both; }
  .hero h1, .hero__lede, .hero__jump { animation: settle 0.6s 0.55s ease-out both; }
  @keyframes strike {
    from { clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%); }
    to { clip-path: polygon(0 -20%, 100% -20%, 100% 100%, 0 100%); }
  }
  @keyframes settle { from { opacity: 0; } to { opacity: 1; } }
}

/* One full section per shirt, on the color of the garment */
.shirt {
  --field: var(--black);
  position: relative;
  background: var(--field);
  margin-top: calc(var(--cut) * -1);
  padding: calc(var(--cut) + clamp(3rem, 7vw, 6rem)) var(--gutter) calc(var(--cut) + clamp(3rem, 7vw, 6rem));
  clip-path: polygon(0 0, 100% var(--cut), 100% 100%, 0 100%);
  display: grid;
  gap: 2.5rem;
}
.shirt__media { min-width: 0; }
.shirt__photo { margin: 0; background: rgb(0 0 0 / 0.25); }
.shirt__photo img { width: 100%; }
.shirt__thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.shirt__thumb {
  flex: 0 1 5.5rem; padding: 0; border: 0; background: none; cursor: pointer;
  opacity: 0.55; transition: opacity 0.15s;
}
.shirt__thumb img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }
.shirt__thumb:hover, .shirt__thumb[aria-pressed="true"] { opacity: 1; }
.shirt__thumb[aria-pressed="true"] { box-shadow: 0 0.35rem 0 -0.15rem var(--orange); }

.shirt__info { min-width: 0; max-width: 34rem; }
.shirt__art { max-height: 16rem; width: auto; margin-bottom: 2rem; }
.shirt h2 { font-size: clamp(2rem, 5.2vw, 4.25rem); color: var(--cream); }
.shirt__price { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.shirt__price strong { font-stretch: var(--wide); font-weight: 700; font-size: 1.5rem; }
.shirt__price span { color: var(--dim); }
.shirt__price s { font-stretch: var(--wide); font-weight: 500; font-size: 1.5rem; color: var(--dim); text-decoration-color: var(--orange); text-decoration-thickness: 2px; }
.shirt__price em { font-style: normal; font-weight: 700; font-size: 0.8rem; font-stretch: var(--wide); padding: 0.2rem 0.6rem; background: var(--orange); color: var(--black); transform: skewX(-14deg); }
.shirt__desc { margin-top: 1.25rem; }

.sizes { border: 0; padding: 0; margin: 2rem 0 0; }
.sizes legend { padding: 0; margin-bottom: 0.6rem; font-weight: 600; }
.sizes__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size { position: relative; }
.size input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.size span {
  display: grid; place-items: center;
  min-width: 3.4rem; height: 3rem; padding: 0 0.6rem;
  box-shadow: inset 0 0 0 1px var(--line);
  font-stretch: var(--wide); font-weight: 600; font-size: 0.9rem;
  transition: background-color 0.12s, color 0.12s;
}
.size input:hover + span { box-shadow: inset 0 0 0 1px var(--cream); }
.size input:checked + span { background: var(--cream); color: var(--black); box-shadow: none; }
.size input:focus-visible + span { outline: 2px solid var(--cream); outline-offset: 3px; }
.size input:disabled { cursor: not-allowed; }
.size input:disabled { pointer-events: none; }

/* Sold out: dimmed, struck through in orange at the angle of the mark, and labeled on hover or tap */
.size--out { cursor: not-allowed; }
.size--out span {
  color: rgb(241 233 214 / 0.38);
  box-shadow: inset 0 0 0 1px rgb(220 203 163 / 0.12);
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--orange) calc(50% - 1px), var(--orange) calc(50% + 1px), transparent calc(50% + 1px));
}
.size--out::after {
  content: "Sold out";
  position: absolute; z-index: 2;
  left: 50%; top: 50%;
  padding: 0.3rem 0.7rem;
  background: var(--orange); color: var(--black);
  font-stretch: var(--wide); font-weight: 700; font-size: 0.75rem; white-space: nowrap;
  transform: translate(-50%, -50%) skewX(-14deg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.12s;
}
.size--out:hover::after, .size--out.is-tipped::after { opacity: 1; }

.shirt__stock { min-height: 1.55em; margin-top: 0.75rem; color: var(--dim); }
.shirt__stock[data-low="true"] { color: var(--orange); }
.shirt[style*="484f30"] .shirt__stock[data-low="true"] { color: var(--cream); font-weight: 600; }
.shirt__add { margin-top: 1rem; }
.shirt__spec { margin-top: 1.5rem; color: var(--dim); font-size: 0.9rem; }

.notice { padding: 6rem var(--gutter); max-width: 40rem; font-size: 1.1rem; }
.notice a { color: var(--orange); }

@media (min-width: 60rem) {
  .shirt {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 7rem);
    align-items: center;
    padding-left: 0;
  }
  .shirt__photo { clip-path: polygon(0 0, 100% 0, 91% 100%, 0 100%); }
  .shirt__thumbs { padding-left: var(--gutter); }
  .shirt--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); padding-left: var(--gutter); padding-right: 0; }
  .shirt--flip .shirt__media { order: 2; }
  .shirt--flip .shirt__info { justify-self: end; }
  .shirt--flip .shirt__photo { clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%); }
  .shirt--flip .shirt__thumbs { padding-left: 0; padding-right: var(--gutter); justify-content: flex-end; }
}

/* Footer */
.foot {
  position: relative;
  background: var(--black);
  margin-top: calc(var(--cut) * -1);
  clip-path: polygon(0 0, 100% var(--cut), 100% 100%, 0 100%);
  padding: calc(var(--cut) + 3rem) var(--gutter) 3rem;
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: flex-end; justify-content: space-between;
  color: var(--dim); font-size: 0.9rem;
}
.foot__mark { width: 3rem; margin-bottom: 1rem; }
.foot__word { width: min(16rem, 70vw); margin-bottom: 0.6rem; }
.foot p + p { margin-top: 0.25rem; }
.mail a { color: var(--bone); text-decoration-color: var(--orange); text-underline-offset: 0.3em; }
.mail a:hover { color: var(--orange); }
.solo__help { color: var(--dim); font-size: 0.9rem; }

/* Cart drawer */
.cart {
  width: min(27rem, 100vw); max-width: none;
  height: 100dvh; max-height: none;
  margin: 0 0 0 auto; padding: 0; border: 0;
  background: var(--black); color: var(--bone);
  box-shadow: -1px 0 0 var(--line);
}
.cart::backdrop { background: rgb(0 0 0 / 0.7); }
.cart[open] { display: flex; flex-direction: column; }
@media (prefers-reduced-motion: no-preference) {
  .cart[open] { animation: slide-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
  @keyframes slide-in { from { transform: translateX(100%); } }
}
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; }
.cart__head h2 { font-size: 1.4rem; color: var(--cream); }
.cart__close { background: none; border: 0; cursor: pointer; padding: 0.5rem; text-decoration: underline; text-underline-offset: 0.3em; }
.cart__lines { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 0 1.5rem; }
.cart__empty { padding: 2rem 1.5rem; flex: 1; color: var(--dim); }
.line { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); align-items: start; }
.line img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.line__name { font-weight: 600; }
.line__size { color: var(--dim); font-size: 0.9rem; }
.line__price { font-weight: 600; text-align: right; }
.qty { display: inline-flex; align-items: center; margin-top: 0.6rem; box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 2.25rem; height: 2.25rem; background: none; border: 0; cursor: pointer; font-size: 1.1rem; }
.qty button:disabled { color: var(--dim); opacity: 0.4; cursor: not-allowed; }
.qty output { min-width: 1.75rem; text-align: center; font-weight: 600; }
.line__remove { display: block; margin-top: 0.5rem; margin-left: auto; background: none; border: 0; padding: 0; cursor: pointer; color: var(--dim); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 0.3em; }
.line__remove:hover { color: var(--bone); }

.cart__foot { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid var(--line); }
.sums { margin: 0 0 1.25rem; display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; }
.sums dt, .sums dd { margin: 0; }
.sums dd { text-align: right; }
.sums .sums__deal { color: var(--orange); }
.sums .sums__total { font-stretch: var(--wide); font-weight: 700; font-size: 1.2rem; padding-top: 0.5rem; color: var(--cream); }
.cart__note { margin-top: 0.9rem; color: var(--dim); font-size: 0.85rem; }
.cart__error { margin-bottom: 1rem; padding: 0.75rem 1rem; box-shadow: inset 3px 0 0 var(--orange); background: rgb(253 74 21 / 0.12); }
.cart__error:empty { display: none; }

/* Landing page and the thank-you page */
.solo {
  min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  padding: var(--gutter);
}
.solo__main { display: grid; place-content: center; justify-items: center; text-align: center; gap: 2.5rem; }
.solo__lockup { width: min(78vw, 68svh, 40rem); }
.solo__line { font-size: 1.1rem; max-width: 30rem; }
.solo__foot { text-align: center; color: var(--dim); font-size: 0.85rem; }
.solo h1 { font-size: clamp(2rem, 7vw, 4.5rem); color: var(--cream); }
@media (prefers-reduced-motion: no-preference) {
  .solo__lockup { animation: strike 1s cubic-bezier(0.7, 0, 0.2, 1) both; }
  .solo__lockup ~ * { animation: settle 0.6s 0.7s ease-out both; }
}
