/* Best4Senior static pages — same tokens and type as the app (constants/theme.ts). */

@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/SourceSans3_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/SourceSans3_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/SourceSans3_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/SourceSans3_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f5f4;
  --surface: #ffffff;
  --text: #20343d;
  --text-soft: #304650;
  --muted: #506169;
  --primary: #245c62;
  --primary-dark: #203f46;
  --primary-tint: #d5e5e3;
  --secondary: #526458;
  --accent: #daac60;
  --accent-text: #533b14;
  --brand-four: #b8893f;
  --danger: #a13f3f;
  --border: #d6dedd;
  --divider: #e4e9e8;
  --radius: 16px;
  --radius-control: 14px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a {
  color: var(--primary);
  font-weight: 600;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-dark);
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  z-index: 10;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header-inner {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

/* The gold "4" of the logo wordmark. */
.brand-four {
  color: var(--brand-four);
}

.brand img {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-links a[aria-current='page'] {
  background: var(--primary-tint);
  color: var(--primary-dark);
  font-weight: 800;
}

.nav-links a.nav-cta {
  margin-left: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-control);
}

.nav-links a.nav-cta:hover {
  background: var(--primary-dark);
}

/* ---------- page ---------- */

.page {
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: 40px 0 48px;
}

.content,
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 16px;
  font-weight: 700;
}

h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  margin: 36px 0 10px;
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.25;
}

h3 {
  margin: 24px 0 8px;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
}

p,
li {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.6;
}

ul,
ol {
  padding-left: 24px;
}

li + li {
  margin-top: 6px;
}

strong {
  color: var(--text);
}

.legal-content {
  overflow-wrap: anywhere;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 24px 0 0;
}

.meta-list div {
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 12px 14px;
}

.meta-list dt {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.meta-list dd {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.table-scroll {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--divider);
  padding: 12px 14px;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 2px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 20px;
  background: var(--primary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--primary-dark);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.notice {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.55;
}

.notice.danger {
  border-color: var(--danger);
}

.notice-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
}

.notice.danger .notice-icon {
  background: var(--danger);
  color: #fff;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.contact-card .tile {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
}

.contact-card p {
  margin: 0;
}

/* ---------- footer ---------- */

.site-footer {
  width: min(100% - 32px, 860px);
  margin: 0 auto;
  padding: 0 0 40px;
  color: var(--muted);
  font-size: 15px;
}

.site-footer p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 16px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--text-soft);
  font-size: 15px;
}

/* ---------- invite (legacy landing) ---------- */

.center-page {
  min-height: calc(100vh - 73px);
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.center-card {
  width: min(100%, 560px);
}

.link-text {
  color: var(--muted);
  font-size: 15px;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links a.nav-cta {
    margin-left: 0;
  }

  .page {
    padding-top: 24px;
  }
}

.notice p {
  margin: 0;
  font-size: 17px;
}
