/* =========================================================
   About subpages (Editorial Policy, Project Principles,
   Historic Language, Acknowledgements) — shared layout.
   Each page also has its own stylesheet for its one
   special section (process steps, principle cards, etc.).
   ========================================================= */

/* ---------- reading progress bar ---------- */
.sub-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none; }
.sub-progress span { display: block; height: 100%; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; }

/* ---------- hero (leather, with the page's photo) ---------- */
.sub-hero { padding-bottom: 0; }
.sub-hero__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); gap: clamp(2.5rem, 6vw, 6rem); align-items: end;
  padding: 2.5rem var(--pad-x) 0; position: relative; z-index: 1;
}
.sub-hero__text { padding-bottom: 4.5rem; }
.sub-crumb { display: flex; flex-wrap: wrap; gap: .625rem; font-family: var(--f-nav); font-size: 1rem; letter-spacing: .08em; color: rgba(245,242,233,.75); }
.sub-crumb a { color: var(--gold); text-decoration: none; }
.sub-crumb a:hover { text-decoration: underline; text-underline-offset: .2em; }
.sub-hero h1 {
  margin-top: 1.25rem; font-family: var(--f-serif); font-weight: 500; color: var(--cream);
  font-size: clamp(2.5rem, 4.2vw, 4rem); line-height: 1.1; letter-spacing: .02em; max-width: 18ch;
}
.sub-hero__lead {
  margin-top: 1.5rem; max-width: 40rem; padding-left: 1.25rem; border-left: 3px solid var(--gold);
  font-family: var(--f-serif); font-style: italic; font-size: clamp(1.25rem, 1.6vw, 1.625rem); line-height: 1.5; color: #fff6ea;
}
.sub-hero__img { margin: 0 0 -3.5rem; position: relative; transform: rotate(2deg); transition: transform .6s var(--ease); }
.sub-hero__img img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: .5rem solid #f6efe6; box-shadow: 0 1.5rem 2.5rem rgba(30,6,4,.4); }
.sub-hero__img:hover { transform: rotate(0deg); }

/* ---------- body: side panel + article ---------- */
.sub-body { background: var(--cream); padding: 5.5rem var(--pad-x) 6rem; }
.sub-body__inner { display: grid; grid-template-columns: 16rem minmax(0, 56rem); gap: clamp(2.5rem, 5vw, 5.5rem); justify-content: center; }

.sub-aside { position: relative; }
.sub-aside__card { position: sticky; top: 2rem; padding: 1.5rem 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; }
.sub-aside__title { font-family: var(--f-nav); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red-brand); }
.sub-aside__list { list-style: none; margin: 1rem 0 0; padding: 0; }
.sub-aside__list a {
  display: block; padding: .5rem .875rem; border-left: 2px solid transparent; text-decoration: none;
  font-family: var(--f-serif); font-size: 1.125rem; line-height: 1.35; color: var(--teal-dark); transition: background-color .2s, border-color .2s;
}
.sub-aside__list a:hover { background: #eef4f3; }
.sub-aside__list a[aria-current="page"] { border-left-color: var(--teal); background: var(--teal-light); font-style: italic; font-weight: 500; }
.sub-aside__contact {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); width: 100%;
  font-size: .9375rem; font-weight: 600; color: var(--red-brand); text-decoration: none;
}
.sub-aside__contact svg { width: 1.125rem; height: .75rem; transition: transform .25s var(--ease); }
.sub-aside__contact:hover svg { transform: translateX(3px); }

/* ---------- article typography ---------- */
.sub-article { min-width: 0; }
.sub-h2 {
  display: flex; align-items: center; gap: 1rem; margin: 3.5rem 0 1.25rem;
  font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.75rem, 2.2vw, 2.25rem); color: var(--red-brand); line-height: 1.2;
}
.sub-h2::after { content: ""; flex: 1; height: 1px; background: rgba(119,46,37,.2); }
.sub-article > .sub-h2:first-child, .sub-article > section:first-child .sub-h2 { margin-top: 0; }
.sub-intro { font-family: var(--f-serif); font-size: clamp(1.375rem, 1.7vw, 1.625rem); line-height: 1.55; color: var(--ink); }
.sub-prose p { font-size: 1.1875rem; line-height: 1.85; color: #4b4b4b; font-weight: 300; }
.sub-prose p + p { margin-top: 1.5rem; }
.sub-prose + .sub-prose, .sub-pull + .sub-prose, .sub-callout + .sub-prose { margin-top: 1.5rem; }
.sub-prose em, .sub-callout em { font-style: italic; }
.sub-prose a, .sub-callout a { color: var(--teal); }
.sub-first::first-letter {
  float: left; margin: .4rem .625rem 0 0; font-family: var(--f-serif); font-weight: 500; font-size: 4.25rem; line-height: .8; color: var(--red-brand);
}

/* pull quote (repeats a key line from the text, so it's hidden from screen readers) */
.sub-pull { position: relative; margin: 2.75rem 0; padding: 1.75rem 0 1.75rem 2.75rem; border-top: 1px solid rgba(119,46,37,.25); border-bottom: 1px solid rgba(119,46,37,.25); }
.sub-pull::before { content: "\201C"; position: absolute; left: 0; top: 1rem; font-family: var(--f-serif); font-size: 4.5rem; line-height: 1; color: var(--gold); }
.sub-pull p { font-family: var(--f-serif); font-style: italic; font-size: clamp(1.5rem, 2vw, 1.875rem); line-height: 1.45; color: var(--red-brand); }

/* callout box */
.sub-callout {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; margin: 2.5rem 0; padding: 1.75rem 1.75rem 1.75rem 1.5rem;
  background: #fff; border-left: 4px solid var(--teal); border-radius: 0 .5rem .5rem 0; box-shadow: 0 .5rem 1.5rem rgba(74,21,14,.06);
}
.sub-callout__icon { width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center; background: var(--teal-light); color: var(--teal-dark); }
.sub-callout__icon svg { width: 1.375rem; height: 1.375rem; }
.sub-callout__label { font-family: var(--f-nav); font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-dark); margin-bottom: .5rem; }
.sub-callout p:not(.sub-callout__label) { font-size: 1.125rem; line-height: 1.8; color: #3f3f3f; font-weight: 400; }

/* sources accordion */
.accordion { margin-top: 3.5rem; background: #fff; border: 1px solid var(--line); border-radius: .5rem; padding: 0 1.5rem; }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none;
  padding: 1.25rem 0; font-family: var(--f-serif); font-weight: 500; font-size: 1.5rem; color: var(--red-brand);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary svg { width: 1.25rem; height: 1.25rem; color: var(--teal); transition: transform .3s var(--ease); transform: rotate(180deg); }
.accordion[open] summary svg { transform: none; }
.accordion[open] summary { border-bottom: 1px solid var(--line); }
.accordion__content { padding: 1.25rem 0 1.5rem; }
.accordion__content p { font-size: 1rem; line-height: 1.6; color: var(--text-2); font-weight: 400; overflow-wrap: anywhere; padding-left: 1rem; text-indent: -1rem; }
.accordion__content p + p { margin-top: 1rem; }
.accordion__content a { color: var(--teal); }

/* ---------- "More about the project" ---------- */
.sub-more { background: var(--white); padding: 5rem var(--pad-x) 6rem; }
.sub-more__inner { max-width: 70rem; margin: 0 auto; }
.sub-more__heading { font-family: var(--f-serif); font-style: italic; font-weight: 500; font-size: clamp(2rem, 2.8vw, 2.75rem); color: var(--red-brand); letter-spacing: .03em; }
.sub-more__grid { margin-top: 2.25rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.more-card {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.25rem; padding: 1rem; text-decoration: none; color: inherit;
  background: var(--cream); border: 1px solid #ebe5da; border-radius: .5rem; transition: transform .3s var(--ease), box-shadow .3s;
}
.more-card:hover, .more-card:focus-visible { transform: translateY(-4px); box-shadow: 0 1rem 2rem rgba(74,21,14,.12); }
.more-card__img { display: block; overflow: hidden; border-radius: .25rem; }
.more-card__img img { width: 100%; height: 100%; min-height: 8rem; object-fit: cover; transition: transform .8s var(--ease); }
.more-card:hover .more-card__img img { transform: scale(1.06); }
.more-card__body { display: flex; flex-direction: column; }
.more-card__title { font-family: var(--f-serif); font-weight: 500; font-size: 1.375rem; line-height: 1.25; color: var(--ink); }
.more-card__text { margin-top: .5rem; font-size: 1rem; line-height: 1.5; color: #5a5a5a; }
.more-card__go { margin-top: auto; padding-top: .75rem; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--f-nav); font-size: 1rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red-brand); }
.more-card__go svg { width: 1.125rem; height: .75rem; transition: transform .25s var(--ease); }
.more-card:hover .more-card__go svg { transform: translateX(4px); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .sub-body__inner { grid-template-columns: 1fr; }
  .sub-aside { order: 2; }
  .sub-aside__card { position: static; }
  .sub-more__grid { grid-template-columns: 1fr; max-width: 34rem; }
}
@media (max-width: 760px) {
  .sub-hero__inner { grid-template-columns: 1fr; padding: 1.5rem 1.375rem 0; }
  .sub-hero__text { padding-bottom: 1.5rem; }
  .sub-hero__img { width: 62%; max-width: 16rem; margin: 0 auto -3rem; }
  .sub-body { padding: 5rem 1.375rem 4rem; }
  .sub-prose p { font-size: 1.0625rem; }
  .sub-pull { padding-left: 2.25rem; }
  .sub-callout { grid-template-columns: 1fr; padding: 1.5rem 1.25rem; }
  .sub-more { padding: 3.5rem 1.375rem 4.5rem; }
}
@media (prefers-reduced-motion: reduce) { .sub-progress { display: none; } }
