/* The marketing site. Its colours and type are the app's --rf-* brand tokens (copied from
   app/assets/stylesheets/application.css, so keep them in step), at a size for reading on any screen rather than the
   app's phone sizes. Plain CSS, with no Web Awesome: the page only has links and two forms. */

:root {
  --rf-turf: #1a6b3c;
  --rf-mint: #4caf7d;
  --rf-mist: #d4e8d4;
  --rf-white: #f7f9f7;
  --rf-ink: #1c1c1a;
  --rf-sec: #477563;
  --rf-card: #ffffff;
  --rf-border: #d4e8d4;
  --rf-turf-bg: #f0faf4;
  --rf-hero: #1a6b3c;
  --rf-on-hero: #ffffff;
  --rf-on-hero-sec: #c6e6d2;
  --rf-hero-track: #0f4a28;
  --rf-placeholder: #9bb3a6;

  --rf-font-body: -apple-system, "Inter", system-ui, sans-serif;
  --rf-font-mono: "SF Mono", "Menlo", "Monaco", monospace;

  --rf-radius-pill: 99px;
  --rf-radius-control: 12px;

  --gutter: 16px;
  --section: clamp(56px, 10vw, 112px);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--rf-white);
  color: var(--rf-ink);
  font-family: var(--rf-font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: clamp(38px, 7vw, 60px);
}

h2 {
  font-size: clamp(26px, 4vw, 36px);
}

p {
  text-wrap: pretty;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--rf-mint);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A field only bots fill in (see InviteRequestsController). Off screen rather than display: none, which some bots
   skip. */
.honeypot {
  position: absolute;
  left: -10000px;
}

/* ── Wordmark and links ─────────────────────────────────────── */
.wordmark {
  font-family: var(--rf-font-mono);
  font-weight: 500;
  font-size: 18px;
  text-decoration: none;
}

.wordmark__routine {
  color: var(--rf-turf);
}

.wordmark__fit {
  color: var(--rf-mint);
}

.text-link {
  color: var(--rf-turf);
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Header and footer ──────────────────────────────────────── */
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.site-footer {
  border-top: 1px solid var(--rf-border);
  padding-block: 32px;
  font-size: 15px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* ── Buttons and the invite form ────────────────────────────── */
.button {
  appearance: none;
  border: 0;
  border-radius: var(--rf-radius-control);
  background: var(--rf-turf);
  color: var(--rf-on-hero);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  min-height: 52px;
  padding-inline: 22px;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover {
  background: var(--rf-hero-track);
}

.button--inverted {
  background: var(--rf-card);
  color: var(--rf-turf);
}

.button--inverted:hover {
  background: var(--rf-turf-bg);
}

.invite-form {
  display: grid;
  gap: 8px;
}

.invite-form__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rf-sec);
}

.invite-form__row {
  display: grid;
  gap: 10px;
}

.invite-form__input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-radius-control);
  background: var(--rf-card);
  color: var(--rf-ink);
  font: inherit;
  font-size: 16px; /* 16px or more, so iOS doesn't zoom in on focus */
  padding-inline: 16px;
}

.invite-form__input::placeholder {
  color: var(--rf-placeholder);
}

.invite-form__input:focus {
  outline: none;
  border-color: var(--rf-turf);
}

.invite-form--inverted .invite-form__input {
  border-color: transparent;
}

.invite-form--inverted .invite-form__input:focus {
  border-color: var(--rf-mint);
}

@media (min-width: 520px) {
  .invite-form__row {
    grid-template-columns: 1fr auto;
  }
}

.fine-print {
  font-size: 14px;
  color: var(--rf-sec);
}

/* ── Phone frames around the screenshots ────────────────────── */
.phone {
  width: min(100%, 300px);
  margin-inline: auto;
  padding: 10px;
  border-radius: 46px;
  background: var(--rf-ink);
  box-shadow: 0 30px 60px -20px rgb(15 74 40 / 0.35), 0 12px 24px -12px rgb(28 28 26 / 0.25);
}

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

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding-block: 32px var(--section);
}

.hero__inner {
  display: grid;
  gap: 56px;
  align-items: center;
}

.hero__copy {
  display: grid;
  gap: 24px;
  max-width: 560px;
}

.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--rf-sec);
}

.hero__copy .invite-form {
  margin-top: 8px;
}

@media (min-width: 860px) {
  .hero {
    padding-top: 56px;
  }

  .hero__inner {
    grid-template-columns: 1fr auto;
    gap: 64px;
  }

  .hero__phone {
    width: 320px;
  }
}

/* ── Features ───────────────────────────────────────────────── */
.features {
  background: var(--rf-card);
  border-block: 1px solid var(--rf-border);
  padding-block: var(--section);
}

.features__list {
  display: grid;
  gap: var(--section);
}

.feature {
  display: grid;
  gap: 40px;
  align-items: center;
}

.feature__copy {
  display: grid;
  gap: 16px;
  max-width: 460px;
}

.feature__copy p {
  color: var(--rf-sec);
}

.feature__phone {
  width: min(100%, 280px);
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .feature__copy {
    justify-self: end;
  }

  /* Every other feature has its screenshot on the left. */
  .feature:nth-child(even) .feature__copy {
    order: 2;
    justify-self: start;
  }
}

/* ── Help shape it ──────────────────────────────────────────── */
.shape {
  padding-block: var(--section);
}

.shape__inner {
  display: grid;
  gap: 16px;
  max-width: 720px;
  text-align: center;
}

.shape__inner p {
  color: var(--rf-sec);
}

/* ── The closing invite, on the hero green ──────────────────── */
.closing {
  background: var(--rf-hero);
  color: var(--rf-on-hero);
  padding-block: var(--section);
}

.closing__inner {
  display: grid;
  gap: 16px;
  max-width: 640px;
  text-align: center;
}

.closing__inner p {
  color: var(--rf-on-hero-sec);
}

.closing .invite-form {
  margin-top: 16px;
  text-align: left;
}
