/* Same palette and typeface as the app (mobile/src/theme/theme.ts). The font
   is served from this site (OFL license in fonts/) so visitors' browsers never
   contact a third party. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}

:root {
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-alt: #f0efe8;
  --border: #e5e1d8;
  --ink: #17190f;
  --muted: #6b6b63;
  --primary: #16643a;
  --primary-soft: #e3efe7;
  --font: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

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

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Header and footer */

.site-header {
  padding-block: 24px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* The wordmark alone: its two O's already are the logo's brackets. */
.brand .wordmark {
  height: 25px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
  padding-block: 32px 48px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer a {
  color: var(--muted);
}

/* Landing page */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-block: 48px 32px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}

.hero .lead {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 34ch;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-button {
  display: inline-flex;
  flex-direction: column;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
  line-height: 1.25;
  min-width: 190px;
}

.store-button small {
  font-size: 12px;
  opacity: 0.75;
}

.store-button strong {
  font-size: 18px;
}

.store-button[aria-disabled="true"] {
  background: var(--surface-alt);
  color: var(--muted);
  pointer-events: none;
}

.soon {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.phones {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.phone {
  width: 240px;
  border-radius: 28px;
  border: 8px solid var(--ink);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 48px -24px rgba(23, 25, 15, 0.35);
}

.phones .phone:nth-child(2) {
  margin-top: 48px;
}

section {
  padding-block: 56px;
}

.section-title {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
  margin: 0 0 12px;
  text-wrap: balance;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 60ch;
}

.examples {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.examples li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  display: grid;
  gap: 2px;
}

.examples strong {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
}

.examples span {
  font-size: 18px;
  font-weight: 600;
}

.modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mode {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.mode h3 {
  margin: 12px 0 6px;
  font-size: 20px;
}

.mode p {
  margin: 0;
  color: var(--muted);
}

.mode .example {
  margin-top: 16px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

.mode-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 12px;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}

.feature-list strong {
  display: block;
  font-size: 18px;
}

.feature-list span {
  color: var(--muted);
}

.cta {
  background: var(--primary);
  color: #ffffff;
  border-radius: 24px;
  padding: 48px;
  text-align: center;
}

.cta h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 34px);
}

.cta p {
  margin: 0;
  opacity: 0.85;
}

/* Text pages (privacy, terms, legal, support) */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding-block: 32px 0;
}

.doc h1 {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.15;
  margin: 0 0 8px;
  text-wrap: balance;
}

.doc .updated {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 40px;
}

.doc h2 {
  font-size: 22px;
  margin: 40px 0 12px;
}

.doc h3 {
  font-size: 18px;
  margin: 24px 0 8px;
}

.doc p,
.doc li {
  max-width: 65ch;
}

.doc ul {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.callout {
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
}

.callout p {
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 16px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  background: var(--surface);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

th {
  background: var(--surface-alt);
}

.steps-inline {
  padding-left: 22px;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

summary {
  font-weight: 600;
  cursor: pointer;
}

details p {
  margin: 10px 0 0;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}

.contact-card p {
  margin: 0;
}

.contact-card .email {
  font-size: 22px;
  font-weight: 700;
  margin-top: 6px;
  word-break: break-all;
}

/* Small screens */

@media (max-width: 820px) {
  .hero,
  .features {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 24px;
  }

  .modes,
  .steps {
    grid-template-columns: 1fr;
  }

  .examples {
    grid-template-columns: 1fr 1fr;
  }

  .phone {
    width: 46%;
    max-width: 220px;
  }

  .cta {
    padding: 32px 24px;
  }

  .site-header nav {
    display: none;
  }
}

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