/* BetterMe site. Tokens mirror the app's palette (Design / Colour scheme): one accent for
   the companion, three quiet category colours, no red and no warning yellow anywhere. */

:root {
  --bg: #FAF6EF;
  --card: #FFFDF8;
  --text: #23202B;
  --text2: #6E6875;
  --accent: #F08A3E;
  --on-accent: #23202B;
  --move: #6FA98C;
  --sleep: #8B87D6;
  --workout: #E4B04A;
  --hairline: #EBE5DC;
  --tray: #F1ECE3;

  --max: 680px;
  --gutter: 20px;
  --radius-card: 20px;
  --button-height: 52px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C2333;
    --card: #242C3D;
    --text: #F3EEE4;
    --text2: #A9A3B0;
    --hairline: #2F3850;
    --tray: #161C2A;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

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

/* Links: text colour with an accent underline, so they read on both themes. */
a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Header */
.site-header {
  padding-top: 24px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand svg {
  width: 22px;
  height: 28px;
}

/* Type */
h1,
h2 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  margin: 24px 0 12px;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.12;
}

h2 {
  margin: 36px 0 8px;
  font-size: 1.25rem;
}

p,
ul {
  margin: 0 0 14px;
}

.lead {
  font-size: 1.2rem;
  color: var(--text2);
}

.meta {
  color: var(--text2);
}

/* Illustration: the egg, in the companion's own colour. */
.egg {
  display: block;
  width: 112px;
  height: auto;
  margin-top: 16px;
}

/* The shell is the accent in both themes, like the companion. */
.shell {
  fill: var(--accent);
}

.egg .shine {
  fill: #FFFFFF;
  opacity: 0.3;
}

.egg .ground {
  fill: var(--tray);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 20px;
}

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

.card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Streams on the landing page: an icon in the category colour, then the line. */
.stream {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tray);
}

.icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.move {
  color: var(--move);
}

.icon.sleep {
  color: var(--sleep);
}

.icon.workout {
  color: var(--workout);
}

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

.stream p {
  margin: 0;
}

/* Primary button: a pill in the accent, dark text on it (6.4:1). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-height);
  padding: 0 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
}

.btn:hover {
  text-decoration: underline;
  text-decoration-color: var(--on-accent);
}

.actions {
  margin: 28px 0 8px;
}

/* Long-form pages: privacy, support. */
.doc h1 {
  font-size: clamp(1.9rem, 6vw, 2.4rem);
}

.doc ul {
  padding-left: 1.2em;
}

.doc li {
  margin-bottom: 6px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--tray);
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding-top: 16px;
  padding-bottom: 40px;
  border-top: 1px solid var(--hairline);
  color: var(--text2);
}

.site-footer a {
  display: inline-block;
  padding: 11px 2px;
  color: var(--text2);
}
