/* =========================================================
   TIIP Community — Design System v3 "Sakīnah"
   Traditional Islamically Integrated Psychotherapy
   A premium, faith-rooted aesthetic keyed to the TIIP logo:
   deep navy (#1e3468) + teal (#2e847e) on warm cream.
   NOTE: the --emerald-* scale now holds the navy primaries and
   the --gold-* scale holds the teal accents; the variable names
   are kept so downstream selectors stay stable.
   ========================================================= */

:root {
  /* ---- Core palette ---- */
  --emerald-950: #0a1226;
  --emerald-900: #101c3a;
  --emerald-800: #16264e;
  --emerald-700: #1e3468;
  --emerald-600: #28437f;
  --emerald-500: #3a589c;
  --emerald-400: #6a83b8;
  --emerald-300: #a3b4d6;
  --emerald-100: #dde4f2;
  --emerald-50:  #edf1f8;

  --gold-700: #1c5a55;
  --gold-600: #256f6a;
  --gold-500: #2e847e;
  --gold-400: #5ba69f;
  --gold-300: #8fc4bf;
  --gold-100: #ddeeec;

  --plum-700: #5b2a4e;   /* deep accent for contrast */

  --cream-50:  #fcfaf5;
  --cream-100: #f7f2e9;
  --cream-200: #efe7d6;
  --cream-300: #e4d8c0;

  --ink-950: #0d1220;
  --ink-800: #1c2438;
  --ink-700: #2f3a52;
  --ink-500: #5a6579;
  --ink-400: #828da0;
  --ink-300: #aab3c2;

  --white: #ffffff;

  /* ---- Gradients ---- */
  --grad-emerald: linear-gradient(135deg, var(--emerald-700), var(--emerald-500));
  --grad-gold: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  --grad-hero: linear-gradient(155deg, #0a1226 0%, #14224a 45%, #1e3468 100%);
  --grad-text: linear-gradient(120deg, var(--emerald-700), var(--emerald-500) 60%, var(--gold-500));

  /* ---- Shadows ---- */
  --shadow-xs: 0 1px 2px rgba(10, 18, 38,.06);
  --shadow-sm: 0 2px 8px rgba(10, 18, 38,.08);
  --shadow-md: 0 12px 30px rgba(10, 18, 38,.10);
  --shadow-lg: 0 26px 60px rgba(10, 18, 38,.16);
  --shadow-glow: 0 18px 50px rgba(58, 88, 156,.30);
  --shadow-gold: 0 14px 36px rgba(46, 132, 126,.30);

  /* ---- Radii ---- */
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 38px;

  /* ---- Type ---- */
  --font-head: "Fraunces", "Georgia", serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ar: "Amiri", "Georgia", serif;

  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-700);
  background-color: var(--cream-50);
  background-image:
    radial-gradient(1100px 700px at 100% -5%, rgba(46, 132, 126,.07), transparent 55%),
    radial-gradient(1000px 800px at -10% 10%, rgba(58, 88, 156,.08), transparent 50%);
  line-height: 1.68;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink-950);
  line-height: 1.08;
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: 600; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.15em; }

a { color: var(--emerald-700); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-600); }

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

/* ---- Decorative / typographic helpers ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .76rem;
  font-weight: 700;
  color: var(--gold-600);
  margin: 0 0 1em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px;
  background: linear-gradient(90deg, var(--gold-500), transparent);
}
.section-head.text-center .eyebrow::before,
.text-center .eyebrow { justify-content: center; }
.text-center .eyebrow::after {
  content: ""; width: 26px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.text-center { text-align: center; }
.muted { color: var(--ink-500); }
.lead { font-size: 1.24rem; line-height: 1.6; color: var(--ink-700); font-weight: 400; }

.serif-em { font-family: var(--font-head); font-style: italic; }

/* ---- Buttons ---- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: .55em;
  padding: .92em 1.7em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600; font-size: 1rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background .25s ease, color .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--grad-emerald); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 22px 56px rgba(58, 88, 156,.42); }
.btn-gold { background: var(--grad-gold); color: #ffffff; box-shadow: var(--shadow-gold); }
.btn-gold:hover { color: #ffffff; transform: translateY(-2px); box-shadow: 0 20px 50px rgba(46, 132, 126,.45); }
.btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.34); color: #fff; backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; transform: translateY(-2px); }
.btn-outline { background: #fff; border-color: var(--cream-300); color: var(--emerald-800); box-shadow: var(--shadow-xs); }
.btn-outline:hover { border-color: var(--emerald-500); color: var(--emerald-800); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-sm { padding: .62em 1.2em; font-size: .9rem; }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252,250,245,.72);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid rgba(228,216,192,.7);
  transition: box-shadow .3s;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand .mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--grad-emerald);
  color: #fff; font-family: var(--font-ar); font-weight: 700; font-size: 1.5rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.25);
  position: relative; overflow: hidden;
}
.brand .mark::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 60%);
}
.brand img.mark {
  background: #fff; padding: 4px; object-fit: contain;
  border: 1px solid var(--cream-200);
}
.brand b { color: var(--ink-950); font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.brand span { display: block; font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-400); font-weight: 700; margin-top: 3px; }
/* "Developed at Khalil Center" link stacked under the header logo */
.brand-stack { display: flex; flex-direction: column; gap: 4px; }
.brand-khalil { font-size: .64rem; font-weight: 700; letter-spacing: .01em; color: var(--gold-600); line-height: 1; padding-left: 59px; }
.brand-khalil:hover { color: var(--emerald-700); }
@media (max-width: 420px) { .brand-khalil { padding-left: 0; font-size: .58rem; } }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: .55em .9em; border-radius: 10px; color: var(--ink-700); font-weight: 500; font-size: .96rem; transition: .2s; }
.nav-links a:hover { background: rgba(58, 88, 156,.09); color: var(--emerald-800); }
.nav-links a.active { color: var(--emerald-800); font-weight: 700; }
.nav-cta { margin-left: 10px; }
/* The generic .nav-links a color/hover rules outrank .btn-* — keep the
   CTA button white-on-navy so "Member Portal" stays legible. */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover { background: var(--grad-emerald); color: #fff; }

.nav-toggle { display: none; background: none; border: none; width: 46px; height: 46px; cursor: pointer; border-radius: 12px; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; position: relative;
  width: 22px; height: 2px; background: var(--ink-950); margin: 0 auto; border-radius: 2px; transition: .25s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 80px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 26px 24px;
    background: rgba(252,250,245,.98); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--cream-200); box-shadow: var(--shadow-md);
    transform: translateY(-140%); transition: transform .32s cubic-bezier(.2,.8,.2,1);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .9em .7em; }
  .nav-cta { margin: 10px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---- Geometric motif (reusable) ---- */
.girih {
  position: absolute; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%232e847e' stroke-opacity='0.5' stroke-width='1'%3E%3Cpath d='M60 4l18 38 42 6-30 30 8 42-38-20-38 20 8-42L0 48l42-6z'/%3E%3Ccircle cx='60' cy='60' r='30'/%3E%3Cpath d='M60 30l21 30-21 30-21-30z'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Hero ---- */
.hero {
  position: relative; isolation: isolate;
  color: #eaf0fa;
  background: var(--grad-hero);
  overflow: hidden;
}
.hero::before { /* mesh glows */
  content: ""; position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(620px 420px at 82% 8%, rgba(46, 132, 126,.34), transparent 60%),
    radial-gradient(560px 520px at 12% 92%, rgba(106, 131, 184,.30), transparent 60%),
    radial-gradient(700px 500px at 60% 50%, rgba(91,42,78,.18), transparent 65%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-2%,2%,0) scale(1.06); } }
.hero::after { /* geometric lattice */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M45 0l45 45-45 45L0 45z'/%3E%3Cpath d='M45 16l29 29-29 29-29-29z'/%3E%3Ccircle cx='45' cy='45' r='6'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 92%);
}
.hero .container { position: relative; z-index: 1; padding: clamp(90px, 13vh, 150px) 26px clamp(96px, 14vh, 160px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.hero h1 { color: #fff; max-width: 15ch; margin-bottom: .35em; }
.hero h1 .hl { font-style: italic; color: var(--gold-300); }
.hero .lead { color: rgba(234, 240, 250,.86); max-width: 52ch; font-size: 1.28rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  padding: .5em 1.1em; border-radius: 999px;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  margin-bottom: 28px; backdrop-filter: blur(8px);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-400); box-shadow: 0 0 0 4px rgba(91, 166, 159,.25); }

/* Hero glass visual */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 360px; }
.hero-orb {
  position: relative; width: min(100%, 400px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, rgba(255,255,255,.16), rgba(255,255,255,.02) 60%);
  border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center; text-align: center;
  box-shadow: inset 0 2px 30px rgba(255,255,255,.12), var(--shadow-lg);
}
.hero-orb .ar { font-family: var(--font-ar); font-size: clamp(2.4rem,6vw,3.4rem); color: #fff; line-height: 1.6; }
.hero-orb .ar-sub { color: var(--gold-300); font-style: italic; font-family: var(--font-head); font-size: 1rem; margin-top: 6px; }
.hero-orb::before, .hero-orb::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(255,255,255,.16);
}
.hero-orb::before { inset: -22px; animation: spin 40s linear infinite; }
.hero-orb::after { inset: -46px; border-color: rgba(46, 132, 126,.22); animation: spin 60s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.float-card {
  position: absolute; background: rgba(255,255,255,.92); color: var(--ink-800);
  border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 11px; font-size: .86rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,.6); animation: bob 5s ease-in-out infinite;
}
.float-card .fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; }
.float-card small { display: block; font-weight: 500; color: var(--ink-400); font-size: .74rem; }
.float-card.fc1 { top: 6%; left: -6%; }
.float-card.fc2 { bottom: 10%; right: -8%; animation-delay: 1.4s; }
.float-card.fc3 { bottom: -2%; left: 6%; animation-delay: 2.6s; }
@media (max-width: 1080px){ .float-card.fc1{left:0} .float-card.fc2{right:0} }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Hero wave divider */
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; z-index: 1; line-height: 0; }
.hero-wave svg { width: 100%; height: 70px; display: block; }

/* ---- Sections ---- */
section { padding: clamp(70px, 9vw, 110px) 0; position: relative; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.section-head .lead { margin-top: .2em; }
.bg-cream { background: var(--cream-100); }
.bg-emerald { background: var(--emerald-950); color: #cfd9ec; }
.bg-emerald h2, .bg-emerald h3, .bg-emerald h4 { color: #fff; }
.bg-white { background: var(--white); }

/* faint motif behind sections */
.has-motif { overflow: hidden; }
.has-motif .girih.big { width: 360px; height: 360px; top: -90px; right: -90px; opacity: .12; }

/* ---- Grids ---- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---- Cards ---- */
.card {
  position: relative;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(4px);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%;
  background: var(--grad-emerald); opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-7px); box-shadow: var(--shadow-md); border-color: var(--emerald-300); }
.card:hover::before { opacity: 1; }
.card .icon {
  width: 60px; height: 60px; border-radius: 17px;
  display: grid; place-items: center; font-size: 1.7rem;
  background: linear-gradient(135deg, var(--emerald-50), var(--emerald-100));
  color: var(--emerald-700); margin-bottom: 20px;
  box-shadow: inset 0 0 0 1px rgba(58, 88, 156,.14), var(--shadow-xs);
  transition: transform .3s;
}
.card:hover .icon { transform: scale(1.08) rotate(-3deg); }
.card h3 { margin-bottom: .45em; }
.card p { margin-bottom: 0; color: var(--ink-500); font-size: 1rem; }
.feature-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-weight: 700; font-size: .92rem; color: var(--emerald-700); }
.feature-link::after { content: "→"; transition: transform .2s; }
.card:hover .feature-link::after { transform: translateX(4px); }

/* ---- Tags ---- */
.tag { display: inline-block; padding: .34em .85em; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--gold-100); color: var(--gold-700); }
.tag.teal { background: var(--emerald-50); color: var(--emerald-700); }
.tag.sand { background: var(--cream-200); color: var(--ink-700); }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 740px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; position: relative; padding: 8px 4px; }
.stat + .stat::before { content:""; position:absolute; left:-12px; top:18%; height:64%; width:1px; background: rgba(255,255,255,.12); }
.stat .num { font-family: var(--font-head); font-size: clamp(2.6rem,4vw,3.4rem); font-weight: 600; line-height: 1;
  background: linear-gradient(120deg, var(--gold-300), var(--gold-500)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .label { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; opacity: .82; margin-top: 10px; font-weight: 600; }
.bg-white .stat + .stat::before, .bg-cream .stat + .stat::before { background: var(--cream-300); }
.bg-white .stat .num, .bg-cream .stat .num { background: var(--grad-text); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color: transparent; }

/* ---- Page header ---- */
.page-head {
  position: relative; isolation: isolate;
  background: var(--grad-hero); color: #eaf0fa;
  padding: clamp(72px,9vw,108px) 0 clamp(104px,11vw,140px); overflow: hidden;
}
.page-head::before { content:""; position:absolute; inset:-20%; z-index:-2;
  background: radial-gradient(560px 380px at 88% 0%, rgba(46, 132, 126,.28), transparent 60%), radial-gradient(520px 460px at 0% 100%, rgba(106, 131, 184,.26), transparent 60%); }
.page-head::after { content:""; position:absolute; inset:0; z-index:-1; opacity:.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06'%3E%3Cpath d='M45 0l45 45-45 45L0 45z'/%3E%3C/g%3E%3C/svg%3E"); }
.page-head h1 { color: #fff; }
.page-head .lead { color: rgba(234, 240, 250,.84); max-width: 62ch; }
.breadcrumb { font-size: .85rem; opacity: .78; margin-bottom: 18px; letter-spacing:.02em; }
.breadcrumb a { color: #eaf0fa; }
.page-head .container { position: relative; z-index: 2; }
.page-head .lead { position: relative; z-index: 2; }
.page-head-eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  text-transform: uppercase; letter-spacing: .22em; font-size: .74rem; font-weight: 700;
  color: var(--gold-300); margin-bottom: 16px;
}
.page-head-eyebrow::before { content:""; width: 26px; height: 2px; background: linear-gradient(90deg, var(--gold-400), transparent); }
/* Arabic watermark + geometric motif */
.page-head .ph-ar {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%); z-index: 1;
  font-family: var(--font-ar); font-size: clamp(4rem, 12vw, 9rem); line-height: 1;
  color: rgba(255,255,255,.06); pointer-events: none; white-space: nowrap;
}
.page-head .girih.deco { width: 300px; height: 300px; top: -70px; right: -50px; opacity: .14; z-index: 1; animation: spin 90s linear infinite; }
.page-head-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; z-index: 2; }
.page-head-wave svg { width: 100%; height: 56px; display: block; }
@media (max-width: 640px){ .page-head .ph-ar { display:none; } }

/* ---- Psyche figure (home preview) ----
   The home page embeds the same ontological-model figure that model.html
   renders (markup + component styles come from model.css); these rules
   only lay it out and neutralize the interactive affordances since the
   home version is a static preview. */
.psyche { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .psyche { grid-template-columns: 1fr; } }
.psyche .model-fig .psy-node,
.psyche .model-fig .fitrah-band,
.psyche .model-fig .ij-pill { cursor: default; }
.psyche .model-fig .fitrah-band:hover { transform: none; }

/* ---- Tabs ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.tab-btn {
  background: #fff; border: 1px solid var(--cream-200); cursor: pointer;
  padding: .7em 1.3em; font-size: .98rem; font-weight: 600; color: var(--ink-500);
  border-radius: 999px; font-family: var(--font-body); transition: .2s;
}
.tab-btn:hover { color: var(--emerald-700); border-color: var(--emerald-300); }
.tab-btn.active { color: #fff; background: var(--grad-emerald); border-color: transparent; box-shadow: var(--shadow-glow); }
.tab-panel { display: none; animation: fade .4s ease; }
.tab-panel.active { display: block; }
.tab-panel { background:#fff; border:1px solid var(--cream-200); border-radius: var(--radius); padding: 34px 36px; box-shadow: var(--shadow-sm); }
.tab-panel h3 { color: var(--emerald-800); }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Accordion ---- */
.accordion { border: 1px solid var(--cream-200); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.acc-item + .acc-item { border-top: 1px solid var(--cream-200); }
.acc-head { width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 24px 28px; font-size: 1.12rem; font-weight: 600; color: var(--ink-950);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--font-head); transition: .2s; }
.acc-head:hover { background: var(--emerald-50); }
.acc-head .chev { transition: transform .3s; color: var(--emerald-600); font-size: 1.4rem; flex-shrink: 0; }
.acc-item.open .acc-head { color: var(--emerald-800); }
.acc-item.open .acc-head .chev { transform: rotate(45deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.acc-body .inner { padding: 0 28px 24px; color: var(--ink-500); }

/* ---- Steps ---- */
.steps { display: grid; gap: 22px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 24px; align-items: start;
  background: rgba(255,255,255,.8); border: 1px solid var(--cream-200); border-radius: var(--radius); padding: 28px 30px;
  box-shadow: var(--shadow-xs); transition: .25s; }
.step:hover { box-shadow: var(--shadow-md); transform: translateX(4px); border-color: var(--emerald-300); }
.step .num { width: 64px; height: 64px; border-radius: 19px; background: var(--grad-emerald); color: #fff;
  display: grid; place-items: center; font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; box-shadow: var(--shadow-glow); }
.step h3 { margin-bottom: .3em; }
.step p { margin-bottom: 0; color: var(--ink-500); }

/* ---- Member portal ---- */
.portal { display: grid; grid-template-columns: 268px 1fr; border: 1px solid var(--cream-200);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: #fff; min-height: 560px; }
@media (max-width: 840px) { .portal { grid-template-columns: 1fr; } }
.portal-aside { background: linear-gradient(180deg, var(--emerald-900), var(--emerald-950)); color: #bfcce0; padding: 28px 20px; }
.portal-aside .pa-user { display: flex; align-items: center; gap: 13px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 18px; }
.pa-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--grad-gold); color: #ffffff; display: grid; place-items: center; font-weight: 800; box-shadow: var(--shadow-sm); }
.portal-aside .pa-user b { color: #fff; display: block; font-size: .98rem; }
.portal-aside .pa-user span { font-size: .78rem; opacity: .72; }
.portal-nav { list-style: none; margin: 0; padding: 0; }
.portal-nav button { width: 100%; text-align: left; background: none; border: none; color: #bfcce0;
  padding: .78em .9em; border-radius: 12px; cursor: pointer; font-size: .94rem; font-weight: 500;
  display: flex; align-items: center; gap: 11px; font-family: var(--font-body); transition: .2s; }
.portal-nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.portal-nav button.active { background: var(--grad-emerald); color: #fff; box-shadow: var(--shadow-sm); }
.portal-main { padding: 32px 34px; background: var(--cream-50); }
.portal-view { display: none; animation: fade .4s ease; }
.portal-view.active { display: block; }
.portal-view h3 { margin-top: 0; }

.thread { background: #fff; border: 1px solid var(--cream-200); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; transition: .2s; box-shadow: var(--shadow-xs); }
.thread:hover { border-color: var(--emerald-300); box-shadow: var(--shadow-sm); }
.thread .meta { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--ink-400); margin-bottom: 8px; }
.thread h4 { margin: 0 0 7px; font-family: var(--font-body); font-size: 1.08rem; color: var(--ink-950); font-weight: 700; }
.thread p { margin: 0; font-size: .94rem; color: var(--ink-500); }
.thread .foot { margin-top: 14px; display: flex; gap: 20px; font-size: .82rem; color: var(--ink-400); }

.consult-card { background:#fff; border:1px solid var(--cream-200); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; display:flex; gap:18px; align-items:center; box-shadow: var(--shadow-xs); transition:.2s; }
.consult-card:hover { border-color: var(--emerald-300); box-shadow: var(--shadow-sm); }
.consult-card .badge-date { background: var(--grad-emerald); color: #fff; border-radius: 14px; padding: 12px 16px; text-align:center; min-width:66px; box-shadow: var(--shadow-sm); }
.consult-card .badge-date b { display:block; font-size:1.4rem; font-family:var(--font-head); }
.consult-card .badge-date span { font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; opacity:.9; }

/* ---- Media / resource ---- */
.media-card { background:#fff; border:1px solid var(--cream-200); border-radius: var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); transition:.28s cubic-bezier(.2,.8,.2,1); }
.media-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-md); }
.media-thumb { position:relative; aspect-ratio: 16/9; background: var(--grad-hero); display:grid; place-items:center; overflow:hidden; }
.media-thumb::after { content:""; position:absolute; inset:0; opacity:.4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.1'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/g%3E%3C/svg%3E"); }
.media-thumb .play { width:60px; height:60px; border-radius:50%; background:rgba(255,255,255,.94); display:grid; place-items:center; color:var(--emerald-800); font-size:1.2rem; box-shadow:var(--shadow-md); z-index:1; transition:.25s; }
.media-card:hover .play { transform: scale(1.12); }
.media-thumb .dur { position:absolute; bottom:11px; right:11px; background:rgba(10, 18, 38,.78); color:#fff; font-size:.74rem; padding:.25em .6em; border-radius:7px; z-index:1; }
.media-body { padding: 18px 20px; }
.media-body h4 { font-family:var(--font-body); font-size:1.04rem; font-weight:700; margin:8px 0 6px; color:var(--ink-950); }
.media-body .meta { font-size:.82rem; color:var(--ink-400); }

.resource-row { display:flex; align-items:center; gap:18px; padding:18px 20px; background:#fff; border:1px solid var(--cream-200); border-radius:var(--radius); margin-bottom:14px; transition:.2s; box-shadow: var(--shadow-xs); }
.resource-row:hover { border-color: var(--emerald-300); box-shadow: var(--shadow-sm); transform: translateX(4px); }
.resource-row .ricon { width:50px; height:50px; border-radius:14px; background:linear-gradient(135deg,var(--gold-100),var(--gold-300)); color:var(--gold-700); display:grid; place-items:center; font-size:1.3rem; flex-shrink:0; }
.resource-row .rinfo { flex:1; }
.resource-row .rinfo b { color:var(--ink-950); display:block; font-size:1.02rem; }
.resource-row .rinfo span { font-size:.82rem; color:var(--ink-400); }

/* ---- Chips ---- */
.chips { display:flex; flex-wrap:wrap; gap:11px; margin-bottom:36px; }
.chip { background:#fff; border:1px solid var(--cream-200); border-radius:999px; padding:.55em 1.25em; font-size:.88rem; font-weight:600; color:var(--ink-700); cursor:pointer; transition:.2s; font-family:var(--font-body); }
.chip:hover { border-color: var(--emerald-400); color: var(--emerald-700); }
.chip.active { background: var(--grad-emerald); color:#fff; border-color: transparent; box-shadow: var(--shadow-glow); }

/* ---- Events ---- */
.event-item { display:grid; grid-template-columns: 120px 1fr auto; gap:28px; align-items:center; background:rgba(255,255,255,.82); border:1px solid var(--cream-200); border-radius:var(--radius); padding:24px 26px; margin-bottom:18px; transition:.25s; box-shadow: var(--shadow-xs); }
.event-item:hover { border-color: var(--emerald-300); box-shadow: var(--shadow-md); transform: translateY(-3px); }
@media (max-width:740px){ .event-item { grid-template-columns: 84px 1fr; } .event-item .ev-cta { grid-column: 1 / -1; } }
.ev-date { text-align:center; background: linear-gradient(135deg,var(--emerald-50),var(--emerald-100)); border-radius:16px; padding:16px 8px; box-shadow: inset 0 0 0 1px rgba(58, 88, 156,.12); }
.ev-date .m { font-size:.8rem; text-transform:uppercase; letter-spacing:.1em; color:var(--emerald-700); font-weight:700; }
.ev-date .d { font-family:var(--font-head); font-size:2.2rem; color:var(--ink-950); font-weight:600; line-height:1; }
.ev-info h4 { margin:0 0 7px; font-family:var(--font-body); font-size:1.2rem; font-weight:700; color:var(--ink-950); }
.ev-info .ev-meta { display:flex; flex-wrap:wrap; gap:18px; font-size:.86rem; color:var(--ink-500); }

/* ---- Public events calendar ---- */
.ev-viewtoggle { display: inline-flex; gap: 8px; margin-bottom: 28px; }
.cal-wrap { background: #fff; border: 1px solid var(--cream-200); border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cal-nav h3 { margin: 0; font-size: 1.35rem; }
.cal-nav .cal-btns { display: flex; gap: 8px; }
.cal-nav button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--cream-300); background: var(--cream-50); color: var(--emerald-700); font-size: 1.1rem; cursor: pointer; transition: .2s; }
.cal-nav button:hover { border-color: var(--emerald-400); background: var(--emerald-50); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.cal-dow span { text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-400); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-day { min-height: 92px; border: 1px solid var(--cream-200); border-radius: 12px; padding: 7px 8px; background: var(--cream-50); }
.cal-day.empty { background: transparent; border: none; }
.cal-day.today { border-color: var(--emerald-400); box-shadow: 0 0 0 2px var(--emerald-50); }
.cal-day .dnum { font-weight: 700; color: var(--ink-400); font-size: .8rem; }
.cal-day.has .dnum { color: var(--emerald-700); }
.cal-ev { display: block; margin-top: 5px; border-radius: 7px; padding: 3px 7px; font-size: .67rem; font-weight: 700; line-height: 1.28; color: #fff; background: var(--grad-emerald); }
.cal-ev.training { background: var(--grad-gold); }
.cal-ev.webinar { background: var(--emerald-500); }
.cal-ev.retreat { background: var(--plum-700); }
.cal-ev.conference { background: var(--emerald-800); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--cream-300); font-size: .8rem; color: var(--ink-500); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cal-empty-note { margin: 16px 0 0; font-size: .85rem; color: var(--ink-400); }
@media (max-width: 640px) {
  .cal-wrap { padding: 16px 12px; }
  .cal-days { gap: 4px; }
  .cal-day { min-height: 64px; padding: 4px 4px; }
  .cal-ev { font-size: .58rem; padding: 2px 4px; }
}

/* ---- Publications ---- */
.pub { background:rgba(255,255,255,.85); border:1px solid var(--cream-200); border-radius:var(--radius); padding:28px 30px; margin-bottom:18px; transition:.25s; box-shadow: var(--shadow-xs); position:relative; }
.pub::before { content:""; position:absolute; left:0; top:24px; bottom:24px; width:4px; border-radius:4px; background: var(--grad-gold); opacity:0; transition:.3s; }
.pub:hover { border-color: var(--emerald-300); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pub:hover::before { opacity:1; }
.pub h3 { font-size:1.32rem; margin-bottom:.4em; }
.pub .authors { color:var(--emerald-700); font-weight:700; font-size:.92rem; margin-bottom:.3em; }
.pub .journal { font-size:.88rem; color:var(--ink-400); font-style:italic; }
.pub .abstract { margin-top:14px; color:var(--ink-500); font-size:.98rem; margin-bottom:0; }

/* ---- CTA band ---- */
.cta-band {
  position: relative; isolation:isolate; overflow:hidden;
  background: var(--grad-hero); color:#fff;
  border-radius: var(--radius-xl); padding: clamp(48px,6vw,72px) clamp(32px,5vw,64px); text-align:center;
  box-shadow: var(--shadow-lg);
}
.cta-band::before { content:""; position:absolute; inset:-30%; z-index:-1;
  background: radial-gradient(500px 360px at 12% 110%, rgba(46, 132, 126,.35), transparent 60%), radial-gradient(460px 360px at 90% -10%, rgba(106, 131, 184,.3), transparent 60%); }
.cta-band::after { content:""; position:absolute; inset:0; z-index:-1; opacity:.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06'%3E%3Cpath d='M40 0l40 40-40 40L0 40z'/%3E%3C/g%3E%3C/svg%3E"); }
.cta-band h2 { color:#fff; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 56ch; margin-left:auto; margin-right:auto; }
.cta-actions { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; margin-top:28px; }

/* ---- Quote ---- */
.quote { max-width: 800px; margin: 0 auto; text-align:center; position:relative; z-index:1; }
.quote .arabic { font-family: var(--font-ar); font-size: clamp(2rem,5vw,3rem); color:#fff; margin-bottom:22px; line-height:1.7; }
.quote blockquote { font-family: var(--font-head); font-size: clamp(1.4rem,2.6vw,2rem); color:var(--emerald-100); font-style:italic; margin:0 0 20px; line-height:1.5; font-weight: 400; }
.quote cite { font-style:normal; color: var(--gold-300); font-size:.95rem; letter-spacing:.04em; }

/* ---- Footer ---- */
.site-footer { background: var(--emerald-950); color: #9fabc0; padding: 80px 0 32px; position:relative; overflow:hidden; }
.site-footer .girih.big { width:420px; height:420px; bottom:-140px; left:-120px; opacity:.06; }
.footer-grid { display:grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 40px; position:relative; z-index:1; }
@media (max-width: 840px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px){ .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color:#fff; font-family:var(--font-body); font-size:.8rem; letter-spacing:.14em; text-transform:uppercase; margin-bottom:1.1em; }
.site-footer a { color:#9fabc0; display:block; padding:.3em 0; font-size:.94rem; }
.site-footer a:hover { color: var(--gold-300); }
.footer-brand p { font-size:.94rem; max-width: 36ch; }
.footer-brand .brand b { color:#fff; } .footer-brand .brand span { color:#7f8ba8; }
.footer-brand .logo-full { width: min(320px, 100%); height: auto; display: block; }
.footer-brand .dev-at { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: .84rem; font-weight: 700; letter-spacing: .03em; color: var(--gold-300); }
.footer-brand .dev-at:hover { color: #fff; }
/* Hero badge doubles as the "Developed at Khalil Center" link — keep it legible on the dark hero */
a.hero-badge { color: #eaf0fa; }
a.hero-badge:hover { color: #fff; border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.14); }
.footer-bottom { border-top:1px solid rgba(255,255,255,.08); margin-top:52px; padding-top:26px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:.85rem; position:relative; z-index:1; }
.footer-note { background: var(--gold-100); border-left:4px solid var(--gold-500); padding:16px 20px; border-radius:12px; font-size:.88rem; color:var(--ink-700); margin-top:16px; }

/* ---- Notice / scope banner ---- */
.notice { display: flex; gap: 14px; align-items: flex-start; background: var(--gold-100); border: 1px solid var(--gold-300); border-left: 4px solid var(--gold-500); border-radius: 14px; padding: 16px 18px; font-size: .92rem; color: var(--ink-700); line-height: 1.55; }
.notice.warn { background: #fdf3e7; border-color: #f0cfa0; border-left-color: #d9873b; }
.notice .ni { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.notice strong { color: var(--ink-950); }
.notice p { margin: 0; }

/* ---- Join (sign up / login) ---- */
.join-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.join-side { position: sticky; top: 100px; }
@media (max-width: 900px) { .join-layout { grid-template-columns: 1fr; } .join-side { position: static; order: -1; } }
.join-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 34px; }
@media (max-width: 620px) { .join-benefits { grid-template-columns: 1fr; } }
.join-benefit { display: flex; gap: 13px; align-items: flex-start; background: rgba(255,255,255,.7); border: 1px solid var(--cream-200); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-xs); }
.join-benefit .bi { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.2rem; background: linear-gradient(135deg, var(--emerald-50), var(--emerald-100)); color: var(--emerald-700); box-shadow: inset 0 0 0 1px rgba(58,88,156,.14); }
.join-benefit b { color: var(--ink-950); display: block; font-size: .98rem; }
.join-benefit small { display: block; color: var(--ink-500); font-size: .85rem; line-height: 1.5; margin-top: 2px; }
.join-login { border-top: 4px solid var(--emerald-600); }
.join-login h3 { margin-top: 0; }
.join-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
@media (max-width: 900px) { .join-grid { grid-template-columns: 1fr; } }
.join-form .field { margin-bottom: 18px; }
.join-form label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-700); margin-bottom: 7px; }
.join-form label em { color: var(--gold-700); font-style: normal; font-weight: 700; }
.join-form input, .join-form select {
  width: 100%; padding: .82em 1em; border: 1px solid var(--cream-300); border-radius: 12px;
  font-size: .96rem; font-family: inherit; background: var(--cream-50); transition: .2s; color: var(--ink-800); appearance: none;
}
.join-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a6579' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer;
}
.join-form input:focus, .join-form select:focus { outline: none; border-color: var(--emerald-500); box-shadow: 0 0 0 4px var(--emerald-50); background-color: #fff; }
.join-form input[type=file] { padding: .6em; background: #fff; }
.join-form .hint { font-size: .8rem; color: var(--ink-400); margin: 7px 0 0; }
.join-form .btn { width: 100%; justify-content: center; }
.benefit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.benefit-list li { display: flex; gap: 13px; align-items: flex-start; font-size: .96rem; color: var(--ink-700); }
.benefit-list .bi { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.05rem; background: linear-gradient(135deg, var(--emerald-50), var(--emerald-100)); color: var(--emerald-700); box-shadow: inset 0 0 0 1px rgba(58,88,156,.14); }
.benefit-list b { color: var(--ink-950); }
.benefit-list small { display: block; color: var(--ink-500); font-size: .84rem; }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(10, 18, 38,.6); backdrop-filter: blur(5px); display: none; place-items: center; z-index: 200; padding: 20px; }
.modal-overlay.open { display: grid; }
.modal { background:#fff; border-radius: var(--radius-lg); max-width: 440px; width:100%; padding: 40px 38px; box-shadow: var(--shadow-lg); animation: pop .3s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity:0; transform: translateY(18px) scale(.97);} to {opacity:1; transform:none;} }
.modal h3 { text-align:center; font-size:1.6rem; }
.modal .field { margin-bottom: 18px; }
.modal label { display:block; font-size:.85rem; font-weight:600; color:var(--ink-700); margin-bottom:7px; }
.modal input { width:100%; padding:.82em 1em; border:1px solid var(--cream-300); border-radius:12px; font-size:.96rem; font-family:inherit; transition:.2s; background: var(--cream-50); }
.modal input:focus { outline:none; border-color: var(--emerald-500); box-shadow:0 0 0 4px var(--emerald-50); background:#fff; }
.modal .btn { width:100%; justify-content:center; }
.modal-close { position:absolute; top:16px; right:20px; background:none; border:none; font-size:1.6rem; cursor:pointer; color:var(--ink-400); line-height:1; }
.modal-wrap { position:relative; }
.demo-pill { background: var(--gold-100); color: var(--gold-700); font-size:.8rem; font-weight:600; padding:.5em .9em; border-radius:10px; text-align:center; margin-bottom:20px; }

/* ---- Utilities ---- */
.mt-0{margin-top:0}.mt-1{margin-top:14px}.mt-2{margin-top:26px}.mt-3{margin-top:44px}
.mb-0{margin-bottom:0}
.hidden{display:none !important}
.flex{display:flex}.gap{gap:16px}.wrap{flex-wrap:wrap}.center{align-items:center}.between{justify-content:space-between}

.divider-motif { display:flex; align-items:center; justify-content:center; gap:16px; margin: 0 auto 8px; color: var(--gold-500); }
.divider-motif::before, .divider-motif::after { content:""; height:1px; width:60px; background: linear-gradient(90deg, transparent, var(--gold-400)); }
.divider-motif::after { background: linear-gradient(90deg, var(--gold-400), transparent); }

/* ---- Provider directory world map ---- */
.dir-map {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 50% -10%, #16264e 0%, #0d1a3a 60%, #0a1226 100%);
  border: 1px solid var(--emerald-800);
  border-radius: var(--radius-lg); padding: 16px 16px 10px;
  margin-bottom: 26px; box-shadow: var(--shadow-md);
}
.dir-map svg { width: 100%; height: auto; display: block; }
.dir-map .land-dot { fill: rgba(143, 196, 191, .26); }
.dir-map .mk-ring { fill: rgba(91, 166, 159, .45); transform-box: fill-box; transform-origin: center; animation: mkpulse 2.6s ease-out infinite; }
@keyframes mkpulse { 0% { transform: scale(.5); opacity: .75; } 70% { transform: scale(2.1); opacity: 0; } 100% { opacity: 0; } }
.dir-map .mk { stroke: #fff; stroke-width: 1.4; cursor: default; }
.dir-map .mk-lg { fill: var(--gold-400); }
.dir-map .mk-sm { fill: var(--gold-300); }
.dir-map-cap { color: rgba(234, 240, 250, .82); font-size: .8rem; text-align: center; padding: 10px 6px 4px; }
.dir-map-cap .dot-key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-400); margin: 0 6px -1px 0; box-shadow: 0 0 0 3px rgba(91,166,159,.3); }
.dir-map-cap b { color: #fff; }
@media (prefers-reduced-motion: reduce) { .dir-map .mk-ring { animation: none; } }

/* ---- Provider directory ---- */
.dir-panel {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(6px);
  border: 1px solid var(--cream-200);
  border-radius: var(--radius-lg);
  padding: 26px 28px 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 34px;
}
.dir-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dir-filters .dir-search { grid-column: 1 / -1; }
@media (max-width: 720px) { .dir-filters { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .dir-filters { grid-template-columns: 1fr; } }
.dir-field label {
  display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-500); margin-bottom: 7px;
}
.dir-field select, .dir-field input {
  width: 100%; padding: .72em .9em;
  border: 1px solid var(--cream-300); border-radius: 12px;
  font-size: .94rem; font-family: inherit; color: var(--ink-800);
  background: var(--cream-50); transition: .2s; appearance: none;
}
.dir-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a6579' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px; cursor: pointer;
}
.dir-field select:focus, .dir-field input:focus {
  outline: none; border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px var(--emerald-50); background-color: #fff;
}
.dir-field select:disabled { opacity: .5; cursor: not-allowed; background-color: var(--cream-100); }
.dir-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--cream-300); }
.dir-bar #dir-count { font-size: .88rem; font-weight: 700; color: var(--emerald-700); }

.dir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 1020px) { .dir-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .dir-grid { grid-template-columns: 1fr; } }

/* Profile box: emerald banner, circular photo overlapping it, centered info */
.provider-card {
  display: flex; flex-direction: column; text-align: center;
  background: #fff; border: 1px solid var(--cream-200);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.provider-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); border-color: var(--emerald-300); }
.pc-banner {
  /* tall enough that the level badge clears the overlapping photo */
  position: relative; height: 106px; flex-shrink: 0;
  background: var(--grad-hero);
}
.pc-banner::before {
  content: ""; position: absolute; inset: 0; opacity: .45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.12'%3E%3Cpath d='M28 0l28 28-28 28L0 28z'/%3E%3Ccircle cx='28' cy='28' r='10'/%3E%3C/g%3E%3C/svg%3E");
}
.pc-banner::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(220px 90px at 80% 0%, rgba(46, 132, 126,.35), transparent 70%);
}
.pc-level {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4;
  display: inline-block; padding: .34em .95em; border-radius: 999px; white-space: nowrap;
  font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}
.pc-level.lv-supervisor { background: var(--grad-gold); color: #ffffff; }
.pc-level.lv-certified { background: rgba(255,255,255,.94); color: var(--emerald-700); }
.pc-level.lv-3 { background: var(--emerald-100); color: var(--emerald-800); }
.pc-level.lv-2 { background: rgba(255,255,255,.88); color: var(--ink-700); }
.pc-level.lv-1 { background: var(--cream-200); color: var(--ink-700); }
.pc-photo {
  width: 96px; height: 96px; margin: -48px auto 0; position: relative; z-index: 3;
  border-radius: 50%;
}
.pc-photo img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: 0 0 0 2px rgba(46, 132, 126,.45), var(--shadow-md);
  background: var(--emerald-50);
}
.pc-body { display: flex; flex-direction: column; flex: 1; padding: 14px 24px 20px; }
.pc-body h3 { font-size: 1.24rem; margin: 0 0 3px; }
.pc-cred { font-size: .78rem; color: var(--ink-400); font-weight: 600; margin-bottom: 9px; }
.pc-loc {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .84rem; font-weight: 700; color: var(--emerald-800);
  background: var(--emerald-50); border-radius: 999px; padding: .38em 1em;
  margin: 0 auto 14px; box-shadow: inset 0 0 0 1px rgba(58, 88, 156,.16);
}
.pc-specs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.pc-spec {
  background: var(--cream-100); border: 1px solid var(--cream-200); border-radius: 999px;
  padding: .34em .9em; font-size: .74rem; font-weight: 700; color: var(--ink-700);
  cursor: pointer; font-family: var(--font-body); transition: .2s;
}
.pc-spec:hover { border-color: var(--emerald-400); background: var(--emerald-50); color: var(--emerald-800); }
.pc-bio { font-size: .9rem; line-height: 1.6; color: var(--ink-500); margin: 0 0 16px; flex: 1; }
.pc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--cream-200); padding-top: 14px; font-size: .8rem;
}
.pc-lang { color: var(--ink-400); font-weight: 600; }
.pc-foot a { font-weight: 700; font-size: .84rem; }
@media (max-width: 640px) {
  .pc-foot { justify-content: center; }
}

/* directory cards open the full profile */
.pc-photo { display: block; }
.pc-body h3 a { color: inherit; }
.pc-body h3 a:hover { color: var(--emerald-600); }
.provider-card.is-link { cursor: pointer; }

/* ---- Provider profile page ---- */
.pf-hero { padding: 40px 0 110px; }
.pf-head { display: flex; gap: 32px; align-items: center; }
@media (max-width: 720px) { .pf-head { flex-direction: column; align-items: flex-start; gap: 20px; } }
.pf-photo { width: 148px; height: 148px; flex-shrink: 0; border-radius: 50%; padding: 4px; background: rgba(255,255,255,.2); box-shadow: 0 0 0 2px rgba(143,196,191,.55), var(--shadow-lg); }
.pf-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #fff; background: var(--emerald-50); }
.pf-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin: .25em 0 .1em; }
.pf-cred { color: rgba(234,240,250,.86); margin: 0 0 6px; font-weight: 600; }
.pf-loc { color: rgba(234,240,250,.82); margin: 0 0 18px; font-size: .95rem; }
.pf-status { background: rgba(143,196,191,.22); border: 1px solid rgba(143,196,191,.45); padding: .15em .7em; border-radius: 999px; font-size: .78rem; font-weight: 700; color: var(--gold-300); }
.pf-badge { display: inline-block; padding: .34em .95em; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.pf-badge.lv-supervisor { background: var(--grad-gold); color: #fff; }
.pf-badge.lv-certified { background: rgba(255,255,255,.94); color: var(--emerald-700); }
.pf-badge.lv-3 { background: var(--emerald-100); color: var(--emerald-800); }
.pf-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.pf-layout { display: grid; grid-template-columns: 1fr 330px; gap: 44px; align-items: start; }
@media (max-width: 940px) { .pf-layout { grid-template-columns: 1fr; } .pf-side { order: -1; } }
.pf-side { position: sticky; top: 100px; }
@media (max-width: 940px) { .pf-side { position: static; } }
.pf-section { margin-bottom: 46px; scroll-margin-top: 100px; }
.pf-section h2 { font-size: 1.6rem; margin-bottom: .55em; }
.pf-section p { color: var(--ink-700); }
.pf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pf-list li { padding: 12px 16px; background: var(--cream-50); border: 1px solid var(--cream-200); border-radius: 12px; font-size: .95rem; }
.pf-list b { color: var(--ink-950); }
.pf-facts { margin: 0 0 14px; }
.pf-facts dt { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); margin-top: 12px; }
.pf-facts dd { margin: 2px 0 0; font-size: .92rem; color: var(--ink-800); }
.pf-offers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .pf-offers { grid-template-columns: 1fr; } }
.pf-offer { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--cream-200); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-xs); transition: .25s; }
.pf-offer:hover { border-color: var(--emerald-300); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.pf-offer-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.pf-offer-meta { font-size: .8rem; color: var(--ink-400); font-weight: 600; }
.pf-offer h3 { font-size: 1.12rem; margin-bottom: .35em; }
.pf-offer p { font-size: .9rem; color: var(--ink-500); margin-bottom: 14px; flex: 1; }
.pf-offer-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; font-size: .78rem; color: var(--ink-500); line-height: 1.6; border-top: 1px solid var(--cream-200); padding-top: 12px; }
.pf-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.pf-form { background: var(--cream-50); border: 1px solid var(--cream-200); border-radius: var(--radius-lg); padding: 26px 28px; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .pf-row { grid-template-columns: 1fr; } }
.join-form .pf-check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; font-weight: 500; color: var(--ink-700); margin-bottom: 18px; }
.join-form .pf-check input { width: auto; padding: 0; margin-top: 4px; appearance: auto; accent-color: var(--emerald-700); }
.join-form .pf-form [hidden], .pf-form [hidden] { display: none !important; }

.dir-empty {
  text-align: center; padding: 56px 24px;
  background: rgba(255,255,255,.7); border: 1px dashed var(--cream-300);
  border-radius: var(--radius); color: var(--ink-500);
}
.dir-empty .big { font-size: 2.2rem; display: block; margin-bottom: 10px; }

/* ---- Certification pathway (public) ---- */
.pathway-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: pw; }
@media (max-width: 940px) { .pathway-track { grid-template-columns: 1fr; } }
.pw-step { position: relative; text-align: center; padding: 0 14px; }
.pw-step::before {
  content: ""; position: absolute; top: 26px; left: calc(-50% + 27px); width: calc(100% - 54px); height: 3px;
  background: var(--cream-300); border-radius: 3px;
}
.pw-step:first-child::before { display: none; }
.pw-step.reached::before { background: linear-gradient(90deg, var(--emerald-500), var(--emerald-400)); }
.pw-dot {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; position: relative; z-index: 1;
  background: #fff; border: 2px solid var(--cream-300); color: var(--ink-500);
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.pw-step.reached .pw-dot { background: var(--grad-emerald); border-color: transparent; color: #fff; box-shadow: var(--shadow-glow); }
.pw-step.gold .pw-dot { background: var(--grad-gold); border-color: transparent; color: #ffffff; box-shadow: var(--shadow-gold); }
.pw-step h3 { font-size: 1.05rem; margin-bottom: .25em; }
.pw-step .pw-sub { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); margin-bottom: 8px; }
.pw-step p { font-size: .86rem; color: var(--ink-500); margin: 0; line-height: 1.55; }
.pw-step .pw-note { display: inline-block; margin-top: 10px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: .35em .9em; border-radius: 999px; background: var(--cream-200); color: var(--ink-700); }
.pw-step .pw-note.ok { background: var(--emerald-50); color: var(--emerald-700); }
@media (max-width: 940px) {
  .pw-step { display: grid; grid-template-columns: 54px 1fr; gap: 18px; text-align: left; padding: 0 0 30px; }
  .pw-step::before { top: 54px; left: 26px; width: 3px; height: calc(100% - 54px); }
  .pw-step:first-child::before { display: block; }
  .pw-step:last-child::before { display: none; }
  .pw-step.reached::before { background: linear-gradient(180deg, var(--emerald-500), var(--emerald-400)); }
  .pw-dot { margin: 0; }
}

/* ---- Header scroll state ---- */
.site-header.scrolled { box-shadow: var(--shadow-md); }

/* ---- Back to top ---- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad-emerald); color: #fff; border: none; cursor: pointer;
  font-size: 1.15rem; box-shadow: var(--shadow-glow);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { transform: translateY(-3px); }

/* ---- Reveal (progressive enhancement) ---- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1{transition-delay:.08s}.js .reveal.d2{transition-delay:.16s}.js .reveal.d3{transition-delay:.24s}.js .reveal.d4{transition-delay:.32s}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .hero-orb::before, .hero-orb::after, .float-card { animation: none; }
}

/* Level 2 profiles (published only after admin approval) */
.pf-badge.lv-2 { background: rgba(255,255,255,.88); color: var(--ink-700); }
