/* Inner pages (about.html, contact.html): same beige page, nav, type and footer as the home page, without the photo hero or the intro.
   Loads after style.css + foot.css. Layout echoes the home page's Overview: a small label column on the left, serif text on the right. */
body.pg { background: var(--wall); }
.pg .nav { background: linear-gradient(var(--wall) 55%, rgba(240, 235, 225, 0)); }
.linkgroup a[aria-current="page"] { color: var(--red-deep); }
.linkgroup a[aria-current="page"]::after { transform: scaleX(1); }

.pg main { width: min(calc(94 * var(--u)), 100% - 8vw); margin: 0 auto; padding-top: max(150px, calc(17 * var(--u))); }
.pg-kick { margin: 0 0 calc(1.6 * var(--u)); font-size: max(14px, calc(1.15 * var(--u))); font-weight: 700; color: var(--red-deep); }
.pg h1 { margin: 0; max-width: 14em; font-family: var(--display); font-weight: var(--dw); letter-spacing: var(--dls); line-height: 1.06; font-size: max(40px, calc(6.2 * var(--u) * var(--ds))); text-wrap: balance; }
.pg-lede { margin: calc(2.6 * var(--u)) 0 0; max-width: 34em; font-size: max(17px, calc(1.55 * var(--u))); line-height: 1.55; color: rgba(43, 45, 49, .8); }

/* ---------- about ---------- */
.pg-head { padding-bottom: calc(9 * var(--u)); }
.pg-row { display: grid; grid-template-columns: calc(94 * var(--u) * .3 + 3 * var(--u)) 1fr; gap: calc(3 * var(--u)); padding: calc(5 * var(--u)) 0 calc(7 * var(--u)); border-top: 1px solid rgba(43, 45, 49, .14); }
.pg-row h2 { margin: 0; font-family: var(--font); font-weight: 700; font-size: max(15px, calc(1.25 * var(--u))); letter-spacing: 0; }
.pg-text { max-width: 40em; }
.pg-text p, .pg-steps li { margin: 0 0 1.1em; font-family: var(--display); font-weight: 400; letter-spacing: var(--dls); font-size: max(19px, calc(2 * var(--u))); line-height: 1.42; color: rgba(43, 45, 49, .88); }
.pg-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.pg-steps li { counter-increment: s; position: relative; padding-left: 2.2em; }
.pg-steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: .1em; font-family: var(--display); font-size: .85em; color: var(--red-deep); }
.pg-steps b { font-weight: 600; color: var(--ink); }
.pg-grid { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: calc(1.6 * var(--u)); }
.pg-card { padding: calc(2.4 * var(--u)) calc(2.4 * var(--u)) calc(1.2 * var(--u)); border-radius: 18px; border: 1px solid rgba(43, 45, 49, .1); }
.pg-card.t1 { background: #f6e1da; } .pg-card.t2 { background: #dde9e7; } .pg-card.t3 { background: #efe6d6; } .pg-card.t4 { background: #f6f2ea; }
.pg-card h3 { margin: 0 0 .5em; font-family: var(--font); font-weight: 700; font-size: max(16px, calc(1.35 * var(--u))); }
.pg-card p { font-family: var(--font); letter-spacing: 0; font-size: max(15px, calc(1.25 * var(--u))); line-height: 1.5; color: rgba(43, 45, 49, .74); }
/* placeholder for founder portraits: three hand-cut blank cards in the card colours */
.pg-team { display: flex; gap: calc(1.4 * var(--u)); margin: calc(1 * var(--u)) 0 calc(3 * var(--u)); }
.pg-team span { width: calc(9 * var(--u)); min-width: 78px; aspect-ratio: 4 / 5; border: 1.5px dashed rgba(43, 45, 49, .35); border-radius: 14px 17px 13px 16px / 16px 13px 17px 14px; }
.pg-team span:nth-child(1) { background: #FFE3C2; transform: rotate(-2deg); } .pg-team span:nth-child(2) { background: #D9F2D0; transform: rotate(1.5deg); } .pg-team span:nth-child(3) { background: #D6E8FB; transform: rotate(-1deg); }
.pg-more { font-size: max(17px, calc(1.5 * var(--u))) !important; }
.pg-link { color: var(--red-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pg-link:hover { color: var(--ink); }

/* ---------- contact ---------- */
/* the About page's title slide (.ab-hero), then one row: label left, a bare form right — underlined fields, no card, one dark button */
.ct { padding-bottom: calc(12 * var(--u)); }
.pg-after > .pg-lede, .pg-after > .pg-head > .pg-lede { margin-top: 0; }
.ct-row { padding-top: calc(10 * var(--u)); }
.ct-row .ab-label { font-family: 'Newsreader', Georgia, serif; font-weight: 500; font-size: max(15px, calc(1.2 * var(--u))); }   /* the form uses the wordmark's face (Newsreader Medium) */
.ct-form { display: flex; flex-direction: column; }
.ct-form label { margin: 0; font-family: 'Newsreader', Georgia, serif; font-weight: 500; font-size: max(14px, calc(1.05 * var(--u))); color: rgba(43, 45, 49, .55); }
.ct-form input, .ct-form textarea { width: 100%; margin: 0 0 calc(2.6 * var(--u)); padding: .35em 0 .5em; border: 0; border-bottom: 1px solid rgba(43, 45, 49, .25); border-radius: 0; background: transparent;
  font: 500 max(17px, calc(1.3 * var(--u)))/1.4 'Newsreader', Georgia, serif; letter-spacing: 0; color: var(--ink); transition: border-color .2s; }
.ct-form textarea { resize: vertical; min-height: 4.2em; }
.ct-form input:focus, .ct-form textarea:focus { outline: none; border-bottom-color: var(--ink); }
.ct-send { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: calc(.6 * var(--u)); }
.ct-btn { appearance: none; border: 0; cursor: pointer; padding: .85em 2.2em; border-radius: 999px; background: var(--ink); color: #fff; font: 500 max(15px, calc(1.15 * var(--u))) 'Newsreader', Georgia, serif; transition: transform .2s, background .2s; }
.ct-btn:hover { background: #000; transform: translateY(-1px); }
.ct-btn:focus-visible { outline: 2px solid var(--red-deep); outline-offset: 3px; }
.ct-note { margin: 0; flex: 1 1 14em; font-size: max(14px, calc(1.05 * var(--u))); line-height: 1.45; }
.ct-note.err { color: var(--red-deep); } .ct-note.ok { color: rgba(43, 45, 49, .7); } .ct-note a { color: inherit; text-decoration: underline; }
.ct-direct { margin: calc(4 * var(--u)) 0 0; font-family: 'Newsreader', Georgia, serif; font-size: max(15px, calc(1.15 * var(--u))); color: rgba(43, 45, 49, .6); }
.ct-direct a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ct-direct a:hover { color: var(--red-deep); }

/* the home page footer has no top margin of its own on these pages */
.pg .foot { padding-top: calc(4 * var(--u)); }
.pg .foot-in { border-top: 1px solid rgba(43, 45, 49, .14); padding-top: calc(4.4 * var(--u)); }

@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .pg .nav { background: var(--wall); }
  .pg main { width: auto; margin: 0 6vw; padding-top: 112px; }
  .pg h1 { font-size: clamp(2.4rem, 10vw, 3.6rem); } .pg-lede { font-size: 1.1rem; }
  .pg-head { padding-bottom: 48px; }
  .pg-row { grid-template-columns: 1fr; gap: 14px; padding: 28px 0 40px; }
  .pg-text p, .pg-steps li { font-size: 1.25rem; }
  .pg-grid { grid-template-columns: 1fr; gap: 12px; } .pg-card { padding: 20px 20px 6px; } .pg-card p { font-size: 1rem; } .pg-card h3 { font-size: 1.05rem; }
  .ct { padding-bottom: 64px; } .ct-form input, .ct-form textarea { margin-bottom: 22px; font-size: 1.05rem; } .ct-direct { margin-top: 28px; }
  .pg .foot { padding-top: 24px; } .pg .foot-in { padding-top: 32px; }
}


/* ---------- sub-page entrance (radiatinghope.org's timeline; split in pages.js) ----------
   title: centred, its top ~17% of the page width down (their margin-top 17.2vw, size 6.4vw); lines rise 120% → 0 from 1s, 1.4s Power4.easeOut, .2s apart.
   then at 2s the nav, the rest of the page and the footer fade in together (.5s, opacity only, GSAP's default power1.out). */
.pg main { padding-top: max(130px, 17.2vw); }
.pg h1.pg-title { max-width: none; margin: 0 auto calc(8 * var(--u)); text-align: center; font-size: max(44px, 6.41vw); line-height: 1.08; }
.pg-title .ln { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.pg-title .li { display: block; }
.js .pg-title:not(.ready) { visibility: hidden; }
.js .pg-title.ready:not(.instant) .li { animation: pg-rise 1.4s cubic-bezier(.23, 1, .32, 1) calc(1s + var(--i) * .2s) both; }
.js .pg .nav, .js .pg-after, .js .pg .foot { animation: pg-fade .5s cubic-bezier(.25, .46, .45, .94) 2s both; }
@keyframes pg-rise { from { transform: translateY(120%); } to { transform: none; } }
@keyframes pg-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .js .pg-title .li, .js .pg .nav, .js .pg-after, .js .pg .foot { animation: none; } }
@media (max-width: 860px), (max-aspect-ratio: 1/1) { .pg main { padding-top: 120px; } .pg h1.pg-title { font-size: clamp(2.6rem, 11vw, 3.8rem); margin-bottom: 40px; } }

/* Credits is reached from the footer link (/about#credits): land it clear of the fixed nav */
#credits { scroll-margin-top: max(110px, calc(9 * var(--u))); }
.pg-notes p { font-family: var(--font); letter-spacing: 0; font-size: max(13px, calc(1.05 * var(--u))); line-height: 1.6; color: rgba(43, 45, 49, .6); }   /* the About page sources line */
.pg-text sup { font-size: .55em; line-height: 0; }
/* About, after radiatinghope.org/mission: rows with a small label at the left edge and the text filling the right half (no rules
   between them), statements at ~2.45u that darken word by word on scroll, a photo beside the founders' text. */
.ab { --gap: calc(4 * var(--u)); }
.pg main.ab { padding-top: 0; }
.pg:has(main.ab) .nav { background: none; }   /* the beige nav fade would cut a band across the glow */
/* title slide: full screen, title centred, a soft, diffuse coral glow, off to the corners, that slowly breathes */
.ab-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; isolation: isolate; }
.ab-hero::before, .ab-hero::after { content: ""; position: absolute; z-index: -1; left: 50%; pointer-events: none; }
.ab-hero::before { top: -15%; width: 100vw; height: 135%; transform: translateX(-50%); -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
  background: radial-gradient(ellipse 55% 60% at 26% 34%, rgba(244, 160, 128, .3), rgba(244, 160, 128, 0) 100%), radial-gradient(ellipse 60% 65% at 78% 70%, rgba(246, 186, 150, .32), rgba(246, 186, 150, 0) 100%), radial-gradient(ellipse 70% 55% at 55% 45%, rgba(242, 176, 150, .14), rgba(242, 176, 150, 0) 100%); }
.ab-hero::after { top: 8%; width: 96vw; aspect-ratio: 2; transform: translateX(-50%); border-radius: 50%; filter: blur(90px);
  background: radial-gradient(circle at 20% 35%, rgba(231, 120, 98, .2), transparent 55%), radial-gradient(circle at 82% 68%, rgba(242, 176, 120, .22), transparent 55%);
  animation: ab-breathe 9s ease-in-out infinite alternate; }
/* load order, as on radiatinghope.org: plain page → the glow blooms in (.35s) → the title rises (1s, pages.css) → nav and the rest fade (2s) */
.js .ab-hero::before { animation: ab-bloom 1.5s cubic-bezier(.25, .46, .45, .94) .35s both; }
.js .ab-hero::after { animation: ab-glow 1.5s cubic-bezier(.25, .46, .45, .94) .35s both, ab-breathe 9s ease-in-out 1.85s infinite alternate; }
@keyframes ab-bloom { from { opacity: 0; transform: translateX(-50%) scale(.86); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes ab-glow { from { opacity: 0; } to { opacity: .75; } }
@keyframes ab-breathe { from { transform: translateX(-50%) scale(.92); opacity: .75; } to { transform: translateX(-50%) scale(1.08); opacity: 1; } }
.pg main.ab h1.pg-title { margin: 0 auto; max-width: 10.5em; font-size: max(46px, 6.6vw); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }
.ab .pg-title .hl { color: inherit; }   /* titles stay one colour */
.ab-down { position: absolute; bottom: max(28px, 6vh); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; font-family: var(--font); font-size: max(15px, calc(1.15 * var(--u))); color: var(--ink); }
.js .ab-down { animation: pg-fade .5s cubic-bezier(.25, .46, .45, .94) 2s both; }
.ab-down svg { width: 1.15em; height: 1.15em; transition: transform .4s cubic-bezier(.23, 1, .32, 1); }
.ab-down:hover svg { transform: translateY(3px); }
.ab-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: calc(13 * var(--u)) 0 0; }
.ab-row + .ab-row { padding-top: calc(11 * var(--u)); }
.ab-label { margin: .55em 0 0; font-family: var(--font); font-size: max(14px, calc(1.12 * var(--u))); font-weight: 600; color: var(--ink); }
.ab-say p { margin: 0 0 1em; font-family: var(--font); font-weight: 500; font-size: max(22px, calc(2.45 * var(--u))); line-height: 1.25; letter-spacing: -.025em; color: var(--ink); }
.ab-say p:last-child { margin-bottom: 0; }
.ab sup { font-size: .5em; line-height: 0; letter-spacing: 0; }
.ab-say .w { opacity: var(--o, 1); transition: opacity .15s linear; }
.js .ab-say .w { --o: .16; }
.ab-text p { margin: 0 0 1.15em; font-family: var(--font); font-size: max(17px, calc(1.8 * var(--u))); line-height: 1.33; letter-spacing: -.02em; color: var(--ink); }
.ab-text p.ab-label { margin: 0 0 calc(2.6 * var(--u)); font-size: max(14px, calc(1.12 * var(--u))); letter-spacing: 0; }
.ab-text b { font-weight: 700; }
.ab-pair { display: grid; grid-template-columns: 1fr 1fr; gap: calc(9 * var(--u)); align-items: start; padding: calc(16 * var(--u)) 0 calc(4 * var(--u)); }
.ab-photo { margin: 0; border-radius: 16px; overflow: hidden; background: #e9e2d6; }
.ab-photo img { display: block; width: 100%; height: auto; }
.pg-end { margin-top: calc(12 * var(--u)); padding: calc(6 * var(--u)) 0 calc(4 * var(--u)); border-top: 1px solid rgba(43, 45, 49, .14); text-align: center; }
.pg-end h2 { margin: 0 0 calc(2 * var(--u)); font-family: var(--font); font-weight: 700; font-size: max(15px, calc(1.25 * var(--u))); letter-spacing: 0; }
.pg-end p { max-width: 46em; margin: 0 auto .8em; font-family: var(--font); font-size: max(13px, calc(1.05 * var(--u))); line-height: 1.6; color: rgba(43, 45, 49, .6); }
.pg-end sup { font-size: .7em; }
/* entrances (about.js adds .on): blocks fade up */
.js [data-up] { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(.25, .46, .45, .94), transform 1.2s cubic-bezier(.23, 1, .32, 1); }
.js [data-up].on { opacity: 1; transform: none; }
.js .ab-text[data-up] { transition-delay: .12s; }
@media (prefers-reduced-motion: reduce) { .js [data-up] { opacity: 1; transform: none; transition: none; } .js .ab-say .w { --o: 1; } .ab-hero::before, .ab-hero::after { animation: none !important; } }
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .ab-row, .ab-pair { grid-template-columns: 1fr; gap: 16px; }
  .ab-row { padding-top: 40px; } .ab-row + .ab-row { padding-top: 72px; }
  .ab-say p { font-size: 1.5rem; } .ab-text p { font-size: 1.1rem; }
  .ab-pair { gap: 28px; padding-top: 96px; }
  .pg main.ab h1.pg-title { font-size: clamp(2.7rem, 12vw, 4rem); max-width: 9em; margin: 0 auto; } .ab-hero::after { width: 140vw; }
  .pg-end { margin-top: 72px; padding: 36px 0 24px; }
}
