/* ==== Fixed chrome tokens: header/footer/brand/nav-tick, never themed ==== */
:root {
  --chrome-bg: #241C15;      /* Night Camp */
  --chrome-accent: #C9821A;  /* Compass Gold */
}

/* ==== Design tokens: swappable per-page theme (default = Home) ==== */
:root {
  --color-bg: #F7F3EC;       /* Paper */
  --color-surface: #FFFFFF;
  --color-text: #33291F;     /* Trail Ink */
  --color-muted: #7A6C59;
  --color-link: #6B4423;     /* Trail Brown */
  --color-accent: #C9821A;   /* Compass Gold */
  --color-line: #A89A85;     /* Compass Grey */

  --font-display: ui-sans-serif, "Segoe UI Semibold", "Helvetica Neue", Arial, sans-serif;
  --font-body: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-data: ui-monospace, "SF Mono", "Cascadia Code", "Consolas", monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: 4rem;

  --max-width: 60rem;
}

/* ==== Per-person theme overrides ==== */
.theme-andreas {
  --color-bg: #F3F6F5;       /* Snowfield */
  --color-surface: #FFFFFF;
  --color-text: #263138;     /* Slate Rock */
  --color-muted: #5B6A70;
  --color-link: #1B6E8C;     /* Glacier Blue */
  --color-accent: #E8590C;   /* Signal Orange */
  --color-line: #9AA5AA;     /* Contour Grey */
}
.theme-anna {
  --color-bg: #F9F4F1;       /* Blush Paper */
  --color-surface: #FFFFFF;
  --color-text: #3D3733;
  --color-muted: #8C7C76;
  --color-link: #7A4A63;     /* Dusty Plum */
  --color-accent: #E0956B;   /* Warm Coral */
  --color-line: #C9BAB4;     /* Petal Grey */
}
.theme-leia {
  --color-bg: #F7F1E3;       /* Straw */
  --color-surface: #FFFFFF;
  --color-text: #3E2A1B;     /* Saddle */
  --color-muted: #8A705A;
  --color-link: #7A3E1D;     /* Chestnut */
  --color-accent: #B23A2E;   /* Ribbon Red */
  --color-line: #BFAE93;     /* Hay Grey */
}
.theme-elias {
  --color-bg: #F1F6F7;       /* Frost */
  --color-surface: #FFFFFF;
  --color-text: #233238;     /* Slate Ice */
  --color-muted: #647178;
  --color-link: #1D7A72;     /* Trail Teal */
  --color-accent: #2FA8D5;   /* Ice Blue */
  --color-line: #9FB0B5;     /* Steel Grey */
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  margin: 0 0 var(--space-1);
}

a {
  color: var(--color-link);
}
a:hover, a:focus-visible {
  color: var(--color-accent);
}
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ==== Header / nav (signature motif, use 1: contour texture) ==== */
.site-header {
  background-color: var(--chrome-bg);
  background-image: repeating-linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.06) 0px,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px,
    transparent 14px
  );
  color: #fff;
  padding: var(--space-2) var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.brand a {
  color: #fff;
  font-family: var(--font-display);
  font-weight: bold;
  text-decoration: none;
  font-size: 1.25rem;
}
.brand-accent { color: var(--chrome-accent); }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-family: var(--font-data);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 4px;
}
.site-nav a:hover, .site-nav a:focus-visible {
  color: #fff;
}

/* signature motif, use 2: the "elevation tick" marking the active page */
.site-nav a[aria-current="page"] {
  color: #fff;
  position: relative;
}
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  background: var(--chrome-accent);
}

/* ==== Main content ==== */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-3);
}

.eyebrow {
  font-family: var(--font-data);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0 0 var(--space-1);
}

.tagline {
  font-size: 1.15rem;
  color: var(--color-muted);
}

/* signature motif, use 3: contour-band section dividers */
.section-divider {
  height: 20px;
  margin: var(--space-3) 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--color-line) 0px,
    var(--color-line) 1px,
    transparent 1px,
    transparent 12px
  );
  background-position: bottom;
  background-size: 100% 2px;
  background-repeat: no-repeat;
}

/* ==== Home page family grid ==== */
.family-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}
.person-card {
  display: block;
  background: var(--color-surface);
  border-left: 3px solid var(--color-line);
  padding: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s ease;
}
.person-card:hover, .person-card:focus-visible {
  border-left-color: var(--color-accent);
}
.person-card h2 {
  color: var(--color-text);
  font-size: 1.1rem;
}
.person-card p {
  color: var(--color-muted);
  margin: 0;
}

.explore ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ==== Gallery ==== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.gallery-grid figure {
  margin: 0;
}
.gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}
.gallery-grid figcaption {
  margin-top: var(--space-1);
  font-family: var(--font-data);
  font-size: 0.8rem;
  color: var(--color-muted);
  text-align: center;
}

/* ==== Blog hub ==== */
.blog-entry {
  margin: var(--space-3) 0;
}
.blog-entry h2 {
  font-size: 1.1rem;
}
.blog-posts {
  list-style: none;
  padding: 0;
  margin: var(--space-1) 0 0;
}
.blog-posts li {
  padding: 2px 0;
}
.blog-posts time {
  display: inline-block;
  margin-left: var(--space-1);
  font-family: var(--font-data);
  font-size: 0.75rem;
  color: var(--color-muted);
}
.blog-note {
  color: var(--color-muted);
  font-style: italic;
}

/* ==== Kid placeholder portraits ==== */
.kid-portrait {
  text-align: center;
  padding: var(--space-2) 0;
}
.photo-frame {
  width: 10rem;
  height: 10rem;
  margin: 0 auto var(--space-2);
  border: 2px dashed var(--color-line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
}
.photo-frame svg {
  width: 3.5rem;
  height: 3.5rem;
  fill: none;
  stroke: var(--color-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==== Person photo + social links ==== */
.person-photo {
  display: block;
  width: 10rem;
  height: 10rem;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--color-line);
  margin: 0 0 var(--space-2);
}
.social-links {
  margin-top: var(--space-2);
}
.social-link {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
}
.social-link svg {
  width: 100%;
  height: 100%;
}
.social-link rect {
  fill: var(--color-accent);
}
.social-link text {
  fill: var(--color-surface);
}
.social-link:hover rect {
  fill: var(--color-link);
}

/* ==== Footer ==== */
.site-footer {
  background: var(--chrome-bg);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: var(--space-2);
  font-size: 0.85rem;
}

@media (max-width: 40rem) {
  .family-grid { grid-template-columns: 1fr; }
}
