/* ═══════════════════════════════════════════════════════════════════════════
   HomeField Directory — marketing site + static pages (login, docs).
   Warm, light, church-first: ivory paper, deep slate ink, meadow-green accent.
   Fraunces display serif, Source Sans 3 body. Same system as FieldLink Missions.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --paper:   #fbf7f0;
  --paper2:  #f3ecdf;
  --paper3:  #ebe2d0;
  --card:    #ffffff;
  --ink:     #1f2a3a;
  --ink-soft:#3c475a;
  --muted:   #6b7280;
  --faint:   #9aa3b2;
  --accent:  #3f8f4f;
  --accent2: #5fae6c;
  --accent-dim:  rgba(63,143,79,0.10);
  --accent-glow: rgba(63,143,79,0.22);
  --sky:     #dbe7f1;
  --sky2:    #c9dbea;
  --danger:  #c0392b;
  --border:  rgba(31,42,58,0.10);
  --border2: rgba(63,143,79,0.35);
  --shadow:  0 1px 2px rgba(31,42,58,0.05), 0 10px 30px rgba(31,42,58,0.07);
  --shadow-lg: 0 2px 4px rgba(31,42,58,0.06), 0 24px 60px rgba(31,42,58,0.12);
  --radius:  18px;
  --radius-sm: 12px;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:    ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent2); color: #fff; }
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--accent); }
strong { font-weight: 600; }

/* ── Type ─────────────────────────────────────────────────────────────────── */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings: 'opsz' 96, 'SOFT' 50;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}
.section-title em, h1 em, h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
.section-sub { font-size: 1.12rem; color: var(--ink-soft); line-height: 1.7; max-width: 600px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 18px;
}
.section-tag::before { content: ''; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.center { text-align: center; }
.center .section-tag::after { content: ''; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.section { padding: 96px 48px; max-width: 1180px; margin: 0 auto; }
.section-tight { padding: 64px 48px; }
.band { background: var(--paper2); }
.band-ink { background: var(--ink); color: #f6f1e7; }
.band-ink h1, .band-ink h2, .band-ink .section-title { color: #f6f1e7; }
.band-ink .section-sub { color: rgba(246,241,231,0.72); }
.band-ink .section-tag { color: var(--accent2); }
.band-ink .section-tag::before, .band-ink .section-tag::after { background: var(--accent2); }
.divider { height: 1px; background: var(--border); max-width: 1180px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Navigation ───────────────────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 76px; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(251,247,240,0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
#nav.scrolled { border-bottom-color: var(--border); box-shadow: 0 6px 24px rgba(31,42,58,0.06); }
.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.nav-logo-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-logo-text { font-family: var(--font-display); font-size: 1.22rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.nav-links { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 30px; white-space: nowrap; }
.nav-links a { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; position: relative; padding: 6px 0; transition: color 0.15s; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-signin { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.nav-signin:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink); color: #fff;
  padding: 10px 22px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  transition: background 0.15s, transform 0.15s; flex-shrink: 0;
}
.nav-cta:hover { background: #2c3a4f; transform: translateY(-1px); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-accent, .btn-outline, .btn-ink {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: 999px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background 0.15s, transform 0.2s, box-shadow 0.2s, border-color 0.15s, color 0.15s;
}
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 22px var(--accent-glow); }
.btn-accent:hover { background: #357a43; transform: translateY(-2px); box-shadow: 0 14px 30px var(--accent-glow); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2c3a4f; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border-color: rgba(31,42,58,0.22); }
.btn-outline:hover { border-color: var(--ink); background: rgba(31,42,58,0.04); transform: translateY(-2px); }
.band-ink .btn-outline { color: #f6f1e7; border-color: rgba(246,241,231,0.35); }
.band-ink .btn-outline:hover { border-color: #f6f1e7; background: rgba(246,241,231,0.08); }
.btn-sm { padding: 10px 20px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn-note { font-size: 0.9rem; color: var(--muted); margin-top: 14px; }
button:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border2); }
.card.static:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.icon-tile {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-dim); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.45rem; margin-bottom: 18px;
}
.card-title { font-family: var(--font-display); font-size: 1.28rem; font-weight: 500; margin-bottom: 8px; color: var(--ink); }
.card-text { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.65; }

/* Check list */
.check-list { display: flex; flex-direction: column; gap: 12px; }
.check-item { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; color: var(--ink-soft); line-height: 1.55; }
.check-item::before {
  content: '✓'; flex-shrink: 0; margin-top: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-dim); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}

/* Pricing */
.price-card { position: relative; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim), var(--shadow-lg); }
.price-badge { position: absolute; top: -13px; left: 30px; background: var(--accent); color: #fff; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.price { font-family: var(--font-display); font-size: 3rem; font-weight: 500; line-height: 1; color: var(--ink); margin: 14px 0 4px; }
.price span { font-family: var(--font-body); font-size: 1rem; color: var(--muted); font-weight: 500; }
.price-period { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--ink-soft); margin-top: 10px; line-height: 1.7; }

/* Prose (docs, legal) */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 14px; }
.prose h2 { font-size: 1.6rem; margin: 44px 0 12px; }
.prose h3 { font-size: 1.2rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-soft); line-height: 1.75; margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--paper2); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.prose .lede { font-size: 1.2rem; color: var(--ink-soft); }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0 22px; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); background: var(--paper2); }
.callout { background: var(--accent-dim); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 20px 0; color: var(--ink-soft); }
.callout.warn { background: rgba(194,102,15,0.08); border-left-color: #c2660f; }
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 4px; }
.docs-nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.docs-nav a:hover { background: var(--paper2); color: var(--ink); }
.docs-nav a.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }
.docs-nav .group { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin: 16px 12px 4px; font-weight: 700; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
#footer {
  background: var(--ink); color: rgba(246,241,231,0.7);
  padding: 56px 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
#footer .foot-logo { font-family: var(--font-display); font-size: 1.15rem; color: #f6f1e7; font-weight: 500; }
#footer .foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
#footer .foot-links a { font-size: 0.9rem; color: rgba(246,241,231,0.7); text-decoration: none; transition: color 0.15s; }
#footer .foot-links a:hover { color: #f6f1e7; }
#footer .foot-copy { font-size: 0.82rem; color: rgba(246,241,231,0.45); width: 100%; }

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { opacity: 0; animation: fadeUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; } .delay-3 { animation-delay: 0.32s; } .delay-4 { animation-delay: 0.45s; }
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none; opacity: 1; } }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 13px 15px;
  background: var(--card); border: 1px solid rgba(31,42,58,0.18); border-radius: var(--radius-sm);
  color: var(--ink); font-family: var(--font-body); font-size: 1rem; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--faint); }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.95rem; margin-bottom: 16px; line-height: 1.5; }
.form-msg.error { background: rgba(192,57,43,0.08); color: var(--danger); border: 1px solid rgba(192,57,43,0.2); }
.form-msg.success { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-glow); }
.form-msg.info { background: var(--paper2); color: var(--ink-soft); border: 1px solid var(--border); }
.checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--ink-soft); }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Auth card (login, signup, reset) */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 110px 20px 60px; }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 6px; }
.auth-card .lede { color: var(--muted); margin-bottom: 26px; font-size: 1rem; }
.auth-or { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 0.85rem; margin: 20px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-links { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; text-align: center; }
.auth-links a { color: var(--ink-soft); text-decoration: none; }
.auth-links a:hover { color: var(--accent); }

/* ── Mobile nav ───────────────────────────────────────────────────────────── */
.nav-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: all 0.2s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; top: 76px; left: 0; right: 0; z-index: 999;
  background: var(--paper); border-bottom: 1px solid var(--border);
  flex-direction: column; padding: 8px 0 16px; box-shadow: 0 16px 40px rgba(31,42,58,0.12);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 14px 24px; font-size: 1.05rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu-cta { margin: 12px 24px 0; text-align: center; border-radius: 999px; background: var(--ink) !important; color: #fff !important; border-bottom: none !important; }
.mobile-menu-overlay { display: none; position: fixed; inset: 0; background: rgba(31,42,58,0.3); z-index: 998; }
.mobile-menu-overlay.open { display: block; }

.env-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 99999; background: #c2660f; color: #fff; text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; padding: 2px; pointer-events: none; }

@media (max-width: 960px) {
  .nav-links, .nav-cta, .nav-signin { display: none; }
  .nav-hamburger { display: flex; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .docs-nav .group { width: 100%; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  #nav { padding: 0 18px; height: 68px; }
  .mobile-menu { top: 68px; }
  .section { padding: 64px 22px; }
  .section-tight { padding: 44px 22px; }
  #footer { padding: 40px 22px; flex-direction: column; align-items: flex-start; gap: 16px; }
  #footer .foot-links { gap: 12px 18px; }
  .form-row, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-title { font-size: 1.9rem; }
  .auth-card { padding: 28px 22px; }
  .auth-wrap { padding-top: 90px; }
}
