:root {
  --bg: #151b2b;
  --bg-alt: #1c2436;
  --bg-contrast: #eee8dc;
  --text: #e4e0d4;
  --text-dim: #8a93a5;
  --text-on-contrast: #151b2b;
  --accent: #c98a4c;
  --accent-2: #7fa3b8;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gap: 24px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.9;
  overflow-x: hidden;
}

.wrap {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  row-gap: 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 4.2vw, 3.05rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.12rem; margin-top: 32px; }

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

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

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

/* ---------- navigation ---------- */

.site-head { padding: 28px 0 0; }

.site-head .wrap { row-gap: 18px; }

.brand {
  grid-column: 1 / span 4;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--accent); }

.nav {
  grid-column: 6 / span 7;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  justify-content: flex-end;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.09em;
}

.nav a {
  color: var(--text-dim);
  text-decoration: none;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--text); }

.nav-rule {
  grid-column: 1 / span 5;
  height: 1px;
  background: var(--accent);
  margin-top: 6px;
}

/* ---------- generic sections ---------- */

main > section { padding: 32px 0; }

main > section:nth-of-type(even) { background: var(--bg-alt); }

.col { grid-column: 1 / span 6; }

main > section:nth-of-type(3n) .col { grid-column: 4 / span 6; }

.rule {
  width: 33.33%;
  height: 1px;
  background: var(--accent);
  margin: 0 0 26px;
  border: 0;
}

.lead { font-size: 1.05rem; }

.caption {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
}

.list {
  list-style: none;
  margin: 4px 0 20px;
  padding: 0;
}
.list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
}
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9em;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.glossary {
  margin: 4px 0 20px;
}
.glossary dt {
  font-family: var(--serif);
  font-size: 1.02rem;
  margin-top: 18px;
}
.glossary dd {
  margin: 0;
  color: var(--text);
}

/* ---------- hero ---------- */

main > section.hero { padding-top: 56px; }
.hero .wrap { row-gap: 40px; }

.hero h1 {
  grid-column: 1 / span 7;
  align-self: start;
}
.hero h1 .line-a {
  display: block;
  margin-left: 28.5%;
}
.hero h1 .line-b { display: block; }

.hero-topics {
  grid-column: 10 / span 3;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}
.hero-topics li {
  border-top: 1px solid rgba(127, 163, 184, 0.4);
  padding: 9px 0;
}
.hero-topics li:last-child { border-bottom: 1px solid rgba(127, 163, 184, 0.4); }

.hero-intro { grid-column: 1 / span 6; }

.hero-fig {
  grid-column: 1 / -1;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  row-gap: 20px;
}
.hero-fig img {
  grid-column: 8 / span 5;
  outline: 1px solid var(--accent);
  outline-offset: 8px;
}
.hero-fig figcaption {
  grid-column: 1 / span 3;
  align-self: end;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
}

/* ---------- contrast section ---------- */

main > section.contrast {
  background: var(--bg-contrast);
  color: var(--text-on-contrast);
  padding: 48px 0;
}
main > section.contrast h2,
main > section.contrast h3 { color: var(--text-on-contrast); }
main > section.contrast .wrap { row-gap: 32px; }
main > section.contrast .wrap .col { grid-column: 7 / span 6; }
main > section.contrast .rule { background: #8c5a26; }
main > section.contrast .list li::before { background: #8c5a26; }
main > section.contrast a { color: #8c5a26; }

.detail-fig {
  grid-column: 1 / span 5;
  margin: 0;
  align-self: start;
}
.detail-fig img {
  outline: 1px solid #8c5a26;
  outline-offset: 8px;
  width: 100%;
}
.detail-fig figcaption {
  margin-top: 22px;
  font-size: 14px;
  line-height: 1.7;
  color: #4a4636;
}

/* ---------- about / legal pages ---------- */

.page-head { padding: 48px 0 8px; }
.page-head h1 { grid-column: 1 / span 8; }
.page-head .kicker {
  grid-column: 1 / span 8;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin: 0 0 14px;
}

.doc { padding: 24px 0 48px; }
.doc .wrap { row-gap: 0; }

.doc-col { grid-column: 1 / span 6; }

.doc-col section { margin-top: 56px; }
.doc-col section:first-of-type { margin-top: 24px; }

.doc-col h2 {
  position: relative;
  padding-left: 40px;
  margin-bottom: 18px;
}
.doc-col h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.doc-col h3 { margin-bottom: 10px; }

.note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-top: 40px;
}

/* ---------- footer ---------- */

.site-foot { padding: 40px 0 56px; }
.site-foot .wrap { row-gap: 28px; }

.foot-rule {
  grid-column: 1 / span 5;
  height: 1px;
  background: var(--accent);
  margin-bottom: 10px;
}

.foot-a { grid-column: 1 / span 5; }
.foot-b { grid-column: 6 / span 3; }
.foot-c { grid-column: 9 / span 4; }

.foot-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
}

.foot-a p,
.foot-c p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.foot-b ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 2.1;
}
.foot-b a {
  color: var(--text-dim);
  text-decoration: none;
}
.foot-b a:hover { color: var(--accent); }

.foot-c a { color: var(--accent); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .nav { grid-column: 5 / span 8; }
  .hero h1 { grid-column: 1 / span 8; }
  .hero-topics { grid-column: 9 / span 4; }
  .hero-intro { grid-column: 1 / span 8; }
  .hero-fig img { grid-column: 6 / span 7; }
  .hero-fig figcaption { grid-column: 1 / span 5; }
  .col,
  main > section:nth-of-type(3n) .col,

  .detail-fig { grid-column: 1 / span 7; }
  .doc-col { grid-column: 1 / span 9; }
  .page-head h1, .page-head .kicker { grid-column: 1 / span 10; }
  .foot-a { grid-column: 1 / span 6; }
  .foot-b { grid-column: 7 / span 3; }
  .foot-c { grid-column: 1 / span 8; }
}

@media (max-width: 700px) {
  body { font-size: 17px; line-height: 1.85; }
  .wrap { width: min(100% - 40px, 640px); }

  .site-head { padding-top: 22px; }
  .brand { grid-column: 1 / -1; }
  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 4px 20px;
  }
  .nav-rule { grid-column: 1 / -1; }

  main > section { padding: 20px 0; }
  main > section.contrast { padding: 34px 0; }

  main > section.hero { padding-top: 34px; }
  .hero .wrap { row-gap: 28px; }
  .hero h1 { grid-column: 1 / -1; }
  .hero h1 .line-a { margin-left: 0; }
  .hero-topics { grid-column: 1 / -1; }
  .hero-intro { grid-column: 1 / -1; }
  .hero-fig { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .hero-fig img { grid-column: 1; outline-offset: 6px; }
  .hero-fig figcaption { grid-column: 1; }

  .col,
  main > section:nth-of-type(3n) .col,
  main > section.contrast .wrap .col,
  .detail-fig,
  .doc-col,
  .page-head h1,
  .page-head .kicker,
  .foot-a,
  .foot-b,
  .foot-c,
  .foot-rule { grid-column: 1 / -1; }

  .detail-fig img { outline-offset: 6px; }
  .rule { width: 60px; }
  .doc-col section { margin-top: 42px; }
  .page-head { padding-top: 32px; }
}
