/*
 * The landing page for dailyfashion.co.
 *
 * Same language as the app — white paper, near-black ink, one variable sans,
 * hairline rules, radius zero, buttons that invert rather than tint — pushed
 * to display scale. The drama comes from typography and motion, not from
 * color: the only inverted surface is the privacy section, because that is
 * the sentence this product would put on a wall.
 *
 * Every asset on this page is served from this origin. No CDN, no analytics
 * script, no tracking pixel — the page practices what its privacy section
 * preaches.
 */

@font-face {
  font-family: 'Instrument Sans Landing';
  src: url('/instrument-sans.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #444444;
  --ink-muted: #6e6e6e;
  --ink-faint: #b9b9b9;
  --line: #e5e5e5;

  --font: 'Instrument Sans Landing', 'Helvetica Neue', Arial, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --measure: 34em;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ------------------------------------------------------------------ nav -- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  padding: 14px var(--pad);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: clamp(10px, 2.5vw, 24px);
  margin-left: auto;
}

.nav-links a {
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav .btn {
    margin-left: auto;
  }
}

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

.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--paper);
  color: var(--ink);
}

.btn--ghost:hover,
.btn--ghost.is-on {
  background: var(--ink);
  color: var(--paper);
}

.btn--big {
  padding: 16px 28px;
  font-size: 14px;
}

/* ----------------------------------------------------------------- type -- */

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(44px, 8.5vw, 104px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-line {
  display: block;
}

.hero-line--em {
  color: var(--ink-faint);
  transition: color 0.6s ease;
}

.hero-line--em.is-in {
  color: var(--ink);
}

h2 {
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  max-width: 18em;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.lede {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 20px;
}

.microproof {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 16px;
}

.link-plain {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 9vh, 120px) var(--pad) clamp(48px, 8vh, 96px);
  min-height: 72vh;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The live grid: a month of days that draws itself in. */

.hero-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.day {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.25s ease,
    color 0.25s ease;
  transition-delay: var(--d, 0s);
  user-select: none;
  overflow: hidden;
}

.day.is-in {
  opacity: 1;
  transform: scale(1);
}

/* Flipped: the day answers with what was worn. */
.day.is-word {
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  padding: 4px;
  transition-delay: 0s;
}

.day--gap {
  border-color: transparent;
  cursor: default;
}

.hero-grid-caption {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: right;
}

/* -------------------------------------------------------------- marquee -- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.marquee-track b {
  color: var(--ink);
  font-weight: 600;
}

.marquee-track .sep {
  margin: 0 18px;
  color: var(--ink-faint);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------- sections -- */

.section {
  padding: clamp(56px, 10vh, 128px) var(--pad);
}

.section--rule {
  border-top: 1px solid var(--line);
}

.section--end {
  text-align: left;
}

/* The one inverted surface on the page. */
.section--ink {
  background: var(--ink);
  color: var(--paper);
}

.section--ink .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.section--ink .lede {
  color: rgba(255, 255, 255, 0.78);
}

/* ---------------------------------------------------------------- steps -- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(28px, 5vh, 56px);
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}

.step p {
  font-size: 15px;
  color: var(--ink-soft);
}

.step-num {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

/* The felt scale, exactly as it looks in the app. */

.felt-demo {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px;
}

.felt-btn {
  flex: 1;
  aspect-ratio: 1;
  max-width: 56px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.felt-btn:hover {
  transform: translateY(-2px);
}

.felt-btn.is-on {
  background: var(--ink);
  color: var(--paper);
}

.felt-answer {
  font-size: 14px;
  color: var(--ink-muted);
  min-height: 3em;
}

/* ----------------------------------------------------------- calculator -- */

.calc {
  margin-top: clamp(24px, 4vh, 48px);
  border: 1px solid var(--ink);
  padding: clamp(20px, 4vw, 48px);
  max-width: 720px;
}

.calc-controls {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 40px);
  margin-bottom: clamp(20px, 4vh, 40px);
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 130px;
}

.calc-field--wide {
  flex: 1;
  min-width: 220px;
}

.calc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.calc input[type='number'] {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  width: 140px;
  color: var(--ink);
  background: var(--paper);
}

.calc input[type='number']:focus {
  outline: none;
  border-color: var(--ink);
}

.calc input[type='range'] {
  width: 100%;
  accent-color: var(--ink);
  margin-top: 14px;
}

.calc-result {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.calc-big {
  font-size: clamp(48px, 9vw, 96px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.calc-unit {
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.calc-line {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-soft);
  min-height: 1.5em;
}

/* ------------------------------------------------------------ week card -- */

.week-demo {
  margin-top: clamp(24px, 4vh, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.week-toggle {
  display: flex;
  gap: 8px;
}

.card {
  width: min(320px, 82vw);
  aspect-ratio: 4 / 5;
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 12px 12px 0 0 var(--line);
  transition:
    aspect-ratio 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card.is-story {
  aspect-ratio: 9 / 16;
  width: min(260px, 70vw);
}

.card-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.card-cell {
  border: 1px solid var(--line);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.card-cell b {
  font-size: 15px;
  color: var(--ink);
}

.card-note {
  font-size: 11px;
  color: var(--ink-muted);
}

.card-big {
  margin-top: auto;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------- training -- */

/*
 * The Training screen at postcard size, and it actually works: the visitor
 * taps "Log it", the set lands in the day list, total work recomputes, and
 * the new-best line appears — the whole loop of the feature in one tap.
 */
.gym-demo {
  margin-top: clamp(24px, 4vh, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.gym-frame {
  width: min(400px, 100%);
  border: 1px solid var(--ink);
  background: var(--paper);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 12px 12px 0 0 var(--line);
}

.gym-frame-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.gym-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.gym-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

.gym-chip.is-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.gym-exercise {
  font-size: 18px;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.gym-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

.gym-cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.gym-cell {
  border: 1px solid var(--line);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.gym-cell b {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.gym-log {
  display: block;
  width: 100%;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 0;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.gym-log:hover:enabled {
  background: var(--paper);
  color: var(--ink);
}

.gym-log:disabled {
  background: var(--paper);
  color: var(--ink-muted);
  border-color: var(--line);
  cursor: default;
}

.gym-rows {
  margin-top: 14px;
}

.gym-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}

.gym-row.is-new {
  animation: gym-land 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes gym-land {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gym-set {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink-soft);
  font-weight: 400;
}

.gym-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.gym-total b {
  font-size: 20px;
  letter-spacing: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.gym-best {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  min-height: 1.5em;
}

.gym-caption {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------- who -- */

.who {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  margin-top: 8px;
}

@media (max-width: 860px) {
  .who {
    grid-template-columns: 1fr;
  }
}

.who-card {
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 32px);
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.who-card:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
}

.who-card p {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- foot -- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 28px var(--pad) calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot a {
  color: var(--ink-muted);
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
}

/* ----------------------------------------------------------- reveal fx -- */

/*
 * Reveal-on-scroll is opt-in via the `js` class the script stamps on <html>.
 * With scripts disabled nothing is ever hidden — the page degrades to a
 * still version of itself, which is the deal this origin makes everywhere.
 */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal,
  .day,
  .card,
  .btn,
  .who-card,
  .felt-btn {
    transition: none;
  }
  .js .reveal,
  .day {
    opacity: 1;
    transform: none;
  }
  .marquee-track {
    animation: none;
  }
  .is-typing::after {
    animation: none;
  }
}
