/* Wearsday site. Black and white; the clothes are the only colour on the page. */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/Archivo-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --grey-1: #f2f2f2;   /* tiles behind cutouts */
  --grey-2: #d9d9d9;   /* lines on white */
  --grey-3: #6b6b6b;   /* secondary text on white (AA) */
  --grey-4: #9a9a9a;   /* secondary text on black (AA) */
  --line-dark: #2a2a2a;

  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --narrow: 68%;       /* headline width */

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --measure: 32rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--white);
  color: var(--black);
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus { left: 8px; }

/* Type */

.headline {
  font-weight: 760;
  font-stretch: var(--narrow);
  font-size: clamp(3rem, 7.4vw, 6.75rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--grey-3);
  max-width: var(--measure);
  margin: 1.5rem 0 0;
  text-wrap: pretty;
}

/* Buttons: square-shouldered, like a label */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 2px;
  font: 600 1rem/1 var(--font);
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}
.button:active { transform: scale(0.98); }

.button-light { background: var(--white); color: var(--black); }
.button-light:hover { background: var(--grey-2); }
.button-dark { background: var(--black); color: var(--white); }
.button-dark:hover { background: #333; }

/* Header */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  color: var(--white);
  z-index: 3;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.wordmark img { width: 34px; height: auto; }

.site-header nav { display: flex; gap: clamp(18px, 3vw, 36px); font-size: 0.9375rem; font-weight: 500; }
.site-header nav a { text-decoration: none; color: var(--grey-4); transition: color 0.2s; }
.site-header nav a:hover { color: var(--white); }

/* Hero: today's weekday turns into Wearsday. */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(28px, 5vh, 56px);
  padding: 120px var(--gutter) clamp(32px, 6vh, 64px);
  background: var(--black);
  color: var(--white);
  overflow: hidden;
}

.hero-word {
  display: flex;
  align-items: flex-start;
  margin: 0 0 0 -0.04em;
  font-weight: 800;
  font-stretch: 62%;
  font-size: clamp(4rem, 24vw, 28rem);
  line-height: 0.82;
  letter-spacing: -0.035em;
  white-space: nowrap;
  animation: appear 0.5s var(--ease) 0.1s both;
}

.hero-swap {
  position: relative;
  display: block;
  /* a window from cap height to the baseline: letters roll through it */
  clip-path: inset(0.1em 0 0.05em 0);
}
.hero-suffix { display: block; }

.hero-prefix { display: block; }
.hero-prefix.is-next { position: absolute; left: 0; top: 0; }
.hero-prefix > span { display: inline-block; }

@keyframes appear { from { opacity: 0; } }

.hero-foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
  animation: appear 0.8s var(--ease) 0.3s both;
}

.hero-line {
  margin: 0;
  font-weight: 700;
  font-stretch: 85%;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1.2;
}

.hero-lede {
  margin: 0;
  max-width: 30rem;
  color: var(--grey-4);
  font-size: 1.0625rem;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.hero-note { font-size: 0.9375rem; color: var(--grey-4); }

/* The scene: a pile of clothes, filed, then today's look on a phone. */

.scene { position: relative; height: 540vh; }

.scene-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 96px);
  padding: 0 var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  overflow: clip;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(28px, 5vh, 48px); }

.step { color: #c4c4c4; transition: color 0.5s var(--ease); }
.step.is-active { color: var(--black); }

.step-bar {
  display: block;
  height: 2px;
  width: 100%;
  max-width: 26rem;
  background: var(--grey-1);
  margin-bottom: 18px;
  overflow: hidden;
}
.step-bar i {
  display: block;
  height: 100%;
  background: var(--black);
  transform-origin: left;
  transform: scaleX(0);
}

.step h2 {
  font-weight: 760;
  font-stretch: var(--narrow);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin: 0;
}

.step p { margin: 0.75rem 0 0; max-width: 26rem; color: inherit; }
.step.is-active p { color: var(--grey-3); }

.stage {
  position: relative;
  width: min(100%, 420px, 80svh / 1.4);
  aspect-ratio: 5 / 7;
  justify-self: center;
  container-type: inline-size;
}

.phone {
  position: absolute;
  left: 15%;
  width: 70%;
  top: 0;
  height: 100%;
  border-radius: 12cqw;
  background: var(--black);
  padding: 2.4cqw;
  opacity: 0;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.45);
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 9.8cqw;
  background: var(--white);
}

.today {
  position: absolute;
  left: 21%;
  right: 21%;
  top: 7%;
  opacity: 0;
  z-index: 2;
}
.today-day {
  margin: 0;
  font-weight: 760;
  font-stretch: var(--narrow);
  font-size: 9cqw;
  line-height: 1;
  letter-spacing: -0.01em;
}
.today-meta { margin: 1.2cqw 0 0; font-size: max(9px, 2.8cqw); color: var(--grey-3); }

.today-wear {
  position: absolute;
  left: 21%;
  right: 21%;
  bottom: 6%;
  height: 7.5%;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-size: max(9px, 3cqw);
  font-weight: 600;
  opacity: 0;
  z-index: 2;
}

.piece {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 3cqw;
  z-index: 1;
  will-change: transform, width, height;
}

.piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.piece-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 1.4cqw;
  font-size: max(10px, 2.6cqw);
  font-weight: 500;
  color: var(--grey-3);
  text-align: left;
  opacity: 0;
}

/* Trips */

.trips { background: var(--black); color: var(--white); }

.trips-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 16vh, 176px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 128px);
  align-items: start;
}
.trips .lede { color: var(--grey-4); }

.trip { width: 100%; max-width: 480px; justify-self: end; }

.trip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--white);
}
.trip-place { margin: 0; font-weight: 760; font-stretch: var(--narrow); font-size: 2.5rem; line-height: 1; }
.trip-days { color: var(--grey-4); font-size: 0.9375rem; white-space: nowrap; }

.forecast {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 20px 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.875rem;
  color: var(--grey-4);
}
.forecast b {
  display: block;
  font-weight: 700;
  font-stretch: var(--narrow);
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 4px;
}

.packing { list-style: none; margin: 0; padding: 0; }

.packing label {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-dark);
  cursor: pointer;
}

.packing .thumb {
  width: 56px;
  height: 56px;
  background: var(--white);
  padding: 6px;
}
.packing .thumb img { width: 100%; height: 100%; object-fit: contain; }

.packing input {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1.5px solid #5a5a5a;
  display: grid;
  place-items: center;
  transition: background-color 0.2s, border-color 0.2s;
}
.packing input::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid var(--black);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg) scale(0);
  transition: transform 0.25s var(--ease);
}
.packing input:checked { background: var(--white); border-color: var(--white); }
.packing input:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.packing .name { transition: color 0.2s; }
.packing label:has(input:checked) .name { color: #777; text-decoration: line-through; }

/* Sections on white */

.section {
  padding: clamp(96px, 16vh, 176px) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.privacy .headline { max-width: 12ch; }

.privacy-points {
  list-style: none;
  margin: clamp(48px, 8vh, 88px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 3vw, 48px);
}
.privacy-points li { border-top: 2px solid var(--black); padding-top: 20px; }
.privacy-points h3 { margin: 0; font-weight: 700; font-stretch: 85%; font-size: 1.375rem; line-height: 1.15; }
.privacy-points p { margin: 0.6rem 0 0; color: var(--grey-3); }

/* Pricing */

.pricing { padding-top: 0; }

.pricing-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(48px, 8vw, 128px);
  align-items: end;
  border-top: 1px solid var(--grey-2);
  padding-top: clamp(96px, 16vh, 176px);
}
.pricing-head .lede { margin: 0; }

.plans {
  margin-top: clamp(48px, 8vh, 80px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 2px solid var(--black);
}

.plan { padding: clamp(24px, 3.5vw, 48px); }
.plan-pro { background: var(--black); color: var(--white); }

.plan h3 { margin: 0; font-weight: 700; font-stretch: 85%; font-size: 1.375rem; }
.price { margin: 28px 0 0; font-size: 1.125rem; }
.price b {
  font-weight: 760;
  font-stretch: var(--narrow);
  font-size: clamp(3.5rem, 6vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-right: 6px;
}
.price-note { margin: 8px 0 0; color: var(--grey-3); }
.plan-pro .price-note { color: var(--grey-4); }

.plan ul { list-style: none; margin: 32px 0 0; padding: 0; }
.plan li { padding: 12px 0; border-top: 1px solid var(--grey-2); }
.plan-pro li { border-top-color: var(--line-dark); }

.fine { margin: 24px 0 0; font-size: 0.875rem; color: var(--grey-3); max-width: 44rem; }

/* Closing */

.closing {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: clamp(112px, 20vh, 220px) var(--gutter) clamp(96px, 16vh, 176px);
  display: grid;
  justify-items: center;
}
.closing-mark { width: clamp(120px, 14vw, 180px); height: auto; margin-bottom: clamp(32px, 5vh, 48px); }
.closing .lede { color: var(--grey-4); margin-inline: auto; text-wrap: balance; }
.closing .button { margin-top: 2.25rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--grey-2);
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--grey-3);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--black); text-decoration: underline; }

.site-footer-dark { background: var(--black); color: var(--grey-4); border-top-color: var(--line-dark); }
.site-footer-dark a:hover { color: var(--white); }

/* Legal pages */

.legal-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--gutter);
  background: var(--black);
  color: var(--white);
}
.legal-header nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.9375rem; font-weight: 500; }
.legal-header nav a { text-decoration: none; color: var(--grey-4); }
.legal-header nav a:hover { color: var(--white); }
.legal-header nav a[aria-current="page"] { color: var(--white); text-decoration: underline; }

.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(56px, 10vh, 112px) var(--gutter) clamp(64px, 12vh, 128px);
}
.legal .display {
  font-weight: 760;
  font-stretch: var(--narrow);
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}
.legal .updated { color: var(--grey-3); margin: 1rem 0 3rem; }
.legal h2 {
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.375rem;
  line-height: 1.2;
  margin: 2.75rem 0 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--black);
}
.legal p { margin: 0 0 1rem; color: #222; line-height: 1.6; overflow-wrap: anywhere; }

/* Narrow screens */

@media (max-width: 860px) {
  .hero { justify-content: center; }
  .hero-foot { grid-template-columns: 1fr; }

  .scene { height: 460vh; }
  .scene-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    justify-items: center;
    gap: 24px;
  }
  .stage { width: min(72vw, 54svh / 1.4); order: -1; }
  .steps { gap: 0; position: relative; min-height: 9.5rem; width: 100%; }
  .step { position: absolute; inset: 0 0 auto 0; opacity: 0; transition: opacity 0.4s var(--ease); }
  .step.is-active { opacity: 1; }
  .step-bar { margin-bottom: 14px; }
  .step h2 { font-size: 2rem; }
  .step p { font-size: 1rem; }

  .trips-inner { grid-template-columns: 1fr; }
  .trip { justify-self: stretch; max-width: none; }
  .privacy-points { grid-template-columns: 1fr; gap: 32px; }
  .pricing-head { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .site-header nav a:not(:last-child) { display: none; }
  .legal-header nav { flex-basis: 100%; }
}

/* Without motion: everything in its final place, the scene as a plain section. */

@media (prefers-reduced-motion: reduce) {
  .hero-word, .hero-foot { animation: none; }
  .scene { height: auto; }
  .scene-sticky { position: relative; height: auto; padding-block: clamp(80px, 14vh, 160px); }
  .step, .step.is-active { opacity: 1; position: static; color: var(--black); }
  .step-bar { display: none; }
  .steps { min-height: 0; gap: 28px; }
}
