/* MileSync website — shared styles.
   Brand palette matches the app's default "plum" theme (src/theme/theme.ts). */

:root {
  color-scheme: light dark;
  --brand: #7B3FA0;
  --brand-strong: #74126D;
  --bg: #ffffff;
  --surface: #faf8fc;
  --text: #1a1a1a;
  --muted: #5f5a66;
  --border: #e4e0ea;
  --note-bg: #fbf7e9;
  --note-border: #c9a227;
  --note-text: #5a4a10;
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #d59be8;
    --brand-strong: #d59be8;
    --bg: #16121c;
    --surface: #1d1826;
    --text: #e6e6e6;
    --muted: #a99fb3;
    --border: #33293d;
    --note-bg: #241f14;
    --note-text: #e0cf8f;
  }
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

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

/* ---------- Site chrome ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .inner,
.site-footer .inner,
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand span { color: var(--brand); }

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.92rem;
}

.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
.site-header nav a[aria-current='page'] { font-weight: 600; }

main { padding-top: 2rem; padding-bottom: 2rem; }

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .inner {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  justify-content: space-between;
}

.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Typography ---------- */

h1 { font-size: 1.9rem; margin-bottom: 0.25rem; line-height: 1.25; }
h2 {
  font-size: 1.3rem;
  margin-top: 2.2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}
h3 { font-size: 1.05rem; margin-top: 1.6rem; }

.updated { color: var(--muted); font-size: 0.9rem; margin-top: 0; }
.lede { font-size: 1.05rem; color: var(--muted); }

code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.9em;
}

blockquote {
  border-left: 4px solid var(--note-border);
  background: var(--note-bg);
  color: var(--note-text);
  margin: 1.2rem 0;
  padding: 0.6rem 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  display: block;
  overflow-x: auto;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

th { background: var(--surface); }

img { max-width: 100%; height: auto; }

/* ---------- Home page ---------- */

.hero { padding: 1rem 0 0.5rem; }
.hero h1 { font-size: 2.3rem; }

.features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.features li {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: var(--surface);
}

.features strong { display: block; margin-bottom: 0.25rem; }

.cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: var(--brand-strong);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .cta { background: var(--brand); color: #16121c; }
}

.doc-links { list-style: none; padding: 0; }
.doc-links li { margin: 0.5rem 0; }
