/* Standalone pages: a quiet continuation of the established Alisa Chessler identity. */

body[data-page="about"] main > .about-band,
body[data-page="philanthropists"] main > .phil-band,
body[data-page="contact"] main > .contact-band,
body[data-page="consultation"] main > .contact-band,
body[data-page="consultation"] main > .band {
  padding-top: clamp(112px, 13vw, 158px);
}

body[data-page="about"] .about-band,
body[data-page="philanthropists"] .phil-band,
body[data-page="contact"] .contact-band,
body[data-page="consultation"] .contact-band {
  min-height: calc(100svh - var(--head-h));
}

/* The opening title gets room to breathe beneath the fixed masthead. */
body.standalone-page .section-title:is(h1) {
  max-width: 850px;
  text-wrap: balance;
}

body.standalone-page .band-head {
  align-items: flex-start;
  gap: clamp(28px, 6vw, 82px);
  margin-bottom: clamp(34px, 5vw, 58px);
}

body.standalone-page .band-head > div:first-child {
  max-width: 720px;
}

body.standalone-page .band-head .eyebrow {
  margin-bottom: 16px;
}

body.standalone-page .band-head p,
body.standalone-page .page-intro {
  color: var(--muted);
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.75;
  max-width: 560px;
}

body.standalone-page .page-intro {
  animation: page-arrive 650ms cubic-bezier(.2, .65, .25, 1) both;
  margin: 0 auto clamp(54px, 8vw, 88px);
  max-width: 1200px;
  padding: 0 24px;
}

body[data-page="consultation"] .page-intro {
  color: var(--navy);
  font: 500 clamp(1.45rem, 2.35vw, 2rem)/1.45 var(--f-display);
}

body[data-page="about"] .about-band,
body[data-page="philanthropists"] .phil-band {
  position: relative;
}

body[data-page="about"] .about-band::before,
body[data-page="philanthropists"] .phil-band::before,
body[data-page="contact"] .contact-band::before,
body[data-page="consultation"] .contact-band::before {
  background: var(--accent);
  content: "";
  height: 1px;
  left: max(24px, calc((100% - 1200px) / 2));
  opacity: .65;
  position: absolute;
  right: max(24px, calc((100% - 1200px) / 2));
  top: calc(var(--head-h) + 18px);
}

body[data-page="about"] .about {
  align-items: start;
  gap: clamp(34px, 7vw, 88px);
}

body[data-page="about"] .about-lead {
  max-width: 29rem;
}

body[data-page="about"] .about-body {
  max-width: 650px;
}

body[data-page="philanthropists"] .phil {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
}

body[data-page="philanthropists"] .phil > div {
  padding: clamp(26px, 4vw, 44px);
}

body[data-page="contact"] #contact,
body[data-page="consultation"] #contact {
  scroll-margin-top: calc(var(--head-h) + 28px);
}

/* Current destination: a persistent rule, not color alone. aria-current also
   communicates the selection to assistive technology when supplied by the nav. */
.head-links > a[aria-current="page"]:not(.btn),
body[data-page="about"] .head-links > a[href*="about"]:not(.btn),
body[data-page="philanthropists"] .head-links > a[href*="philanthropists"]:not(.btn),
body[data-page="contact"] .head-links > a[href*="contact"]:not(.btn),
body[data-page="consultation"] .head-links > a[href*="consultation"]:not(.btn) {
  color: var(--accent-ink);
  position: relative;
}

.head-links > a[aria-current="page"]:not(.btn)::after,
body[data-page="about"] .head-links > a[href*="about"]:not(.btn)::after,
body[data-page="philanthropists"] .head-links > a[href*="philanthropists"]:not(.btn)::after,
body[data-page="contact"] .head-links > a[href*="contact"]:not(.btn)::after,
body[data-page="consultation"] .head-links > a[href*="consultation"]:not(.btn)::after {
  background: currentColor;
  bottom: -9px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.theme-dark .head-links > a[aria-current="page"]:not(.btn) {
  color: var(--brass-lt);
}

@keyframes page-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1080px) {
  body[data-page="philanthropists"] .phil {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body[data-page="about"] main > .about-band,
  body[data-page="philanthropists"] main > .phil-band,
  body[data-page="contact"] main > .contact-band,
  body[data-page="consultation"] main > .contact-band,
  body[data-page="consultation"] main > .band {
    padding-top: 104px;
  }

  body.standalone-page .band-head {
    gap: 18px;
    margin-bottom: 34px;
  }

  body.standalone-page .page-intro {
    margin-bottom: 44px;
    padding-inline: 16px;
  }

  body[data-page="about"] .about {
    gap: 28px;
  }

  body[data-page="about"] .portrait {
    margin-top: 24px;
    max-width: min(100%, 340px);
  }

  body[data-page="about"] .about-body p {
    font-size: 16px;
  }

  body[data-page="contact"] .contact-band::before,
  body[data-page="about"] .about-band::before,
  body[data-page="philanthropists"] .phil-band::before,
  body[data-page="consultation"] .contact-band::before {
    left: 16px;
    right: 16px;
    top: calc(var(--head-h) + 12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.standalone-page .page-intro {
    animation: none;
  }
}
