/* Colours follow the app: Tailwind neutral greys, the zinc-950 dark background and indigo accent. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #fafafa;
  --fg: #171717;
  --muted: #737373;
  --accent: #4f46e5;
  --link: #4f46e5;
  --line: #e5e5e5;
  --callout: #eef2ff;
  --callout-line: #c7d2fe;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --surface: #171717;
    --fg: #f5f5f5;
    --muted: #a3a3a3;
    --link: #818cf8;
    --line: #262626;
    --callout: #1e1b4b;
    --callout-line: #312e81;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.6 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
}

main,
footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  padding-bottom: 3rem;
}

/* The landing page is wider so the screenshot and feature row have room. */
.home main,
.home footer {
  max-width: 56rem;
}

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

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 4px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.5rem;
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}

nav a:hover {
  background: var(--surface);
  color: var(--link);
}

nav .brand {
  gap: 0.5rem;
  margin-right: auto;
  padding-left: 0;
  font-weight: 600;
}

nav .brand:hover {
  background: none;
}

nav .brand img {
  width: 28px;
  height: 28px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin: 1.5rem 0 0.75rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.25rem;
}

p,
li {
  text-wrap: pretty;
}

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

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

/* Landing page */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

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

.btn.primary:hover {
  background: #4338ca;
}

.btn.secondary {
  color: var(--link);
}

.btn.secondary:hover {
  background: var(--callout);
}

.note {
  font-size: 0.9rem;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 0;
  list-style: none;
}

.features h2 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

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

@media (max-width: 40rem) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* Privacy and delete-account pages */
.callout,
.card {
  padding: 0.25rem 1.25rem;
  border-radius: 12px;
}

.callout {
  margin: 1.5rem 0;
  background: var(--callout);
  border: 1px solid var(--callout-line);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
}

.callout h2,
.card h2 {
  margin-top: 1rem;
}

.toc {
  margin: 1.5rem 0;
}

.toc ul {
  margin: 0.25rem 0 0;
  columns: 2;
  padding-left: 1.25rem;
}

@media (max-width: 40rem) {
  ol,
  ul {
    padding-left: 1.25rem;
  }
}

footer ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 2rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

footer a:hover {
  color: var(--link);
  text-decoration: underline;
}
