@charset "UTF-8";

.chapter-page main.chapter-layout {
  max-width: none;
  padding-inline: 0;
}

/* ─── Hero ──────────────────────────────────────────────────────────── */
.chapter-hero {
  position: relative;
  height: min(60vh, 540px);
  min-height: 360px;
  background: var(--pohaku-black) center/cover no-repeat;
  color: var(--pulu-white);
  display: grid;
  align-items: end;
}
.chapter-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,14,0.05) 0%, rgba(14,14,14,0.55) 100%);
  pointer-events: none;
}
.chapter-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw-page);
  margin: 0 auto;
  padding: var(--sp-12) var(--sp-6);
  width: 100%;
}
.chapter-hero__crumb {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sun-gold);
  margin-bottom: var(--sp-3);
}
.chapter-hero__crumb a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.chapter-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.04;
  margin-bottom: var(--sp-3);
}
.chapter-hero__tag {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-md);
  max-width: 50ch;
}

/* ─── Section bands ─────────────────────────────────────────────────── */
.section-band {
  padding: var(--sp-24) var(--sp-6);
  position: relative;
}
.section-band__inner {
  max-width: var(--maxw-page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2fr;
  gap: var(--sp-8);
  align-items: start;
}
.section-band__label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: 6px;
  border-top: 2px solid currentColor;
}
.section-band__body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: var(--sp-4);
}
.section-band__body p {
  font-size: var(--fs-md);
  max-width: 60ch;
}
.section-band__body p + p { margin-top: var(--sp-3); }
.section-band__body em.hawaiian { font-style: italic; }
.section-band__body ul {
  margin-top: var(--sp-3);
  padding-left: var(--sp-4);
  font-size: var(--fs-sm);
}

/* ─── Above the waterline ──────────────────────────────────────────── */
.section-band--mauka { background: var(--sand); color: var(--pohaku-black); }
.section-band--mid   { background: color-mix(in srgb, var(--sand) 65%, var(--bg-coast) 35%); color: var(--pohaku-black); }
.section-band--coast { background: var(--bg-coast); color: var(--pohaku-black); }

/* ─── Waterline transition ─────────────────────────────────────────── */
.waterline {
  height: 80px;
  background: linear-gradient(180deg,
    var(--bg-coast) 0%,
    color-mix(in srgb, var(--bg-coast) 30%, var(--reef-teal)) 40%,
    var(--reef-teal) 100%);
  position: relative;
}
.waterline::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(255,255,255,0.06) 60%, rgba(255,255,255,0.06) 62%, transparent 62%);
  pointer-events: none;
}
.waterline__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--pulu-white) 80%, transparent);
}

/* ─── Below the waterline ──────────────────────────────────────────── */
.section-band--reef  { background: var(--reef-teal); color: var(--pulu-white); }
.section-band--reef .section-band__body p { color: color-mix(in srgb, var(--pulu-white) 92%, transparent); }
.section-band--ocean { background: var(--ocean-deep); color: var(--pulu-white); }
.section-band--ocean .section-band__body p { color: color-mix(in srgb, var(--pulu-white) 90%, transparent); }

/* ─── Mini-map link ─────────────────────────────────────────────────── */
.chapter-map-link {
  display: block;
  margin-top: var(--sp-4);
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  background: rgba(255,255,255,0.08);
}
.chapter-map-link__caption {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

/* ─── Next-chapter footer ──────────────────────────────────────────── */
.chapter-nav {
  background: var(--pohaku-black);
  color: var(--pulu-white);
  padding: var(--sp-12) var(--sp-6);
  text-align: center;
}
.chapter-nav__prompt {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: color-mix(in srgb, var(--pulu-white) 70%, transparent);
  margin-bottom: var(--sp-2);
}
.chapter-nav__link {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--sun-gold);
  text-decoration: none;
  border-bottom: 2px solid color-mix(in srgb, var(--sun-gold) 50%, transparent);
  padding-bottom: 2px;
}
.chapter-nav__link:hover { border-bottom-color: var(--sun-gold); }

/* ─── Reveal on scroll ─────────────────────────────────────────────── */
.section-band__body {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.section-band.is-in-view .section-band__body {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Mobile ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .section-band__inner { grid-template-columns: 1fr; gap: var(--sp-4); }
  .section-band { padding: var(--sp-16) var(--sp-6); }
  .waterline { height: 60px; }
}
