/* =========================================================
   Family Archive Theme: Parchment + Ink
   ---------------------------------------------------------
   Notes:
   - No external images required (SVG noise is embedded).
   - "Cinzel" / "Cormorant Garamond" used if available.
   - Timeline rows styled like scroll slips with dog-ears.
   ========================================================= */

/* -----------------------------
   Theme tokens
----------------------------- */
:root{
  /* parchment + ink */
  --bg: #f2eadc;        /* parchment */
  --panel: #fbf6ee;     /* lighter parchment */
  --text: #1b1b1b;      /* ink */
  --muted: #5b544a;     /* faded ink */
  --link: #2b3a67;      /* indigo ink */

  /* accents: muted dye, not neon */
  --accent: #2b3a67;    /* indigo */
  --accent2: #6b1f2a;   /* oxblood */

  --border: rgba(45,35,28,.22);
  --shadow: 0 1px 0 rgba(0,0,0,.05);
  --radius: 12px;
  --max: 980px;

  --focus: rgba(43,58,103,.45);
}

/* -----------------------------
   Base reset
----------------------------- */
*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  padding-bottom: 48px;
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  /* parchment texture (no external images needed) */
  background:
    /* fibrous noise */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"),
    /* soft stains */
    radial-gradient(1000px 700px at 22% 10%, rgba(107,31,42,.08), transparent 60%),
    radial-gradient(900px 650px at 78% 12%, rgba(43,58,103,.07), transparent 62%),
    /* gentle edge darkening */
    radial-gradient(1200px 900px at 50% 40%, transparent 62%, rgba(45,35,28,.10) 100%),
    var(--bg);

  background-blend-mode: multiply, multiply, multiply, multiply, normal;
}

/* -----------------------------
   Links + focus
----------------------------- */
a{
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: .18em;
}
a:hover{ color: var(--accent2); }

a:focus-visible,
select:focus-visible,
input:focus-visible,
.pill:focus-visible,
.crestHome:focus-visible{
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 10px;
}

/* -----------------------------
   Layout container
----------------------------- */
.container{
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 60px;
}

/* -----------------------------
   Typography
----------------------------- */
h1, h2, .brand strong{
  font-family: "Cinzel", "Cormorant Garamond", serif;
  letter-spacing: .35px;
}

h1{
  margin: 0 0 10px;
  font-size: 34px;
  letter-spacing: .25px;
  display:inline-block;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(45,35,28,.20);
  background: linear-gradient(to bottom, rgba(255,255,255,.55), rgba(0,0,0,.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

h2{
  margin:18px 0 8px;
  font-size: 19px;
  color: var(--text);
}

p{
  margin: 8px 0;
  color: rgba(27,27,27,.92);
}

.muted{ color: var(--muted); }

/* -----------------------------
   Framed surfaces
----------------------------- */
.topbar,
.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* -----------------------------
   Topbar
----------------------------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 16px;
  position: sticky;
  top: 14px;
}

.topbarLeft{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.brand strong{ font-size: 15px; }
.brand span{ font-size: 12px; color: var(--muted); }

/* Crest home button */
.crestHome{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:54px;
  border-radius: 14px;
  border: 1px solid rgba(45,35,28,.25);
  background: linear-gradient(to bottom, rgba(255,255,255,.60), rgba(0,0,0,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  text-decoration:none;
  flex:0 0 auto;
}

.crestHome img{
  width:44px;
  height:44px;
  object-fit:contain;
}

.crestHome:hover{
  border-color: rgba(43,58,103,.35);
  background: linear-gradient(to bottom, rgba(255,255,255,.70), rgba(0,0,0,.03));
}

/* -----------------------------
   Card
----------------------------- */
.card{
  margin-top: 18px;
  padding: 18px;
}

/* -----------------------------
   Pills
----------------------------- */
.pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin: 12px 0;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(45,35,28,.22);
  background: rgba(43,58,103,.04);
  text-decoration:none;
}

.pill:hover{
  border-color: rgba(43,58,103,.35);
  background: rgba(107,31,42,.06);
}

/* -----------------------------
   Inputs
----------------------------- */
select, option, input{
  color: var(--text);
  background-color: var(--panel);
}

input, select{
  border: 1px solid rgba(45,35,28,.22);
  border-radius: 10px;
  padding: 10px 12px;
}

/* -----------------------------
   Timeline rail
----------------------------- */
.timeline{
  position: relative;
  list-style:none;
  padding:0;
  padding-left: 14px;
  margin: 10px 0 0;
  display:grid;
  gap:10px;
}

.timeline::before{
  content:"";
  position:absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(45,35,28,.55) 0px,
      rgba(45,35,28,.55) 10px,
      rgba(45,35,28,.35) 12px,
      rgba(45,35,28,.55) 22px
    );
  border-radius: 999px;
}

/* =========================================================
   Timeline rows: Scroll slip + dog-eared corners
   (This is the only .personRow block now.)
   ========================================================= */
.personRow{
  text-decoration: none;
  color: inherit;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  padding: 14px 16px;
  position: relative;

  border: 1px solid rgba(45,35,28,.28);
  border-radius: 12px;

  background:
    /* TOP-RIGHT folded corner */
    conic-gradient(
      from 225deg at calc(100% - 2px) 2px,
      rgba(0,0,0,0) 0 88deg,
      rgba(0,0,0,.10) 88deg 92deg,
      rgba(255,255,255,.60) 92deg 118deg,
      rgba(0,0,0,0) 118deg 360deg
    ),
    radial-gradient(38px 38px at calc(100% - 10px) 10px,
      rgba(45,35,28,.16),
      rgba(45,35,28,0) 70%
    ),

    /* BOTTOM-LEFT folded corner */
    conic-gradient(
      from 45deg at 2px calc(100% - 2px),
      rgba(0,0,0,0) 0 88deg,
      rgba(0,0,0,.10) 88deg 92deg,
      rgba(255,255,255,.55) 92deg 118deg,
      rgba(0,0,0,0) 118deg 360deg
    ),
    radial-gradient(38px 38px at 10px calc(100% - 10px),
      rgba(45,35,28,.14),
      rgba(45,35,28,0) 70%
    ),

    /* scroll “rolled lip” top */
    radial-gradient(140% 24px at 50% 0%,
      rgba(45,35,28,.55),
      rgba(45,35,28,0) 72%
    ),

    /* scroll “rolled lip” bottom */
    radial-gradient(140% 24px at 50% 100%,
      rgba(45,35,28,.45),
      rgba(45,35,28,0) 72%
    ),

    /* parchment body */
    linear-gradient(to bottom,
      rgba(255,255,255,.74),
      rgba(0,0,0,.03)
    ),

    /* subtle fiber noise inside row */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E"),

    var(--panel);

  background-repeat: no-repeat;
  background-size: auto;

  box-shadow:
    0 1px 0 rgba(0,0,0,.06),
    0 6px 10px rgba(45,35,28,.08),
    inset 0 10px 14px rgba(45,35,28,.10),
    inset 0 -10px 14px rgba(45,35,28,.08),
    inset 0 1px 0 rgba(255,255,255,.78),
    inset 0 -1px 0 rgba(0,0,0,.10);

  transition: border-color .12s ease, background .12s ease;
}

.personRow:hover{
  border-color: rgba(43,58,103,.35);
}

/* Wax-ish bullet */
.personRow::before{
  content:"";
  position:absolute;
  left: -18px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%,
      rgba(255,255,255,.85),
      rgba(107,31,42,.95) 55%,
      rgba(60,12,18,1) 100%
    );
  box-shadow: 0 0 0 2px rgba(45,35,28,.25);
}

/* Type details */
.personName{
  font-weight: 650;
  text-shadow: 0 0 0.6px rgba(0,0,0,.35); /* tiny “ink bleed” */
}

.personMeta{
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

footer{ padding-bottom: 48px; }

/* -----------------------------
   Optional: Font upgrade
   (Add this in your HTML <head> if you want it)
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Cormorant+Garamond:wght@400;500;600&display=swap" rel="stylesheet">
----------------------------- */
