/* IFEW website. Warm cream + IFEW navy/teal; layout inspired by bayyinah.com */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("../fonts/rubik-normal.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Amiri"; src: url("../fonts/amiri-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --cream: #fbf4ea;
  --cream-2: #f4e8d6;
  --paper: #fffaf3;
  --navy: #00304f;
  --navy-2: #00233a;
  --cyan: #5bc8da;
  --cyan-bright: #6bebff;
  --cyan-wash: #d9f1f5;
  --pop: #ffb84d;        /* warm amber: the contrast colour against navy/teal */
  --pop-hover: #ffca76;
  --pop-deep: #b45309;   /* readable version for small text on cream */
  --teal: #176e7e;
  --leaf: #2a9aab;       /* logo letter teal */
  --leaf-dark: #2b6a7a;  /* logo leaf teal */
  --ink: #10222f;
  --muted: #4a5e6b;
  --line: rgba(0, 48, 79, 0.14);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Rubik", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --arabic: "Amiri", "Geeza Pro", "Noto Naskh Arabic", serif;

  --radius: 28px;
  --radius-sm: 18px;
  --wrap: 1140px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--navy); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h3 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.2; }
p { margin: 0 0 1em; }
em, .accent { font-style: italic; color: var(--teal); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-block;
  font: 500 0.78rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 0 100% 0 100%; background: var(--pop); margin-right: 0.7em; vertical-align: 0.02em; }
.on-dark .eyebrow, .dark .eyebrow { color: var(--cyan); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40rem; }
.center .lead { margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font: 500 1rem/1 var(--sans);
  padding: 0.95em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn::after { content: "→"; transition: transform 0.2s ease; }
.btn:hover::after { transform: translateX(4px); }
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-cyan { background: var(--cyan); color: var(--navy-2); }
.btn-cyan:hover { background: var(--cyan-bright); color: var(--navy-2); }
.btn-pop { background: var(--pop); color: var(--navy-2); }
.btn-pop:hover { background: var(--pop-hover); color: var(--navy-2); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }
.btn-sm { padding: 0.7em 1.2em; font-size: 0.95rem; }

/* Announcement bar */

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand img { height: 60px; width: auto; mix-blend-mode: multiply; } /* logo file has a white background; multiply lets the cream show through */
.nav { display: flex; align-items: center; gap: 2rem; }
.nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav a:not(.btn) { color: var(--navy); text-decoration: none; font-weight: 500; font-size: 0.97rem; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { border-bottom-color: var(--pop); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--navy); }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 26px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform 0.25s ease, background 0.25s ease; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -8px; }
.nav-toggle span::after { top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
    display: none;
  }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li a:not(.btn) { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav .btn { margin-top: 1rem; justify-content: center; }
}

/* Patterns */
.pattern { position: relative; isolation: isolate; overflow: hidden; }
.pattern::before {
  content: ""; position: absolute; inset: -96px; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96' fill='none' stroke='%231b7f90' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'><path transform='translate(24 24) rotate(45)' d='M0 -15C10 -8 10 8 0 15C-10 8 -10 -8 0 -15ZM0 -15V15'/><path transform='translate(72 72) rotate(45)' d='M0 -15C10 -8 10 8 0 15C-10 8 -10 -8 0 -15ZM0 -15V15'/><path transform='translate(72 24) rotate(-45)' d='M0 -15C10 -8 10 8 0 15C-10 8 -10 -8 0 -15ZM0 -15V15'/><path transform='translate(24 72) rotate(-45)' d='M0 -15C10 -8 10 8 0 15C-10 8 -10 -8 0 -15ZM0 -15V15'/></svg>");
  background-size: 96px 96px;
  opacity: 0.1;
}
.pattern.light::before { opacity: 0.12; }
.dark.pattern::before { filter: brightness(2.4); opacity: 0.1; }

/* Hero */
.hero { position: relative; padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); text-align: center; }
.hero h1 { margin-inline: auto; max-width: 14ch; }
.hero h1 .accent { display: block; width: fit-content; margin-inline: auto; background: linear-gradient(var(--pop), var(--pop)) 0 94% / 100% 0.1em no-repeat; padding-bottom: 0.08em; }
.hero .lead { margin: 1.25rem auto 0; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; padding-bottom: clamp(3rem, 6vw, 5rem); }
.panel {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius) 8px var(--radius) 8px;
  padding: clamp(1.75rem, 4vw, 3rem);
  text-align: center;
  min-height: 460px;
  display: flex; flex-direction: column; align-items: center;
}
.panel h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); max-width: 14ch; }
.panel h2 .accent { display: block; }
.panel p { max-width: 30ch; margin-inline: auto; }
.panel .btn { margin-top: 0.5rem; }
.panel.dark { background: var(--navy); color: #d6e6ee; padding-bottom: 13.5rem; }
.panel.dark h2 { color: var(--cream); }
.panel.dark h2 .accent { color: var(--cyan-bright); }
.panel.soft { background: var(--cyan-wash); }

/* Concentric arches (the arc from the IFEW brochure cover) */
.arches { position: absolute; left: 50%; bottom: 0; width: min(72%, 300px); aspect-ratio: 1 / 0.6; transform: translateX(-50%); z-index: -1; }
.arches i { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); border: 12px solid var(--cyan); border-bottom: 0; border-radius: 999px 999px 0 0; }
.arches i:nth-child(1) { width: 100%; height: 100%; opacity: 1; }
.arches i:nth-child(2) { width: 76%; height: 76%; opacity: 0.7; }
.arches i:nth-child(3) { width: 52%; height: 52%; opacity: 0.45; }
.arches i:nth-child(4) { width: 28%; height: 28%; border-color: var(--pop); }
.panel .arches ~ * { position: relative; }

.price-tag { margin-top: auto; padding-top: 1.5rem; }
.price-tag .pt-line { margin: 0 0 0.5rem; font: 400 1.05rem var(--sans); color: var(--ink, var(--navy)); }
.price-tag .pt-line strong { font: 500 1.7rem/1 var(--serif); color: var(--navy); letter-spacing: -0.01em; background: linear-gradient(var(--pop), var(--pop)) 0 92% / 100% 0.1em no-repeat; }
.price-tag .pt-line i { font-style: normal; color: var(--leaf); font-weight: 600; margin-inline: 0.15em; }
.price-tag .pt-note { margin: 0; color: var(--muted); font-size: 0.98rem; }

@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; }
  .panel { min-height: 420px; }
}

/* Verse band */
.verse { background: var(--cream-2); padding: clamp(3rem, 7vw, 5.5rem) 0; text-align: center; }
.verse .ar { font: 400 clamp(2rem, 5vw, 3.2rem)/1.9 var(--arabic); color: var(--navy); margin: 0 0 1rem; direction: rtl; }
.verse .tr { font: italic 400 clamp(1.15rem, 2.4vw, 1.5rem)/1.5 var(--serif); color: var(--navy); max-width: 32rem; margin: 0 auto 0.75rem; }
.verse .ref { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.08em; margin: 0; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head.center { max-width: 44rem; margin-inline: auto; }

/* Program cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius) 8px var(--radius) 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
a.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(0, 48, 79, 0.35); color: var(--ink); }
.card .thumb { height: 150px; position: relative; display: grid; place-items: center; background: var(--navy); }
.card .thumb svg { width: 70px; height: 70px; stroke: var(--cyan-bright); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card:nth-child(3n+2) .thumb { background: var(--teal); }
.card:nth-child(3n+2) .thumb svg { stroke: #fff; }
.card:nth-child(3n) .thumb { background: var(--cyan-wash); }
.card:nth-child(3n) .thumb svg { stroke: var(--navy); }
.card .body { padding: 1.5rem 1.6rem 1.75rem; display: flex; flex-direction: column; flex: 1; }
.card .tag { font: 500 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.7rem; }
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--muted); font-size: 0.98rem; margin: 0 0 1.1rem; }
.card .more { margin-top: auto; color: var(--navy); font-weight: 500; font-size: 0.95rem; }
.card .more::after { content: " →"; }

@media (max-width: 980px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* Photo slots. Drop a .jpg with the matching name into assets/photos/ and it replaces the placeholder. */
.photo { position: relative; isolation: isolate; margin: 0 0 1.25rem; border-radius: var(--radius) 8px var(--radius) 8px; overflow: hidden; background: var(--cyan-wash); aspect-ratio: 4 / 3; }
.photo.wide { aspect-ratio: 16 / 7; }
.photo.cine { aspect-ratio: 16 / 9; }
.photo.tall { aspect-ratio: 4 / 5; }
.photo.square { aspect-ratio: 1; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .ph {
  position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  text-align: center; padding: 1rem; color: var(--teal);
  border: 2px dashed rgba(23, 110, 126, 0.5); border-radius: calc(var(--radius) - 8px);
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(23, 110, 126, 0.06) 14px 28px);
}
.photo .ph svg { width: 40px; height: 40px; stroke: var(--teal); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.photo .ph b { font: 500 0.95rem var(--sans); color: var(--navy); }
.photo .ph small { font: 400 0.78rem var(--sans); color: var(--muted); word-break: break-all; }
.photo.has-img .ph { display: none; }
body:not(.show-placeholders) .photo:not(.has-img) { display: none; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding-bottom: clamp(1.25rem, 3vw, 2rem); }
.photo-strip .photo { margin: 0; aspect-ratio: 1; }
.photo-strip .photo:nth-child(2) { margin-top: 2.5rem; }
@media (max-width: 700px) {
  .photo-strip { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .photo-strip .photo:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .photo-strip .photo:nth-child(2) { margin-top: 0; }
}
.card .thumb .thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.photo-pair .photo { margin: 0; aspect-ratio: 1; }
.person .photo { max-width: 260px; margin-bottom: 1rem; }
.split > div > .photo:last-child { margin-bottom: 0; }

/* Dark split: habits */
.habits { background: var(--navy); color: #d6e6ee; }
.habits h2 { color: var(--cream); }
.habits h2 .accent { color: var(--cyan-bright); }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.habits p { color: #c7dbe6; }
.quote-card {
  position: relative; background: var(--cyan-wash); color: var(--navy);
  border-radius: var(--radius); padding: 3.2rem 2rem 2rem; text-align: center;
}
.quote-card::before {
  content: "\201C"; position: absolute; top: -1.6rem; left: 50%; transform: translateX(-50%);
  width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--navy); color: var(--cyan-bright);
  border: 4px solid var(--pop); display: grid; place-items: center;
  font: 700 2.6rem/1.35 var(--serif); text-align: center;
}
.quote-card blockquote { margin: 0 0 1rem; font: italic 400 1.12rem/1.65 var(--serif); }
.quote-card cite { font: 500 0.85rem var(--sans); font-style: normal; letter-spacing: 0.08em; color: var(--teal); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Rhythm */
.rhythm { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.rhythm > div { padding: 2rem 1.6rem; border-right: 1px solid var(--line); }
.rhythm > div:last-child { border-right: 0; }
.rhythm strong { display: block; font: 500 clamp(2rem, 3.4vw, 2.7rem)/1.05 var(--serif); color: var(--navy); margin-bottom: 0.6rem; }
.rhythm strong em { color: var(--pop-deep); }
.rhythm span { color: var(--muted); font-size: 0.97rem; display: block; }
@media (max-width: 980px) {
  .rhythm { grid-template-columns: repeat(2, 1fr); }
  .rhythm > div:nth-child(2) { border-right: 0; }
  .rhythm > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .rhythm { grid-template-columns: 1fr; }
  .rhythm > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .rhythm > div:last-child { border-bottom: 0; }
}

/* Elders */
.elders { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2rem; }
.person { border-left: 3px solid var(--pop); padding: 0.25rem 0 0.25rem 1.25rem; }
.person h3 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.person p { margin: 0; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 700px) { .people { grid-template-columns: 1fr; } }

/* Testimonials */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.quote { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.quote blockquote { margin: 0 0 1.2rem; font: italic 400 1.1rem/1.65 var(--serif); color: var(--navy); }
.quote cite { font: 500 0.85rem var(--sans); font-style: normal; letter-spacing: 0.08em; color: var(--teal); }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; } }

/* CTA band */
.cta { padding: 0 0 clamp(3.5rem, 8vw, 6rem); }
.cta-box { background: var(--navy); border-radius: var(--radius) 8px var(--radius) 8px; padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem); text-align: center; color: #d6e6ee; position: relative; overflow: hidden; isolation: isolate; }
.cta-box h2 { color: var(--cream); max-width: 16ch; margin-inline: auto; }
.cta-box h2 .accent { color: var(--cyan-bright); }
.cta-box p { max-width: 34rem; margin-inline: auto; }
.cta-box .actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; margin-top: 1.5rem; }
.cta-box .btn-pop { background: var(--pop); color: var(--navy-2); }
.btn-pop:hover { background: var(--pop-hover); color: var(--navy-2); }
.cta-box .btn-ghost { border-color: var(--cyan); color: var(--cyan-bright); }
.cta-box .btn-ghost:hover { background: var(--cyan); color: var(--navy-2); }

/* Inner page header */
.page-head { background: var(--navy); color: #d6e6ee; padding: clamp(3rem, 7vw, 5.5rem) 0; overflow: hidden; }
.page-head h1 { color: var(--cream); font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 18ch; }
.page-head h1 .accent { color: var(--cyan-bright); }
.page-head .lead { color: #c7dbe6; }

/* Program sections */
.prog { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; padding: clamp(1.5rem, 3vw, 2.5rem) 0; scroll-margin-top: 90px; }
.prog > div > .aside-card:not(:first-child), .prog > div > .weeks:not(:first-child) { margin-top: 1.75rem; }
@media (min-width: 861px) { .prog.flip > :first-child { order: 2; } }
.prog:last-of-type { border-bottom: 0; }
.prog .tag { font: 500 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; display: block; }
.prog h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.prog h3 { font-size: 1.3rem; margin-top: 1.75rem; }
.prog ul { padding-left: 1.2rem; margin: 0 0 1em; }
.prog li { margin-bottom: 0.4em; }
.aside-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.aside-card.dark { background: var(--navy); color: #d6e6ee; border: 0; }
.aside-card.dark h3 { color: var(--cream); margin-top: 0; }
.aside-card h3:first-child { margin-top: 0; }
.aside-card p:last-child, .aside-card ul:last-child { margin-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.chips li { background: var(--cyan-wash); color: var(--navy); border-radius: 999px; padding: 0.35em 0.95em; font-size: 0.9rem; font-weight: 500; margin: 0; }
.pill { display: inline-block; background: var(--pop); color: var(--navy-2); font: 500 0.72rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; padding: 0.4em 0.8em; border-radius: 999px; vertical-align: middle; margin-left: 0.5rem; }
@media (max-width: 860px) { .prog { grid-template-columns: 1fr; } }

.subnav { position: sticky; top: 76px; z-index: 40; background: var(--cream); border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: 0.5rem; list-style: none; margin: 0; padding: 0.75rem 0; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: block; white-space: nowrap; padding: 0.5em 1em; border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 500; font-size: 0.92rem; border: 1px solid var(--line); }
.subnav a:hover { background: var(--navy); color: var(--cream); }

/* Membership */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.price-card { border-radius: var(--radius); padding: 2.25rem; background: var(--paper); border: 1px solid var(--line); }
.price-card.main { background: var(--navy); color: #d6e6ee; border: 0; }
.price-card .amt { font: 500 clamp(3.2rem, 7vw, 4.5rem)/1 var(--serif); color: var(--navy); letter-spacing: -0.03em; margin: 0.5rem 0; }
.price-card.main h3 { color: var(--cream); }
.price-card.main .amt { color: var(--pop); }
.price-card .amt small { font: 400 1rem var(--sans); letter-spacing: 0; color: var(--muted); }
.price-card.main .amt small { color: #9fc0d0; }
.price-card p:last-child { margin-bottom: 0; }
.fine { font-size: 0.92rem; color: var(--muted); margin-top: 1.25rem; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }

.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem 2rem; }
.checks li { position: relative; padding-left: 2rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.3rem; height: 1.3rem; border-radius: 0 100% 0 100%; background: var(--pop) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300233a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19 7.5'/></svg>") center / 70% no-repeat; }
.checks strong { color: var(--navy); font-weight: 500; }
@media (max-width: 760px) { .checks { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.contact-card h3 { font-size: 1.4rem; }
.contact-card p { color: var(--muted); }
.contact-card a { font-weight: 500; word-break: break-word; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--navy-2); color: #b3cad7; padding: 4rem 0 2rem; }
.site-footer .grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer .logo-chip { display: inline-block; background: #fff; border-radius: 14px; padding: 0.5rem 0.9rem; margin-bottom: 1.25rem; }
.site-footer .logo-chip img { height: 56px; width: auto; }
.site-footer h4 { font: 500 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); margin: 0 0 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.65rem; }
.site-footer a { color: #d6e6ee; text-decoration: none; }
.site-footer a:hover { color: var(--cyan-bright); text-decoration: underline; }
.site-footer .tagline { font: italic 400 1.2rem/1.4 var(--serif); color: var(--cream); max-width: 18rem; margin: 0; }
.site-footer .legal { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 3rem; padding-top: 1.5rem; font-size: 0.88rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; }
@media (max-width: 860px) { .site-footer .grid { grid-template-columns: 1fr 1fr; } .site-footer .grid > :first-child { grid-column: 1 / -1; } }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translate(var(--rx, 0), var(--ry, 18px)) scale(var(--rs, 1)); transition: opacity 0.7s ease var(--rd, 0s), transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rd, 0s); }
/* different entrances: halves slide in from their own side, grids stagger, photos zoom up */
.split > :first-child, .prog > :first-child, .duo > :first-child { --rx: -40px; --ry: 0px; }
.split > :last-child, .prog > :last-child, .duo > :last-child { --rx: 40px; --ry: 0px; }
.prog.flip > :first-child { --rx: 40px; }
.prog.flip > :last-child { --rx: -40px; }
.photo-strip { --rs: 0.9; --ry: 36px; }
.cards .card:nth-child(3n+2) { --rd: 0.12s; }
.cards .card:nth-child(3n) { --rd: 0.24s; }
.quotes .quote:nth-child(2), .price-grid > :nth-child(2), .people .person:nth-child(2) { --rd: 0.15s; }
.contact-grid > :nth-child(2) { --rd: 0.12s; }
.contact-grid > :nth-child(3) { --rd: 0.24s; }
.cta-box, .night, .weeks { --rs: 0.96; --ry: 30px; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .btn::after { transition: none; }
}

/* Programs: weekly rhythm and the night of qiyamullail */
.weeks { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.weeks h4, .night h4 { font: 500 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 1.1rem; color: var(--teal); }
.weeks ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; }
.weeks li { background: var(--navy); color: var(--cream); border-radius: 16px; padding: 0.85rem 0.3rem; text-align: center; }
.weeks li.f { background: var(--teal); }
.weeks li b { display: block; font: 500 1.5rem/1 var(--serif); margin-bottom: 0.3rem; }
.weeks li span { font-size: 0.72rem; opacity: 0.88; }
.weeks .key { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 1.1rem 0 0; font-size: 0.88rem; color: var(--muted); }
.weeks .key i { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; margin-right: 0.45rem; background: var(--navy); }
.weeks .key i.f { background: var(--teal); }

.night { position: relative; overflow: hidden; isolation: isolate; background: var(--navy); color: #d6e6ee; border-radius: var(--radius); padding: 1.75rem 1.5rem 1.6rem; }
.night h4 { color: var(--cyan); margin-bottom: 0; }
.night .stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0.35; }
.night .moon { position: absolute; right: 1.25rem; top: 0.9rem; width: 54px; height: 54px; fill: var(--pop); }
.night ol { list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.night ol::before, .night ol::after { content: ""; position: absolute; top: 8px; left: 10%; right: 10%; height: 2px; background: rgba(255, 255, 255, 0.2); }
.night ol::after { background: var(--pop); transform-origin: left; }
.night li { position: relative; text-align: center; padding-top: 2rem; }
.night li::before { content: ""; position: absolute; top: 0; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--pop); box-shadow: 0 0 0 4px rgba(255, 184, 77, 0.25); }
.night li b { display: block; font: 500 1.05rem/1.2 var(--serif); color: var(--cream); }
.night li span { display: block; margin-top: 0.25rem; font-size: 0.78rem; line-height: 1.35; color: #9fc0d0; }
@media (max-width: 560px) { .night li b { font-size: 0.82rem; } .night li span { display: none; } .weeks li span { font-size: 0.62rem; } }

/* Decorative stars: slowly turning ornaments */
.page-head::after, .cta-box::after, .verse::after, .habits::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%235bc8da' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'><path transform='rotate(0 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(30 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(60 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(90 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(120 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(150 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(180 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(210 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(240 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(270 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(300 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(330 100 100) translate(100 62)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(15 100 100) translate(100 92) scale(.6)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(75 100 100) translate(100 92) scale(.6)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(135 100 100) translate(100 92) scale(.6)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(195 100 100) translate(100 92) scale(.6)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(255 100 100) translate(100 92) scale(.6)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/><path transform='rotate(315 100 100) translate(100 92) scale(.6)' d='M0 0C7 -10 7 -26 0 -36C-7 -26 -7 -10 0 0ZM0 0V-36'/></svg>") center / contain no-repeat;
}
.page-head::after { right: -90px; top: 50%; width: 440px; height: 440px; margin-top: -220px; opacity: 0.4; }
.cta-box::after { right: -100px; bottom: -130px; width: 380px; height: 380px; opacity: 0.35; }
.habits::after { left: -120px; bottom: -150px; width: 400px; height: 400px; opacity: 0.3; }
.verse::after { left: 50%; top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px; opacity: 0.12; filter: hue-rotate(0deg) saturate(0.8) brightness(0.55); }
@media (max-width: 700px) { .page-head::after { width: 280px; height: 280px; margin-top: -140px; right: -110px; } .cta-box::after { width: 260px; height: 260px; } .verse::after { width: 360px; height: 360px; margin: -180px 0 0 -180px; } }

/* Motion (skipped for people who ask their device for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes pan { to { transform: translate(96px, 96px); } }
  @keyframes draw-line { from { background-size: 0 0.1em; } to { background-size: 100% 0.1em; } }
  @keyframes draw-stroke { to { stroke-dashoffset: 0; } }
  @keyframes bob { 50% { transform: translateY(-6px); } }
  @keyframes rise { from { scale: 1 0; } to { scale: 1 1; } }
  @keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 184, 77, 0)); } 50% { filter: drop-shadow(0 0 14px rgba(255, 184, 77, 0.9)); } }
  @keyframes twinkle { 0%, 100% { opacity: 0.15; scale: 0.8; } 50% { opacity: 1; scale: 1.5; } }
  @keyframes sweep {
    0%, 14%, 100% { transform: none; box-shadow: 0 0 0 0 transparent; }
    3%, 11% { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--pop), 0 12px 18px -10px rgba(0, 48, 79, 0.55); }
  }
  @keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes light { from { background: #31566f; box-shadow: none; scale: 1; } 60% { scale: 1.6; } to { background: var(--pop); box-shadow: 0 0 0 4px rgba(255, 184, 77, 0.25); scale: 1; } }

  .pattern::before { animation: pan 45s linear infinite; }
  .page-head::after, .cta-box::after, .verse::after, .habits::after { animation: spin 110s linear infinite; }

  .js .hero h1 .accent { animation: draw-line 1.1s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

  .js .arches i { scale: 1 0; transform-origin: 50% 100%; }
  .js .reveal.in .arches i { animation: rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .js .reveal.in .arches i:nth-child(2) { animation-delay: 0.2s; }
  .js .reveal.in .arches i:nth-child(3) { animation-delay: 0.4s; }
  .js .reveal.in .arches i:nth-child(4) { animation: rise 1.2s 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both, glow 2.8s 2s ease-in-out infinite; }

  .js .card .thumb svg :is(path, circle) { stroke-dasharray: 400; stroke-dashoffset: 400; }
  .js .card.in .thumb svg :is(path, circle) { animation: draw-stroke 1.6s 0.25s ease forwards; }
  a.card:hover .thumb svg { animation: bob 1.4s ease-in-out infinite; }

  .weeks li { animation: sweep 9.6s ease-in-out infinite; animation-delay: calc(var(--i) * 1.2s); }

  .night .stars i { animation: twinkle 3.2s ease-in-out infinite; animation-delay: var(--d); }
  .night .moon { animation: glow 4s ease-in-out infinite; }
  .js .night:not(.in) ol::after { transform: scaleX(0); }
  .js .night:not(.in) li::before { background: #31566f; box-shadow: none; }
  .js .night.in ol::after { animation: fill 3.2s 0.4s ease-out both; }
  .js .night.in li::before { animation: light 0.5s both; animation-delay: calc(var(--i) * 0.8s + 0.4s); }
}

/* Leaves: growing vines and sprigs, drifting leaves, leaf bullets and a swaying leaf edge */
.leafy .stem { fill: none; stroke: var(--leaf-dark); stroke-width: 3; stroke-linecap: round; }
.leafy .blade { fill: var(--leaf-dark); }
.leafy .a .blade { fill: var(--leaf); }
.leafy .tip .blade { fill: var(--pop); }
.leafy .rib { fill: none; stroke: var(--cream); stroke-width: 1.4; stroke-linecap: round; opacity: 0.55; }
.cta-box .leafy .stem { stroke: var(--cyan); }
.cta-box .leafy .blade { fill: var(--leaf); }
.cta-box .leafy .a .blade { fill: var(--cyan); }
.cta-box .leafy .tip .blade { fill: var(--pop); }
.cta-box .leafy .rib { stroke: var(--navy); }

.vine { position: absolute; bottom: 0; width: 200px; height: auto; pointer-events: none; overflow: visible; }
.vine-l { left: 2%; }
.vine-r { right: 2%; transform: scaleX(-1); }
.cta-box .vine { width: 150px; bottom: -14px; }
.cta-box .vine-l { left: 3%; }
.cta-box .vine-r { right: 3%; }
@media (max-width: 1020px) { .vine { display: none; } }
.sprig { display: block; width: min(280px, 70%); height: auto; margin: 0.5rem auto; overflow: visible; }
.section-head .sprig { width: 170px; margin: 0 auto 1.1rem; }
.hero .wrap { position: relative; }
.cta-box::after { display: none; }

/* leaf bullets in program lists */
.prog ul, .arc ul { list-style: none; padding-left: 0; }
.prog li, .arc li { position: relative; padding-left: 1.5rem; margin-bottom: 0.4em; }
.prog li::before, .arc li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.7rem; height: 0.7rem; border-radius: 0 100% 0 100%; background: var(--leaf); }
.aside-card.dark li::before { background: var(--pop); }

/* drifting leaves */
.drift { display: none; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.drift i { position: absolute; left: var(--x); top: 0; width: var(--s); height: var(--s); border-radius: 0 100% 0 100%; opacity: 0; }
.drift .c-a { background: var(--leaf); }
.drift .c-b { background: var(--leaf-dark); }
.drift .c-p { background: var(--pop); }
.habits .drift .c-a, .cta-box .drift .c-a { background: var(--cyan); }
.habits .drift .c-b, .cta-box .drift .c-b { background: var(--leaf); }

/* swaying leaf edge above the footer */
.site-footer { position: relative; }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 38px; transform-origin: 50% 100%;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='38' viewBox='0 0 150 38' fill='%2300233a'><path d='M10 38C2 26 4 12 14 2c9 12 9 26 0 36z'/><path d='M40 38C34 30 33 20 40 10c8 8 9 20 4 28z'/><path d='M62 38C54 22 58 8 72 0c9 14 7 28-2 38z'/><path d='M100 38C94 28 94 18 101 9c7 9 8 20 3 29z'/><path d='M124 38C116 24 120 10 132 3c8 12 7 24-2 35z'/></svg>") repeat-x bottom left / 150px 38px;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes grow { to { scale: 1; } }
  @keyframes sway { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }
  @keyframes hedge { from { transform: skewX(-1.6deg); } to { transform: skewX(1.6deg); } }
  @keyframes fall {
    0%   { transform: translate(0, -10px) rotate(0deg); opacity: 0; }
    8%   { opacity: 0.6; }
    25%  { transform: translate(26px, calc(var(--h, 480px) * 0.25)) rotate(100deg); }
    50%  { transform: translate(-20px, calc(var(--h, 480px) * 0.5)) rotate(210deg); }
    75%  { transform: translate(22px, calc(var(--h, 480px) * 0.75)) rotate(300deg); }
    92%  { opacity: 0.6; }
    100% { transform: translate(-6px, var(--h, 480px)) rotate(400deg); opacity: 0; }
  }
  .js .leafy .stem { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .leafy.in .stem { animation: draw-stroke 3.2s 0.2s ease-out forwards; }
  .js .sprig.in .stem { animation-duration: 1.6s; }
  .js .leafy .lf { scale: 0; transform-origin: 0 0; }
  .js .leafy.in .lf { animation: grow 0.9s var(--d) cubic-bezier(0.3, 1.5, 0.5, 1) forwards, sway var(--s) calc(var(--d) + 0.9s) ease-in-out infinite; }
  .drift { display: block; }
  .drift i { animation: fall var(--t) linear var(--d) infinite; }
  .cta-box .drift, .habits .drift { --h: 420px; }
  .site-footer::before { animation: hedge 7s ease-in-out infinite alternate; }
}

/* Ticker band, progress bar, hover and button touches */
.ticker { background: var(--navy); overflow: hidden; padding: 1.15rem 0; }
.ticker .track { display: flex; width: max-content; }
.ticker .half { display: flex; align-items: center; gap: 2rem; padding-right: 2rem; }
.ticker span { font: italic 400 clamp(1.3rem, 3vw, 1.9rem)/1 var(--serif); color: var(--cream); white-space: nowrap; }
.ticker .hl { color: var(--cyan-bright); }
.ticker i { flex: none; width: 0.9rem; height: 0.9rem; border-radius: 0 100% 0 100%; background: var(--pop); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; background: var(--pop); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }
.site-header { transition: box-shadow 0.3s ease; }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 48, 79, 0.45); }
.rhythm > div { transition: background 0.3s ease; }
.rhythm > div:hover { background: var(--cyan-wash); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes marquee { to { transform: translateX(-50%); } }
  @keyframes word-in { from { opacity: 0; transform: translateY(0.55em) rotate(2deg); } to { opacity: 1; transform: none; } }
  @keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 184, 77, 0.6); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255, 184, 77, 0); } }
  @keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
  .ticker .track { animation: marquee 42s linear infinite; }
  .ticker:hover .track { animation-play-state: paused; }
  .js .sw .w { display: inline-block; opacity: 0; }
  .js .sw.in .w { animation: word-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 0.09s + 0.1s); }
  .nav .btn-pop { animation: ring 3.6s ease-out 2s infinite; }
  .photo-strip .photo { animation: floaty 8s ease-in-out infinite; }
  .photo-strip .photo:nth-child(2) { animation-delay: -2.7s; }
  .photo-strip .photo:nth-child(3) { animation-delay: -5.3s; }
}

/* Past projects, "more" drop-downs and the founder timeline */
.past { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem); scroll-margin-top: 90px; }
.past .tag { font: 500 0.78rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; display: block; }
.archive { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.arc { background: var(--paper); border: 2px dashed rgba(0, 48, 79, 0.22); border-radius: var(--radius) 8px var(--radius) 8px; padding: 1.75rem; }
.arc .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; margin: 0 0 1rem; }
.arc .pill-past { background: var(--cream-2); color: var(--muted); font: 500 0.7rem/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; padding: 0.45em 0.8em; border-radius: 999px; }
.arc .when { font: 500 0.85rem var(--sans); color: var(--teal); }
.arc h3 { margin-bottom: 0.4em; }
.arc p { color: var(--muted); }
details { margin-top: 0.75rem; }
details summary { cursor: pointer; font-weight: 500; color: var(--navy); list-style: none; display: inline-flex; align-items: center; gap: 0.6rem; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; width: 0.8rem; height: 0.8rem; border-radius: 0 100% 0 100%; background: var(--leaf); transition: transform 0.3s ease, background 0.3s ease; }
details[open] summary::before { transform: rotate(90deg); background: var(--pop); }
details > :not(summary) { margin-top: 0.9rem; }
details ul { padding-left: 0; }
.prog details.more { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.4rem; margin-top: 1.75rem; }
.prog details.more[open] summary { margin-bottom: 0.25rem; }
@media (max-width: 760px) { .archive { grid-template-columns: 1fr; } }

.timeline-wrap { max-width: 820px; margin-inline: auto; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.75rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 0.6rem; bottom: 0.6rem; width: 2px; background: linear-gradient(var(--leaf), var(--cyan)); transform-origin: top; transition: transform 2.2s ease; }
.timeline li { position: relative; display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem 1.5rem; padding: 0.7rem 0; }
.timeline li::before { content: ""; position: absolute; left: -1.75rem; top: 1.15rem; width: 0.95rem; height: 0.95rem; border-radius: 0 100% 0 100%; background: var(--leaf); transform: rotate(-20deg); }
.timeline li:last-child::before { background: var(--pop); }
.timeline b { font: 500 1.25rem/1.3 var(--serif); color: var(--navy); }
.timeline span { color: var(--muted); }
.timeline em { color: var(--teal); }
@media (max-width: 620px) { .timeline li { grid-template-columns: 1fr; } }
.js .timeline:not(.in)::before { transform: scaleY(0); }

/* Dr Qazi Ashfaq Ahmad page */
.fig { margin: 1.25rem 0 0; }
.fig .photo { margin: 0; }
.fig .cap { font-size: 0.88rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.45; }
.photo.nat { aspect-ratio: auto; }
.photo.nat img { position: static; display: block; height: auto; }
.photo.nat:not(.has-img) { aspect-ratio: 4 / 3; }
.qaa-head .split { align-items: center; }
.qaa-head .photo { max-width: 420px; margin-inline: auto; }
.qaa-head h1 { max-width: none; }
.facts { margin: 1rem 0 0; display: grid; gap: 0.9rem; }
.facts div { border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 0.8rem; }
.facts dt { font: 500 0.75rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 0.4rem; }
.facts dd { margin: 0; }
.chapters { max-width: 900px; margin-inline: auto; }
.chapter { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.5rem 2.5rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; }
.chapter .yr { position: relative; margin: 0; padding-left: 1.5rem; font: 500 1.6rem/1.2 var(--serif); color: var(--navy); }
.chapter .yr::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.85rem; height: 0.85rem; border-radius: 0 100% 0 100%; background: var(--leaf); transform: rotate(-20deg); }
.chapter:last-child .yr::before { background: var(--pop); }
.chapter h3 { margin-bottom: 0.4em; }
.chapter p { color: var(--muted); }
.chapter .fig { max-width: 640px; }
.chapter .fig .photo { border-radius: var(--radius-sm) 6px var(--radius-sm) 6px; }
.leaflist { list-style: none; padding: 0; margin: 0; }
.leaflist li { position: relative; padding-left: 1.5rem; margin-bottom: 0.65rem; }
.leaflist li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.7rem; height: 0.7rem; border-radius: 0 100% 0 100%; background: var(--leaf); }
.aside-card.dark .leaflist li::before { background: var(--pop); }
@media (max-width: 700px) { .chapter { grid-template-columns: 1fr; gap: 0.25rem; padding: 1.5rem 0; } }

/* Country outlines in the story */
.map { float: right; width: 150px; margin: 0 0 1rem 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm) 6px var(--radius-sm) 6px; padding: 0.8rem 0.8rem 0.65rem; text-align: center; }
.map svg { display: block; width: 100%; height: auto; max-height: 125px; overflow: visible; }
.map .shape { fill: var(--leaf); fill-opacity: 0.9; stroke: var(--leaf-dark); stroke-width: 1; stroke-linejoin: round; }
.map .dot { fill: var(--pop); stroke: var(--navy); stroke-width: 1; }
.map .ring { fill: var(--pop); fill-opacity: 0.4; }
.map .dot, .map .ring { transform-box: fill-box; transform-origin: center; }
.map figcaption { font: 500 0.74rem/1.3 var(--sans); color: var(--muted); margin-top: 0.45rem; }
.chapter .fig { clear: both; }
@media (max-width: 700px) { .map { float: none; margin: 0 0 1rem; } }
@media (prefers-reduced-motion: no-preference) {
  @keyframes fill-in { to { fill-opacity: 0.9; } }
  @keyframes pin-in { from { scale: 0; } to { scale: 1; } }
  @keyframes ping { 0% { scale: 1; opacity: 0.7; } 100% { scale: 3.4; opacity: 0; } }
  .js .map .shape { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; }
  .js .map .dot, .js .map .ring { scale: 0; }
  .js .chapter.in .map .shape { animation: draw-stroke 1.8s 0.2s ease forwards, fill-in 0.8s 1.4s ease forwards; }
  .js .chapter.in .map .dot { animation: pin-in 0.6s 1.7s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
  .js .chapter.in .map .ring { animation: pin-in 0.6s 1.7s forwards, ping 2.6s 2.4s ease-out infinite; }
}

/* breathing room when the closing banner follows a dark section */
.habits + .cta { padding-top: clamp(3rem, 7vw, 5rem); }

.fig .photo.portrait { max-width: 300px; }

/* Join form */
.join-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: start; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius) 8px var(--radius) 8px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-card fieldset { border: 0; margin: 0 0 2rem; padding: 0; min-width: 0; }
.form-card legend { font: 500 1.5rem/1.2 var(--serif); color: var(--navy); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.7rem; padding: 0; }
.step { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 0 100% 0 100%; background: var(--pop); color: var(--navy-2); font: 500 0.95rem var(--sans); }
.hint { color: var(--muted); font-size: 0.93rem; margin: 0 0 1rem; }
.field { margin-bottom: 1rem; }
.field label, .hp label { display: block; font-weight: 500; font-size: 0.93rem; color: var(--navy); margin-bottom: 0.35rem; }
.opt { font-weight: 400; color: var(--muted); }
.joiner select { padding-inline: 0.7rem; }
.form-card input[type="text"], .form-card input[type="email"], .form-card input[type="tel"], .form-card select {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid rgba(0, 48, 79, 0.28); border-radius: 14px; padding: 0.8rem 1rem; min-height: 3rem;
}
.form-card textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid rgba(0, 48, 79, 0.28); border-radius: 14px; padding: 0.8rem 1rem; resize: vertical; min-height: 9rem; }
.form-card input:focus, .form-card select:focus, .form-card textarea:focus { outline: 3px solid var(--cyan); outline-offset: 1px; border-color: var(--teal); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.joiner { display: grid; grid-template-columns: 1.25fr 1.15fr 1fr auto; gap: 0 0.8rem; align-items: end; padding: 1rem 1rem 0.2rem; margin-bottom: 0.8rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.joiner .remove { background: none; border: 0; color: var(--teal); font: 500 0.9rem var(--sans); cursor: pointer; padding: 0.8rem 0.3rem; margin-bottom: 1rem; text-decoration: underline; }
.joiner [hidden] { display: none; }
.choice, .check { display: flex; gap: 0.8rem; align-items: flex-start; padding: 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 0.7rem; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--teal); background: var(--cyan-wash); }
.choice input, .check input { margin-top: 0.3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--teal); flex: none; }
.choice strong { display: block; color: var(--navy); }
.choice small { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.check { border: 0; padding: 0; background: none; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.btn-lg { font-size: 1.1rem; padding: 1.1em 1.8em; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.form-error { background: #fdeceb; color: #8a1c14; border: 1.5px solid #e9a8a3; border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin: 0 0 1.25rem; font-weight: 500; }
.notice { background: var(--cyan-wash); border: 1.5px solid var(--cyan); border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.notice.warn { background: #fff4df; border-color: var(--pop); }
.summary { position: sticky; top: 100px; background: var(--navy); color: #d6e6ee; border-radius: var(--radius) 8px var(--radius) 8px; padding: 2rem; }
.summary h2 { color: var(--cream); font-size: 1.6rem; margin-bottom: 1rem; }
.summary dl { margin: 0; }
.summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.summary dt { color: #b3cad7; }
.summary dd { margin: 0; font-weight: 500; }
.summary .total { margin: 1.25rem 0 1.5rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.8rem; }
.summary .total span { font: 500 3.2rem/1 var(--serif); color: var(--pop); letter-spacing: -0.02em; }
.summary .total small { color: #b3cad7; }
.summary .leaflist li::before { background: var(--pop); }
.prose h2 { font-size: 1.7rem; margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }
@media (max-width: 900px) { .join-grid { grid-template-columns: 1fr; } .summary { position: static; order: -1; } }
@media (max-width: 640px) { .row2, .joiner { grid-template-columns: 1fr; } .joiner .remove { justify-self: start; margin-bottom: 0.8rem; } }
.joiner .remove { grid-column: 4; }
.joiner.no-gender .field:nth-child(2) { grid-column: 2 / span 2; }
@media (max-width: 640px) { .joiner .remove, .joiner.no-gender .field:nth-child(2) { grid-column: auto; } }

/* Join form: name row, address row, "why" note, children rows */
.row-name { display: grid; grid-template-columns: 8rem 1fr 1fr 1fr; gap: 0 0.8rem; }
.row-addr { display: grid; grid-template-columns: 1.6fr 0.9fr 0.9fr; gap: 0 0.8rem; }
details.why { margin: 0 0 0.8rem; background: var(--cyan-wash); border-radius: var(--radius-sm); padding: 0.8rem 1.1rem; }
details.why p { margin: 0.6rem 0 0; color: var(--ink); font-size: 0.95rem; }
.initials { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95rem; }
.initials strong { display: inline-block; background: var(--navy); color: var(--cream); border-radius: 999px; padding: 0.1em 0.7em; letter-spacing: 0.08em; }
.dep { display: grid; grid-template-columns: 1fr 0.9fr 1fr 1.1fr auto; gap: 0 0.7rem; align-items: end; padding: 1rem 1rem 0.2rem; margin-bottom: 0.8rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dep .remove { background: none; border: 0; color: var(--teal); font: 500 0.9rem var(--sans); cursor: pointer; padding: 0.8rem 0.3rem; margin-bottom: 1rem; text-decoration: underline; }
.dep select { padding-inline: 0.7rem; }
@media (max-width: 900px) { .row-name { grid-template-columns: 8rem 1fr 1fr; } .row-name .field:nth-child(4) { grid-column: 1 / -1; } .dep { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .row-name, .row-addr, .dep { grid-template-columns: 1fr; } .row-name .field:nth-child(4) { grid-column: auto; } .dep .remove { justify-self: start; margin-bottom: 0.8rem; } }

/* the 15 June automatic-renewal charge date stands out */
.hl-date { color: #c0262d !important; font-weight: 700 !important; }
.summary .total small .hl-date { font: inherit; font-weight: 700 !important; letter-spacing: 0; color: #ff5f56 !important; }
.choice .hl-date { display: inline !important; font-size: 1.05em; }

/* outlined buttons inside dark page headers */
.page-head .btn-ghost { border-color: var(--cyan); color: var(--cyan-bright); }
.page-head .btn-ghost:hover { background: var(--cyan); color: var(--navy-2); }

/* Sister-organisation logos sit on a light tile so they read on the navy cards */
.logo-tile { display: flex; align-items: center; justify-content: center; gap: 1.5rem; background: #fff; border-radius: var(--radius-sm) 6px var(--radius-sm) 6px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; height: 200px; }
.logo-tile img { height: 100%; width: auto; max-width: 48%; object-fit: contain; }
.logo-tile:not(.duo-logos) img { max-width: 100%; }
