/* ==========================================================================
   CMWIM — Canadian Muslim Women in Medicine
   Brand: cream #FEFAE7 / red #BD3232 / warm ink #3D1F1D, sampled from the logo.
   Display face is Kelin Eator (commercial, self-hosted once licensed);
   Bodoni Moda stands in until the .woff2 files land.
   ========================================================================== */

/* Drop the licensed files in assets/fonts/ and this starts working.
@font-face {
  font-family: "Kelin Eator";
  src: url("../fonts/KelinEator.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
*/

:root {
  --cream:      #FEFAE7;
  --cream-deep: #F8F0D6;
  --cream-warm: #F3E8CC;
  --red:        #BD3232;
  --red-dark:   #98262A;
  --red-soft:   #E8BBB2;
  --ink:        #3D1F1D;
  --ink-mid:    #6B5C4E;
  --ink-soft:   #9A8C7A;
  --line:       #E4D7B6;

  --display: "Kelin Eator", "Bodoni Moda", Didot, "Playfair Display", Georgia, serif;
  --body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --ease: cubic-bezier(.22,.68,.32,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 .4em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--red); text-underline-offset: 4px; text-decoration-thickness: 1px; }

img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 0; top: 0; z-index: 200; transform: translateY(-120%);
  background: var(--red); color: var(--cream); padding: .8rem 1.3rem; font-weight: 700;
  text-decoration: none; border-radius: 0 0 6px 0;
}
.skip-link:focus { transform: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.wrap-tight { max-width: 780px; }

/* ---------------------------------------------------------- header ------ */

.site-head {
  position: sticky; top: 0; z-index: 90;
  background: rgba(254, 250, 231, .92);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-in { display: flex; align-items: center; gap: 1.1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.site-head .brand img { display: block; width: 112px; height: auto; max-height: 40px; object-fit: contain; flex: none; }
.nav { display: flex; align-items: center; gap: .2rem; }
.nav a {
  padding: .5rem .75rem; font-size: .95rem; font-weight: 500;
  color: var(--ink-mid); text-decoration: none; transition: color .15s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--red); }
.nav a.act { color: var(--cream); padding: .8rem 1.4rem; margin-left: .6rem; }
.nav a.act:hover { color: var(--cream); background: var(--red-dark); }
.nav-toggle { display: none; width: 46px; height: 46px; background: none; border: 1px solid var(--line); cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 20px; height: 1.5px; margin: 5px auto; background: currentColor; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: .5rem clamp(1.25rem,4vw,2.5rem) 1.25rem;
  }
  .nav:not(.open) { display: none; }
  .nav a { padding: .85rem .25rem; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav .act { margin-top: .75rem; text-align: center; }
}

/* ------------------------------------------------------------ act ------- */

.act {
  display: inline-block; padding: .8rem 1.6rem;
  background: var(--red); color: var(--cream); text-decoration: none;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  transition: background-color .18s var(--ease);
}
.act:hover { background: var(--red-dark); color: var(--cream); }
.act-line {
  display: inline-block; padding: .8rem 0; color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: .95rem;
  border-bottom: 2px solid var(--red);
  transition: color .18s var(--ease);
}
.act-line:hover { color: var(--red); }
.band-red .act-line { color: var(--cream); border-bottom-color: var(--red-soft); }
.band-red .act-line:hover { color: #fff; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem; margin-top: 2.2rem; }
.section-heading-link:link,
.section-heading-link:visited,
.section-heading-link:hover,
.section-heading-link:active { color: inherit; text-decoration: none; }
.band-red .section-heading-link:link,
.band-red .section-heading-link:visited,
.band-red .section-heading-link:hover,
.band-red .section-heading-link:active { color: var(--cream); }
.section-route { margin-top: 2rem; }
.video-embed { margin-top: clamp(1.5rem, 4vw, 2.5rem); aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.video-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ----------------------------------------------------------- hero ------- */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: none; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero-lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-mid); max-width: 42ch; margin-top: 1.4rem; }

.arc { position: relative; height: 668px; }
.arc-face {
  position: absolute; width: clamp(104px, 9vw, 122px) !important; height: clamp(104px, 9vw, 122px) !important;
  border-radius: 50%; object-fit: cover; object-position: 50% 38%;
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 5.5px var(--line);
}
.js .arc-face { animation: rise .7s var(--ease) backwards; }
.arc-face:hover { box-shadow: 0 0 0 4px var(--cream), 0 0 0 5.5px var(--red); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.94); } }
.arc-crescent { position: absolute; inset: 0; z-index: -1; }

@media (max-width: 940px) {
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; }
  .arc {
    width: 100%; height: auto; margin-top: 1rem;
    display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .65rem;
  }
  .arc-face {
    position: static; justify-self: center;
    width: clamp(68px, 9vw, 92px) !important; height: clamp(68px, 9vw, 92px) !important;
    transform: none; transform-origin: center;
  }
}

/* ---------------------------------------------------------- bands ------- */

.band { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.band-warm { background: var(--cream-deep); border-block: 1px solid var(--line); }
.band-red { background: var(--red); color: var(--cream); }
.band-red h2 { color: var(--cream); }
.band-ink { background: var(--ink); color: var(--cream-warm); }

.kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--red); margin: 0 0 1rem;
}
.band-red .kicker, .band-ink .kicker { color: var(--red-soft); }

/* organizational partners — a continuous logo rail */
.partners-section { overflow: hidden; }
.partners-section h2 { margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.partner-marquee { overflow: hidden; }
.partner-row { display: flex; width: max-content; animation: partner-scroll 28s linear infinite; }
.partner-marquee:hover .partner-row { animation-play-state: paused; }
.partner-logo {
  width: clamp(17rem, 26vw, 22rem); min-height: 11.5rem; padding: 1.8rem 2.25rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem;
  color: var(--ink); text-align: center; text-decoration: none;
}
.partner-logo img { width: 100%; max-width: 12.5rem; height: 7rem; object-fit: contain; mix-blend-mode: multiply; }
.partner-logo img.partner-logo-square { width: 7.5rem; height: 7.5rem; }
.partner-logo img.partner-logo-tall { width: 7.5rem; height: 8rem; }
.partner-logo strong { font-family: var(--body); font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1; letter-spacing: -.04em; }
.partner-logo strong i { display: block; margin-top: .45rem; font-size: .35em; font-style: normal; letter-spacing: .45em; text-transform: uppercase; }
.partner-logo span { max-width: 24ch; color: var(--ink-soft); font-size: .76rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .08em; }
.partner-pending { opacity: .64; }
a.partner-logo:hover { color: var(--red); }
@keyframes partner-scroll { to { transform: translateX(-50%); } }

/* pull quote — replaces the "who we are" card */
.quote { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.quote blockquote {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.35rem); line-height: 1.22; color: var(--ink);
}
.quote blockquote span { color: var(--red); font-style: italic; }
.quote-body { color: var(--ink-mid); font-size: 1.03rem; }

/* the six offerings — a warm ruled list, not an icon-card grid */
.offer { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); gap: 0 clamp(2rem, 5vw, 4rem); }
.offer-item { display: flex; gap: 1.1rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.offer-item svg { flex: none; margin-top: .5rem; }
.offer-item h3 { margin-bottom: .25em; }
.offer-item p { color: var(--ink-mid); font-size: .97rem; margin: 0; }

/* two ways in */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: clamp(1.25rem, 3vw, 2rem); margin-top: 2.5rem; }
.way { border: 1px solid rgba(254,250,231,.42); padding: clamp(1.75rem, 3vw, 2.5rem); }
.way h3 { color: var(--cream); font-size: clamp(1.5rem, 2.6vw, 2rem); }
.way p { color: var(--red-soft); font-size: 1rem; }
.way-solid { background: var(--cream); border-color: var(--cream); color: var(--ink); }
.way-solid li { color: var(--ink); }
.way-solid .act-line { color: var(--red); border-bottom-color: var(--red); }
.way-solid h3 { color: var(--red); }
.way-solid p { color: var(--ink-mid); }
.way ul { list-style: none; margin: 1.1rem 0 0; padding: 0; font-size: .95rem; }
.way li { padding: .45rem 0; border-top: 1px solid rgba(254,250,231,.24); }
.way-solid li { border-top-color: var(--line); }
.way .act-line { color: inherit; border-bottom-color: currentColor; margin-top: 1.2rem; }

/* chapters */
.chapters { display: flex; flex-wrap: wrap; gap: 0 2.4rem; }
.chapter { padding: .9rem 0; border-bottom: 1px solid var(--line); flex: 1 1 13rem; }
.chapter b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; display: block; }
.chapter span { font-size: .82rem; color: var(--ink-soft); letter-spacing: .06em; text-transform: uppercase; }

/* events */
.event { display: grid; grid-template-columns: 11rem 1fr; gap: 1.5rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.event > div:first-child { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); padding-top: .35rem; }
.event h3 { margin-bottom: .2em; }
.event p { color: var(--ink-mid); font-size: .97rem; margin: 0; }
@media (max-width: 640px) { .event { grid-template-columns: 1fr; gap: .4rem; } }

/* footer */
.site-foot { background: var(--ink); color: var(--cream-warm); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: .95rem; }
.foot-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.5fr) repeat(auto-fit, minmax(8.5rem, 1fr)); }
.site-foot h4 { font-family: var(--body); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red-soft); margin: 0 0 1rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .55rem; }
.site-foot a { color: var(--cream-warm); text-decoration: none; overflow-wrap: break-word; word-break: normal; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.social-links a { display: inline-flex; align-items: center; gap: .65rem; }
.social-links svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--red-soft); }
.social-links a:hover svg { color: #fff; }
.site-foot .brand b { max-width: 18rem; font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 400; line-height: 1.2; letter-spacing: .01em; color: var(--cream); }
.site-foot .brand b span { display: block; margin-top: .3rem; font-family: var(--body); font-size: .48em; font-weight: 700; letter-spacing: .16em; color: var(--red-soft); }
.foot-end { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(254,250,231,.16); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem; color: var(--ink-soft); }

@media (max-width: 760px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.5rem; }
  .foot-grid > :first-child, .foot-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; line-height: 1.62; }
  .wrap { padding-inline: 1.15rem; }
  .head-in { min-height: 62px; }
  .site-head .brand img { width: 104px; max-height: 37px; }
  .nav-toggle { width: 44px; height: 44px; }
  .nav { max-height: calc(100dvh - 62px); overflow-y: auto; }

  .hero { padding-block: 2.5rem 3rem; }
  .hero-grid { gap: 1.75rem; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
  .hero-lede { margin-top: 1rem; }
  .hero .acts { flex-direction: column; align-items: stretch; gap: .75rem; margin-top: 1.6rem; }
  .hero .acts .act, .hero .acts .act-line { width: 100%; text-align: center; }
  .arc { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem .5rem; margin-top: .25rem; }
  .arc-face { position: static; width: min(20vw, 78px) !important; height: min(20vw, 78px) !important; }

  .band { padding-block: 3rem; }
  .hairline { gap: .7rem; }
  .hairline::before { width: 1.25rem; }
  .quote { grid-template-columns: 1fr; gap: 1.5rem; }
  .ways { margin-top: 1.75rem; }
  .way { padding: 1.4rem; }
  .bio-in { flex-direction: column; }

  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  .foot-grid > :first-child, .foot-grid > :last-child { grid-column: auto; }
  .site-foot { padding-top: 2.75rem; }
  .foot-end { margin-top: 2.25rem; }
  .social-links a { max-width: 100%; }
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .arc-face { opacity: 1; transform: none; animation: none; } }

/* ------------------------------------------------------ photography ----- */

.photo-band { position: relative; }
.photo-band img { width: 100%; height: clamp(20rem, 42vw, 34rem); object-fit: cover; object-position: 50% 34%; }
.photo-cap {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); padding-top: .9rem;
}

.said { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.said blockquote {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.7rem); line-height: 1.18; color: var(--ink);
}
.said blockquote em { font-style: italic; color: var(--red); }
@media (max-width: 860px) { .said { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1rem; margin-top: 2rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { font-size: .82rem; color: var(--ink-soft); padding-top: .6rem; letter-spacing: .04em; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0 clamp(1.5rem, 3vw, 2.75rem); margin-top: 2rem; }
.pillar { padding: 1.5rem 0; border-top: 2px solid var(--red); }
.pillar h3 { margin-bottom: .35em; }
.pillar p { color: var(--ink-mid); font-size: .97rem; margin: 0; }
a.pillar { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
a.pillar b { margin-top: 1rem; color: var(--red); font-size: .85rem; }

/* buttons that sit on the red field — .act's own red would vanish there */
.act-cream { background: var(--cream); color: var(--red); }
.act-cream:hover { background: #fff; color: var(--red-dark); }
.way .act, .way .act-cream { margin-top: 1.4rem; }
.way-solid .act { background: var(--red); color: var(--cream); }
.way-solid .act:hover { background: var(--red-dark); color: var(--cream); }

/* =========================================================== motion ===== */

/* hidden only when JS is running, so the page is never blank without it */
.js [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].seen { opacity: 1; transform: none; }

/* hero enters as a sequence rather than all at once */
.hero-line { display: block; overflow: hidden; }
@media (min-width: 941px) { .hero-line { white-space: nowrap; } }
.hero-line > span { display: block; }
.js .hero-line > span { transform: translateY(105%); animation: lineUp .9s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes lineUp { to { transform: none; } }

.site-head { transition: box-shadow .3s var(--ease), min-height .3s var(--ease); }
.site-head.stuck { box-shadow: 0 1px 0 var(--line), 0 8px 30px rgba(61,31,29,.07); }
.site-head.stuck .head-in { min-height: 62px; }

/* buttons: the arrow moves, the button does not jump */
.act, .act-line { position: relative; }
.act-line span { display: inline-block; transition: transform .25s var(--ease); }
.act-line:hover span { transform: translateX(5px); }
.act { overflow: hidden; }
.act::after {
  content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.16);
  transform: translateX(-101%); transition: transform .35s var(--ease);
}
.act:hover::after { transform: none; }

/* pillars: the rule draws itself in */
.pillar { position: relative; border-top: 2px solid var(--line); transition: border-color .3s var(--ease); }
.pillar::before {
  content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0;
  background: var(--red); transition: width .5s var(--ease);
}
.pillar.seen::before { width: 100%; transition-delay: calc(var(--d, 0ms) + 180ms); }
.pillar h3 { transition: color .25s var(--ease); }
.pillar:hover h3 { color: var(--red); }

/* photo band: slow drift, plus a scrim so type can sit on it */
.photo-band { position: relative; overflow: hidden; }
.js .photo-band img { transform: scale(1.06); transition: transform 1.6s var(--ease); }
.js .photo-band.seen img { transform: scale(1); }
.photo-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(61,31,29,.86) 0%, rgba(61,31,29,.34) 42%, rgba(61,31,29,.06) 72%);
}
.photo-say {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.photo-say p {
  font-family: var(--display); font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.2; color: var(--cream); max-width: 20ch; margin: 0;
}
.photo-say p em { font-style: italic; color: #F0BDB4; }

/* chapters as a slow marquee instead of a static grid of eight boxes */
.marquee { overflow: hidden; padding-block: .5rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { display: flex; width: max-content; animation: slide 38s linear infinite; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.marquee-row > span {
  font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.5rem);
  padding: 0 1.5rem; color: var(--ink); white-space: nowrap; opacity: .55;
  transition: opacity .3s var(--ease), color .3s var(--ease);
}
.marquee-row > span:hover { opacity: 1; color: var(--red); }
.marquee-row > i { align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--red); opacity: .5; flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }

/* gallery hover */
.gallery figure { overflow: hidden; }
.gallery img { transition: transform .7s var(--ease); }
.gallery figure:hover img { transform: scale(1.05); }

/* portraits drift gently once they have arrived */
.arc-face { transition: box-shadow .3s var(--ease), transform .4s var(--ease); }
.arc-face:hover { transform: scale(1.07); z-index: 3; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero-line > span { transform: none; animation: none; }
  .photo-band img { transform: none; }
  .marquee-row { animation: none; }
}

/* =================================================== watermelon port ====
   Motion mechanics adapted from Watermelon Platform (MIT), translated from
   React + Framer Motion to plain CSS and JS, and recoloured to CMWIM.
   github.com/WatermelonCorp/watermelon-platform
   ======================================================================== */

:root { --wm-ease: cubic-bezier(.16, 1, .3, 1); }

/* their reveal adds a blur to the fade, which reads softer than a plain fade */
.js [data-reveal] {
  opacity: 0; transform: translateY(20px); filter: blur(4px);
  transition: opacity .85s var(--wm-ease), transform .85s var(--wm-ease), filter .85s var(--wm-ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].seen { opacity: 1; transform: none; filter: blur(0); }

/* scroll progress, spring-smoothed in JS */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--red); z-index: 200; pointer-events: none;
}

/* hero atmosphere: dot grid, warm glow, technical frame */
.hero { position: relative; overflow: hidden; }
.hero-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(61,31,29,.16) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 40% 45%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 40% 45%, #000 10%, transparent 75%);
}
.hero-glow {
  position: absolute; top: 42%; left: 30%; width: 640px; height: 420px;
  transform: translate(-50%, -50%); pointer-events: none; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(189,50,50,.10) 0%, rgba(189,50,50,.04) 42%, transparent 70%);
  animation: glowIn 1.5s var(--wm-ease) both .3s;
}
@keyframes glowIn { from { opacity: 0; transform: translate(-50%,-50%) scale(.8); } }

.hero-frame { position: absolute; inset: 0; pointer-events: none; }
.hero-frame i { position: absolute; background: var(--line); }
.hero-frame .h { left: 0; right: 0; height: 1px; }
.hero-frame .v { top: 0; bottom: 0; width: 1px; }
.hero-frame .x { width: 13px; height: 13px; background: none; }
.hero-frame .x::before, .hero-frame .x::after { content: ""; position: absolute; background: var(--red); opacity: .55; }
.hero-frame .x::before { left: 0; right: 0; top: 50%; height: 1px; }
.hero-frame .x::after  { top: 0; bottom: 0; left: 50%; width: 1px; }
@media (max-width: 1100px) { .hero-frame { display: none; } }

/* the tagline highlight walks across the three words */
.tagline { display: inline-flex; gap: .55rem; align-items: center; }
.tagline b {
  font-weight: 700; color: var(--ink-soft);
  transition: color .45s var(--wm-ease), filter .45s var(--wm-ease), transform .45s var(--wm-ease);
}
.tagline b.lit { color: var(--red); transform: translateY(-1px); }
.tagline i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-soft); opacity: .6; }

/* their press state and diagonal arrow */
.act:active, .act-line:active { transform: scale(.97); }
.act, .act-line { transition: transform .15s var(--wm-ease), background-color .18s var(--ease), color .18s var(--ease); }
.act-line:hover span { transform: translate(4px, -3px); }

/* label between hairlines */
.hairline { display: flex; align-items: center; gap: 1rem; }
.hairline::before, .hairline::after { content: ""; height: 1px; background: var(--line); }
.hairline::before { width: 2rem; flex: none; }
.hairline::after { flex: 1; }

/* portraits raise above their neighbours on hover */
.arc-face:hover { transform: scale(1.06); z-index: 20; box-shadow: 0 0 0 4px var(--cream), 0 0 0 5.5px var(--red), 0 14px 34px rgba(61,31,29,.2); }

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .progress { animation: none; }
  .js [data-reveal] { filter: none; }
}

/* ============================================================= team ===== */

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; }
.page-head p { color: var(--ink-mid); max-width: 52ch; margin-top: .8rem; }

.team-directory { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.team-directory-label {
  margin-bottom: .8rem; color: var(--red); font-size: .76rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.chapter-jumps { display: flex; flex-wrap: wrap; gap: .65rem; }
.chapter-jumps a {
  display: inline-flex; align-items: center; gap: .5rem; padding: .58rem 1rem;
  border: 1px solid var(--line); border-radius: .7rem;
  background: var(--cream-deep); color: var(--ink-mid);
  font-size: .86rem; line-height: 1.2; text-decoration: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.chapter-jumps a span { width: .38rem; height: .38rem; flex: none; border-radius: 50%; background: var(--red); }
.chapter-jumps a:hover { background: var(--cream-warm); border-color: var(--red-soft); color: var(--ink); transform: translateY(-1px); }
.chapter-jumps a.chapter-start { background: var(--red); border-color: var(--red); color: var(--cream); font-weight: 700; }
.chapter-jumps a.chapter-start span { width: auto; height: auto; border-radius: 0; background: none; transition: transform .18s var(--ease); }
.chapter-jumps a.chapter-start:hover { background: var(--red-dark); border-color: var(--red-dark); }
.chapter-jumps a.chapter-start:hover span { transform: translate(3px, -2px); }
.team-directory-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; margin-top: 1.25rem; }
.team-directory-actions > span { color: var(--ink-mid); font-size: .95rem; }
.team-directory-actions .act { text-align: center; }

.roster { padding-block: clamp(2rem, 4vw, 3rem); scroll-margin-top: 5.5rem; }
.roster + .roster { padding-top: 0; }
.roster-label { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.roster-label span { font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
.roster-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.faces { display: flex; flex-wrap: wrap; gap: clamp(1.75rem, 3.5vw, 3rem); }
.face {
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  width: 12rem; font-family: inherit; color: inherit;
}
.face img {
  width: 164px; height: 164px; border-radius: 50%; object-fit: cover; object-position: 50% 38%;
  box-shadow: 0 0 0 4px var(--cream), 0 0 0 5.5px var(--line);
  transition: box-shadow .28s var(--wm-ease), transform .28s var(--wm-ease);
}
.face img[src*="amena_calgary"], .arc-face[src*="amena_calgary"] { object-position: 50% 32%; }
.face img[src*="taifa_western"], .arc-face[src*="taifa_western"] { object-position: 50% 25%; }
.face:hover img { transform: scale(1.05); box-shadow: 0 0 0 4px var(--cream), 0 0 0 5.5px var(--red); }
.face[aria-expanded="true"] img { box-shadow: 0 0 0 4px var(--cream), 0 0 0 6px var(--red); transform: scale(1.05); }
.face b { font-weight: 500; font-size: .9rem; line-height: 1.25; text-align: center; }
.face i { font-style: normal; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 500px) {
  .chapter-jumps { gap: .5rem; }
  .chapter-jumps a { flex: 1 1 calc(50% - .5rem); padding: .55rem .7rem; }
  .chapter-jumps a.chapter-start { flex-basis: 100%; }
  .team-directory-actions { flex-direction: column; }
  .team-directory-actions > span { width: 100%; }
  .team-directory-actions .act { width: 100%; }
  .faces { gap: 1.5rem .75rem; justify-content: space-between; }
  .face { width: calc(50% - .5rem); }
  .face img { width: 142px; height: 142px; }
}

.bio {
  overflow: hidden; max-height: 0;
  transition: max-height .5s var(--wm-ease), opacity .35s var(--wm-ease), margin .5s var(--wm-ease);
  opacity: 0; margin-top: 0;
}
.bio.open { max-height: 80rem; opacity: 1; margin-top: 1.6rem; }
.bio-in { display: flex; gap: 1.25rem; background: var(--cream-deep); border-left: 4px solid var(--red); padding: clamp(1.25rem, 3vw, 1.9rem); }
.bio-in h3 { margin-bottom: .15em; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.bio-in .role { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.bio-in p { color: var(--ink-mid); margin: .8rem 0 0; font-size: 1rem; white-space: pre-line; }
.bio-close {
  appearance: none; background: none; border: 1px solid var(--line); color: var(--ink-mid);
  font-family: inherit; font-size: .8rem; padding: .4rem .8rem; cursor: pointer; align-self: flex-start;
}
.bio-close:hover { border-color: var(--red); color: var(--red); }

/* =========================================================== events ===== */

.archive { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(1.5rem, 4vw, 2.5rem); padding: clamp(1.5rem, 3vw, 2.25rem) 0; border-bottom: 1px solid var(--line); align-items: start; }
.archive img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.archive img.event-natural { aspect-ratio: auto; object-fit: contain; }
.archive h3 { margin-bottom: .2em; }
.archive p { color: var(--ink-mid); font-size: .97rem; margin: 0; }
.archive .meta { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: .5rem; }
.archive-text { grid-template-columns: 1fr; padding-left: clamp(0rem, 3vw, 2.5rem); }
.archive-text > div { max-width: 58rem; }
@media (max-width: 720px) { .archive { grid-template-columns: 1fr; } }

.initiative { border-top: 2px solid var(--red); padding-top: 1.2rem; }
.initiative h3 { margin-bottom: .25em; }
.initiative p { color: var(--ink-mid); font-size: .95rem; margin: 0; }

/* ======================================================== resources ===== */

.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.resource-card { min-height: 18rem; padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; flex-direction: column; color: var(--ink); text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .25s var(--ease); }
.resource-card:hover { background: var(--cream-deep); color: var(--ink); }
.resource-card > span { color: var(--red); font-size: .75rem; font-weight: 700; letter-spacing: .16em; }
.resource-card h2 { margin-top: auto; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.resource-card p { max-width: 42ch; color: var(--ink-mid); font-size: .96rem; }
.resource-card b { color: var(--red); font-size: .9rem; }
@media (max-width: 700px) { .resource-grid { grid-template-columns: 1fr; } .resource-card { min-height: 15rem; } }
.resource-feature { margin-top: 2rem; padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; color: var(--ink); text-decoration: none; background: var(--cream); border-left: 4px solid var(--red); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.resource-feature:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 16px 35px rgba(61,31,29,.09); }
.resource-feature > div > span { color: var(--red); font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.resource-feature h2 { margin-top: .7rem; font-size: clamp(1.65rem, 3vw, 2.45rem); }
.resource-feature p { color: var(--ink-mid); margin: 0; }
.resource-feature > b { flex: none; color: var(--red); font-size: .9rem; }
.resource-feature + .resource-feature { margin-top: 1.25rem; }
@media (max-width: 640px) { .resource-feature { align-items: flex-start; flex-direction: column; } }

/* ====================================================== mentorship ===== */

.accordion { margin-top: 2rem; }
.accordion-item { border: 1px solid var(--line); background: var(--cream); }
.accordion-item h3 { margin: 0; }
.accordion-trigger { width: 100%; min-height: 5.5rem; padding: 1.35rem clamp(1.25rem, 3vw, 2rem); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; appearance: none; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font: inherit; }
.accordion-trigger span { font-family: var(--display); font-size: clamp(1.3rem, 2.5vw, 1.75rem); }
.accordion-trigger i { position: relative; width: 1.4rem; height: 1.4rem; flex: none; }
.accordion-trigger i::before, .accordion-trigger i::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; background: var(--red); transition: transform .25s var(--ease); }
.accordion-trigger i::after { transform: rotate(90deg); }
.accordion-trigger:hover, .accordion-item.is-open .accordion-trigger { color: var(--red); background: var(--cream-deep); }
.accordion-item.is-open .accordion-trigger { border-bottom: 1px solid var(--line); }
.accordion-item.is-open .accordion-trigger i::after { transform: rotate(0); }
.accordion-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; }
.accordion-panel > .template-body { overflow: hidden; }
.template-body { max-width: 58rem; padding: 0 clamp(1.5rem, 4vw, 2.75rem); margin: 0; border-left: 4px solid transparent; }
.accordion-item.is-open .template-body { padding-block: clamp(1.5rem, 4vw, 2.75rem); border-left-color: var(--red); }
.template-body p { color: var(--ink-mid); }
.template-body mark { padding: .05em .3em; background: var(--cream-warm); color: var(--red-dark); border-bottom: 1px solid var(--red-soft); }
.template-body a { overflow-wrap: anywhere; }

/* ========================================================== contact ===== */

.reach { display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: padding-left .25s var(--wm-ease); }
.reach:hover { padding-left: .6rem; }
.reach svg { flex: none; color: var(--red); }
.reach b { display: block; font-size: 1.05rem; font-weight: 500; }
.reach span { font-size: .92rem; color: var(--ink-soft); }
.reach em { margin-left: auto; font-style: normal; color: var(--red); }

@media (max-width: 640px) {
  .bio-in { flex-direction: column; }
  .reach { align-items: flex-start; }
  .reach > span { min-width: 0; overflow-wrap: anywhere; }
  .reach em { margin-left: 0; }
}
