/* eCue web design tokens.
   Values are copied from eCue/DesignSystem/Theme.swift so the site and the app
   read as the same product. Light and dark both, since the app supports both.

   No web fonts, no analytics, no third-party requests of any kind. The privacy
   page claims the site collects nothing, and that has to be literally true. */

:root {
  --brand: #B491C2;
  --brand-ink: #6E4B79;
  --brand-edge: #7F5987;
  --brand-soft: #EDE5F7;
  --accent: #E9694A;
  --accent-soft: #FBEAE4;
  --success: #12B886;
  --background: #F5F1FA;
  --background-top: #EBE0F7;
  --surface: #FFFFFF;
  --text-primary: #201D2B;
  --text-secondary: #6A6579;
  --hairline: #EBE7F2;
  --on-brand: #2A2233;

  --card-radius: 24px;
  --tile-radius: 14px;
  --button-radius: 16px;

  --measure: 34rem;
  --page: 60rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #BB9ED6;
    --brand-ink: #CDB4DB;
    --brand-edge: #5A4166;
    --brand-soft: #272033;
    --accent: #FF8E73;
    --accent-soft: #3A241C;
    --success: #4BD8A8;
    --background: #131019;
    --background-top: #191424;
    --surface: #1E1B27;
    --text-primary: #F4F2FA;
    --text-secondary: #A9A3B8;
    --hairline: #2C2836;
    --on-brand: #1E1826;
  }
}

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

body {
  margin: 0;
  /* ui-rounded gives SF Rounded on Apple platforms, which is the app's voice.
     Everything after it is a graceful fallback, all locally installed. */
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(var(--background-top), var(--background));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- header ---------- */

.site-header {
  padding: 22px 0;
}

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.wordmark img { width: 30px; height: 30px; border-radius: 8px; }

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a { color: var(--brand-ink); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 32px 0 56px;
}

@media (min-width: 44rem) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 48px; padding: 56px 0 80px; }
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 16px;
  font-weight: 800;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: var(--measure);
}

.hero-art {
  background: var(--brand-soft);
  border-radius: var(--card-radius);
  padding: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-art img { width: 100%; max-width: 280px; height: auto; display: block; }

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 800;
  font-size: 1.02rem;
  padding: 15px 30px;
  border-radius: var(--button-radius);
  text-decoration: none;
  /* The app's pressable lip, from Theme.Metric.buttonDepth. */
  box-shadow: 0 4px 0 var(--brand-edge);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--brand-edge);
}

.note {
  display: block;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ---------- cards and sections ---------- */

.section { padding: 20px 0 56px; }

.section h2 {
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  font-weight: 800;
}

.section > .wrap > p.lede {
  color: var(--text-secondary);
  max-width: var(--measure);
  margin: 0 0 28px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 40rem) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

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

.card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-primary);
}

.card p { margin: 0; color: var(--text-secondary); font-size: 0.98rem; }

.step {
  width: 34px;
  height: 34px;
  border-radius: var(--tile-radius);
  background: var(--brand-soft);
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 14px;
}

/* ---------- privacy highlight ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--card-radius);
  padding: 30px;
}

@media (min-width: 44rem) { .panel { padding: 40px; } }

.panel h2 { margin-top: 0; }

.facts { list-style: none; margin: 20px 0 0; padding: 0; }

.facts li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
}

.facts strong { color: var(--text-primary); font-weight: 700; }

.panel-lede {
  color: var(--text-secondary);
  max-width: var(--measure);
  margin: 0;
}

.panel-more { margin: 22px 0 0; }

.link-strong { color: var(--brand-ink); font-weight: 700; }

/* ---------- plain document pages ---------- */

.doc { padding: 12px 0 64px; }

.doc .wrap { max-width: 44rem; }

.doc h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  font-weight: 800;
}

.doc .updated {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin: 0 0 34px;
}

.doc h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 36px 0 10px;
  letter-spacing: -0.01em;
}

.doc p, .doc li { color: var(--text-secondary); }
.doc strong { color: var(--text-primary); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc a { color: var(--brand-ink); }

.callout {
  background: var(--brand-soft);
  border-radius: var(--tile-radius);
  padding: 18px 20px;
  margin: 24px 0;
}

.callout p { margin: 0; color: var(--text-primary); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 30px 0 46px;
  margin-top: 20px;
}

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

.site-footer p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }

.footer-links { display: flex; gap: 18px; font-size: 0.9rem; font-weight: 600; }
.footer-links a { color: var(--brand-ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- accessibility ---------- */

a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--brand-ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
