/**
 * Development work by David Lane
 */
/**
 * Genealogy source file.
 * Author: Levi Lane.
 */
/**
 * Lane Family hub — quiet, editorial layout (warm neutral, one accent).
 * Heritage tokens: /shared/design-tokens.css (--lf-*)
 */

html {
  scroll-behavior: smooth;
}

body.lane-family-hub {
  margin: 0;
  background: var(--lf-bg);
  color: var(--lf-ink);
  font-family: var(--lf-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.lf-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* Hero */
.lf-hero {
  padding: 3.25rem 0 2.5rem;
  border-bottom: 1px solid var(--lf-line);
  margin-bottom: 2rem;
}

.lf-hero-kicker {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lf-muted);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.lf-hero-title {
  font-family: var(--lf-serif);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--lf-ink);
}

.lf-hero-lede {
  font-size: 1.0625rem;
  color: var(--lf-muted);
  max-width: 34em;
  margin: 0;
  font-weight: 400;
}

.lf-hero-chrono {
  font-size: 0.9375rem;
  color: var(--lf-ink-soft);
  max-width: 36em;
  margin: 1rem 0 0;
  line-height: 1.5;
}

.lf-hero-chrono em {
  font-style: italic;
  color: var(--lf-ink-soft);
}

.lf-hero-roots {
  font-size: 0.9375rem;
  color: var(--lf-ink-soft);
  max-width: 38em;
  margin: 1rem 0 0;
  line-height: 1.55;
}

.lf-hero-host {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lf-muted);
  margin: 0.85rem 0 0;
}

.lf-era-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0.65rem 0 0;
  border-top: 1px solid var(--lf-line);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lf-muted);
}

.lf-era-strip__item {
  color: var(--lf-accent);
}

.lf-era-strip__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--lf-line-strong);
  display: inline-block;
}

.lf-reading-order {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--lf-muted);
  max-width: 40em;
  line-height: 1.55;
}

.lf-reading-order__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lf-accent);
  margin-bottom: 0.35rem;
}

.lf-reading-order a {
  color: var(--lf-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--lf-ease);
}

.lf-reading-order a:hover {
  border-bottom-color: var(--lf-accent);
}

.lf-also-line {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--lf-line);
  font-size: 0.8125rem;
  color: var(--lf-muted);
  max-width: 40em;
}

.lf-also-line a {
  color: var(--lf-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.lf-also-line a:hover {
  border-bottom-color: var(--lf-accent);
}

/* Lane guide (AI) — same editorial tone as the hub */
.lf-ai-panel {
  margin-top: 1.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--lf-bg-elevated);
  border: 1px solid var(--lf-line);
  border-radius: var(--lf-radius);
  box-shadow: var(--lf-shadow);
}

.lf-ai-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.lf-ai-panel__title {
  font-family: var(--lf-serif);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0;
  color: var(--lf-ink-soft);
}

.lf-ai-panel__badges {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lf-muted);
}

.lf-ai-panel__lede {
  font-size: 0.875rem;
  color: var(--lf-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
  max-width: 40em;
}

.lf-ai-panel__disclaimer {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #8a8478;
}

.lf-ai-suggestions-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.65rem !important;
}

.lf-ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: flex-start;
}

.lf-ai-prompt-chip {
  border: 1px solid var(--lf-line-strong);
  color: var(--lf-muted);
  background: var(--lf-bg);
  padding: 0.4rem 0.72rem;
  border-radius: var(--lf-radius);
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.lf-ai-prompt-chip:hover {
  color: var(--lf-ink);
  border-color: var(--lf-accent);
  background: rgba(107, 83, 68, 0.06);
}

.lf-ai-prompt-chip:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(107, 83, 68, 0.25);
}

.lf-ai-input {
  font-size: 0.9rem;
  border-radius: var(--lf-radius) !important;
  border: 1px solid var(--lf-line-strong) !important;
  resize: vertical;
  min-height: 2.75rem;
}

.lf-ai-input:focus {
  border-color: var(--lf-accent) !important;
  box-shadow: 0 0 0 0.15rem rgba(107, 83, 68, 0.12);
}

.lf-ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.65rem;
}

.lf-ai-send {
  background: var(--lf-accent) !important;
  border: none !important;
  color: #fff !important;
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lf-ai-send:hover:not(:disabled) {
  background: var(--lf-accent-hover) !important;
  color: #fff !important;
}

.lf-ai-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lf-ai-status {
  font-size: 0.8rem;
  color: var(--lf-muted);
}

.lf-ai-reply {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--lf-line);
  font-size: 0.9rem;
  color: var(--lf-ink-soft);
  line-height: 1.55;
  max-width: 40em;
}

.lf-ai-reply--visible:not([hidden]) {
  display: block;
}

.lf-ai-answer .lf-ai-para {
  margin: 0 0 0.75rem;
}

.lf-ai-answer .lf-ai-para:last-child {
  margin-bottom: 0;
}

.lf-ai-error {
  color: #8b4513;
  font-size: 0.9rem;
}

.lf-source-note {
  margin: 1rem 0 0;
  color: var(--lf-muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.lf-source-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lf-accent);
}

.lf-source-note a {
  color: var(--lf-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--lf-ease);
}

.lf-source-note a:hover {
  border-bottom-color: var(--lf-accent);
}

.lf-source-sep {
  color: var(--lf-line-strong);
}

/* Sticky dock */
.lf-dock-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lf-line);
  margin: 0 -1.25rem 2.5rem;
  padding: 0.65rem 1.25rem;
}

.lf-dock {
  max-width: 56rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
  justify-content: center;
}

.lf-dock a {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lf-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--lf-ease), border-color 0.2s var(--lf-ease);
}

.lf-dock a:hover,
.lf-dock a:focus {
  color: var(--lf-accent);
  outline: none;
}

.lf-dock a.is-active {
  color: var(--lf-ink-soft);
  border-bottom-color: var(--lf-line-strong);
}

/* Sections */
.lf-section {
  margin-bottom: 3rem;
  scroll-margin-top: 5.5rem;
}

.lf-section-head {
  margin-bottom: 1.25rem;
}

.lf-section-label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lf-muted);
  margin: 0 0 0.35rem;
}

.lf-section-title {
  font-family: var(--lf-serif);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0;
  color: var(--lf-ink-soft);
}

/* Cards */
.lf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .lf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .lf-grid--triple {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lf-card {
  display: block;
  background: var(--lf-bg-elevated);
  border: 1px solid var(--lf-line);
  border-radius: var(--lf-radius);
  padding: 1.35rem 1.4rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--lf-shadow);
  transition: border-color 0.25s var(--lf-ease), box-shadow 0.25s var(--lf-ease), transform 0.35s var(--lf-ease);
}

.lf-card:hover,
.lf-card:focus {
  border-color: var(--lf-line-strong);
  box-shadow: 0 2px 4px rgba(28, 27, 25, 0.06), 0 12px 32px rgba(28, 27, 25, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.lf-card:focus-visible {
  outline: 2px solid var(--lf-accent);
  outline-offset: 2px;
}

.lf-card-icon {
  font-size: 1.1rem;
  color: var(--lf-accent);
  margin-bottom: 0.65rem;
  display: block;
  opacity: 0.85;
}

.lf-card-title {
  font-family: var(--lf-serif);
  font-size: 1.125rem;
  font-weight: 400;
  margin: 0 0 0.4rem;
  color: var(--lf-ink);
}

.lf-card-desc {
  font-size: 0.875rem;
  color: var(--lf-muted);
  margin: 0;
  line-height: 1.5;
}

.lf-card-arrow {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lf-accent);
}

.lf-footer-note {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lf-line);
  font-size: 0.8125rem;
  color: var(--lf-muted);
  text-align: center;
}

.lf-footer-note a {
  color: var(--lf-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.lf-footer-note a:hover {
  border-bottom-color: var(--lf-accent);
}

/* First-visit splash (Lane Historians–style plate; see lane-family-splash.js) */

.lf-hub-splash {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: #2c2824;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition: opacity 900ms ease, visibility 900ms ease;
}

.lf-hub-splash-bg {
  position: absolute;
  inset: 0;
  background-position: center top;
  background-size: cover;
  filter: grayscale(0.06) contrast(1.04) saturate(0.92);
  transform: scale(1.02);
  animation: lfHubSplashDrift 3200ms ease forwards;
}

.lf-hub-splash--reduced-motion .lf-hub-splash-bg {
  animation: none;
  transform: scale(1);
}

.lf-hub-splash-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(244, 240, 232, 0.12) 0%, rgba(44, 40, 36, 0.45) 55%, rgba(30, 26, 22, 0.82) 100%),
    linear-gradient(180deg, rgba(20, 18, 16, 0.35), rgba(20, 18, 16, 0.65));
}

.lf-hub-splash-inner {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 42rem);
  padding: 1rem 1.1rem 1.5rem;
  text-align: center;
  color: #f4f0e8;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.lf-hub-splash-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #e8dfd0;
}

.lf-hub-splash-title {
  margin: 0;
  font-family: var(--lf-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.lf-hub-splash-sub {
  margin: 0.6rem auto 0;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e0d8ca;
}

.lf-hub-splash-sub a {
  color: #fff4e4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lf-hub-splash-sub a:hover {
  color: #fff;
}

.lf-hub-splash-embed-wrap {
  margin-top: 1rem;
  width: 100%;
  max-width: min(92vw, 720px);
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(244, 240, 232, 0.22);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  background: #1a1816;
}

.lf-hub-splash-iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.lf-hub-splash-placeholder {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: #d4cfc4 !important;
  line-height: 1.5;
}

.lf-hub-splash-placeholder code {
  font-size: 0.85em;
  color: #f0ebe3;
}

.lf-hub-splash-skip {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  border: 1px solid rgba(244, 240, 232, 0.35);
  background: rgba(30, 26, 22, 0.55);
  color: #f4f0e8;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.lf-hub-splash-skip:hover {
  background: rgba(44, 40, 36, 0.75);
  color: #fff;
}

.lf-hub-splash--closing {
  opacity: 0;
  visibility: hidden;
}

.lf-hub-splash--hidden {
  display: none;
}

.lf-hub-splash--fallback .lf-hub-splash-bg {
  background-image: none !important;
  background: linear-gradient(145deg, #3d3832 0%, #252220 55%, #1a1816 100%);
}

@keyframes lfHubSplashDrift {
  from {
    transform: scale(1.03);
  }
  to {
    transform: scale(1);
  }
}

@media print {
  body.lane-family-hub {
    background: #fff;
    color: #000;
  }

  .lf-hub-splash {
    display: none !important;
  }

  .lf-dock-wrap,
  .lf-footer-note {
    display: none;
  }

  .lf-hero {
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
  }

  .lf-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .lf-section {
    break-inside: avoid;
  }
}
