/* Corpora Studio. Plum ink, warm paper and one rose, taken from the mark.
   The renders are retinted so their canvas is exactly the page's plum stage. */
:root {
  --stage: #241b2c; /* decoded render canvas: plates sit seamless on the page */
  --stage-up: #30253a;
  --sheet: #f8f2ed; /* warm paper */
  --bone: #f8f2ed;
  --ash: #b3a3b6; /* muted text on plum */
  --ash-dark: #765a7c; /* mauve, muted text on paper */
  --ink: #241a2b;
  --rose: #b53576;
  --rose-mark: #e58bb7; /* the rose that reads on plum */
  --rule-dark: rgba(248, 242, 237, 0.14);
  --rule-light: rgba(36, 26, 43, 0.14);
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: var(--stage);
}
body {
  margin: 0;
  background: var(--stage);
  color: var(--bone);
  font: 400 1rem/1.6 var(--sans);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}
img,
canvas {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--rose-mark);
  outline-offset: 4px;
}
h1,
h2,
p {
  margin: 0;
}
h2 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
::selection {
  background: var(--rose-mark);
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--bone);
  color: var(--ink);
}
.skip:focus {
  top: 1rem;
}

/* Top bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem var(--pad);
  background: color-mix(in srgb, var(--stage) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule-dark);
  font-size: 0.9rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: start;
  text-decoration: none;
}
.brand-mark {
  width: 1.9rem;
  height: 1.9rem;
  color: var(--bone);
}
.lockup {
  display: grid;
  line-height: 1;
}
.lockup-name {
  font: 500 1.35rem/0.95 var(--serif);
  letter-spacing: -0.015em;
}
.lockup-sub {
  margin-top: 0.2rem;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ash);
}
.bar nav {
  display: flex;
  gap: clamp(1rem, 2.6vw, 2.5rem);
}
.bar nav a {
  color: var(--ash);
  text-decoration: none;
  transition: color 0.2s;
}
.bar nav a:hover {
  color: var(--bone);
}
.bar-note {
  justify-self: end;
  color: var(--ash);
}

/* Hero: the wordmark stands behind the body, the way a name sits behind a model. */
.hero {
  --fh: min(78svh, 64vw); /* torso height */
  --fo: 0.104; /* torso centre offset from page centre, as a share of its height */
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100svh - 3.4rem);
  padding: clamp(1rem, 2.5vw, 2rem) var(--pad) 0;
  overflow: hidden;
}
/* Lamellae: contour rings grown around the body, drawn in once on load. */
.lamellae {
  position: absolute;
  z-index: 0;
  left: calc(50% + var(--fh) * var(--fo));
  bottom: calc(5.5rem + var(--fh) * 0.5);
  width: calc(var(--fh) * 2.3);
  aspect-ratio: 1;
  transform: translate(-50%, 50%);
  pointer-events: none;
}
.lam {
  stroke: #8a6c90;
  opacity: 0.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: grow 2.2s cubic-bezier(0.5, 0, 0.2, 1) forwards;
  animation-delay: calc(0.25s + var(--k) * 0.09s);
}
.lam-rose {
  stroke: var(--rose-mark);
  opacity: 0.55;
}
@keyframes grow {
  to {
    stroke-dashoffset: 0;
  }
}
.wordmark {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-variation-settings: "wdth" 62;
  font-weight: 850;
  font-size: clamp(5rem, 26.6vw, 30rem);
  line-height: 0.8;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  color: var(--bone);
  margin-left: -0.03em;
  white-space: nowrap;
}
.hero-figure {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 5.5rem;
  width: auto;
  height: var(--fh);
  max-width: none;
  transform: translateX(-34%);
  aspect-ratio: 716 / 1101;
  filter: drop-shadow(0 30px 40px rgba(12, 6, 16, 0.45));
  animation: rise 1.4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.hero-figure img {
  width: 100%;
  height: 100%;
}
/* The ink layer is clipped to the body's own silhouette, so strokes only land on skin. */
.ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  -webkit-mask: url("img/plates/torso-back-cut.webp") center / 100% 100% no-repeat;
  mask: url("img/plates/torso-back-cut.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
.ink-hint {
  position: absolute;
  z-index: 3;
  right: var(--pad);
  bottom: 7.5rem;
  max-width: 11rem;
  color: var(--ash);
  font-size: 0.85rem;
  text-align: right;
}
@media (hover: none) {
  .ink-hint {
    display: none;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateX(-34%) translateY(3rem);
  }
}
.hero-foot {
  position: relative;
  z-index: 3;
  align-self: end;
  display: grid;
  gap: 1rem;
  max-width: 21rem;
  padding-bottom: 2rem;
}
.hero-line {
  font: 400 clamp(1.35rem, 2vw, 1.75rem) / 1.25 var(--serif);
}
.hero-line em {
  font-style: italic;
}
.hero-sub {
  color: var(--ash);
  font-size: 0.95rem;
}
.routes {
  position: relative;
  z-index: 3;
  list-style: none;
  margin: 0 calc(var(--pad) * -1);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule-dark);
  background: var(--stage);
}
.routes li + li {
  border-left: 1px solid var(--rule-dark);
}
.routes a {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem var(--pad) 1.3rem;
  text-decoration: none;
  box-shadow: inset 0 2px 0 transparent;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.routes a:hover {
  background: var(--stage-up);
  box-shadow: inset 0 2px 0 var(--rose-mark);
}
.route-name {
  font-weight: 600;
  font-size: 1.05rem;
}
.route-text {
  color: var(--ash);
  font-size: 0.88rem;
}

/* The attribution notice is plain and early, not fine print. */
.notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 38rem);
  gap: 1rem 3rem;
  padding: clamp(2rem, 4vw, 3rem) var(--pad);
  background: var(--sheet);
  color: var(--ink);
}
.notice h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--rose);
}
.notice p {
  font: 400 clamp(1.15rem, 1.6vw, 1.35rem) / 1.45 var(--serif);
}

/* Studies: the render canvas is the page colour, so each body floats on the stage. */
.studies {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(0.75rem, 2vw, 1.5rem);
  row-gap: clamp(3rem, 7vw, 6rem);
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
}
.section-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  gap: 1rem 3rem;
  align-items: end;
}
.section-head h2,
.garments-copy h2 {
  font-variation-settings: "wdth" 62;
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 8.5rem);
  line-height: 0.86;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.section-head p {
  color: var(--ash);
}
.study {
  margin: 0;
}
.study figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule-dark);
  color: var(--ash);
  font-size: 0.85rem;
}
.study figcaption span {
  color: var(--bone);
}
.s-torso { grid-column: 1 / span 7; }
.s-arm-ext { grid-column: 8 / span 5; align-self: end; }
.pose-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: inherit;
  row-gap: 1.5rem;
}
.s-leg-a { grid-column: 1 / span 5; }
.s-leg-b { grid-column: 6 / span 5; }
.pair-note {
  grid-column: 11 / span 2;
  align-self: center;
  font: 400 1.05rem/1.45 var(--serif);
  color: var(--bone);
}
.s-arm-left { grid-column: 2 / span 5; }
.s-back { grid-column: 7 / span 6; margin-top: 8rem; }
.studies-note {
  grid-column: 1 / span 6;
  color: var(--ash);
  font-size: 0.85rem;
}

/* Poem on the grey sheet, set like a page from a sketchbook. */
.poem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 34rem) minmax(0, 1fr);
  padding: clamp(5rem, 11vw, 9rem) var(--pad);
  background: var(--sheet);
  color: var(--ink);
}
.poem > * {
  grid-column: 2;
}
.poem h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
}
.verse {
  display: grid;
  gap: 1.6em;
  font: 300 clamp(1.3rem, 2.1vw, 1.65rem) / 1.5 var(--serif);
}
.verse em {
  font-style: italic;
  font-weight: 400;
}
.signature {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--ash-dark);
}

/* The mark, large, with the story of the name. */
.mark {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
}
.mark-art {
  width: min(100%, 34rem);
  height: auto;
  justify-self: center;
}
.mark-copy {
  display: grid;
  gap: 1.25rem;
  max-width: 32rem;
}
.mark-copy h2 {
  font-variation-settings: "wdth" 62;
  font-weight: 800;
  font-size: clamp(3rem, 6.4vw, 6rem);
  line-height: 0.88;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.mark-copy p {
  color: var(--ash);
}
.mark-copy p:first-of-type {
  font: 400 clamp(1.2rem, 1.7vw, 1.45rem) / 1.45 var(--serif);
  color: var(--bone);
}
.mark-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.mark-links a {
  color: var(--rose-mark);
  text-underline-offset: 4px;
}

/* Garments: a pale rack on warm paper, waiting for the collection. */
.garments {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: 90svh;
  padding: clamp(3rem, 6vw, 5rem) var(--pad);
  background: #fbf7f3;
  color: var(--ink);
}
.rack-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  cursor: grab;
}
.rack-stage:active {
  cursor: grabbing;
}
#rack {
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.rack-hint {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 0.8rem;
  color: var(--ash-dark);
}
.garments-copy {
  display: grid;
  gap: 1.5rem;
  max-width: 28rem;
}
.garments-copy h2 {
  font-size: clamp(3rem, 7vw, 6.5rem);
}
.garments-copy p {
  color: #5a4a5e;
  font-size: 1.05rem;
}

/* Footer */
.footer {
  padding: clamp(3rem, 6vw, 5rem) var(--pad) 2.5rem;
  overflow: hidden;
}
.footer-mark {
  font-variation-settings: "wdth" 62;
  font-weight: 850;
  font-size: clamp(5rem, 26.6vw, 30rem);
  line-height: 0.8;
  text-transform: uppercase;
  color: var(--stage-up);
  margin: 0 0 2.5rem -0.03em;
  white-space: nowrap;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 1.5rem 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-dark);
  color: var(--ash);
  font-size: 0.9rem;
}
.footer-grid p:first-child {
  color: var(--bone);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-figure {
    animation: none;
  }
  .lam {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* Tablet */
@media (max-width: 960px) {
  .bar {
    grid-template-columns: 1fr auto;
  }
  .bar-note {
    display: none;
  }
  .hero {
    --fh: min(62svh, 90vw);
    --fo: 0.13;
  }
  .hero-figure {
    transform: translateX(-30%);
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateX(-30%) translateY(3rem);
    }
  }
  .notice,
  .section-head,
  .garments,
  .mark {
    grid-template-columns: 1fr;
  }
  .mark-art {
    width: min(70%, 24rem);
  }
  .s-torso,
  .s-arm-ext,
  .s-arm-left,
  .s-back {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .s-leg-a { grid-column: 1 / span 6; }
  .s-leg-b { grid-column: 7 / span 6; }
  .pair-note,
  .studies-note {
    grid-column: 1 / -1;
  }
  .poem {
    grid-template-columns: 0 minmax(0, 1fr) 0;
  }
    .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Phone */
@media (max-width: 600px) {
  .bar nav {
    gap: 0.9rem;
    font-size: 0.85rem;
  }
  .bar {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .hero {
    min-height: auto;
  }
  .hero-figure {
    position: relative;
    left: auto;
    bottom: auto;
    height: auto;
    width: 78%;
    margin: -12vw auto 0;
    transform: none;
    animation: none;
  }
  .hero-foot {
    max-width: none;
    padding-top: 1.5rem;
  }
  .lamellae {
    display: none; /* the torso fills the phone width and its shadow hides the rings */
  }
  .routes {
    grid-template-columns: 1fr;
  }
  .routes li + li {
    border-left: 0;
    border-top: 1px solid var(--rule-dark);
  }
  .s-leg-a,
  .s-leg-b {
    grid-column: 1 / -1;
  }
}
