/* ==========================================================================
   Rather — the house site

   Not black and white: warm paper and deep indigo, never pure black or white.
   Colour only appears where there are two good answers: coral and periwinkle,
   two hues of the same lightness (oklch L 0.76), so neither can look heavier
   or "better". Size, not a marker, shows what a person would rather: the two
   answers always stay the same size; the sentence that's yours gets big.
   Product cards keep their own colours. Text keeps 4.5:1 everywhere.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* Only on the products' own cards, so each looks like itself. */
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, monospace;

  /* The two good answers. Same lightness; indigo text on both is 7.6:1+. */
  --a: #f6946d;
  --b: #99adf7;
  --on-ab: #1b1838;

  --indigo: #1b1838;
  --deep: #16142e;
  --paper: #f5f2ea;

  --wide: 1240px;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(88px, 12vw, 168px);

  --bg: var(--paper);
  --ink: var(--indigo);
  --ink-2: #3d3a5a;
  --muted: #625f78;
  --line: #dedad0;
  --surface: #ece8df;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--deep);
    --ink: var(--paper);
    --ink-2: #d8d5e6;
    --muted: #a9a6bf;
    --line: #2c2a48;
    --surface: #201e3c;
  }
}

.tone-deep {
  --bg: var(--deep);
  --ink: var(--paper);
  --ink-2: #d8d5e6;
  --muted: #a9a6bf;
  --line: #2c2a48;
  --surface: #201e3c;
}

@media (prefers-color-scheme: dark) {
  .tone-deep {
    --bg: #0f0d22;
  }
}

* {
  box-sizing: border-box;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

section,
header,
footer {
  background: var(--bg);
  color: var(--ink);
}

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

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  min-height: 44px;
  border-radius: 8px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wide) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
  text-wrap: balance;
}

h2 {
  font-size: clamp(36px, 5.6vw, 76px);
  letter-spacing: -0.05em;
  line-height: 0.98;
}

h3 {
  font-size: clamp(22px, 2.3vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}

.lead {
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
}

.muted {
  color: var(--muted);
}

/* The brand word carries no decoration in running text: size does the work. */
b.rather {
  font-weight: inherit;
}

/* "Find out what you'd" small, "rather." enormous: the scale is the emphasis. */
.h1-small {
  display: block;
  font-size: clamp(24px, 3.4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.h1-big {
  display: block;
  font-size: clamp(110px, 27vw, 400px);
  font-weight: 820;
  letter-spacing: -0.075em;
  line-height: 0.8;
  margin-left: -0.04em;
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.wordmark {
  font-weight: 820;
  font-size: 24px;
  letter-spacing: -0.055em;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin: 0 -10px 0 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 540;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .site-nav .wide-only {
    display: none;
  }
}

@media (max-width: 360px) {
  .site-nav .roomy-only {
    display: none;
  }
}

/* ---------- Sections ---------- */

section {
  padding: var(--section) 0;
}

.section-head {
  display: grid;
  gap: 24px;
  margin-bottom: clamp(48px, 7vw, 88px);
  max-width: 1000px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: 1.5px solid var(--ink);
}

.button.solid {
  background: var(--ink);
  color: var(--bg);
}

.button.ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

.button svg {
  width: 17px;
  height: 17px;
  flex: none;
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(80px, 11vw, 152px);
  overflow: hidden;
}

.hero .h1-big {
  margin-top: clamp(4px, 1vw, 16px);
}

.hero .lead {
  margin-top: clamp(40px, 5vw, 72px);
  margin-left: auto;
  max-width: 40ch;
  font-size: clamp(20px, 2.1vw, 25px);
}

.hero .actions {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .hero .lead {
    margin-left: 0;
  }
  .hero .actions {
    justify-content: flex-start;
  }
}

/* ---------- The trade-off, and the map ---------- */

.tradeoff-text {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  margin-bottom: clamp(72px, 10vw, 136px);
}

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

/* The story: two axes at right angles.
   Up and down is quality (worse to better): the rating, which rules things out.
   Left and right is what something is like (one way to another): Rather's axis.
   --floor-in: the floor appears and the options below it fade.
   --spread: what's left slides sideways to where each one actually sits.
   --band-in, --band-from, --band-to: a person's range on the sideways axis. */
.story {
  height: 420vh;
  margin-top: clamp(24px, 4vw, 48px);
}

.story-pin {
  --floor-in: 0;
  --spread: 0;
  --band-in: 0;
  --band-from: 12%;
  --band-to: 38%;
  --floor: 55%;
  position: sticky;
  top: max(24px, calc(50vh - 330px));
  margin: 0;
  display: grid;
  gap: 24px;
}

.story.is-still {
  height: auto;
}

.story.is-still .story-pin {
  position: static;
}

.plot {
  position: relative;
  height: clamp(300px, 46vh, 440px);
  margin: 0 0 28px 74px;
}

.y-axis {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--ink);
  opacity: 0.25;
}

.y-label,
.x-label,
.floor-label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.y-top {
  top: 0;
  right: calc(100% + 14px);
}

.y-bottom {
  bottom: 0;
  right: calc(100% + 14px);
}

/* The floor: what the rating is good for. */
.floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--floor);
  border-top: 2px dashed var(--ink);
  opacity: var(--floor-in);
}

.floor-label {
  right: 0;
  top: 8px;
}

/* Rather's axis: one way to another, in the two answer colours. */
.x-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--a), var(--b));
  opacity: var(--spread);
}

.x-label {
  bottom: -46px;
  opacity: var(--spread);
}

.x-a {
  left: 0;
}

.x-b {
  right: 0;
}

/* A person's range on that axis: a column above the floor. */
.band {
  position: absolute;
  top: -10px;
  bottom: calc(var(--floor) + 10px);
  left: var(--band-from);
  width: calc(var(--band-to) - var(--band-from));
  border: 3px solid var(--ink);
  border-radius: 22px;
  opacity: var(--band-in);
}

.dot {
  --size: 18px;
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--ink);
  left: calc(var(--x0) + (var(--x) - var(--x0)) * var(--spread) - var(--size) / 2);
  bottom: calc(var(--q) - var(--size) / 2);
  transition: transform 260ms ease, opacity 260ms ease;
}

/* Options under the floor stay where they are and fade: ruled out. */
.dot.out {
  left: calc(var(--x0) - var(--size) / 2);
  opacity: calc(1 - var(--floor-in) * 0.85);
}

.has-band .dot:not(.out):not(.in) {
  opacity: 0.3;
}

.dot.in {
  transform: scale(1.45);
  box-shadow: 0 0 0 3px var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    transition: none;
  }
}

.story-steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.story-steps li {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.15;
  max-width: 34ch;
  color: var(--muted);
  opacity: 0.4;
  transition: opacity 300ms ease, color 300ms ease;
}

.story-steps li.on {
  color: var(--ink);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .story-steps li {
    transition: none;
  }
}

@media (max-width: 640px) {
  .plot {
    margin-left: 58px;
    height: 280px;
  }
  .dot {
    --size: 14px;
  }
  .story-pin {
    top: 16px;
  }
}

/* ---------- Finding out ---------- */

.reveal h2 {
  font-size: clamp(40px, 6.4vw, 96px);
  max-width: 15ch;
}

.reveal .callout {
  margin-top: clamp(56px, 7vw, 88px);
}

.reveal .lead {
  margin-top: clamp(36px, 4vw, 56px);
  font-size: clamp(20px, 2.2vw, 26px);
  max-width: 44ch;
}

/* ---------- The name ---------- */

.name .section-head {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.paths-note {
  margin-top: 36px;
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 19px;
}

/* ---------- Grids of short points ---------- */

.points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 64px) clamp(32px, 5vw, 80px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.points.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.points li {
  display: grid;
  gap: 14px;
  align-content: start;
}

.points .n {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.points p {
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .points.three {
    grid-template-columns: 1fr;
  }
}

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

.callout {
  margin-top: clamp(64px, 8vw, 104px);
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.04;
  max-width: 20ch;
  text-wrap: balance;
}

/* ---------- Products ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.product {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-radius: 24px;
  padding: clamp(28px, 4vw, 44px);
  min-height: 100%;
}

.product .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
}

.product .brand svg {
  width: 40px;
  height: 40px;
  flex: none;
}

.product.second-draft .brand svg {
  width: 34px;
  height: 34px;
  margin: 3px;
}

.product .what {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product h3 {
  font-size: clamp(26px, 3vw, 34px);
}

.product p {
  font-size: 17px;
}

.product .foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.product .visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.product .visit svg {
  width: 16px;
  height: 16px;
}

/* Provisional things wear a dashed, neutral tag, as in Tuesdays. */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px dashed currentColor;
}

/* Tuesdays, in its own colours (its light and dark themes). */
.product.tuesdays {
  --t-paper: #f4f1ea;
  --t-ink: #141413;
  --t-ink-2: #4f4c46;
  --t-muted: #66625b;
  --t-line: #cdc7ba;
  --t-tile: #141413;
  --t-tile-ink: #f4f1ea;
  background: var(--t-paper);
  color: var(--t-ink);
  border: 1px solid var(--t-line);
}

.product.tuesdays .brand {
  font-weight: 650;
  letter-spacing: -0.03em;
}

.product.tuesdays h3 {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 44px);
  letter-spacing: -0.025em;
  line-height: 1;
}

.product.tuesdays p,
.product.tuesdays .tag {
  color: var(--t-ink-2);
}

.product.tuesdays .what {
  color: var(--t-muted);
}

.product.tuesdays .visit {
  background: #d4f25c;
  color: #141413;
}

@media (prefers-color-scheme: dark) {
  .product.tuesdays {
    --t-paper: #0f0f0e;
    --t-ink: #f2efe8;
    --t-ink-2: #c4c0b6;
    --t-muted: #8d897f;
    --t-line: #3d3d38;
    --t-tile: #f2efe8;
    --t-tile-ink: #0f0f0e;
  }
}

/* second draft, in plum and pink. */
.product.second-draft {
  background: #4a2138;
  color: #fff5f7;
  border: 1px solid #4a2138;
}

.product.second-draft .brand {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.product.second-draft h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.product.second-draft p,
.product.second-draft .what {
  color: #f7d6de;
}

.product.second-draft .visit {
  background: #f7d6de;
  color: #4a2138;
}

/* ---------- Choose, change, agree ---------- */

.verbs {
  margin-bottom: clamp(56px, 7vw, 96px);
}

.verbs-title {
  font-size: clamp(30px, 3.8vw, 48px);
  letter-spacing: -0.045em;
  margin-bottom: clamp(36px, 5vw, 56px);
  max-width: 18ch;
}

.verbs .points .n {
  font-family: var(--font-sans);
  font-size: clamp(44px, 5.4vw, 72px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: var(--ink);
}

.verbs .points h3 {
  font-size: clamp(20px, 2vw, 24px);
}

/* ---------- Fit and quality ---------- */

.kinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.kind {
  border-radius: 24px;
  padding: clamp(26px, 3.5vw, 40px);
  display: grid;
  gap: 16px;
  align-content: start;
}

/* Quality has one side: no colour. Fit has two: both colours, same size. */
.kind.quality {
  background: var(--surface);
}

.kind.fit {
  background: var(--surface);
}

.kind p {
  color: var(--ink-2);
}

/* Two answers, the same size, the two colours. */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.duo span {
  height: 44px;
  border-radius: 14px;
}

.duo-a {
  background: var(--a);
}

.duo-b {
  background: var(--b);
}

.kind .rule {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.kind h3 {
  font-size: clamp(24px, 2.6vw, 32px);
}

.kind dl {
  margin: 4px 0 0;
  display: grid;
  gap: 18px;
}

.kind dt {
  font-weight: 700;
  font-size: 15px;
}

.kind dd {
  margin: 6px 0 0;
  color: var(--ink-2);
}

.kind dd ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 520px) {
  .kind dd ul {
    grid-template-columns: 1fr;
  }
}

.kind.fit dd li {
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--on-ab);
}

.kind.fit dd li:first-child {
  background: var(--a);
}

.kind.fit dd li:last-child {
  background: var(--b);
}

.protects {
  display: block;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.4;
  margin-top: 6px;
}

.protects b {
  font-weight: 700;
}

.subsection {
  margin-top: clamp(64px, 8vw, 104px);
}

.subsection > h3 {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.045em;
  margin-bottom: 32px;
}

.never {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.never > div {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.never ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.never li {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.never p {
  color: var(--ink-2);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: clamp(88px, 12vw, 168px) 0 48px;
  overflow: hidden;
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
}

@media (max-width: 760px) {
  .site-footer .wrap {
    grid-template-columns: 1fr;
  }
}

.site-footer .line {
  grid-column: 1 / -1;
  max-width: none;
  color: var(--ink);
  margin-bottom: 24px;
}

.site-footer .line .h1-big {
  font-size: clamp(96px, 22vw, 320px);
}

.site-footer p {
  color: var(--ink-2);
  max-width: 52ch;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  align-content: start;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 19px;
  font-weight: 560;
}

.site-footer .fine {
  grid-column: 1 / -1;
  max-width: none;
  font-size: 15px;
  color: var(--muted);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
