/* Lindgren Family Memories — book-style design
   Cloth-bound cover (forest green + gold), cream paper pages, classic serif type. */

:root {
  --cover: #23362b;
  --cover-dark: #18261e;
  --gold: #b8925a;
  --gold-light: #d9bf8f;
  --paper: #f6efe1;
  --paper-edge: #ebe1cc;
  --ink: #2b241c;
  --ink-soft: #5c5244;
  --serif-display: 'Cormorant Garamond', Georgia, serif;
  --serif-body: 'EB Garamond', Georgia, 'Times New Roman', serif;
}

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

body {
  font-family: var(--serif-body);
  font-size: 21px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cover-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--cover);
}

/* ── COVER (home page hero) ── */
.cover {
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 70%),
    var(--cover);
  color: var(--paper);
  text-align: center;
  padding: 64px 24px 72px;
  position: relative;
}

.cover-frame {
  max-width: 820px;
  margin: 0 auto;
  border: 2px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 8px;
  padding: 48px 32px 44px;
}

.cover-photo {
  width: 220px;
  height: 220px;
  margin: 0 auto 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--gold);
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  background: var(--cover-dark);
}

.cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.15);
}

.cover h1 {
  font-family: var(--serif-display);
  font-size: 3.6rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 1px;
}

.ornament {
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 12px;
  margin: 18px 0;
}

.cover .tagline {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--gold-light);
}

/* ── PAPER PAGE (main content area) ── */
.page {
  background: var(--paper);
  flex: 1;
  padding: 64px 24px 80px;
  box-shadow: inset 0 12px 24px -12px rgba(0,0,0,0.25);
}

.page-inner {
  max-width: 760px;
  margin: 0 auto;
}

.page-inner.wide {
  max-width: 1000px;
}

.section-title {
  font-family: var(--serif-display);
  font-size: 2.3rem;
  font-weight: 600;
  text-align: center;
  color: var(--cover);
  margin-bottom: 6px;
}

.section-title + .ornament {
  text-align: center;
  margin: 0 0 36px;
  font-size: 1.1rem;
}

.welcome {
  text-align: center;
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 600px;
  margin: 0 auto 56px;
}

/* ── TABLE OF CONTENTS (list of stories) ── */
.contents {
  list-style: none;
  margin-bottom: 72px;
}

.contents li {
  border-bottom: 1px dotted var(--gold);
}

.contents a {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease;
}

.contents a:hover,
.contents a:focus-visible {
  background: var(--paper-edge);
  outline: none;
}

.contents .thumb {
  width: 110px;
  height: 110px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper-edge);
  border: 1px solid var(--gold);
}

.contents .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.1);
}

.chapter-num {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.contents h3 {
  font-family: var(--serif-display);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--cover);
}

.contents p {
  font-size: 1rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 4px;
}

/* ── COLLECTION CARDS (Videos / Photos / Audio) ── */
.collection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.collection a {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: #fffaf0;
  border: 1px solid var(--gold);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.collection a:hover,
.collection a:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
  outline: none;
}

.collection .card-img {
  height: 180px;
  background: var(--paper-edge);
}

.collection .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection h3 {
  font-family: var(--serif-display);
  font-size: 1.6rem;
  color: var(--cover);
  margin-top: 14px;
}

.collection p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0 16px 20px;
}

/* Shown until a real photo is added */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: repeating-linear-gradient(45deg, var(--paper-edge), var(--paper-edge) 10px, #e4d8bf 10px, #e4d8bf 20px);
}

/* ── INNER-PAGE HEADER ── */
.page-header {
  background: var(--cover);
  color: var(--paper);
  padding: 28px 24px 34px;
  border-bottom: 3px double var(--gold);
}

.page-header .inner {
  max-width: 760px;
  margin: 0 auto;
}

.page-header nav a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 1px;
}

.page-header nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.page-header h1 {
  font-family: var(--serif-display);
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.15;
  margin-top: 12px;
}

.page-header .subtitle {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-light);
}

/* ── STORY PAGE ── */
.story p {
  margin-bottom: 1.3em;
  text-align: left;
}

.story > p:first-of-type::first-letter {
  font-family: var(--serif-display);
  float: left;
  font-size: 4.6em;
  line-height: 0.8;
  padding: 8px 10px 0 0;
  color: var(--cover);
  font-weight: 600;
}

.story h2 {
  font-family: var(--serif-display);
  font-size: 1.8rem;
  color: var(--cover);
  margin: 1.6em 0 0.5em;
}

.story figure {
  margin: 2.2em 0;
  background: #fffaf0;
  padding: 14px 14px 10px;
  border: 1px solid var(--paper-edge);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.story figure.left,
.story figure.right {
  width: 46%;
  margin-top: 0.4em;
}

.story figure.left {
  float: left;
  margin-right: 28px;
  transform: rotate(-1deg);
}

.story figure.right {
  float: right;
  margin-left: 28px;
  transform: rotate(1deg);
}

.story figure .placeholder {
  height: 260px;
}

.story figcaption {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-align: center;
  padding-top: 8px;
  line-height: 1.4;
}

.story blockquote {
  clear: both;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1.4;
  color: var(--cover);
  text-align: center;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  padding: 24px 12px;
  margin: 2em 0;
}

.story blockquote cite {
  display: block;
  font-family: var(--serif-body);
  font-size: 1rem;
  font-style: normal;
  color: var(--gold);
  margin-top: 10px;
}

.story audio,
.story .video-wrap {
  clear: both;
  width: 100%;
  margin: 1.5em 0;
}

.story .video-wrap iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 6px;
}

.the-end {
  clear: both;
  text-align: center;
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: 12px;
  margin: 48px 0 32px;
}

.story-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px dotted var(--gold);
  padding-top: 24px;
  font-size: 1.05rem;
}

.story-nav a {
  text-decoration: none;
  color: var(--cover);
  font-weight: 600;
}

.story-nav a:hover {
  text-decoration: underline;
}

/* ── GOOGLE DRIVE EMBED PAGES ── */
.tip-box {
  background: #fffaf0;
  border-left: 5px solid var(--gold);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 26px;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.tip-box strong {
  color: var(--cover);
}

.drive-embed {
  width: 100%;
  height: 640px;
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
  background: #fff;
}

/* ── FOOTER ── */
footer {
  background: var(--cover-dark);
  color: rgba(246, 239, 225, 0.5);
  text-align: center;
  padding: 24px;
  font-size: 0.95rem;
  letter-spacing: 1px;
  border-top: 3px double var(--gold);
}

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  body { font-size: 19px; }
  .cover h1 { font-size: 2.5rem; }
  .cover-frame { padding: 36px 18px; }
  .cover-photo { width: 160px; height: 160px; }
  .collection { grid-template-columns: 1fr; }
  .contents a { grid-template-columns: 80px 1fr; gap: 16px; }
  .contents .thumb { width: 80px; height: 80px; }
  .story figure.left,
  .story figure.right {
    float: none;
    width: 100%;
    margin: 2em 0;
    transform: none;
  }
  .drive-embed { height: 480px; }
}

/* ── HISTORY STORY EXTRAS ── */
.contents.plain a {
  grid-template-columns: 1fr;
}

.note-box {
  clear: both;
  background: #fffaf0;
  border: 1px solid var(--gold);
  border-left: 5px solid var(--gold);
  border-radius: 6px;
  padding: 18px 22px;
  margin: 0 0 2em;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.note-box h3 {
  font-family: var(--serif-display);
  font-size: 1.3rem;
  color: var(--cover);
  margin-bottom: 6px;
}

.note-box ul {
  margin: 6px 0 0 1.2em;
}

.note-box li {
  margin-bottom: 6px;
}


.timeline {
  clear: both;
  list-style: none;
  border-left: 2px solid var(--gold);
  margin: 1.5em 0 2em 8px;
  padding-left: 24px;
}

.timeline li {
  position: relative;
  margin-bottom: 14px;
  line-height: 1.5;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
}

.timeline strong {
  font-family: var(--serif-display);
  font-size: 1.2rem;
  color: var(--cover);
  margin-right: 6px;
}

.family-tree {
  clear: both;
  text-align: center;
  background: #fffaf0;
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
  padding: 24px 16px;
  margin: 2em 0;
  font-size: 1rem;
  line-height: 1.5;
}

.family-tree .row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.family-tree .person {
  background: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 8px 14px;
  min-width: 150px;
}

.family-tree .person b {
  display: block;
  font-family: var(--serif-display);
  font-size: 1.15rem;
  color: var(--cover);
}

.family-tree .person span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.family-tree .link {
  color: var(--gold);
  font-size: 1.3rem;
  margin: 6px 0;
}

.sources {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.sources li {
  margin-bottom: 6px;
}

/* Transcribed original record */
.record {
  clear: both;
  background: #fbf6ea;
  border: 1px dashed var(--ink-soft);
  border-radius: 4px;
  padding: 16px 20px;
  margin: 1.6em 0;
  font-size: 1rem;
  line-height: 1.55;
}

.record .record-title {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}

.record q {
  font-style: italic;
  quotes: "\201C" "\201D";
}

.record .translation {
  display: block;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* Evidence label on each "reason" */
.verdict {
  display: inline-block;
  font-family: var(--serif-body);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
  color: #fff;
}

.verdict.documented { background: var(--cover); }
.verdict.strong     { background: #4f7a52; }
.verdict.partial    { background: var(--gold); }
.verdict.unproven   { background: #8a7a66; }

.story > h3 {
  font-family: var(--serif-display);
  font-size: 1.45rem;
  color: var(--cover);
  margin: 1.4em 0 0.4em;
}
