/* Wearsday site. Paper and ink, from the app's design system and the icon. */

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* The app's paper and ink (DSColors). */
  --paper: #f7f5f0;
  --surface: #efece6;
  --raised: #fbfaf7;
  --ink: #141413;
  --text-2: #5c5c5a;
  --text-3: #8a8a88;
  --hairline: #e3e0d9;
  /* The icon (BrandPalette). */
  --ground-top: #1b191a;
  --ground-bottom: #0f0e0f;
  --cream: #f4e8d9;
  --sand: #d5bba1;
  --taupe: #5c4c40;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --measure: 34rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

/* Type */

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}

h2.display { font-size: clamp(2.6rem, 6vw, 4.75rem); }

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

/* Header */

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

.wordmark {
  font-family: var(--serif);
  font-size: 1.6rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header nav { display: flex; gap: clamp(16px, 3vw, 32px); font-size: 0.9375rem; }
.site-header nav a { text-decoration: none; opacity: 0.72; }
.site-header nav a:hover { opacity: 1; }

/* Hero: the icon's ground, the mark wiping in as it does at launch. */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 120px var(--gutter) 72px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(244, 232, 217, 0.07), transparent 60%),
    linear-gradient(var(--ground-top), var(--ground-bottom));
  color: var(--cream);
  text-align: center;
  overflow: hidden;
}

.hero-inner { display: grid; justify-items: center; }

.hero-mark {
  width: min(56vw, 300px, 34svh * 1.45);
  height: auto;
  aspect-ratio: 720 / 495;
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 260% 100%;
  mask-size: 260% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: wipe 1.6s var(--ease) 0.2s forwards;
}

@keyframes wipe {
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

.hero h1 {
  font-size: clamp(3.2rem, 9vw, 7.5rem);
  margin-top: clamp(24px, 4.5vh, 48px);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1s var(--ease) 1.25s forwards;
}

.hero .lede {
  color: rgba(244, 232, 217, 0.72);
  margin-inline: auto;
  opacity: 0;
  animation: rise 1s var(--ease) 1.45s forwards;
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: rise 1s var(--ease) 1.6s forwards;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: 500 1rem/1 var(--sans);
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.button:active { transform: scale(0.97); }

.button-cream { background: var(--cream); color: var(--ink); }
.button-cream:hover { background: #fff6ea; }
.button-ink { background: var(--ink); color: var(--paper); }
.button-ink:hover { background: #2a2826; }

.hero-note { font-size: 0.9375rem; color: rgba(244, 232, 217, 0.55); }

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

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

.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: 1240px;
  margin: 0 auto;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(20px, 4vh, 40px); }

.step { transition: opacity 0.5s var(--ease); opacity: 0.28; }
.step.is-active { opacity: 1; }

.step-number {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--taupe);
  display: block;
  margin-bottom: 0.25rem;
}

.step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}

.step p { margin: 0.6rem 0 0; color: var(--text-2); max-width: 26rem; }

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

.stage-card {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  background: var(--raised);
  box-shadow: 0 1px 0 rgba(20, 20, 19, 0.04), 0 30px 60px -20px rgba(60, 45, 30, 0.22);
  opacity: 0;
}

.today {
  position: absolute;
  left: 5.5%;
  right: 5.5%;
  top: 5%;
  opacity: 0;
}

.today-greeting {
  font-family: var(--serif);
  font-size: 8cqw;
  line-height: 1;
  margin: 0;
}

.today-meta { margin: 1.6cqw 0 0; font-size: max(10px, 3cqw); color: var(--text-2); }

.today-occasion {
  display: inline-block;
  margin-top: 2.4cqw;
  padding: 1cqw 2.8cqw;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: max(10px, 3cqw);
  color: var(--text-2);
}
.today-occasion b { color: var(--ink); font-weight: 500; }

.piece {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 18px;
  will-change: transform, width, height;
}

.piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(40, 30, 20, 0.16));
}

.piece-label {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-2);
  text-align: center;
  opacity: 0;
}

/* Trips */

.section {
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  max-width: 1240px;
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}

.trip {
  background: var(--raised);
  border-radius: 28px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 1px 0 rgba(20, 20, 19, 0.04), 0 24px 50px -24px rgba(60, 45, 30, 0.2);
  max-width: 440px;
  justify-self: center;
  width: 100%;
}

.trip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.trip-place { font-family: var(--serif); font-size: 2rem; line-height: 1; margin: 0; }
.trip-days { color: var(--text-2); font-size: 0.9375rem; white-space: nowrap; }

.forecast {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 8px;
  padding: 14px 0;
  border-block: 1px solid var(--hairline);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-2);
}
.forecast b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--ink); line-height: 1.2; }

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

.packing label {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  cursor: pointer;
}

.packing li + li label { border-top: 1px solid var(--hairline); }

.packing .thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--surface);
  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-radius: 50%;
  border: 1.5px solid #c9c5bd;
  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(--paper);
  border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg) scale(0);
  transition: transform 0.25s var(--ease);
}
.packing input:checked { background: var(--ink); border-color: var(--ink); }
.packing input:checked::after { transform: translateY(-1px) rotate(45deg) scale(1); }
.packing label:has(input:checked) .name { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); }

.packing .name { transition: color 0.2s; }

.trip-foot { margin: 14px 0 0; font-size: 0.875rem; color: var(--text-2); }

/* Privacy */

.privacy {
  background: linear-gradient(var(--ground-top), var(--ground-bottom));
  color: var(--cream);
}

.privacy .section { padding-block: clamp(96px, 16vh, 180px); }

.privacy h2 { max-width: 14ch; }

.privacy-points {
  list-style: none;
  margin: clamp(40px, 6vh, 64px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  border-top: 1px solid rgba(244, 232, 217, 0.16);
  padding-top: 28px;
}
.privacy-points h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0; line-height: 1.1; }
.privacy-points p { margin: 0.5rem 0 0; color: rgba(244, 232, 217, 0.66); font-size: 0.9875rem; }
.privacy-points a { color: var(--cream); }

/* Pricing */

.plans {
  margin-top: clamp(40px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
}

.plan { padding: 28px 0 0; }
.plan + .plan { padding-left: clamp(24px, 4vw, 56px); border-left: 1px solid var(--hairline); }
.plan:first-child { padding-right: clamp(24px, 4vw, 56px); }

.plan h3 { font-family: var(--serif); font-weight: 400; font-size: 2.25rem; margin: 0; line-height: 1; }
.plan .price { margin: 0.6rem 0 0; color: var(--text-2); }
.plan .price b { color: var(--ink); font-weight: 600; }

.plan ul { list-style: none; margin: 22px 0 0; padding: 0; }
.plan li { padding: 10px 0; border-top: 1px solid var(--hairline); }

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

/* Closing */

.closing { text-align: center; padding-bottom: clamp(96px, 16vh, 180px); }
.closing h2 { margin-inline: auto; }
.closing .lede { margin-inline: auto; }
.closing .button { margin-top: 2rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--hairline);
  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(--text-2);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Legal pages */

.legal-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--hairline);
}
.legal-header .wordmark { color: var(--ink); }
.legal-header nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.9375rem; color: var(--text-2); }
.legal-header nav a { text-decoration: none; }
.legal-header nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.legal {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 96px) var(--gutter) clamp(64px, 12vh, 120px);
}
.legal h1 { font-size: clamp(2.8rem, 7vw, 4.25rem); }
.legal .updated { color: var(--text-3); margin: 0.75rem 0 2.5rem; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.1; margin: 2.5rem 0 0.5rem; }
.legal p { margin: 0 0 1rem; color: #2e2d2b; overflow-wrap: anywhere; }

/* Narrow screens */

@media (max-width: 820px) {
  .scene { height: 300vh; }
  .scene-sticky {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 20px;
    padding-top: 12px;
  }
  .stage { width: min(78vw, 46svh * 0.8); order: -1; }
  .steps { gap: 0; position: relative; min-height: 8.5rem; }
  .step { position: absolute; inset: 0 0 auto 0; opacity: 0; }
  .step.is-active { opacity: 1; }
  .step h3 { font-size: 1.75rem; }
  .step p { font-size: 0.9875rem; }

  .split { grid-template-columns: 1fr; }
  .privacy-points { grid-template-columns: 1fr; gap: 24px; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { padding-left: 0; border-left: 0; border-top: 1px solid var(--hairline); margin-top: 28px; }
  .plan:first-child { padding-right: 0; }
}

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

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

@media (prefers-reduced-motion: reduce) {
  .hero-mark { animation: none; -webkit-mask-image: none; mask-image: none; }
  .hero h1, .hero .lede, .hero-actions { animation: none; opacity: 1; transform: none; }
  .scene { height: auto; }
  .scene-sticky { position: relative; height: auto; padding-block: clamp(80px, 14vh, 160px); }
  .step, .step.is-active { opacity: 1; position: static; }
  .steps { min-height: 0; gap: 24px; }
}
