/* ==========================================================
   de Marchant et d'Ansembourg — site stylesheet
   Editorial · calm · photo-led. No frameworks.
   ========================================================== */

:root {
  --ink:        #1a1a1a;   /* near-black for text */
  --ink-soft:   #3a3a3a;   /* secondary text / subtle accent */
  --stone:      #6e6e6e;   /* muted text */
  --rule:       #e4dccb;   /* warm divider line */

  --cream:      #f8f1e4;   /* page background — warm peach-cream */
  --cream-pale: #fcf7ec;   /* even lighter cream for header */
  --dove:       #cdd6d9;   /* pale dusty blue-grey accent panel */
  --dove-soft:  #e0e6e7;   /* lighter dove for subtle panels */
  --sand:       #ece4d2;   /* warm tonal panel */

  --maxw:   1140px;
  --readw:  720px;

  --shadow-soft:   0 8px 24px rgba(40, 30, 20, 0.06);
  --shadow-strong: 0 18px 50px rgba(40, 30, 20, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Headlines: bold sans-serif (grotesque feel) */
h1, h2 {
  font-family: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  line-height: 1.1;
}
h3, h4 {
  font-family: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  line-height: 1.25;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); margin-top: 2em; }
h3 { font-size: 1.35rem; margin-top: 2em; }

p { margin: 0 0 1.1em; color: var(--ink-soft); }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--stone);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s ease;
}
a:hover { text-decoration-color: var(--ink); }

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

blockquote {
  margin: 2.4em 0;
  padding: 1.4em 0 1.4em 1.6em;
  border-left: 2px solid var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.45;
}

cite { display: block; margin-top: 0.8em; font-size: 0.9rem; font-style: normal; color: var(--stone); font-family: "Inter", sans-serif; letter-spacing: 0.05em; }
cite::before { content: "— "; }

strong { color: var(--ink); font-weight: 600; }

/* ----- Photo placeholders ----- */

.photo-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--sand) 0%, var(--rule) 100%);
  display: flex; align-items: center; justify-content: center;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 50% 0 0 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px;
  border: 1px solid rgba(110, 110, 110, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.20);
  z-index: 0;
}
.photo-frame img {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  transition: transform 0.7s ease;
}
.photo-frame:hover img { transform: scale(1.03); }
.photo-frame img.photo--missing { display: none; }

/* ----- Reveal-on-scroll ----- */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ----- Decorative ornament — hidden in this style ----- */

.ornament { display: none; }

/* ----- Site header ----- */

.site-header {
  background: var(--cream-pale);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background-color: rgba(252, 247, 236, 0.92);
}

.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ---- Wordmark ----
   The family name is never uppercased: "de Marchant et d'Ansembourg"
   keeps its small d's. Refinement comes from letter-spacing and weight,
   never from text-transform. */

.brand {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand:hover .brand__title { color: var(--ink); }

.brand img {
  width: 62px;
  height: auto;
  flex-shrink: 0;
}

.brand__mark {
  display: flex;
  flex-direction: column;
  gap: 0.34em;
  /* thin rule separating crest from wordmark */
  padding-left: 1.05rem;
  border-left: 1px solid var(--rule);
}

.brand__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.055em;
  color: var(--ink);
  white-space: nowrap;
  text-transform: none;   /* never uppercase the family name */
}

.brand__subtitle {
  font-family: "Inter", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  color: var(--stone);
  font-weight: 500;
  font-style: normal;
  text-transform: none;   /* keeps the d of d'Ansembourg lowercase */
  white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
.site-nav a {
  font-family: "Inter", sans-serif;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;   /* safe: nav labels contain no family name */
  font-weight: 500;
  padding: 0.45em 0;
  position: relative;
  transition: color 0.2s ease;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15em;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.lang-toggle {
  display: inline-flex;
  gap: 0.3em;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  margin-left: 0.4rem;
}
.lang-toggle a {
  border-bottom: none;
  padding: 0.2em 0.5em;
  color: var(--stone);
}
.lang-toggle a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang-toggle a[aria-disabled="true"] { color: var(--stone); opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ----- Hero (fallback, no photo) ----- */

.hero {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  text-align: left;
  padding: 6rem 1.5rem 6rem;
  overflow: hidden;
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; position: relative; }

.hero__crest {
  width: 90px;
  margin: 0 0 1.6rem;
  animation: crestFloat 6s ease-in-out infinite;
}
@keyframes crestFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hero h1 {
  color: var(--ink);
  font-size: clamp(2.6rem, 6.2vw, 4.4rem);
  margin: 0 0 0.5em;
  max-width: 14em;
  text-align: left;
}
.hero h1 .eyebrow {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.22em;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 600;
  font-style: normal;
  margin-bottom: 1.4em;
}

.hero__lede {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-style: italic;
  color: var(--ink-soft);
  margin: 1em 0 0;
  max-width: 32em;
  line-height: 1.5;
}
.hero__rule { display: none; }

.hero--page { padding: 4.5rem 1.5rem 5rem; }
.hero--page .hero__crest { width: 70px; }

/* ----- Photo hero (image-led, calm overlay) ----- */

.hero--photo {
  padding: 0;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  text-align: left;
  position: relative;
  overflow: hidden;
  background: var(--cream);
  color: white;
}
.hero--photo .photo-frame { position: absolute; inset: 0; z-index: 0; }
.hero--photo .photo-frame::after { display: none; }
.hero--photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
}
.hero--photo .hero__inner {
  position: relative; z-index: 2;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 5rem 1.5rem 4.5rem;
  text-align: left;
}
.hero--photo h1 { color: white; text-align: left; text-shadow: 0 2px 14px rgba(0,0,0,0.3); max-width: 14em; }
.hero--photo h1 .eyebrow { color: rgba(255,255,255,0.8); }
.hero--photo .hero__lede { color: white; margin-left: 0; max-width: 32em; text-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.hero--photo .hero__crest { margin: 0 0 1.4rem; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5)); }

/* When no hero photo: fall back to plain cream hero with dark text */
.hero--photo.no-photo {
  min-height: 0;
  background: var(--cream);
  color: var(--ink);
  padding: 5.5rem 1.5rem 5rem;
}
.hero--photo.no-photo::before { display: none; }
.hero--photo.no-photo h1 { color: var(--ink); text-shadow: none; }
.hero--photo.no-photo h1 .eyebrow { color: var(--stone); }
.hero--photo.no-photo .hero__lede { color: var(--ink-soft); text-shadow: none; }
.hero--photo.no-photo .hero__crest { filter: none; }

/* ----- Drop cap (subtle, charcoal) ----- */
.has-dropcap::first-letter {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4em;
  line-height: 0.86;
  float: left;
  padding: 0.08em 0.14em 0 0;
  color: var(--ink);
  font-weight: 600;
}

/* ----- Sections ----- */

.section { padding: 6rem 1.5rem; position: relative; }
.section--alt { background: var(--dove); }
.section--pale { background: var(--cream-pale); }
.section--accent { background: var(--sand); }
.section--feature { background: var(--cream-pale); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section--dark { background: var(--dove); color: var(--ink); }
.section--dark h2, .section--dark h3 { color: var(--ink); }
.section--dark a { color: var(--ink); }

.section__inner { max-width: var(--maxw); margin: 0 auto; }
.read { max-width: var(--readw); margin: 0 auto; }

.section__eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 600;
  margin-bottom: 1.2em;
}

.section__title-block { text-align: left; margin-bottom: 3rem; max-width: var(--readw); }
.section__title-block.center, .section__title-block[style*="center"] { text-align: left; }
.section__title-block h2 { margin-top: 0; }

/* ----- Cards ----- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: var(--cream-pale);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 2rem 1.8rem;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { box-shadow: var(--shadow-soft); border-color: var(--stone); }
.card h3 { margin-top: 0; color: var(--ink); }
.card__year {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--stone);
  padding: 0;
  margin-bottom: 1em;
  text-transform: uppercase;
  border: none;
  background: none;
  font-weight: 500;
}

.section--dark .card { background: rgba(255, 255, 255, 0.55); border-color: rgba(0, 0, 0, 0.08); }
.section--dark .card h3, .section--dark .card__year { color: var(--ink); }

/* ----- Castle card with photo ----- */

.castle-card {
  background: var(--cream-pale);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.castle-card:hover { box-shadow: var(--shadow-strong); border-color: var(--ink); }
/* Historic plates come in every shape — engravings tall, lithographs wide.
   Show them whole on a paper-toned mount rather than cropping them to fit. */
.castle-card .photo-frame {
  width: 100%;
  height: 300px;
  background: #ece5d6;
  padding: 14px;
  border-bottom: 1px solid var(--rule);
}
.castle-card .photo-frame img {
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 5px rgba(40,30,20,0.16));
}
.castle-card:hover .photo-frame img { transform: none; }
@media (max-width: 520px) {
  .castle-card .photo-frame { height: 250px; }
}
.plate-caption {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--stone);
  margin: 0.6rem 1.6rem 0;
  font-style: normal;
}
/* the source line — quieter still, sitting under the caption */
.plate-source {
  display: block;
  margin-top: 0.35em;
  font-size: 0.94em;
  color: var(--stone);
  opacity: 0.8;
}
.plate figcaption .plate-source {
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  margin-top: 0.7em;
  line-height: 1.45;
}
.castle-card__body { padding: 1.8rem 1.6rem 2rem; }
.castle-card__body h3 { margin-top: 0; color: var(--ink); }
.castle-card__year {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--stone);
  padding: 0;
  margin-bottom: 0.9em;
  text-transform: uppercase;
  border: none;
  background: none;
  font-weight: 500;
}

/* ----- Era divider: large numeral marking a period ----- */

.era {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  margin: 5rem 0 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.era:first-of-type { margin-top: 2rem; }
.era__num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 0.85;
  color: var(--dove);
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.era__label {
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 600;
}
.era__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
  margin-top: 0.25em;
}
@media (max-width: 620px) {
  .era { flex-direction: column; gap: 0.5rem; margin-top: 3.5rem; }
}

/* ----- Aside: a quiet box for a related note ----- */

.aside {
  background: var(--cream-pale);
  border-left: 2px solid var(--dove);
  padding: 1.6rem 1.8rem;
  margin: 2.5rem 0;
}
.aside h3 {
  margin: 0 0 0.6em;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  font-family: "Inter", sans-serif;
  font-weight: 600;
}
.aside p { margin-bottom: 0; font-size: 0.98rem; }

/* ----- First line of a section, set larger ----- */
.standfirst {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.4em;
}

/* ----- Plates: historic paintings with captions ----- */

.plates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin: 2.5rem 0 0;
}
.plate { margin: 0; }
.plate .photo-frame {
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--rule);
  background: #ece5d6;
  box-shadow: var(--shadow-soft);
  padding: 12px;
}
.plate .photo-frame img {
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(40,30,20,0.18));
}
.plate .photo-frame img { transition: none; }
.plate:hover .photo-frame img { transform: none; }
.plate figcaption {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 1rem;
}
.plate__year {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 600;
  margin-bottom: 0.6em;
}

/* ----- Village / seigneurie list ----- */

.village-list {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  line-height: 2;
  color: var(--ink);
  padding: 1.8rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 1.5rem 0 2rem;
}

/* ----- Cahier issue grid ----- */

.cahier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin: 2.5rem 0;
}
.cahier-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  background: var(--cream-pale);
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
}
.cahier-tile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--dove);
  border-right: 1px solid var(--rule);
}
.cahier-tile:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
  transform: translateY(-3px);
  text-decoration: none;
}
.cahier-tile:hover::before { background: var(--stone); }
.cahier-tile__label {
  font-family: "Inter", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  order: -1;
  margin-bottom: 0.3em;
}
.cahier-tile:hover .cahier-tile__label { color: var(--dove); }
.cahier-tile__num {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
}

/* ----- Mosaic gallery ----- */

.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
  margin: 3rem 0;
}
.mosaic .photo-frame { border-radius: 2px; }
.mosaic .m-1 { grid-column: span 4; grid-row: span 2; }
.mosaic .m-2 { grid-column: span 2; grid-row: span 1; }
.mosaic .m-3 { grid-column: span 2; grid-row: span 1; }
.mosaic .m-4 { grid-column: span 2; grid-row: span 1; }
.mosaic .m-5 { grid-column: span 2; grid-row: span 1; }
.mosaic .m-6 { grid-column: span 2; grid-row: span 2; }
.mosaic .m-7 { grid-column: span 4; grid-row: span 1; }
@media (max-width: 880px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .mosaic .m-1, .mosaic .m-6 { grid-column: span 2; }
  .mosaic .m-7 { grid-column: span 2; }
}

/* ----- Portrait + feature block ----- */

/* Painted portraits are rectangular — frame them as pictures, not medallions,
   so no part of the sitter is cut away. */
.portrait {
  width: 100%;
  max-width: 240px;
  height: 300px;
  border: 1px solid var(--rule);
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  background: #ece5d6;
  padding: 12px;
  position: relative;
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(40,30,20,0.18));
}
.portrait img.photo--missing { display: none; }
.portrait--lg { max-width: 280px; height: 360px; }

.feature-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
  margin: 3rem 0;
}
.feature-block .portrait { margin: 0; }
@media (max-width: 720px) {
  .feature-block { grid-template-columns: 1fr; gap: 1.5rem; text-align: left; }
  .feature-block .portrait { margin: 0 auto; }
}

/* ----- Timeline ----- */

.timeline { list-style: none; padding: 0; margin: 3rem 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--ink);
  opacity: 0.4;
}
.timeline li { position: relative; padding: 0 0 1.6rem 2.4rem; color: var(--ink-soft); }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--ink);
}
.section--alt .timeline li::before { border-color: var(--dove); }
.timeline__year {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ----- Lineage tree ----- */

.lineage { max-width: 880px; margin: 3rem auto; position: relative; }
.lineage__node {
  background: var(--cream-pale);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1.1rem 1.4rem;
  margin: 0.4rem auto;
  max-width: 480px;
  text-align: center;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lineage__node:hover { border-color: var(--ink); box-shadow: var(--shadow-soft); }
.lineage__node .name { font-family: "Inter", sans-serif; font-size: 1.05rem; color: var(--ink); font-weight: 600; letter-spacing: -0.005em; }
.lineage__node .dates { font-family: "Inter", sans-serif; font-size: 0.78rem; color: var(--stone); letter-spacing: 0.06em; margin-top: 0.25em; }
.lineage__node .note { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.02rem; color: var(--ink-soft); margin-top: 0.6em; font-style: italic; }
.lineage__connector { width: 1px; height: 26px; background: var(--ink); margin: 0 auto; opacity: 0.4; }
.lineage__branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.6rem;
  position: relative;
}
.lineage__branches::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: var(--ink);
  opacity: 0.4;
}
.lineage__branch { position: relative; padding-top: 14px; }
.lineage__branch::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 1px;
  height: 14px;
  background: var(--ink);
  opacity: 0.4;
}
.lineage__branch .lineage__node { max-width: none; }
@media (max-width: 720px) {
  .lineage__branches { grid-template-columns: 1fr; gap: 1.4rem; }
  .lineage__branches::before { display: none; }
}

/* ----- Map ----- */

#map {
  height: 540px;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
  background: var(--dove-soft);
}
@media (max-width: 720px) { #map { height: 420px; } }

.map-legend {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.map-legend__dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  margin-right: 0.5em;
  vertical-align: middle;
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.map-legend__dot--lux   { background: #1a1a1a; }
.map-legend__dot--orig  { background: #b87455; }
.map-legend__dot--duchy { background: #6e6e6e; }
.map-legend__dot--int   { background: #7a8d92; }

.leaflet-popup-content-wrapper {
  border-radius: 2px !important;
  font-family: "Inter", sans-serif;
}
.leaflet-popup-content { margin: 12px 14px !important; }
.leaflet-popup-content strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.15rem; color: var(--ink); display: block; margin-bottom: 0.3em; font-weight: 600; }
.leaflet-popup-content em { color: var(--stone); font-size: 0.85rem; font-style: italic; }

/* ----- Gate (family password) ----- */

.gate {
  max-width: 460px;
  margin: 0 auto;
  background: var(--cream-pale);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 2.8rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.gate__crest { width: 70px; margin: 0 auto 1.2rem; }
.gate__title { font-family: "Inter", sans-serif; font-size: 1.5rem; color: var(--ink); margin: 0 0 0.6em; font-weight: 600; letter-spacing: -0.01em; }
.gate__intro { color: var(--ink-soft); margin-bottom: 2rem; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.1rem; font-style: italic; }
.gate__field { margin-bottom: 1rem; text-align: left; }
.gate__field label {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.5em;
  font-weight: 600;
}
.gate__field input {
  width: 100%;
  padding: 0.85em 1em;
  font-size: 1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: white;
  font-family: "Inter", sans-serif;
  color: var(--ink);
}
.gate__field input:focus { outline: none; border-color: var(--ink); }
.gate__error { color: #a13a2f; font-size: 0.88rem; margin-top: 0.6em; min-height: 1.2em; font-family: "Inter", sans-serif; }
.gate__hint { color: var(--stone); font-size: 0.82rem; margin-top: 1.6rem; font-family: "Inter", sans-serif; }

/* ----- Buttons (outline, simple) ----- */

.btn {
  display: inline-block;
  padding: 0.95em 1.6em;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border-radius: 1px;
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--cream); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--gold { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn--gold:hover { background: transparent; color: var(--ink); }
.btn--block { display: block; width: 100%; }

/* ----- Footer ----- */

.site-footer {
  background: var(--cream-pale);
  color: var(--ink-soft);
  padding: 4rem 1.5rem 2rem;
  font-size: 0.92rem;
  border-top: 1px solid var(--rule);
  font-family: "Inter", sans-serif;
}
.site-footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.site-footer h4 {
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 1em;
  font-weight: 600;
}

/* The first footer column is the family name — it must never be uppercased,
   so it is set as an elegant serif wordmark instead of a small-caps label. */
.site-footer h4.footer-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: none;
  font-weight: 500;
  margin-bottom: 0.7em;
}
.site-footer a { color: var(--ink-soft); text-decoration-color: var(--stone); }
.site-footer a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.site-footer__rule { border-top: 1px solid var(--rule); margin: 3rem 0 1.4rem; }
.site-footer__base { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.78rem; color: var(--stone); }

/* ----- Utilities ----- */

.center { text-align: center; }
.muted { color: var(--stone); }
.small { font-size: 0.9rem; }
.lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.5;
  color: var(--ink);
  font-style: normal;
}
.stack > * + * { margin-top: 1.2em; }
.gap { height: 2rem; }
.gap--lg { height: 4rem; }

.display {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

/* ----- Responsive ----- */

@media (max-width: 720px) {
  body { font-size: 18px; }
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0.8rem; padding: 0.8rem 1.25rem; }
  .site-nav { width: 100%; gap: 0.9rem 1.2rem; }
  .hero { padding: 4rem 1.25rem 4rem; }
  .section { padding: 3.5rem 1.25rem; }
  .section__title-block { margin-bottom: 2rem; }
}
