/*
 * Shared styles for the Escalator Wealth Advisors public landing site
 * at escalatorwealth.com. Hosted on Cloudflare Pages. Static HTML pages
 * pull live data (fees, disclosure metadata) from api.escalatorwealth.com
 * via the unauthenticated /api/public/* surface.
 */

:root {
  color-scheme: dark;
  --bg: #1c2433;
  --bg-elev: #232c3d;
  --fg: #e5e5e5;
  --fg-strong: #ffffff;
  --muted: #a3a3a3;
  --muted-strong: #cbd0db;
  --primary: #e05d38;
  --rule: #2e394e;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ── Header / nav ──────────────────────────────────────────── */

.site-header {
  width: 100%;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-link:hover { text-decoration: none; }
.brand-link .brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 8px;
  padding: 3px;
}
.brand-link .brand-name-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-link .brand-name-stack .brand-escalator {
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.brand-link .brand-name-stack .brand-wealth {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 14px;
  color: var(--muted-strong);
  letter-spacing: 0.02em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover {
  color: var(--fg-strong);
  text-decoration: none;
  border-bottom-color: var(--primary);
}
.site-nav a.is-current {
  color: var(--fg-strong);
  border-bottom-color: var(--primary);
}

/* ── Main ──────────────────────────────────────────────────── */

main {
  flex: 1 0 auto;
  width: 100%;
}
.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 20px 64px;
}
.page-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 20px 64px;
}

h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  margin: 40px 0 16px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--fg-strong);
}
p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  margin: 0 0 16px;
}
p.muted {
  color: var(--muted-strong);
}
ul, ol {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  padding-left: 22px;
  margin: 0 0 20px;
}
li { margin: 6px 0; }

.lede {
  font-size: clamp(17px, 2.2vw, 19px);
  color: var(--muted-strong);
  line-height: 1.6;
  margin: 0 0 32px;
  max-width: 620px;
}

.callout {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 15px;
  color: var(--muted-strong);
  line-height: 1.6;
}
.callout strong { color: var(--fg-strong); }

/* ── Tables ────────────────────────────────────────────────── */

.table-wrap {
  margin: 16px 0 28px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  background: var(--bg-elev);
  color: var(--fg-strong);
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  letter-spacing: 0.02em;
}
tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--rule);
  color: var(--fg);
  vertical-align: top;
  line-height: 1.5;
}
tbody tr:first-child td { border-top: 0; }
tbody td.muted { color: var(--muted); }

/* ── Disclosure card list ──────────────────────────────────── */

.doc-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
}
.doc-list li {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.doc-list .doc-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.doc-list .doc-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-strong);
}
.doc-list .doc-sub {
  font-size: 13px;
  color: var(--muted);
}
.doc-list .doc-action {
  flex-shrink: 0;
}
.button {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.button:hover {
  background: #c84d2b;
  text-decoration: none;
}
.button.is-disabled {
  background: var(--rule);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.loading, .error {
  font-size: 14px;
  color: var(--muted);
  padding: 12px 0;
}
.error { color: #e07a7a; }

/* ── Footer ────────────────────────────────────────────────── */

.site-footer {
  width: 100%;
  border-top: 1px solid var(--rule);
  margin-top: 64px;
  background: var(--bg);
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.site-footer-inner nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer-inner nav a {
  color: var(--muted-strong);
}
.site-footer-inner .legal {
  line-height: 1.6;
  max-width: 720px;
  color: var(--muted);
}

/* ── Responsive tweaks ─────────────────────────────────────── */

@media (max-width: 640px) {
  .site-header-inner { padding: 14px 16px; gap: 14px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 13px; }
  .page, .page-wide { padding: 36px 16px 48px; }
  .doc-list li { flex-direction: column; align-items: flex-start; }
  .doc-list .doc-action { width: 100%; }
  .button { width: 100%; text-align: center; }
}
