@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --cream: #fdf8f0;
  --warm-white: #fffef9;
  --gold: #b8922a;
  --gold-light: #d4a840;
  --brown: #5c3d1e;
  --brown-dark: #3a2510;
  --text: #2a1f14;
  --text-muted: #6b5744;
  --border: #e8dcc8;
  --section-alt: #f5efe3;
  --dark-band: #1e1510;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
body { background: var(--cream); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.7; }
img { display: block; max-width: 100%; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 2rem; }

/* ── Nav ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--brown-dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 2rem; gap: 1rem;
}
.site-nav .brand { font-family: var(--serif); color: var(--gold-light); font-size: 1.05rem; letter-spacing: 0.02em; white-space: nowrap; }
.site-nav nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.site-nav nav a { color: #d4c4a8; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.site-nav nav a:hover { color: var(--gold-light); text-decoration: none; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: flex-end;
  background: linear-gradient(to bottom, #1e1510 0%, transparent 40%), url('assets/photos/photo-25-j-s.jpg') center/cover no-repeat;
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,6,2,0.88) 0%, rgba(10,6,2,0.3) 55%, transparent 100%); }
.hero-content { position: relative; z-index: 1; padding: 4rem 2rem 5rem; max-width: 820px; }
.hero-eyebrow { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 1rem; }
.hero h1 { font-family: var(--serif); font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 700; color: #fff; line-height: 1.05; margin-bottom: 1rem; }
.hero-dates { font-family: var(--serif); font-size: 1.25rem; color: #c8b89a; margin-bottom: 1.8rem; letter-spacing: 0.06em; }
.hero-quote { font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: #e8d8bc; line-height: 1.5; border-left: 3px solid var(--gold); padding-left: 1.2rem; max-width: 580px; }
.hero-quote cite { display: block; font-style: normal; font-size: 0.82rem; font-family: var(--sans); color: #a89878; margin-top: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Section bands ── */
.band { padding: 5rem 0; }
.band-alt { background: var(--section-alt); }
.band-dark { background: var(--dark-band); color: #d8c8a8; padding: 5rem 0; }
.band-dark h2, .band-dark h3 { color: #f0e0c0; }
.section-label { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 0.6rem; }
.section-title { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 600; color: var(--brown-dark); line-height: 1.15; margin-bottom: 1.5rem; }
.band-dark .section-title { color: #f0e0c0; }

/* ── Character traits ── */
.traits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.trait-card { background: var(--warm-white); border: 1px solid var(--border); border-top: 3px solid var(--gold); padding: 1.5rem 1.5rem 1.8rem; }
.trait-card h3 { font-family: var(--serif); font-size: 1.15rem; color: var(--brown); margin-bottom: 0.5rem; }
.trait-card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.65; }

/* ── Story blocks ── */
.story-block { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-bottom: 5rem; }
.story-block:last-child { margin-bottom: 0; }
.story-block.reverse { direction: rtl; }
.story-block.reverse > * { direction: ltr; }
.story-text h3 { font-family: var(--serif); font-size: 1.5rem; color: var(--brown-dark); margin-bottom: 0.4rem; }
.story-text .story-era { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.story-text p { color: var(--text-muted); margin-bottom: 0.9rem; font-size: 0.97rem; line-height: 1.75; }
.story-img { overflow: hidden; }
.story-img img { width: 100%; height: 420px; object-fit: cover; }

/* ── Pull quote ── */
.pull-quote { text-align: center; padding: 4rem 2rem; background: var(--brown-dark); }
.pull-quote blockquote { font-family: var(--serif); font-size: clamp(1.2rem, 2.5vw, 1.7rem); font-style: italic; color: #f0e0c0; max-width: 780px; margin: 0 auto; line-height: 1.5; }
.pull-quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-light); }

/* ── Timeline ── */
.timeline { margin-top: 3rem; position: relative; list-style: none; padding: 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border); transform: translateX(-50%); }
.tl-item { display: grid; grid-template-columns: 1fr 48px 1fr; align-items: start; gap: 0; margin-bottom: 2.5rem; }
.tl-left { text-align: right; padding-right: 2rem; padding-top: 0.1rem; }
.tl-right { padding-left: 2rem; padding-top: 0.1rem; }
.tl-center { display: flex; justify-content: center; align-items: flex-start; padding-top: 0.15rem; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 3px solid var(--cream); flex-shrink: 0; margin-top: 0.2rem; }
.tl-year { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--gold); }
.tl-event { font-size: 0.93rem; color: var(--text); line-height: 1.5; }
.tl-event strong { display: block; font-weight: 500; }

/* ── Stories ── */
.stories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.story-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); padding: 1.8rem; }
.story-card h3 { font-family: var(--serif); font-size: 1.1rem; color: var(--gold-light); margin-bottom: 0.8rem; }
.story-card p { font-size: 0.9rem; color: #bfaa88; line-height: 1.7; }

/* ── Journal ── */
.journal-entries { margin-top: 2rem; }
.journal-entry { border-left: 3px solid var(--gold); padding-left: 1.5rem; margin-bottom: 2.5rem; }
.journal-entry .je-date { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.journal-entry blockquote { font-family: var(--serif); font-size: 1.05rem; font-style: italic; color: var(--text-muted); line-height: 1.7; }

/* ── Photo gallery ── */
.gallery-eras { margin-top: 2.5rem; }
.era-title { font-family: var(--serif); font-size: 1.1rem; color: var(--brown); margin-bottom: 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; margin-bottom: 2.5rem; }
.photo-grid a { overflow: hidden; cursor: pointer; }
.photo-grid img { width: 100%; height: 160px; object-fit: cover; transition: transform 0.3s ease; }
.photo-grid img:hover { transform: scale(1.04); }

/* ── Tributes ── */
.tribute { background: var(--warm-white); border: 1px solid var(--border); padding: 2.5rem; margin-bottom: 2rem; }
.tribute-by { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.6rem; }
.tribute h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 1rem; color: var(--brown-dark); }
.tribute p { color: var(--text-muted); margin-bottom: 0.8rem; font-size: 0.95rem; line-height: 1.75; }

/* ── Memory Wall ── */
.memory-form { background: var(--warm-white); border: 1px solid var(--border); padding: 2rem; margin-top: 2rem; }
.memory-form label { display: block; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.3rem; }
.memory-form input, .memory-form textarea {
  width: 100%; padding: 0.65rem 0.9rem; border: 1px solid var(--border); background: var(--cream);
  font-family: var(--sans); font-size: 0.95rem; color: var(--text); margin-bottom: 1.2rem;
}
.memory-form textarea { min-height: 120px; resize: vertical; }
.btn-gold { background: var(--gold); color: #fff; border: none; padding: 0.7rem 2rem; font-size: 0.9rem; font-weight: 500; letter-spacing: 0.06em; cursor: pointer; text-transform: uppercase; }
.btn-gold:hover { background: var(--gold-light); }
#comments-list { margin-top: 2rem; }
.comment-item { border-top: 1px solid var(--border); padding: 1.2rem 0; }
.comment-item .comment-author { font-weight: 600; font-size: 0.9rem; color: var(--brown); }
.comment-item .comment-date { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.comment-item p { font-size: 0.93rem; color: var(--text-muted); }

/* ── Source Library ── */
.source-list { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 2.5rem; }
.source-row { background: var(--warm-white); border: 1px solid var(--border); border-left: 4px solid var(--gold); padding: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.source-row h3 { font-family: var(--serif); font-size: 1.2rem; color: var(--brown-dark); margin-bottom: 0.4rem; }
.source-row p { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 0.5rem; }
.source-row dl { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.85rem; }
.source-row dl div { display: grid; grid-template-columns: 80px 1fr; gap: 1rem; }
.source-row dt { font-weight: 600; color: var(--text-muted); }
.source-row dd { margin: 0; font-family: monospace; color: var(--text); background: var(--cream); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; word-break: break-all; }

/* ── Lightbox ── */
.lightbox { display: none; position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.92); align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 90vw; object-fit: contain; }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; line-height: 1; }

/* ── Footer ── */
footer { background: var(--brown-dark); color: #a89070; text-align: center; padding: 2.5rem 1rem; font-size: 0.82rem; line-height: 1.8; }
footer strong { color: var(--gold-light); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .story-block { grid-template-columns: 1fr; gap: 2rem; }
  .story-block.reverse { direction: ltr; }
  .timeline::before { left: 20px; }
  .tl-item { grid-template-columns: 40px 1fr; }
  .tl-left { display: none; }
  .tl-center { justify-content: flex-start; }
  .tl-right { padding-left: 1rem; }
  .site-nav nav { gap: 0.8rem; }
  .source-row { grid-template-columns: 1fr; gap: 1rem; }
}
