/* Eldrid marketing site. Palette mirrors mobile/src/theme.ts so the web
   presence and the app feel like the same product. Large type and high
   contrast by default -- part of the audience is elderly visitors, not just
   their adult children. */

:root {
  --background: #FAF9F5;
  --surface: #FFFFFF;
  --border: #E3E1DA;
  --text: #1F1D1A;
  --text-muted: #6B6862;
  --primary: #206F7E;
  --primary-dark: #17505c;
  --on-primary: #FFFFFF;
  --accent: #C8793C;
  --accent-surface: #F7E8D9;
  --danger: #B3261E;
  --danger-surface: #FBEAE9;
  --warning: #8A5A00;
  --warning-surface: #FBF1DF;
  --safe: #1E5C3B;
  --safe-surface: #EAF3EC;
  --max-width: 1080px;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
}

img {
  max-width: 100%;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 20px;
  z-index: 100;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

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

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
}

.brand .mark .dot {
  color: var(--accent);
}

nav.site-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}

nav.site-nav a:hover {
  color: var(--primary);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 16px 28px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1.2;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 48px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: var(--accent-surface);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 20px;
}

.hero .lede {
  font-size: 20px;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 12px 32px rgba(31, 29, 26, 0.06);
}

.chat-bubble {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 16px;
  max-width: 90%;
}
.chat-bubble.from-user {
  background: var(--accent-surface);
  margin-left: auto;
}
.chat-bubble.from-eldrid {
  background: var(--background);
  border: 1px solid var(--border);
}
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 12px;
  margin-top: 8px;
  font-size: 15px;
}
.verdict.fraud { background: var(--danger-surface); color: var(--danger); }
.verdict.unsure { background: var(--warning-surface); color: var(--warning); }
.verdict.safe { background: var(--safe-surface); color: var(--safe); }

/* ---------- Sections ---------- */

section {
  padding: 56px 0;
}

section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2.section-title {
  font-size: 32px;
  margin: 0 0 12px;
  text-align: center;
}

.section-lede {
  text-align: center;
  color: var(--text-muted);
  font-size: 19px;
  max-width: 60ch;
  margin: 0 auto 40px;
}

/* Problem stats */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.stat-card .num {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 16px;
}

.stat-card cite {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: normal;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.step-card .step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.step-card p {
  color: var(--text-muted);
  margin: 0;
}

/* Verdict explainer */

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.verdict-card {
  border-radius: var(--radius);
  padding: 28px;
  border: 2px solid transparent;
}
.verdict-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}
.verdict-card p {
  margin: 0;
}
.verdict-card.fraud { background: var(--danger-surface); border-color: var(--danger); color: var(--danger); }
.verdict-card.unsure { background: var(--warning-surface); border-color: var(--warning); color: var(--warning); }
.verdict-card.safe { background: var(--safe-surface); border-color: var(--safe); color: var(--safe); }
.verdict-card p { color: var(--text); }

/* For families */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.check-list li {
  padding-left: 32px;
  position: relative;
  margin-bottom: 14px;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: 800;
}

/* Blog cards */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card:hover {
  border-color: var(--primary);
}

.post-card .tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.post-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 16px;
}

.post-card time {
  color: var(--text-muted);
  font-size: 14px;
}

.blog-index-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* FAQ */

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 16px;
}
.faq-item summary {
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}
.faq-item p {
  color: var(--text-muted);
  margin: 12px 0 0;
}

/* ---------- Form ---------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 620px;
  margin: 0 auto;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select {
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  color: var(--text);
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus {
  outline: 3px solid var(--primary);
  outline-offset: 1px;
}

.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--text-muted);
}
.consent-row input {
  margin-top: 4px;
}

.form-status {
  margin-top: 18px;
  font-weight: 600;
  min-height: 24px;
}
.form-status.success { color: var(--safe); }
.form-status.error { color: var(--danger); }

/* ---------- Article ---------- */

.article-header {
  padding: 48px 0 24px;
  text-align: center;
}
.article-header .eyebrow {
  margin-bottom: 20px;
}
.article-header h1 {
  font-size: 38px;
  line-height: 1.2;
  margin: 0 0 16px;
}
.article-meta {
  color: var(--text-muted);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.article-body h2 {
  font-size: 26px;
  margin: 40px 0 16px;
}

.article-body p {
  margin: 0 0 18px;
}

.article-body ul {
  margin: 0 0 18px;
  padding-left: 24px;
}
.article-body li {
  margin-bottom: 8px;
}

.callout {
  background: var(--accent-surface);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}
.callout h2 {
  margin-top: 0 !important;
  color: var(--accent);
}

.sources {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 40px;
  font-size: 15px;
  color: var(--text-muted);
}
.sources h2 {
  font-size: 18px !important;
  margin: 0 0 12px !important;
}
.sources ul {
  padding-left: 20px;
}

.breadcrumbs {
  font-size: 14px;
  color: var(--text-muted);
  padding-top: 24px;
}
.breadcrumbs a {
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 15px;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
footer.site-footer a {
  color: var(--text-muted);
}
footer.site-footer ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  body { font-size: 17px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .stat-grid,
  .steps,
  .verdict-grid,
  .post-grid,
  .blog-index-list {
    grid-template-columns: 1fr;
  }
  .split { grid-template-columns: 1fr; }
  nav.site-nav ul { gap: 14px; }
  .form-card { padding: 24px; }
}

@media (prefers-color-scheme: dark) {
  /* Deliberately not inverted: the target audience relies on this staying a
     stable, high-contrast light surface regardless of system theme. */
}
