:root {
  --ink: #171717;
  --panel: rgba(18, 18, 18, 0.96);
  --gold: #d9ab6c;
  --gold-pale: #eed9bb;
  --muted: #bda88b;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink) url("/legacy/template/page.jpeg") top center no-repeat;
  color: #f3eee7;
  font-family: "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

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

.site-frame {
  width: min(980px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}

.hero {
  position: relative;
  height: 482px;
  background: url("/legacy/template/header.png") top center / 980px 482px no-repeat;
}

.hero-home {
  position: absolute;
  inset: 0 0 44px;
}

.navigation {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 4px 8px 7px;
  background: linear-gradient(180deg, rgba(9, 9, 9, 0.15), rgba(4, 4, 4, 0.92));
  border-top: 1px solid rgba(238, 217, 187, 0.12);
}

.navigation a {
  position: relative;
  display: block;
  padding: 5px 16px;
  color: var(--gold);
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.035em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 160ms ease, background-color 160ms ease;
}

.navigation a + a::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: rgba(217, 171, 108, 0.3);
  content: "";
}

.navigation a:hover,
.navigation a:focus-visible,
.navigation a.active {
  color: var(--gold-pale);
  background: rgba(217, 171, 108, 0.06);
  outline: none;
}

.menu-toggle {
  display: none;
}

.content-shell {
  min-height: 260px;
  padding: 30px 22px 24px;
  background: linear-gradient(180deg, rgba(19, 19, 19, 0.98), rgba(22, 22, 22, 0.95));
  border-right: 1px solid rgba(217, 171, 108, 0.08);
  border-left: 1px solid rgba(217, 171, 108, 0.08);
}

.legacy-content {
  max-width: 900px;
  margin: 0 auto;
  color: #f2ede7;
  font-size: 16px;
  line-height: 1.6;
}

.legacy-content p {
  margin: 13px 0;
}

.legacy-content h1,
.legacy-content h2,
.legacy-content h3,
.legacy-content h4,
.legacy-content h5,
.legacy-content h6 {
  margin: 22px 0 10px;
  color: var(--gold);
  font-family: inherit;
  font-weight: 400;
  line-height: 1.25;
}

.legacy-content h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
}

.legacy-content h2 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
}

.legacy-content h3,
.legacy-content h4,
.legacy-content h5,
.legacy-content h6 {
  font-size: 1.12rem;
}

.legacy-content a {
  text-decoration: none;
}

.legacy-content a:hover,
.legacy-content a:focus-visible {
  color: var(--gold-pale);
  text-decoration: underline;
}

.legacy-content img {
  max-width: calc(100% - 10px);
  height: auto !important;
  margin: 7px 5px;
  border-radius: 2px;
  vertical-align: middle;
}

.legacy-content a > img {
  transition: opacity 160ms ease, transform 160ms ease;
}

.legacy-content a:hover > img {
  opacity: 0.9;
  transform: translateY(-1px);
}

.legacy-content table {
  display: block;
  width: 100% !important;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.legacy-content td,
.legacy-content th {
  padding: 4px;
}

.legacy-content ul,
.legacy-content ol {
  padding-left: 1.5rem;
}

.legacy-center {
  text-align: center;
}

.footer {
  padding: 8px 16px 34px;
  color: var(--gold-pale);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.footer img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 10px;
}

.footer p {
  margin: 0;
}

.footer a {
  text-decoration: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 44px 20px 20px;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox img {
  max-width: min(1200px, 96vw);
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.55);
}

.lightbox button {
  position: fixed;
  top: 12px;
  right: 18px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: white;
  font: 300 40px/1 Arial, sans-serif;
  cursor: pointer;
}

@media (max-width: 820px) {
  body {
    background-size: auto 430px;
  }

  .hero {
    height: 430px;
    background-size: auto 430px;
  }

  .navigation a {
    padding-inline: 9px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  body {
    background-position: 51% top;
    background-size: auto 340px;
  }

  .hero {
    height: 340px;
    background-size: auto 340px;
  }

  .hero::after {
    position: absolute;
    inset: 0 0 50px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 46%, rgba(0, 0, 0, 0.1));
    pointer-events: none;
    content: "";
  }

  .hero-home {
    bottom: 50px;
  }

  .menu-toggle {
    position: absolute;
    right: 14px;
    bottom: 8px;
    z-index: 4;
    display: grid;
    grid-template-columns: 22px auto;
    gap: 4px 9px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid rgba(217, 171, 108, 0.25);
    border-radius: 3px;
    background: rgba(8, 8, 8, 0.9);
    color: var(--gold-pale);
    cursor: pointer;
  }

  .menu-toggle span:not(.menu-label) {
    display: block;
    grid-column: 1;
    width: 22px;
    height: 1px;
    background: var(--gold);
  }

  .menu-toggle span:nth-child(1) {
    grid-row: 1;
  }

  .menu-toggle span:nth-child(2) {
    grid-row: 2;
  }

  .menu-toggle span:nth-child(3) {
    grid-row: 3;
  }

  .menu-label {
    grid-row: 1 / 4;
    grid-column: 2;
    font: 13px/1 Georgia, serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .navigation {
    top: 340px;
    bottom: auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 14px 14px;
    background: rgba(11, 11, 11, 0.98);
    border-bottom: 1px solid rgba(217, 171, 108, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }

  .navigation.is-open {
    display: flex;
  }

  .navigation a {
    padding: 9px 12px;
    font-size: 15px;
  }

  .navigation a + a::before {
    top: 0;
    right: 12px;
    bottom: auto;
    left: 12px;
    width: auto;
    height: 1px;
  }

  .content-shell {
    padding: 24px 12px 18px;
  }

  .legacy-content {
    font-size: 16px;
  }

  .legacy-content img {
    margin: 6px auto;
  }

  .footer {
    padding-inline: 12px;
    letter-spacing: 0.08em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .legacy-content a > img {
    transition: none;
  }
}

.lightbox[hidden] { display: none; }
