:root {
  --bg: #f7f1e3;
  --bg-deep: #ece2cc;
  --surface: #fffdf7;
  --ink: #1d1a15;
  --muted: #6b6255;
  --line: rgba(29, 26, 21, 0.12);
  --accent: #a4262c;
  --bam: #2f7a3e;
  --shadow: rgba(40, 28, 10, 0.28);
  --radius: 18px;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17140f;
    --bg-deep: #211c15;
    --surface: #231f18;
    --ink: #f3ecdd;
    --muted: #b3a894;
    --line: rgba(243, 236, 221, 0.14);
    --accent: #e0676b;
    --bam: #6cc27d;
    --shadow: rgba(0, 0, 0, 0.55);
  }
}

:root[data-theme="dark"] {
  --bg: #17140f;
  --bg-deep: #211c15;
  --surface: #231f18;
  --ink: #f3ecdd;
  --muted: #b3a894;
  --line: rgba(243, 236, 221, 0.14);
  --accent: #e0676b;
  --bam: #6cc27d;
  --shadow: rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.eyebrow {
  font: 600 0.78rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 38em;
}

/* Header */

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font: 700 1.1rem/1 var(--sans);
  letter-spacing: 0.08em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

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

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

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

.button.ghost {
  border-color: var(--line);
  color: var(--ink);
}

/* Hero */

.hero {
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-note {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

/* Framed app screenshots */

.shot {
  margin: 0;
}

.shot img {
  width: min(320px, 78%);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 28px 36px var(--shadow));
}

.shot img[width="1000"] { width: min(460px, 100%); }

.hero-shot img[width="1000"] { width: min(480px, 100%); }

.shot figcaption {
  max-width: 26rem;
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Sections */

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-head {
  max-width: 44rem;
  margin-bottom: 3rem;
}

.band {
  background: var(--bg-deep);
  border-block: 1px solid var(--line);
}

/* Principles */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.principle {
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
}

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

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

/* Feature rows */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.feature + .feature { margin-top: clamp(4rem, 9vw, 7rem); }

.feature.flip .feature-copy { order: 2; }

.feature-copy p { color: var(--muted); }

.feature-copy ul {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-copy li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
}

.feature-copy li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-copy { order: 0; }
}

/* Grid of smaller features */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 0 0 1px var(--line);
}

.card h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.card .icon svg { width: 22px; height: 22px; }

/* Help levels */

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

.level {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 0 0 1px var(--line);
}

.level .tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.level h3 { margin-top: 0.5rem; }
.level p { color: var(--muted); font-size: 0.95rem; }

.toggle-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.toggle-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}

.switch {
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 30%, transparent);
  position: relative;
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.switch.on { background: var(--bam); }

/* A three-way choice in the help levels: Off, Sections or Hands. */
.choice {
  flex: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}

.choice.on {
  color: #fff;
  background: var(--bam);
}
.switch.on::after { left: 16px; }

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

/* FAQ */

.faq {
  max-width: 50rem;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 1.1rem 0;
}

.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
}

.faq details[open] summary::after { content: "−"; }

.faq details p {
  color: var(--muted);
  margin: 0.75rem 0 0;
}

/* CTA */

.cta {
  text-align: center;
}

.cta .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta img {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 0 0 1px var(--line), 0 20px 40px -20px var(--shadow);
  margin-bottom: 1.5rem;
}

.cta .lede { margin-inline: auto; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer .fine { max-width: 36rem; margin: 0; }

/* Plain document pages (privacy) */

.doc {
  max-width: 44rem;
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--ink); }
.doc h3 { font-size: 1.1rem; margin-top: 1.75rem; }
.doc code, .feature-copy code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--ink);
  background: var(--bg-deep);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}
.doc pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  line-height: 1.55;
}
.doc pre code { background: none; padding: 0; font-size: 0.85rem; }

/* Beta install page */

.doc .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0.5rem;
}

.doc .note { font-size: 0.9rem; }

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
}

.steps li {
  position: relative;
  padding: 0.15rem 0 1.25rem 3rem;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--ink);
  color: var(--bg);
}

.site-nav a[aria-current="page"] { color: var(--ink); }

.cta .hero-actions { justify-content: center; margin-top: 1.5rem; }
