/* Shared look for the public pages at app-milo.com. Palette matches the app's own tokens
   (client/src/constants/colors.ts) so the website and the app read as one product. */

:root {
  --ground: #F7F9FF;
  --surface: #FFFFFF;
  --surface-2: #EEF3FE;
  --ink: #1A2340;
  --ink-soft: #5A6B94;
  --rule: #D9E2F5;
  --rule-strong: #BDCCEB;
  --accent: #3E6FD0;
  --accent-soft: #5B8DEF;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E1424;
    --surface: #161E33;
    --surface-2: #1D2740;
    --ink: #E4EAFA;
    --ink-soft: #94A5CC;
    --rule: #2A3654;
    --rule-strong: #3A4A70;
    --accent: #7BA5F5;
    --accent-soft: #5B8DEF;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ---------- page frame ---------- */
.page {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.15rem, 5vw, 2rem) 5rem;
}

.masthead {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.wordmark {
  font-size: 1.35rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .dot { color: var(--accent-soft); }
.masthead .tag { color: var(--ink-soft); font-size: 0.92rem; }

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 750;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0 0 2.5rem;
  text-wrap: pretty;
}

h2 {
  font-size: 1.15rem;
  font-weight: 680;
  letter-spacing: -0.012em;
  margin: 2.25rem 0 0.6rem;
  text-wrap: balance;
}

h3 {
  font-size: 0.98rem;
  font-weight: 660;
  margin: 1.4rem 0 0.4rem;
  color: var(--ink);
}

p { margin: 0 0 0.85rem; max-width: var(--measure); }
ul { margin: 0 0 0.85rem; padding-left: 1.2rem; max-width: var(--measure); }
li { margin-bottom: 0.3rem; }

/* ---------- navigation cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.card:hover { border-color: var(--accent-soft); }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-1px); }
}
.card .title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 680;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}
.card .title .arrow { color: var(--accent); font-weight: 500; }
.card .what { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

.staff-note {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: -1.75rem;
  margin-bottom: 2.5rem;
}

/* ---------- legal documents ---------- */
.doc-meta {
  color: var(--ink-soft);
  font-size: 0.88rem;
  border-left: 3px solid var(--rule-strong);
  padding-left: 0.9rem;
  margin-bottom: 2rem;
}
.doc section { margin-bottom: 1.75rem; }
.doc h2 { margin-top: 0; }
.doc .subheading {
  font-weight: 660;
  font-size: 0.98rem;
  margin: 1.1rem 0 0.35rem;
}
/* The Impressum keeps its address on separate lines */
.doc p.block { white-space: pre-line; }

/* ---------- footer ---------- */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.88rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
footer a { color: var(--ink-soft); }
footer a:hover { color: var(--accent); }
footer .spacer { margin-left: auto; }

/* ---------- coming back from Stripe ----------
   Someone lands here mid-task, from a browser tab opened by the app. The job is to say what
   happened in one line and get them back where they were, not to be a web page. */
.outcome {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  gap: 0.4rem;
}

.outcome .mark {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  background: var(--surface-2);
}
.outcome .mark svg { width: 2.1rem; height: 2.1rem; }
.outcome .mark.good { background: #E4F4EC; }
.outcome .mark.good svg { stroke: #2E9E6B; }
.outcome .mark.neutral svg { stroke: var(--ink-soft); }

.outcome h1 { font-size: 1.6rem; margin: 0; letter-spacing: -0.02em; }
.outcome p {
  color: var(--ink-soft);
  max-width: 26rem;
  margin: 0.5rem 0 0;
  line-height: 1.55;
}

.outcome .back {
  display: inline-block;
  margin-top: 2rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  padding: 0.85rem 1.9rem;
  border-radius: 12px;
}
.outcome .hint {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 1rem;
}
