/*
 * Reeve's front page. The same tokens as the owner website (apps/web/src/index.css), so the two feel
 * like one company: warm paper, charcoal text, one oxblood accent (#712929), Lora for headings and
 * Inter for everything else. Phone first; dark mode follows the visitor's setting.
 */

:root {
  --bg: #f6f2ea;
  --bg-deep: #efe7db;
  --surface: #fffdf9;
  --ink: #2a2624;
  --ink-2: #4f4843;
  --ink-3: #6a615a;
  --line: #e7e0d5;
  --line-strong: #d7cdbf;
  --accent: #712929;
  --accent-hover: #5c2020;
  --accent-soft: #f2e2df;
  --accent-text: #712929;
  --on-accent: #fff8f3;
  --bubble-in: #ece6dc;
  --bubble-out: #712929;
  --bubble-out-ink: #fff8f3;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Lora", ui-serif, Georgia, serif;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(42, 38, 36, 0.04), 0 24px 60px -28px rgba(42, 38, 36, 0.35);
  --wrap: 1160px;
  --gutter: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151211;
    --bg-deep: #1b1715;
    --surface: #1d1917;
    --ink: #f3eee6;
    --ink-2: #c9c0b5;
    --ink-3: #a0968b;
    --line: #302925;
    --line-strong: #40372f;
    --accent: #b9524c;
    --accent-hover: #c9645d;
    --accent-soft: rgba(185, 82, 76, 0.18);
    --accent-text: #e0938b;
    --on-accent: #ffffff;
    --bubble-in: #2a2421;
    --bubble-out: #7c2e2c;
    --bubble-out-ink: #fbeee9;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

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

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

@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: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--accent-text);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.display em {
  font-style: italic;
  color: var(--accent-text);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 20ch;
}

.section-lede {
  margin-top: 16px;
  font-size: 19px;
  color: var(--ink-2);
  max-width: 46ch;
}

.caption,
figcaption {
  font-size: 14px;
  color: var(--ink-3);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--ink-3);
}

.btn-light {
  background: #fff8f3;
  color: #5c2020;
}

.btn-light:hover {
  background: #ffffff;
}

.btn-outline-light {
  color: #fff8f3;
  border-color: rgba(255, 248, 243, 0.5);
}

.btn-outline-light:hover {
  border-color: #fff8f3;
}

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

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

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--accent-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.mark {
  width: 24px;
  height: 24px;
}

.top-nav {
  display: none;
  gap: 28px;
  margin-left: auto;
}

.top-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

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

.top .btn {
  margin-left: auto;
}

@media (min-width: 760px) {
  .top-nav {
    display: flex;
  }

  .top .btn {
    margin-left: 8px;
  }
}

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

.hero {
  padding: 48px 0 72px;
  background:
    radial-gradient(1100px 520px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--bg);
}

.hero-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero .display {
  font-size: clamp(44px, 9vw, 84px);
  max-width: 13ch;
}

.hero .display em {
  display: block;
}

.lede {
  margin-top: 24px;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--ink-2);
  max-width: 34ch;
}

.fine {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-3);
}

.hero-shot {
  margin: 0;
  justify-self: center;
  width: min(330px, 100%);
}

.hero-shot figcaption {
  margin-top: 14px;
  text-align: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 72px 0 104px;
  }

  .hero-inner {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 64px;
  }

  .hero .display {
    max-width: 15ch;
  }

  .hero-shot {
    transform: rotate(1.5deg);
  }
}

/* A phone, drawn around a phone-width screenshot. */
.phone {
  border-radius: 34px;
  padding: 10px;
  background: #1d1917;
  box-shadow: var(--shadow);
}

.phone img {
  border-radius: 25px;
  width: 100%;
}

/* A browser window, drawn around a desktop screenshot. */
.browser {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.browser-bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* ---------- How it works ---------- */

.how {
  padding: 80px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.how-inner {
  display: grid;
  gap: 56px;
}

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

.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
}

.step-n {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent-text);
}

.steps h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 10px 0 4px;
}

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

.thread {
  margin: 0;
}

.thread-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 18px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
}

.bubble {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 15.5px;
  line-height: 1.45;
}

.bubble .who {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  opacity: 0.75;
}

.bubble-in {
  align-self: flex-start;
  background: var(--bubble-in);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}

.bubble-out {
  align-self: flex-end;
  background: var(--bubble-out);
  color: var(--bubble-out-ink);
  border-bottom-right-radius: 6px;
}

.bubble-you {
  font-weight: 600;
  letter-spacing: 0.04em;
}

.thread figcaption {
  margin-top: 12px;
}

@media (min-width: 900px) {
  .how {
    padding: 112px 0;
  }

  .how-inner {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
  }

  .thread {
    position: sticky;
    top: 96px;
  }

  .thread-card {
    padding: 32px 28px;
  }
}

/* ---------- Screens ---------- */

.screens {
  padding: 80px 0;
}

.screens .browser {
  margin-top: 40px;
}

.screens .caption {
  margin-top: 12px;
}

.pair {
  display: grid;
  gap: 48px;
  margin-top: 72px;
}

.pair figure {
  margin: 0;
}

.pair .browser {
  margin-top: 0;
}

.pair figcaption {
  margin-top: 16px;
  font-size: 16px;
  color: var(--ink-2);
  max-width: 40ch;
}

.pair figcaption strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 4px;
}

.pair-narrow .phone {
  width: min(320px, 100%);
}

@media (min-width: 900px) {
  .screens {
    padding: 112px 0;
  }

  .pair {
    grid-template-columns: 1fr 320px;
    gap: 56px;
    align-items: start;
  }
}

/* ---------- Control ---------- */

.control {
  padding: 80px 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--line);
}

.grid {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.grid li {
  background: var(--surface);
  padding: 26px 24px;
}

.grid h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 8px;
}

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

.browser-solo {
  margin-top: 56px;
}

.control .caption {
  margin-top: 12px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 980px) {
  .control {
    padding: 112px 0;
  }

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

  .grid li {
    padding: 32px 28px;
  }
}

/* ---------- Ask ---------- */

.ask {
  background: #712929;
  color: #fff8f3;
  padding: 80px 0;
}

.ask-inner {
  text-align: left;
}

.ask .display {
  font-size: clamp(40px, 7vw, 68px);
}

.ask p {
  margin-top: 18px;
  font-size: 19px;
  max-width: 40ch;
  color: rgba(255, 248, 243, 0.88);
}

@media (min-width: 900px) {
  .ask {
    padding: 112px 0;
  }
}

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

.foot {
  padding: 48px 0 56px;
  font-size: 15px;
  color: var(--ink-3);
}

.foot-inner {
  display: grid;
  gap: 16px;
}

.wordmark-small {
  font-size: 22px;
}

.wordmark-small .mark {
  width: 20px;
  height: 20px;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.foot-links a,
.foot-mail a {
  color: var(--ink-2);
}

@media (min-width: 760px) {
  .foot-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px 40px;
  }

  .foot-links {
    justify-content: center;
  }

  .foot-company {
    grid-column: 1 / 3;
  }

  .foot-mail {
    text-align: right;
  }
}

.pair figcaption .sample {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-3);
}

/* A picture cut off at the bottom fades out, rather than ending mid-line. */
.fade img {
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, #000 82%, transparent);
}
