/* ─────────────────────────────────────────────────────────────────────────
   RATE MY FIT — landing
   Design language: docs/DESIGN.md (SSENSE-derived).
   Two colors. Type is the interface. Zero radius, zero shadows.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --ink: #000000;
  --bg: #ffffff;
  --gray: #757575;
  --hairline: #e0e0e0;
  --margin: 24px;
  --topbar-h: 52px;
  --max: 1440px;
}
@media (min-width: 900px) {
  :root { --margin: 48px; }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

/* ── type styles ───────────────────────────────────────────────────────── */

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}
.caption {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--gray);
}
.gray { color: var(--gray); }

.textlink {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.textlink:hover { color: var(--gray); }

/* ── top bar ───────────────────────────────────────────────────────────── */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--margin);
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
  z-index: 10;
}

.wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 56px) var(--margin) 48px;
}

.hero-title {
  font-size: clamp(56px, 10.5vw, 148px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.hero-line { display: block; }

.hero-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: 36px;
}

.hero-sub {
  font-size: 15px;
  line-height: 1.55;
  max-width: 460px;
}
.hero-sub em { font-style: italic; }

.hero-scroll { white-space: nowrap; padding-bottom: 2px; }
.hero-scroll:hover { color: var(--gray); }

/* ── ticker ────────────────────────────────────────────────────────────── */

.ticker {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  white-space: nowrap;
  padding: 14px 0;
}
.ticker-track {
  display: inline-flex;
  animation: ticker 36s linear infinite;
}
.ticker-track span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ── sections ──────────────────────────────────────────────────────────── */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 28px;
}

.demo, .edits {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--margin);
}
.demo { padding-top: 56px; }
.edits { padding-top: 56px; padding-bottom: 72px; }

/* ── demo grid ─────────────────────────────────────────────────────────── */

.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 900px) {
  .demo-grid {
    grid-template-columns: 5fr 1fr 6fr;
    align-items: start;
  }
  .demo-photo { position: sticky; top: calc(var(--topbar-h) + 24px); }
  .demo-read { grid-column: 3; }
}

.frame {
  position: relative;
  overflow: hidden;
  background: #f4f4f4;
}
.ratio-34 { aspect-ratio: 3 / 4; }
.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-photo figcaption { margin-top: 12px; }

.score {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.score-number {
  font-size: clamp(88px, 10vw, 136px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.verdict {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  margin-top: 20px;
  max-width: 560px;
}

.editorial {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  max-width: 560px;
}
.editorial p {
  font-size: 15px;
  line-height: 1.6;
}
.editorial p + p { margin-top: 16px; }

.tags { margin-top: 20px; }

/* ── edits grid ────────────────────────────────────────────────────────── */

.edits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 720px) {
  .edits-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.edit-card { display: flex; flex-direction: column; }

.edit-media { cursor: crosshair; }
.edit-media img { transition: opacity 0.35s ease; }
.edit-media .edit-before { opacity: 0; }
.edit-media:hover .edit-before,
.edit-media.compare .edit-before { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .edit-media img { transition: none; }
}

.edit-title {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}
.edit-index { color: var(--gray); margin-right: 8px; }
.edit-detail {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 420px;
}

/* touch hint visibility */
.show-touch { display: none; }
@media (hover: none) {
  .hide-touch { display: none; }
  .show-touch { display: inline; }
}

/* ── cta ───────────────────────────────────────────────────────────────── */

.cta {
  background: var(--ink);
  color: var(--bg);
  padding: 64px var(--margin) 72px;
  text-align: center;
}

.cta-eyebrow { color: #9b9b9b; }

.cta-title {
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-top: 20px;
}

.sms-form {
  max-width: 620px;
  margin: 36px auto 0;
}
.sms-row {
  display: flex;
  gap: 0;
  border: 1px solid var(--bg);
}
.sms-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--bg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 18px;
  height: 52px;
}
.sms-input::placeholder { color: #9b9b9b; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary.inverse { background: var(--bg); color: var(--ink); }
.btn-primary:active { opacity: 0.7; }
.btn-primary:disabled { cursor: default; opacity: 0.85; }

.sms-note { margin-top: 12px; color: #9b9b9b; }

.store-block { display: none; margin-top: 36px; }
.store-block .btn-primary { width: 100%; max-width: 420px; }

.cta-alt {
  display: inline-block;
  margin-top: 28px;
  color: #9b9b9b;
}
.cta-alt:hover { color: var(--bg); }

/* mobile web: store link instead of SMS form (toggled in app.js too) */
body.is-mobile .sms-form, body.is-mobile .cta-alt { display: none; }
body.is-mobile .store-block { display: flex; justify-content: center; }

/* ── footer ────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--ink);
  padding: 40px var(--margin) 32px;
  max-width: none;
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-tagline { max-width: 300px; margin-top: 14px; }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.footer-legal {
  max-width: var(--max);
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* ── reveal animation ──────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── terms page ────────────────────────────────────────────────────────── */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 72px) var(--margin) 120px;
}
.legal h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.legal h2 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 40px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}
.legal p {
  font-size: 15px;
  line-height: 1.65;
  margin-top: 12px;
}
.legal p.bullet { padding-left: 8px; }

/* ── 404 ───────────────────────────────────────────────────────────────── */

.notfound {
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 var(--margin);
  text-align: center;
}
.notfound h1 {
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
