/* Abode public website — one shared stylesheet, no build step.
   Colors mirror src/theme/index.ts (the app). Large type and high contrast on
   purpose: many users are older adults. */

:root {
  --primary: #457A00;
  --primary-dark: #2E5200;
  --primary-light: #6AAD1A;
  --bg: #F8F5F0;
  --surface: #FFFFFF;
  --border: #E2D9CC;
  --text: #2A383F;
  --text-2: #4A5660;   /* darker than the app's muted gray so it stays readable */
  --warn-bg: #FFF4D6;
  --warn-border: #C8973A;
  --radius: 14px;
  --maxw: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; } /* 18px base */

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary); }

:focus-visible { outline: 4px solid #1F6FEB; outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--primary-dark); color: #fff; padding: 12px 18px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / nav ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; line-height: 0; border-radius: 10px; }
.brand img { height: 64px; width: auto; border-radius: 10px; display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.site-nav a {
  display: inline-block; padding: 10px 14px; min-height: 44px;
  font-weight: 600; text-decoration: none; color: var(--text); border-radius: 10px;
}
.site-nav a:hover { background: var(--bg); color: var(--primary-dark); }
.site-nav a[aria-current="page"] { color: var(--primary-dark); box-shadow: inset 0 -4px 0 var(--primary); border-radius: 10px 10px 0 0; }

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.25; color: var(--text); margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); font-weight: 800; margin-top: 0; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.3rem; color: var(--text-2); max-width: 44rem; }
.muted { color: var(--text-2); }
.small { font-size: 0.95rem; }

/* ---------- Layout blocks ---------- */
main { display: block; }
.section { padding: 56px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-intro { max-width: 46rem; margin-bottom: 28px; }

.hero { padding: 48px 0 40px; background: linear-gradient(180deg, #EEF4E3 0%, var(--bg) 100%); }
.hero h1 { max-width: 20ch; }
.hero .actions { margin-top: 28px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }

/* Two homes, one swap: the whole idea in one picture. */
.swap { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.swap-home { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(42, 56, 63, 0.14); }
.swap-home img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.swap-home figcaption { padding: 10px 12px; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--primary-dark); text-align: center; }
.swap-badge { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 60px; height: 60px; border-radius: 50%; background: var(--primary-dark); color: #fff;
  font-size: 1.9rem; line-height: 60px; text-align: center; border: 4px solid var(--bg);
  box-shadow: 0 4px 12px rgba(42, 56, 63, 0.3); }

/* Three short promises under the hero. */
.trust { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.trust li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; display: flex; flex-direction: column; }
.trust strong { font-size: 1.15rem; color: var(--primary-dark); }
.trust span { color: var(--text-2); font-size: 0.95rem; }

.versus .card.pick { border: 3px solid var(--primary); background: #F4F9EA; }
.versus ul.plain { margin: 0; }

@media (min-width: 900px) {
  .hero { padding: 72px 0 56px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 2px 8px rgba(42, 56, 63, 0.06);
}
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-dark); color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: 12px;
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-block; padding: 16px 28px; min-height: 56px;
  font-size: 1.15rem; font-weight: 700; text-align: center; text-decoration: none;
  border-radius: 12px; border: 3px solid var(--primary-dark);
  background: var(--primary-dark); color: #fff;
}
.btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--primary-dark); }
.btn.secondary:hover { background: #EEF4E3; color: var(--primary-dark); }
.btn.disabled, .btn[aria-disabled="true"] {
  background: #E9E5DE; border-color: #C9C2B6; color: #4A5660; cursor: not-allowed;
}

/* ---------- Pricing ---------- */
.plan { display: flex; flex-direction: column; }
.plan .price { font-size: 2rem; font-weight: 800; margin: 4px 0 0; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--text-2); }
.plan .alt-price { margin: 0 0 12px; color: var(--text-2); }
.plan .fee { background: var(--bg); border-radius: 10px; padding: 12px 14px; margin: 8px 0 14px; font-weight: 600; }
.plan ul { padding-left: 1.2em; margin: 0; }
.plan li { margin-bottom: 8px; }
.plan.featured { border: 3px solid var(--primary); }
.tag {
  display: inline-block; align-self: flex-start; background: var(--primary-dark); color: #fff;
  font-size: 0.85rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}

.notice {
  background: var(--warn-bg); border-left: 6px solid var(--warn-border);
  padding: 18px 20px; border-radius: 10px; margin: 24px 0;
}
.notice > :last-child { margin-bottom: 0; }
.notice.info { background: #EEF4E3; border-left-color: var(--primary); }

ul.plain { padding-left: 1.3em; }
ul.plain li { margin-bottom: 8px; }

/* ---------- Document pages (privacy, terms, FAQ, support) ---------- */
.doc { padding: 40px 0 64px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.doc .updated { color: var(--text-2); font-weight: 600; }
.doc h2 { font-size: 1.5rem; margin-top: 2em; padding-top: 0.2em; }
.doc-intro { background: var(--surface); border-left: 6px solid var(--primary); padding: 16px 20px; border-radius: 10px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 24px; margin: 24px 0; }
.toc h2 { font-size: 1.15rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2 280px; column-gap: 32px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }
.legal p { margin-bottom: 1em; }

/* Unfilled placeholders must be impossible to miss in review. */
mark.placeholder { background: #FFE066; color: #000; padding: 0 4px; border-radius: 4px; font-weight: 700; }

.faq-group { margin-top: 2.4em; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; }
.faq-item h3 { margin: 0 0 8px; font-size: 1.2rem; }
.faq-item p:last-child { margin-bottom: 0; }

.contact-card { text-align: center; padding: 32px 24px; }
.contact-card .email { font-size: clamp(1.3rem, 5vw, 1.8rem); font-weight: 800; word-break: break-word; }

/* ---------- Forms (Join the network) ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 24px; margin-top: 24px; }
.field { margin-bottom: 22px; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { display: block; font-weight: 400; color: var(--text-2); font-size: 0.95rem; margin-top: 2px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="url"],
.field select, .field textarea {
  width: 100%; font: inherit; font-size: 1.1rem; padding: 14px 14px; min-height: 56px;
  color: var(--text); background: #fff; border: 2px solid #8A8F94; border-radius: 10px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:disabled { background: #EEE9E0; color: #4A5660; }
.check { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.check input[type="checkbox"] { width: 28px; height: 28px; flex: 0 0 28px; margin-top: 2px; accent-color: var(--primary-dark); }
.check label { font-weight: 600; }
.field-error { color: #9B1C1C; font-weight: 700; margin: 6px 0 0; }
.form-status { margin: 18px 0 0; padding: 14px 18px; border-radius: 10px; font-weight: 600; }
.form-status.error { background: #FDECEC; border-left: 6px solid #9B1C1C; color: #5F1111; }
.form-status.ok { background: #EEF4E3; border-left: 6px solid var(--primary); color: var(--text); }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.pro-strip { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.pro-strip p { margin: 0; }
.form-card .btn { cursor: pointer; font-family: inherit; }
.form-card .btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #fff; padding: 40px 0; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #DDEBC0; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer li a { display: inline-block; padding: 10px 0; min-height: 44px; font-weight: 600; }
.site-footer p { margin: 0 0 10px; font-size: 0.95rem; color: #E8F0D8; }

@media (max-width: 560px) {
  html { font-size: 106.25%; }
  .section { padding: 40px 0; }
  .hero { padding: 40px 0 36px; }
  .btn { width: 100%; }
  .brand img { height: 54px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { background: #fff; font-size: 12pt; }
}
