:root {
  color-scheme: dark;
  --ink: #05070a;
  --ivory: #f4f0e8;
  --soft: #e5ded2;
  --faint: rgba(243, 239, 231, 0.18);
  --gold: #a98a50;
  --gold-light: #c5af78;
  --display: "Garamond", "Adobe Garamond Pro", "EB Garamond", serif;
  --text: Georgia, Cambria, "Times New Roman", serif;
}

* { box-sizing: border-box; }
i,
em { font-style: normal; }

html {
  min-width: 320px;
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.68;
}

body::before {
  content: none;
}

.subpage-film {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #05070a;
}

.subpage-silk-image,
.subpage-film canvas,
.subpage-film::before,
.subpage-film::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.subpage-silk-image {
  background:
    radial-gradient(circle at 76% 34%, rgba(24, 76, 132, 0.34), transparent 34%),
    url("../assets/silk-base-gold.png") center / cover;
  filter: brightness(0.82) saturate(0.96) contrast(1.03);
  transform: scale(1.015);
  transform-origin: center;
}

.subpage-film canvas {
  display: block;
  opacity: 0;
  transition: opacity 1.4s ease;
}

body.webgl-ready .subpage-film canvas { opacity: 0.94; }
body.webgl-ready .subpage-silk-image { opacity: 0.12; }

.subpage-film::before,
.subpage-film::after {
  content: "";
}

.subpage-film::before {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(2, 3, 6, 0.68), rgba(2, 4, 8, 0.24) 54%, rgba(2, 3, 6, 0.36)),
    linear-gradient(180deg, rgba(2, 3, 5, 0.18), rgba(2, 3, 5, 0.48));
}

.subpage-film::after {
  z-index: 3;
  background: radial-gradient(circle at 78% 28%, rgba(34, 99, 166, 0.16), transparent 38%);
  mix-blend-mode: screen;
}

body > header,
body > main,
body > footer {
  position: relative;
  z-index: 1;
}

a { color: inherit; }

.section-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 72px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(243, 239, 231, 0.12);
  background: rgba(5, 7, 10, 0.82);
  backdrop-filter: blur(16px);
}

.brand,
.back-link,
.next-link { text-decoration: none; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-family: var(--display);
  font-size: 0.98rem;
  text-transform: uppercase;
}
.brand-mark {
  display: grid;
  width: 40px;
  height: 38px;
  place-items: center;
  border: 1px solid #ffffff;
  font-size: 12px;
  line-height: 1;
}
.back-link,
.next-link { font-family: var(--display); }
.back-link { color: #ffffff; font-size: 1.02rem; }

.section-hero {
  min-height: 92svh;
  display: grid;
  align-items: end;
  padding: 148px 7vw 11vh;
}

.section-hero-inner,
.section-body-inner,
.section-footer-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.section-index {
  display: block;
  margin-bottom: 34px;
  color: var(--gold);
  font-size: 1.05rem;
}

.section-hero h1 {
  max-width: 1050px;
  margin: 0 0 36px;
  color: #fffdf8;
  font-size: 4.4rem;
  font-weight: 400;
  line-height: 0.96;
  white-space: nowrap;
  font-family: var(--display);
}

.section-question {
  max-width: 800px;
  margin: 0;
  color: var(--gold-light);
  font-size: 2.8rem;
  line-height: 1.22;
  font-family: var(--display);
}

.section-body {
  padding: 14vh 7vw;
  border-top: 1px solid var(--faint);
  background: rgba(3, 5, 8, 0.54);
  backdrop-filter: blur(2px);
}

.section-body-inner {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 8vw;
}

.label {
  margin: 8px 0 0;
  color: #ffffff;
  font-family: var(--display);
  font-size: 1.05rem;
}

.section-intro {
  max-width: 720px;
  margin: 0 0 70px;
  color: var(--soft);
  font-size: 1.38rem;
  line-height: 1.68;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.52);
}

.questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--faint);
}

.questions p {
  margin: 0;
  padding: 26px 24px 26px 0;
  border-bottom: 1px solid var(--faint);
  color: #ffffff;
  font-size: 1.08rem;
  line-height: 1.72;
  font-weight: 400;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.52);
}

.questions p:not(:first-child) {
  padding-left: 24px;
  border-left: 1px solid var(--faint);
}

.writing {
  min-height: 76svh;
  padding: 14vh 7vw;
  border-top: 1px solid var(--faint);
  background: rgba(2, 4, 7, 0.62);
  backdrop-filter: blur(2px);
}

.writing h2 {
  margin: 0 0 60px;
  font-size: 5.4rem;
  font-weight: 400;
  line-height: 0.95;
  font-family: var(--display);
}

.empty-index {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
}

.empty-index span { color: #ffffff; font-size: 1.02rem; text-transform: uppercase; }
.empty-index strong { font-size: 1.62rem; font-weight: 400; }
.empty-index small { color: #ffffff; font-size: 1.12rem; }

.essay-index-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto 20px;
  gap: 28px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  text-decoration: none;
}

.essay-index-item + .essay-index-item { border-top: 0; }

.essay-number,
.essay-date {
  font-size: 1.08rem;
}

.essay-index-copy strong,
.essay-index-copy small {
  display: block;
}

.essay-index-copy strong {
  margin-bottom: 9px;
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.2;
  font-family: var(--display);
}

.essay-index-copy small {
  max-width: 670px;
  font-size: 1.08rem;
  line-height: 1.62;
}

.essay-arrow {
  font-size: 1.2rem;
  transition: transform 240ms ease;
}

.essay-index-item:hover .essay-arrow,
.essay-index-item:focus-visible .essay-arrow {
  transform: translateX(6px);
}

.section-footer {
  padding: 8vh 7vw;
  border-top: 1px solid var(--faint);
  background: rgba(3, 4, 6, 0.78);
}

.section-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.next-link { color: var(--gold-light); border-bottom: 1px solid var(--gold); }

body,
button,
input,
textarea,
select {
  font-family: var(--text);
}

body { color: var(--ivory); }

/* Refined field pages: one volume, four distinct chapter plates. */
:root {
  --nav-serif: "Baskerville", "Baskerville Old Face", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --pearl: #f1ede5;
  --pearl-soft: #d7d0c4;
  --reading: #e3ddd2;
  --old-gold: #a98a50;
  --old-gold-light: #c5af78;
  --lapis: #15345d;
  --deep-lapis: #071529;
  --blue-mist: #ffffff;
}

.subpage-silk-image {
  background: url("../assets/silk-base-gold.png") center / cover;
  filter: brightness(0.86) saturate(0.96) contrast(1.03);
}

.subpage-film::before {
  background:
    linear-gradient(90deg, rgba(2, 3, 6, 0.74), rgba(2, 4, 8, 0.22) 58%, rgba(2, 3, 6, 0.42)),
    linear-gradient(180deg, rgba(2, 3, 5, 0.16), rgba(2, 3, 5, 0.5));
}

.subpage-film::after {
  background: linear-gradient(180deg, rgba(2, 3, 6, 0.03), rgba(2, 3, 6, 0.32));
  mix-blend-mode: normal;
}

.section-header {
  min-height: 82px;
  padding-inline: clamp(28px, 4vw, 68px);
  border-bottom-color: rgba(197, 169, 106, 0.22);
  background: linear-gradient(180deg, rgba(3, 5, 9, 0.92), rgba(3, 5, 9, 0.58));
  backdrop-filter: blur(14px);
}

.brand,
.back-link,
.next-link {
  font-weight: 400;
  letter-spacing: 0;
}

.brand { font-family: var(--display); }
.back-link,
.next-link { font-family: var(--nav-serif); }

.brand {
  gap: 15px;
  font-size: 0.92rem;
  font-variant-caps: small-caps;
  text-transform: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-color: rgba(216, 201, 164, 0.82);
  font-family: var(--display);
  box-shadow:
    inset 0 0 0 3px rgba(5, 7, 10, 0.78),
    inset 0 0 0 4px rgba(197, 169, 106, 0.2);
}

.back-link {
  position: relative;
  color: var(--pearl-soft) !important;
  font-size: 1rem;
  font-variant-caps: small-caps;
}

.back-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--old-gold));
  transition: width 320ms ease;
}

.back-link:hover::after,
.back-link:focus-visible::after { width: 100%; }

.section-hero {
  position: relative;
  min-height: 94svh;
  overflow: hidden;
  padding-bottom: 12vh;
}

.section-hero::before {
  position: absolute;
  top: 18vh;
  right: 6vw;
  color: rgba(197, 169, 106, 0.13);
  font-family: var(--nav-serif);
  font-size: 15rem;
  line-height: 1;
  pointer-events: none;
}

body[data-field="aesthetics"] .section-hero::before { content: "I"; }
body[data-field="inheritance"] .section-hero::before { content: "II"; right: auto; left: 5vw; }
body[data-field="creation"] .section-hero::before { content: "III"; color: rgba(52, 116, 205, 0.13); }
body[data-field="responsibility"] .section-hero::before { content: "IV"; right: 4vw; color: rgba(197, 169, 106, 0.1); }

.section-hero::after {
  content: "";
  position: absolute;
  right: 7vw;
  bottom: 8vh;
  width: min(36vw, 440px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(18, 59, 117, 0.86), rgba(197, 169, 106, 0.78));
}

.section-hero-inner { position: relative; z-index: 1; }

body[data-field="inheritance"] .section-hero-inner { width: min(1040px, 100%); }
body[data-field="creation"] .section-hero-inner { width: min(1080px, 100%); padding-left: min(8vw, 96px); }
body[data-field="responsibility"] .section-hero-inner { width: min(1100px, 100%); }

.section-index,
.label,
.essay-number,
.essay-date,
.empty-index span,
.empty-index small {
  color: var(--old-gold) !important;
  font-family: var(--nav-serif);
  font-variant-caps: small-caps;
  letter-spacing: 0;
}

.section-index {
  margin-bottom: 42px;
  font-size: 1.12rem;
}

.section-index::after {
  content: "";
  display: inline-block;
  width: 72px;
  height: 1px;
  margin-left: 18px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--old-gold), rgba(18, 59, 117, 0.42));
}

.section-hero h1 {
  max-width: 1120px;
  margin-bottom: 34px;
  color: var(--pearl) !important;
  font-weight: 400;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.78);
}

.section-question {
  color: var(--blue-mist) !important;
  font-family: var(--nav-serif);
  font-weight: 400;
}

.section-body {
  position: relative;
  background: linear-gradient(112deg, rgba(3, 5, 8, 0.72), rgba(5, 15, 32, 0.34) 72%, rgba(3, 5, 8, 0.58));
  border-top-color: rgba(197, 169, 106, 0.32);
  backdrop-filter: none;
}

body[data-field="inheritance"] .section-body {
  background: linear-gradient(112deg, rgba(3, 5, 8, 0.7), rgba(34, 27, 15, 0.22) 70%, rgba(3, 5, 8, 0.62));
}

body[data-field="creation"] .section-body {
  background: linear-gradient(112deg, rgba(3, 5, 8, 0.7), rgba(7, 31, 67, 0.38) 74%, rgba(3, 5, 8, 0.58));
}

.section-body-inner {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(48px, 8vw, 116px);
}

.label {
  position: relative;
  padding-top: 16px;
}

.label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 1px;
  background: var(--old-gold);
}

.section-intro {
  color: var(--pearl) !important;
  font-size: 1.42rem;
  line-height: 1.72;
}

.questions { border-top-color: rgba(197, 169, 106, 0.34); }

.questions p {
  position: relative;
  color: var(--reading) !important;
  border-bottom-color: rgba(216, 201, 164, 0.2);
}

.questions p::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--old-gold), var(--lapis));
}

.questions p:not(:first-child) { border-left-color: rgba(216, 201, 164, 0.18); }

.writing {
  background: linear-gradient(180deg, rgba(2, 4, 7, 0.46), rgba(4, 12, 27, 0.62));
  border-top-color: rgba(197, 169, 106, 0.28);
  backdrop-filter: none;
}

.writing h2 {
  margin-bottom: 64px;
  color: var(--pearl) !important;
  font-size: 3.9rem;
  font-weight: 400;
}

.empty-index,
.essay-index-item {
  border-top-color: rgba(197, 169, 106, 0.34);
  border-bottom-color: rgba(216, 201, 164, 0.2);
}

.essay-index-item {
  position: relative;
  transition: padding 360ms ease, background 360ms ease;
}

.essay-index-item:hover,
.essay-index-item:focus-visible {
  padding-inline: 18px;
  background: linear-gradient(90deg, rgba(197, 169, 106, 0.08), rgba(18, 59, 117, 0.15));
}

.essay-index-copy strong { color: var(--pearl) !important; font-weight: 400; }
.essay-index-copy small { color: var(--blue-mist) !important; }
.essay-arrow { color: var(--old-gold) !important; }

.section-footer {
  border-top-color: rgba(197, 169, 106, 0.26);
  background: linear-gradient(90deg, rgba(2, 3, 5, 0.9), rgba(5, 16, 35, 0.82));
}

.next-link {
  position: relative;
  color: var(--pearl) !important;
  border-bottom-color: var(--old-gold);
  font-variant-caps: small-caps;
}

@media (max-width: 900px) {
  .section-hero h1 { font-size: 3.1rem; }
  .section-question { font-size: 2.15rem; }
  .writing h2 { font-size: 3.25rem; }
}

@media (max-width: 760px) {
  .section-header { padding-inline: 20px; }
  .section-hero { min-height: 84svh; padding: 120px 22px 10vh; }
  .section-hero-inner,
  .section-body-inner,
  .section-footer-inner { max-width: calc(100vw - 44px); }
  .section-hero::before { top: 16vh; right: 5vw !important; left: auto !important; font-size: 7rem; }
  .section-hero::after { right: 22px; bottom: 6vh; width: 42vw; }
  .section-hero h1 { font-size: 1.9rem; white-space: normal; text-wrap: balance; }
  .section-question { font-size: 1.72rem; }
  .section-body,
  .writing,
  .section-footer { padding-inline: 22px; }
  .section-body-inner { grid-template-columns: 1fr; gap: 42px; }
  body[data-field="creation"] .section-hero-inner { padding-left: 0; }
  .questions { grid-template-columns: 1fr; }
  .questions p,
  .questions p:not(:first-child) { padding: 22px 0; border-left: 0; font-size: 1.08rem; }
  .empty-index { grid-template-columns: 1fr; gap: 9px; }
  .essay-index-item {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 12px;
  }
  .essay-number,
  .essay-date { grid-column: 1; }
  .essay-index-copy { grid-column: 1; }
  .essay-arrow { grid-column: 2; grid-row: 1 / span 3; }
  .section-footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .essay-index-item,
  .back-link::after { transition: none; }
}
