:root {
  --bg: #f8f3eb;
  --paper: #fffaf1;
  --ink: #241b14;
  --muted: #6f6255;
  --line: rgba(85, 61, 35, 0.18);
  --gold: #b78939;
  --gold-dark: #6e4b26;
  --shadow: 0 24px 70px rgba(46, 31, 15, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(183, 137, 57, 0.18), transparent 36rem),
    linear-gradient(180deg, #fbf6ed 0%, var(--bg) 45%, #f4eadc 100%);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  line-height: 1.72;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(110, 75, 38, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 75, 38, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.skip-link {
  position: absolute;
  top: -120px;
  left: 1rem;
  z-index: 20;
  padding: .75rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: white;
}

.skip-link:focus {
  top: 1rem;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: .8rem clamp(1rem, 3vw, 3rem);
  background: rgba(248, 243, 235, .86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .92rem;
}

.brand img {
  display: block;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(110, 75, 38, .28);
  background: rgba(255, 250, 241, .74);
  color: var(--gold-dark);
  border-radius: 999px;
  padding: .48rem .85rem;
  font: 700 .82rem/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.lang-flag-img {
  width: 18px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(110, 75, 38, .16);
  object-fit: cover;
  flex: 0 0 auto;
}

.lang-button:hover,
.lang-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--gold-dark);
}

.lang-button.is-active {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fffaf1;
}

.hero {
  min-height: min(760px, 88vh);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding: clamp(5rem, 9vw, 9rem) clamp(1.2rem, 4vw, 4rem);
}

.hero__pattern {
  position: absolute;
  inset: 7%;
  border: 1px solid var(--line);
  border-radius: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(255,255,255,.46), rgba(183,137,57,.08)),
    url("../img/pietra.svg") center/220px no-repeat;
  opacity: .52;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.34);
}

.hero__content {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.kicker,
.eyebrow {
  margin: 0 0 .9rem;
  color: var(--gold-dark);
  font: 800 .82rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 6.6rem);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.subtitle {
  max-width: 760px;
  margin: 1.45rem auto 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.1vw, 1.42rem);
  text-wrap: balance;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  padding: .9rem 1.18rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf1;
  text-decoration: none;
  font: 800 .88rem/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .02em;
  box-shadow: 0 14px 34px rgba(36, 27, 20, .18);
}

.page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 clamp(3rem, 7vw, 6rem);
}

.card,
.person-card {
  position: relative;
  background: rgba(255, 250, 241, .86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: clamp(1.25rem, 3vw, 2.2rem);
}

.intro-card {
  margin-top: -3.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -.025em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.04rem;
}

p:last-child {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.person-card {
  padding: clamp(1.3rem, 3vw, 2.4rem);
  overflow: hidden;
}

.person-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2rem;
  right: 2rem;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 999px;
}

.person-card__date {
  display: inline-flex;
  margin-bottom: 1rem;
  color: #fffaf1;
  background: var(--gold-dark);
  border-radius: 999px;
  padding: .28rem .78rem;
  font: 800 .78rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .08em;
}

.family-card {
  margin-top: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.35);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

th,
td {
  text-align: left;
  padding: .82rem .95rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--gold-dark);
  background: rgba(183, 137, 57, .12);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

td {
  color: #352a20;
}

tr:last-child td {
  border-bottom: 0;
}

.site-footer {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  font-size: .95rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .language-switcher {
    justify-content: flex-start;
  }

  .hero {
    min-height: 78vh;
  }

  .hero__pattern {
    inset: 4%;
  }

  .grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .intro-card {
    margin-top: -2rem;
  }
}

@media (max-width: 460px) {
  .lang-button {
    padding: .45rem .68rem;
  }

  .page {
    width: min(100% - 1rem, 1120px);
  }

  .card,
  .person-card {
    border-radius: 22px;
  }
}
