/* ==========================================================================
   Yudolovich & Brothers — stylesheet
   Palette: ivory / parchment / deep forest green / oxblood / brass gold
   Type: Fraunces (display) + EB Garamond (body)
   ========================================================================== */

:root {
  /* Color */
  --ink: #1c1a14;
  --ivory: #f7f3e8;
  --parchment: #ece3cd;
  --forest: #1f3d2c;
  --forest-deep: #16291d;
  --oxblood: #6e2430;
  --brass: #9c7a34;
  --brass-light: #c9ab6a;
  --brass-text: #7c5e1a; /* darker than --brass: meets 4.5:1 contrast on ivory/parchment for small label text */
  --hairline: rgba(28, 26, 20, 0.16);
  --hairline-on-dark: rgba(247, 243, 232, 0.22);

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "EB Garamond", Georgia, serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  --container-max: 68rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--forest);
  color: var(--ivory);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 56rem) {
  .container--split {
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-6);
    align-items: start;
  }
}

.section {
  padding-block: var(--space-7);
}
@media (min-width: 56rem) {
  .section { padding-block: var(--space-8); }
}

.section--ivory { background: var(--ivory); }
.section--parchment { background: var(--parchment); }
.section--forest { background: var(--forest); color: var(--ivory); }

.rule {
  width: 3.5rem;
  height: 1px;
  background: var(--hairline);
  margin-block: var(--space-3);
}
.rule--gold { background: var(--brass-light); margin-inline: auto; }
.rule--footer { background: var(--hairline-on-dark); width: 100%; max-width: 20rem; margin-inline: auto; margin-block: var(--space-4); }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: var(--space-2);
}
.eyebrow--on-dark { color: var(--brass-light); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}
.section-title--on-dark { color: var(--ivory); }

.section-lede {
  font-size: 1.25rem;
  line-height: 1.7;
  max-width: 42rem;
  color: rgba(28, 26, 20, 0.85);
  margin-bottom: var(--space-6);
}
.section-lede--on-dark { color: rgba(247, 243, 232, 0.85); }

.section-body {
  font-size: 1.25rem;
  line-height: 1.75;
  max-width: 34rem;
}

.section-closing {
  margin-top: var(--space-6);
  max-width: 38rem;
  font-style: italic;
  color: rgba(28, 26, 20, 0.75);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 232, 0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--forest-deep);
}

.crest { width: 2.1rem; height: 2.1rem; color: var(--forest-deep); flex-shrink: 0; }
.crest svg { width: 100%; height: 100%; }
.crest-text {
  font-family: var(--font-display);
  font-size: 34px;
  fill: currentColor;
}
.crest--footer { width: 3rem; height: 3rem; color: var(--brass-light); margin-inline: auto; margin-bottom: var(--space-3); }

.primary-nav {
  display: none;
  gap: var(--space-5);
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.primary-nav a {
  padding-block: var(--space-1);
  border-bottom: 1px solid transparent;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  border-bottom-color: var(--oxblood);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.primary-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: absolute;
  top: 4.5rem;
  left: 0;
  right: 0;
  background: var(--ivory);
  padding: var(--space-4);
  border-bottom: 1px solid var(--hairline);
}

@media (min-width: 48rem) {
  .nav-toggle { display: none; }
  .primary-nav { display: flex; }
  .primary-nav.is-open {
    position: static;
    flex-direction: row;
    padding: 0;
    border: none;
    background: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, var(--forest) 0%, var(--forest-deep) 70%);
  color: var(--ivory);
  padding: var(--space-6) var(--space-4);
}

.hero-inner { max-width: 46rem; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero-tagline {
  font-size: 1.25rem;
  font-style: italic;
  color: rgba(247, 243, 232, 0.82);
  margin-bottom: var(--space-5);
}

.hero-cta {
  display: inline-block;
  border: 1px solid var(--brass-light);
  color: var(--ivory);
  padding: var(--space-2) var(--space-4);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}
.hero-cta:hover,
.hero-cta:focus-visible {
  background: var(--brass-light);
  color: var(--forest-deep);
}

/* ---------- Lineage ---------- */
.lineage {
  position: relative;
  max-width: 34rem;
  padding-left: var(--space-4);
  border-left: 1px solid var(--hairline);
}

.lineage-item {
  position: relative;
  padding-bottom: var(--space-5);
}
.lineage-item:last-child { padding-bottom: 0; }

.lineage-marker {
  position: absolute;
  left: calc(-1 * var(--space-4) - 5px);
  top: 0.4em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--oxblood);
}
.lineage-marker--open {
  background: transparent;
  border: 1px solid var(--oxblood);
}

.lineage-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 0.15em;
}

.lineage-meta {
  font-size: 0.9375rem;
  color: rgba(28, 26, 20, 0.65);
  margin-bottom: 0.15em;
}

.lineage-role {
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass-text);
}
.lineage-role--continues { font-style: italic; text-transform: none; letter-spacing: normal; }

/* ---------- Archive ---------- */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-3);
}

.archive-card {
  border: 1px dashed var(--hairline-on-dark);
  padding: var(--space-4);
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.archive-card-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.archive-card-status {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-light);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-deep);
  color: var(--ivory);
  text-align: center;
  padding-block: var(--space-7);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

.footer-tagline {
  font-style: italic;
  color: rgba(247, 243, 232, 0.7);
  margin-top: var(--space-1);
}

.footer-email {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--brass-light);
  padding-bottom: 2px;
}
.footer-email:hover,
.footer-email:focus-visible { color: var(--brass-light); }

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(247, 243, 232, 0.62);
}
