/* Schild Family Archive — modern theme */

:root {
  --bg: #0a0e17;
  --bg-soft: #10161f;
  --panel: rgba(255,255,255,0.035);
  --panel-border: rgba(255,255,255,0.09);
  --panel-border-hover: rgba(212,175,55,0.45);
  --ink: #eef1f6;
  --ink-soft: #a7b0c0;
  --ink-faint: #6d7688;
  --gold: #d4af37;
  --gold-bright: #f0cf6a;
  --azure: #3d63b8;
  --azure-glow: #5b82d6;
  --gules: #c23b3b;
  --max-width: 1080px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 480px at 15% -10%, rgba(61,99,184,0.22), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(212,175,55,0.10), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-word {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
  margin: 0 0 1rem;
}

h2 .accent { color: var(--gold-bright); font-style: italic; }

p { color: var(--ink-soft); }

a {
  color: var(--gold-bright);
  text-decoration: none;
}
a:hover { color: var(--gold); text-decoration: underline; }

::selection { background: rgba(212,175,55,0.35); color: #fff; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #14181f;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------- Header / nav ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,23,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--panel-border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.crest {
  width: 34px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(212,175,55,0.35));
}

.title-block .brand-word {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.title-block .tagline {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  width: 42px;
  height: 38px;
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

nav.site-nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

nav.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, background 0.15s ease;
}

nav.site-nav a:hover {
  color: var(--ink);
  background: var(--panel);
}

nav.site-nav a[aria-current="page"] {
  color: #14181f;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  margin: 0 0 1rem;
  background: linear-gradient(135deg, #fff 30%, var(--gold-bright) 75%, var(--azure-glow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
}

.hero-crest {
  width: 74px;
  height: auto;
  margin: 0 auto 1.75rem;
  filter: drop-shadow(0 6px 24px rgba(212,175,55,0.3));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--panel-border);
}

.section:first-child { border-top: none; }

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 720px;
}

.divider { display: none; }

/* Reveal-on-scroll (only when JS has armed it — see app.js).
   Content is fully visible by default so it never depends on JS. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js-reveal .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Callout / notice boxes ---------- */
.notice {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid var(--azure-glow);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.98rem;
  margin: 1.5rem 0;
}

.notice.heraldry-note {
  border-left-color: var(--gold);
  background: rgba(212,175,55,0.06);
}

.notice h3 {
  margin-top: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.notice p { margin-bottom: 0; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--panel-border-hover);
  background: rgba(255,255,255,0.055);
}

.card h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.card p:last-child { margin-bottom: 0; }

.origins-map {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  background: rgba(0,0,0,0.15);
}

.source-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.5rem;
}

.source-note a { color: var(--ink-soft); }
.source-note a:hover { color: var(--gold-bright); }

.card .placeholder-tag {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* ---------- Family tree ---------- */
.tree { margin-top: 1rem; }

.tree-gen { margin-bottom: 2rem; }

.tree-gen h3 {
  font-size: 0.8rem;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 0.6rem;
  margin-bottom: 0;
}

.tree-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.tree-node {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  min-width: 190px;
  flex: 1 1 190px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.tree-node:hover {
  border-color: var(--panel-border-hover);
  transform: translateY(-2px);
}

.tree-node::before {
  content: "\1F6E1";
  opacity: 0.5;
  font-size: 0.85rem;
  margin-right: 0.35rem;
  filter: grayscale(1) brightness(1.6);
}

.tree-node .name {
  font-family: "Fraunces", serif;
  font-weight: 600;
  color: var(--ink);
  display: block;
  font-size: 1.02rem;
}

.tree-node .dates,
.tree-node .place {
  display: block;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 2rem;
  border-left: 2px solid var(--panel-border);
}

.timeline-event {
  position: relative;
  margin-bottom: 2.25rem;
  padding-left: 1.25rem;
}

.timeline-event::before {
  content: "";
  position: absolute;
  left: -2.32rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--panel-border-hover), 0 0 14px rgba(212,175,55,0.5);
}

.timeline-event .year {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  color: var(--gold-bright);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-event h3 {
  margin: 0.3rem 0 0.35rem;
  font-size: 1.2rem;
}

.timeline-event p { margin-bottom: 0; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--panel-border);
  color: var(--ink-faint);
  text-align: center;
  padding: 2.25rem 1.5rem;
  font-size: 0.88rem;
}

footer.site-footer a { color: var(--ink-soft); }
footer.site-footer a:hover { color: var(--gold-bright); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  nav.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10,14,23,0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 0.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--panel-border);
    display: none;
  }

  nav.site-nav.open { display: flex; }

  nav.site-nav a { width: 100%; }

  header.site-header { position: sticky; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
}
