:root {
  --ink: #17120d;
  --ink-soft: #4d4237;
  --paper: #f7f1e7;
  --paper-deep: #efe2cf;
  --ivory: #fffaf0;
  --gold: #b9914b;
  --gold-bright: #d8b66d;
  --wine: #4b1825;
  --forest: #16392f;
  --line: rgba(23, 18, 13, 0.14);
  --shadow: 0 28px 80px rgba(18, 12, 7, 0.18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(185, 145, 75, 0.08) 1px, transparent 1px),
    linear-gradient(var(--paper), var(--ivory) 42%, var(--paper-deep));
  background-size: 86px 86px, auto;
  font-family: var(--sans);
  line-height: 1.72;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 82px;
  padding: 16px clamp(18px, 4vw, 54px);
  color: var(--ivory);
  border-bottom: 1px solid rgba(255, 250, 240, 0.12);
  background: rgba(16, 12, 9, 0.58);
  backdrop-filter: blur(20px);
}

.site-nav.is-scrolled {
  background: rgba(16, 12, 9, 0.9);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: clamp(220px, 21vw, 330px);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-group {
  position: relative;
  display: block;
}

.nav-group-trigger {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  color: rgba(255, 250, 240, 0.72);
  background: transparent;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-group-trigger::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  display: grid;
  gap: 4px;
  min-width: 230px;
  padding: 12px;
  border: 1px solid rgba(216, 182, 109, 0.22);
  background: rgba(18, 13, 10, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(255, 250, 240, 0.84);
  font-size: 14px;
  font-weight: 600;
}

.nav-group-trigger:hover,
.nav-group:focus-within .nav-group-trigger,
.nav-dropdown a:hover,
.nav-dropdown a[aria-current="page"] {
  color: var(--gold-bright);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(216, 182, 109, 0.68);
  font-size: 13px;
  font-weight: 700;
}

.nav-cta {
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 250, 240, 0.22);
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ivory);
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 150px clamp(18px, 7vw, 100px) 86px;
  overflow: hidden;
  color: var(--ivory);
  background: #120d0a;
}

.hero-media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  transform: scale(1.02);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(16, 11, 8, 0.18), rgba(16, 11, 8, 0.72)),
    linear-gradient(180deg, rgba(10, 8, 6, 0.42), rgba(10, 8, 6, 0.78)),
    radial-gradient(circle at 50% 42%, rgba(216, 182, 109, 0.2), transparent 34%);
}

.hero-content {
  position: relative;
  width: min(1050px, 100%);
  text-align: center;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.04;
}

h1 {
  max-width: 1050px;
  margin: 0 auto;
  font-size: clamp(42px, 5.4vw, 78px);
}

.hero-content > p {
  max-width: 760px;
  margin: 26px auto 0;
  color: rgba(255, 250, 240, 0.82);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.button.primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.button.ghost {
  color: var(--ivory);
  background: rgba(255, 250, 240, 0.06);
}

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-band div {
  padding: 30px clamp(18px, 4vw, 56px);
  background: rgba(255, 250, 240, 0.72);
}

.intro-band span,
.aside-kicker {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.intro-band strong {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.1;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 880px);
  gap: clamp(28px, 5vw, 72px);
  width: min(1240px, calc(100% - 36px));
  margin: 72px auto 110px;
}

.page-aside {
  position: sticky;
  top: 104px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.aside-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: 0 18px 48px rgba(53, 35, 18, 0.08);
}

.aside-card.dark {
  color: var(--ivory);
  background: linear-gradient(145deg, var(--ink), #2b1a12);
}

.toc {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.toc a {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.toc a:hover {
  color: var(--gold);
}

.text-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--gold-bright);
  font-weight: 700;
}

.content {
  min-width: 0;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.9);
  box-shadow: var(--shadow);
}

.content > *:first-child {
  margin-top: 0;
}

.content h2 {
  margin: 56px 0 20px;
  padding-top: 8px;
  color: var(--ink);
  font-size: clamp(34px, 4vw, 54px);
}

.content h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin-top: 16px;
  background: var(--gold);
}

.content h3 {
  margin: 34px 0 12px;
  color: var(--wine);
  font-size: clamp(25px, 3vw, 34px);
}

.content p,
.content li {
  color: var(--ink-soft);
  font-size: 17px;
}

.content p {
  margin: 0 0 18px;
}

.content ul,
.content ol {
  display: grid;
  gap: 14px;
  margin: 20px 0 28px;
  padding-left: 22px;
}

.content li::marker {
  color: var(--gold);
  font-weight: 800;
}

.content strong {
  color: var(--ink);
  font-weight: 800;
}

.content a {
  color: var(--wine);
  font-weight: 800;
  border-bottom: 1px solid rgba(75, 24, 37, 0.34);
}

.content blockquote {
  margin: 34px 0;
  padding: 28px 34px;
  border-left: 3px solid var(--gold);
  color: var(--ink);
  background: linear-gradient(135deg, rgba(185, 145, 75, 0.13), rgba(22, 57, 47, 0.08));
}

.content blockquote p {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.34;
}

.content-figure {
  position: relative;
  margin: 22px 0 34px;
  padding: 10px;
  border: 1px solid rgba(185, 145, 75, 0.26);
  background: linear-gradient(145deg, rgba(23, 18, 13, 0.06), rgba(185, 145, 75, 0.08));
  box-shadow: 0 18px 48px rgba(53, 35, 18, 0.1);
}

.content-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #17120d;
}

.content-figure figcaption {
  margin: 10px 4px 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.content hr {
  height: 1px;
  margin: 44px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: rgba(239, 226, 207, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 46px clamp(18px, 5vw, 72px);
  color: rgba(255, 250, 240, 0.78);
  background: #120d0a;
}

.site-footer strong {
  display: block;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 28px;
}

.site-footer p {
  max-width: 540px;
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .nav-panel {
    position: fixed;
    inset: 76px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    background: rgba(18, 13, 10, 0.96);
    border: 1px solid rgba(216, 182, 109, 0.22);
  }

  .site-nav.is-open .nav-panel {
    display: flex;
  }

  .nav-group {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 250, 240, 0.1);
  }

  .nav-group-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 0;
    text-align: left;
  }

  .nav-dropdown {
    position: static;
    min-width: 0;
    width: 100%;
    padding: 4px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-dropdown a {
    min-height: 34px;
    padding: 0;
    font-size: 14px;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 100vh;
    padding-top: 126px;
  }

  .intro-band {
    grid-template-columns: 1fr;
  }

  .page-shell {
    grid-template-columns: 1fr;
    margin-top: 36px;
  }

  .page-aside {
    position: static;
    order: 2;
  }

  .content {
    padding: 28px 20px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-nav {
    padding-inline: 14px;
  }

  .brand {
    width: 188px;
  }

  h1 {
    font-size: clamp(38px, 13vw, 54px);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
