/* ==========================================================================
   شذرات للتدريب التربوي — styles
   Mobile-first, RTL. Logical properties (inline-start = right in RTL).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Brand */
  --cream: #FAF6EA;        /* page background */
  --surface: #FFFFFF;      /* cards */
  --sand: #F1E8D2;         /* alternate section background */
  --tan: #E2C9A6;          /* logo dots */
  --gold: #C69F44;
  --gold-dark: #A47D27;    /* headings */
  --gold-ink: #8A6A1F;     /* gold text on light backgrounds (AA contrast) */
  --burgundy: #873047;     /* buttons & accents */
  --burgundy-hover: #6F2639;
  --text: #342D28;
  --muted: #6E6258;

  /* Semantic */
  --heading: var(--gold-dark);
  --join-bg: var(--burgundy);
  --on-accent: #FFFFFF;
  --line: rgba(52, 45, 40, .10);
  --line-strong: rgba(52, 45, 40, .20);
  --field-bg: #FFFDF8;
  --error: #B42318;
  --header-bg: rgba(250, 246, 234, .86);
  --tint-burgundy: rgba(135, 48, 71, .09);
  --tint-gold: rgba(198, 159, 68, .16);

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(52, 45, 40, .05), 0 6px 18px -8px rgba(52, 45, 40, .14);
  --shadow-md: 0 2px 4px rgba(52, 45, 40, .05), 0 18px 36px -16px rgba(52, 45, 40, .24);
  --shadow-lg: 0 30px 60px -28px rgba(52, 45, 40, .45);

  --font-head: "Rubik", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-body: "Almarai", system-ui, "Segoe UI", Tahoma, sans-serif;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 76px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #1E1814;
    --surface: #2A221C;
    --sand: #251D18;
    --tan: #D5B993;
    --gold: #D4AE55;
    --gold-dark: #E2BE6B;
    --gold-ink: #E2BE6B;
    --burgundy: #B4506A;
    --burgundy-hover: #C5617B;
    --text: #F3EBDD;
    --muted: #C2B4A3;

    --join-bg: #5C1F31;
    --line: rgba(243, 235, 221, .10);
    --line-strong: rgba(243, 235, 221, .22);
    --field-bg: #231C17;
    --error: #FF8A80;
    --header-bg: rgba(30, 24, 20, .82);
    --tint-burgundy: rgba(180, 80, 106, .18);
    --tint-gold: rgba(212, 174, 85, .16);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 20px -10px rgba(0, 0, 0, .5);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 40px -18px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, .75);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 8px);
  overflow-x: clip;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--cream);
  color: var(--text);
  font: 400 17px/1.8 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.3;
  color: var(--heading);
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 700; }
bdi, .ltr { unicode-bidi: isolate; }

.num { font-family: var(--font-body); font-variant-numeric: tabular-nums; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  padding: .6rem 1.1rem;
  border-radius: 999px;
  background: var(--burgundy);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  translate: 0 -200%;
  transition: translate .2s;
}
.skip-link:focus { translate: 0 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 600px) { .container { padding-inline: 24px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 50px;
  padding: .55rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s, background-color .25s, color .25s, border-color .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }

.btn-primary {
  background: var(--burgundy);
  color: var(--on-accent);
  box-shadow: 0 10px 22px -12px rgba(135, 48, 71, .7);
}
.btn-primary:hover {
  background: var(--burgundy-hover);
  box-shadow: 0 16px 30px -14px rgba(135, 48, 71, .8);
}
.btn-outline {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: transparent;
}
.btn-outline:hover { background: var(--tint-gold); }
.btn-ghost {
  background: var(--sand);
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--tint-gold); }
.btn-sm { min-height: 42px; padding: .4rem 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--sand);
  color: var(--text);
  transition: background-color .2s, transform .2s;
}
.icon-btn:hover { background: var(--tint-gold); transform: rotate(90deg); }

/* ---------- Shared bits ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem 1rem;
  border: 1px solid var(--tan);
  border-radius: 999px;
  background: var(--surface);
  color: var(--burgundy);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.5;
}

/* The logo's three dots, reused as a section marker */
.dots { display: inline-flex; gap: 6px; }
.dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--tan);
}
.dots i:nth-child(2) { background: var(--gold); }
.dots i:nth-child(3) { background: var(--burgundy); }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-block-end: 2rem;
}
.chip {
  min-height: 44px;
  padding: .35rem 1.15rem;
  border: 1.5px solid var(--tan);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.4;
  transition: background-color .25s, color .25s, border-color .25s, transform .2s;
}
.chip:hover { border-color: var(--gold); transform: translateY(-1px); }
.chip[aria-pressed="true"] {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--on-accent);
}

/* ---------- Header ---------- */
#top-sentinel { position: absolute; inset-block-start: 0; height: 24px; width: 1px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: box-shadow .35s, border-color .35s;
  animation: header-in .7s var(--ease-out) both;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -22px rgba(52, 45, 40, .5);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-h);
  transition: height .35s var(--ease-out);
}
.is-scrolled .header-inner { height: 62px; }

.brand { display: block; flex: none; border-radius: 10px; }
.brand img {
  width: auto;
  height: 50px;
  transition: height .35s var(--ease-out);
}
.is-scrolled .brand img { height: 42px; }

.main-nav { display: none; }
@media (min-width: 720px) {
  .main-nav { display: block; flex: 1; }
  .main-nav ul { display: flex; justify-content: center; gap: clamp(1rem, 3vw, 2.4rem); }
  .main-nav a {
    position: relative;
    display: inline-block;
    padding-block: .4rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    transition: color .2s;
  }
  .main-nav a::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .4s var(--ease-out);
  }
  .main-nav a:hover { color: var(--burgundy); }
  .main-nav a:hover::after,
  .main-nav a.is-active::after { transform: scaleX(1); }
  .main-nav a.is-active { color: var(--burgundy); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(28px, 6vw, 88px) clamp(40px, 7vw, 96px);
  background:
    radial-gradient(60% 50% at 15% 30%, var(--tint-gold), transparent 70%),
    radial-gradient(50% 45% at 90% 85%, var(--tint-burgundy), transparent 70%),
    var(--cream);
  overflow: clip;
}
.hero-inner {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; }
}
.hero-text { display: grid; justify-items: start; gap: 1.1rem; min-width: 0; }
.hero h1 {
  font-size: clamp(2.15rem, 7vw, 3.9rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}
.hero h1 .accent { color: var(--heading); }
.lead {
  max-width: 34ch;
  font-size: clamp(1.1rem, 2.6vw, 1.32rem);
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: .5rem; }

/* Staggered entrance */
.hero-item {
  animation: rise .9s var(--ease-out) both;
  animation-delay: calc(.15s + var(--i, 0) * 90ms);
}

/* Three-circle motif */
.hero-art {
  display: grid;
  justify-items: center;
  gap: .75rem;
  min-width: 0;
}
.circles {
  position: relative;
  width: min(400px, 84vw);
  aspect-ratio: 1;
  isolation: isolate;
}
.circle {
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.05rem, 4vw, 1.4rem);
  animation:
    pop 1s var(--ease-spring) both,
    float 9s ease-in-out infinite;
  animation-delay: calc(.4s + var(--i) * .16s), calc(var(--i) * -3s);
}
.circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--c);
  opacity: .93;
  mix-blend-mode: multiply;
  box-shadow: inset 0 -14px 30px -18px rgba(0, 0, 0, .25);
  z-index: -1;
}
.circle > span { position: relative; translate: var(--lx, 0) var(--ly, 0); }
.c-learner { --c: var(--tan); top: 0; left: 21%; color: #3A2F25; --ly: -26%; --fx: 6px; --fy: -10px; }
.c-trainer { --c: var(--gold); bottom: 4%; right: 0; color: #2A2018; --lx: 22%; --ly: 18%; --fx: -8px; --fy: -6px; }
.c-contrib { --c: var(--burgundy); bottom: 4%; left: 0; color: #FFFFFF; --lx: -22%; --ly: 18%; --fx: 8px; --fy: -8px; }
.hero-family {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--muted);
  animation: rise .9s var(--ease-out) 1.1s both;
}
.hero-family::before, .hero-family::after {
  content: "";
  width: 28px; height: 2px;
  border-radius: 2px;
  background: var(--tan);
}
@media (prefers-color-scheme: dark) {
  .circle::before { mix-blend-mode: normal; opacity: .9; }
  .c-learner { color: #2A2018; }
}

/* Gentle parallax on scroll (progressive enhancement, no JS) */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .circles {
      animation: parallax linear both;
      animation-timeline: scroll(root);
      animation-range: 0 700px;
    }
  }
}

/* ---------- Wave dividers ---------- */
.wave {
  display: block;
  height: clamp(28px, 5vw, 64px);
  margin-block: -1px;
  background: var(--from);
  color: var(--to);
  line-height: 0;
  position: relative;
  z-index: 1;
}
.wave svg { width: 100%; height: 100%; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(48px, 8vw, 104px); background: var(--cream); }
.section--sand { background: var(--sand); }

.section-head {
  display: grid;
  justify-items: center;
  gap: .75rem;
  text-align: center;
  margin-block-end: clamp(1.75rem, 4vw, 2.75rem);
}
.section-head h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: .7rem auto 0;
  border-radius: 4px;
  background: var(--gold);
  transform-origin: right;
}
.section-sub {
  max-width: 52ch;
  color: var(--muted);
  font-size: 1.05rem;
}
.section-head--light h2 { color: #FFFFFF; }
.section-head--light .section-sub { color: rgba(255, 255, 255, .86); }
.section-head--light .dots i:nth-child(3) { background: #FFFFFF; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-block-end: clamp(2rem, 5vw, 3rem);
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.about-lead {
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  line-height: 1.9;
}
.quote-card {
  position: relative;
  margin: 0;
  padding: 2.25rem 1.75rem 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border-inline-start: 5px solid var(--burgundy);
}
.quote-card::before {
  content: "”";
  position: absolute;
  top: -.35em;
  inset-inline-start: .45em;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 5rem;
  line-height: 1;
  color: var(--gold);
}
.quote-card p {
  font-size: clamp(1.08rem, 2.4vw, 1.2rem);
  font-weight: 700;
  line-height: 1.9;
}

/* Vision & mission */
.vm {
  display: grid;
  gap: 1.25rem;
  margin-block-end: clamp(2rem, 5vw, 3rem);
}
@media (min-width: 760px) {
  .vm { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
.vm-card {
  --accent: var(--gold-dark);
  --tint: var(--tint-gold);
  position: relative;
  overflow: hidden;
  padding: 2rem 1.6rem 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border-block-start: 5px solid var(--accent);
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.vm-card--mission { --accent: var(--burgundy); --tint: var(--tint-burgundy); }
.vm-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
/* soft logo-dot in the corner */
.vm-card::after {
  content: "";
  position: absolute;
  inset-block-start: -48px;
  inset-inline-end: -48px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: var(--tint);
  transition: transform .6s var(--ease-out);
}
.vm-card:hover::after { transform: scale(1.15); }
.vm-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-block-end: 1rem;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
}
.vm-icon .icon { width: 28px; height: 28px; }
.vm-card h3 {
  position: relative;
  z-index: 1;
  margin-block-end: .6rem;
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  color: var(--accent);
}
.vm-card p { position: relative; z-index: 1; line-height: 1.95; }
.vm-card p strong { color: var(--accent); }

.audience {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin-block-end: clamp(2rem, 5vw, 3rem);
  text-align: center;
}
.audience h3 { font-size: 1.3rem; }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.pills li {
  padding: .45rem 1.15rem;
  border: 1px solid var(--tan);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
  line-height: 1.5;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
}
.fact {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.fact:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.fact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--burgundy);
}
.fact-icon .icon { width: 26px; height: 26px; }
.fact p { font-weight: 700; line-height: 1.6; }
.fact p strong { color: var(--burgundy); }

/* ---------- Programs ---------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.program-card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-width: 0;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.program-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.tag {
  align-self: flex-start;
  padding: .15rem .8rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.7;
  background: var(--tint-burgundy);
  color: var(--burgundy);
}
.tag--teens { background: var(--tint-gold); color: var(--gold-ink); }
.tag--parents { background: rgba(226, 201, 166, .35); color: var(--text); }
.program-card h3 { font-size: 1.3rem; }
.program-card p { color: var(--muted); font-size: 1rem; }
.program-card .pending { font-style: italic; opacity: .85; }
.program-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-block-start: auto;
  padding-block-start: .6rem;
  border-top: 1px dashed var(--line-strong);
}
.react {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 42px;
  padding: .3rem .95rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: .95rem;
  transition: color .2s, border-color .2s, background-color .2s;
}
.react svg {
  width: 20px; height: 20px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: fill .2s;
}
.react:hover { border-color: var(--burgundy); color: var(--burgundy); }
.react[aria-pressed="true"] {
  border-color: var(--burgundy);
  background: var(--tint-burgundy);
  color: var(--burgundy);
}
.react[aria-pressed="true"] svg { fill: currentColor; }
.react.is-pop svg { animation: heart-pop .5s var(--ease-spring); }
.react .count:empty { display: none; }
.react[aria-busy="true"] { cursor: progress; }
.program-actions .btn { margin-inline-start: auto; }

/* ---------- Gallery ---------- */
.gallery { overflow: clip; }
.gallery-switch { transition: opacity .35s ease, translate .35s var(--ease-out); }
.gallery-switch.is-switching { opacity: 0; translate: 0 14px; }

.show {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background: #2B231D;
  box-shadow: var(--shadow-lg);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
@media (min-width: 700px) {
  .show { aspect-ratio: 16 / 9; border-radius: 32px; }
}
.show:focus-visible { outline-offset: 4px; }
.show-stage { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.slide.is-active { opacity: 1; z-index: 1; }
.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}
.slide .slide-bg {
  filter: blur(26px) brightness(.62);
  transform: scale(1.15);
}
.slide.is-contain .slide-main { object-fit: contain; }
.slide.is-active .slide-main,
.slide.is-leaving .slide-main {
  animation: kb-a 9s ease-out forwards;
  will-change: transform;
}
.slide.kb-b.is-active .slide-main,
.slide.kb-b.is-leaving .slide-main { animation-name: kb-b; }

.show-shade {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 62%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(22, 15, 10, .82), rgba(22, 15, 10, .4) 45%, transparent);
}
.show-caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  justify-items: start;
  gap: .35rem;
  padding: 1.25rem 1.25rem 1.5rem;
  color: #FFFFFF;
  pointer-events: none;
}
@media (min-width: 700px) {
  .show-caption { padding: 2rem 2.25rem 2.1rem; max-width: 70%; }
}
.show-caption > * {
  opacity: 0;
  translate: 0 14px;
  transition: opacity .25s ease, translate .25s ease;
}
.show-caption.is-in > * {
  opacity: 1;
  translate: 0 0;
  transition: opacity .6s ease, translate .6s var(--ease-out);
}
.show-caption.is-in > :nth-child(2) { transition-delay: .08s; }
.show-caption.is-in > :nth-child(3) { transition-delay: .16s; }
.show-caption.is-in > :nth-child(4) { transition-delay: .24s; }
.show-title {
  color: #FFFFFF;
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
  font-weight: 700;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}
.show-meta {
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
  opacity: .9;
}
.show-photo-caption { font-size: .98rem; line-height: 1.6; }
.show-meta:empty, .show-photo-caption:empty, .lb-desc:empty { display: none; }

.pill-type {
  display: inline-block;
  padding: .12rem .75rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.8;
  background: #873047;
  color: #FFFFFF;
}
.pill-type[data-type="participated"] { background: #C69F44; color: #2A2018; }
.pill-type[data-type="activity"] { background: #E2C9A6; color: #2A2018; }

.glass-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  color: #FFFFFF;
  transition: background-color .25s, transform .25s var(--ease-out);
}
.glass-btn:hover { background: rgba(255, 255, 255, .3); }
.glass-btn:active { transform: scale(.94); }
.glass-btn--sm { width: 40px; height: 40px; }
.glass-btn .icon { width: 22px; height: 22px; }

.show-prev, .show-next {
  position: absolute;
  top: 50%;
  z-index: 4;
  translate: 0 -50%;
}
.show-prev { inset-inline-start: 12px; }
.show-next { inset-inline-end: 12px; }
@media (max-width: 699px) {
  .show-prev, .show-next { width: 42px; height: 42px; top: 42%; }
}

.show-bar {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.show-counter {
  padding: .2rem .8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .38);
  color: #FFFFFF;
  font-weight: 700;
  font-size: .88rem;
}
#show-toggle .i-play { display: none; }
#show-toggle[aria-pressed="true"] .i-play { display: block; }
#show-toggle[aria-pressed="true"] .i-pause { display: none; }

.show-progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  z-index: 4;
  background: rgba(255, 255, 255, .18);
}
.show-progress span {
  display: block;
  height: 100%;
  background: var(--gold);
  transform-origin: right;
  transform: scaleX(0);
}
.show-progress span.is-running { animation: progress 5s linear forwards; }
.show.is-paused .show-progress span { animation-play-state: paused; }
.show.no-autoplay .show-progress { display: none; }

.filmstrip-wrap { margin-block-start: 1rem; }
.filmstrip {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding: .5rem .25rem .75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--tan) transparent;
}
.filmstrip li { flex: none; scroll-snap-align: center; }
.thumb {
  display: block;
  width: 84px;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--tan);
  opacity: .62;
  transition: opacity .3s, box-shadow .3s, transform .3s var(--ease-out);
}
@media (min-width: 700px) { .thumb { width: 108px; } }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: .9; transform: translateY(-2px); }
.thumb[aria-current="true"] {
  opacity: 1;
  box-shadow: 0 0 0 3px var(--gold), 0 8px 18px -8px rgba(0, 0, 0, .4);
}

.gallery-empty {
  display: grid;
  justify-items: center;
  gap: .9rem;
  max-width: 560px;
  margin-inline: auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 1.1rem;
}

/* Moving photo ribbon */
.ribbon {
  display: grid;
  gap: .8rem;
  margin-block-start: clamp(2.5rem, 6vw, 4.5rem);
  direction: ltr;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}
.ribbon-row { overflow: hidden; }
.ribbon-track {
  display: flex;
  width: max-content;
  animation: marquee var(--dur, 80s) linear infinite;
}
.ribbon-track[data-dir="b"] { animation-direction: reverse; }
.ribbon:hover .ribbon-track,
.ribbon:focus-within .ribbon-track { animation-play-state: paused; }
.ribbon-set { display: flex; gap: .8rem; padding-right: .8rem; }
.ribbon-item {
  position: relative;
  flex: none;
  width: 124px;
  height: 92px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--tan);
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
@media (min-width: 700px) { .ribbon-item { width: 164px; height: 118px; } }
.ribbon-item img { width: 100%; height: 100%; object-fit: cover; }
.ribbon-item:hover, .ribbon-item:focus-visible { transform: scale(1.05); box-shadow: var(--shadow-md); z-index: 1; }
.ribbon-label {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.2rem .55rem .4rem;
  direction: rtl;
  background: linear-gradient(to top, rgba(22, 15, 10, .82), transparent);
  color: #FFFFFF;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: start;
  opacity: 0;
  translate: 0 6px;
  transition: opacity .3s, translate .3s;
}
@media (hover: hover) {
  .ribbon-item:hover .ribbon-label,
  .ribbon-item:focus-visible .ribbon-label { opacity: 1; translate: 0 0; }
}

.gallery-more { display: flex; justify-content: center; margin-block-start: 2.25rem; }

/* ---------- Join ---------- */
.join {
  position: relative;
  padding-block: clamp(48px, 8vw, 100px);
  background:
    radial-gradient(circle at 12% 20%, rgba(226, 201, 166, .16) 0 2px, transparent 3px) 0 0 / 34px 34px,
    radial-gradient(45% 38% at 85% 50%, rgba(198, 159, 68, .2), transparent 100%),
    var(--join-bg);
  color: #FFFFFF;
}
.join-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}
.join-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .8rem;
  height: 100%;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 24px 44px -24px rgba(0, 0, 0, .55);
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
.join-card:hover { transform: translateY(-6px); box-shadow: 0 32px 54px -24px rgba(0, 0, 0, .6); }
.join-card:focus-visible { outline-color: var(--tan); outline-offset: 4px; }
.join-card h3 { font-size: 1.55rem; font-weight: 800; }
.join-card p { flex: 1; color: var(--muted); }
.join-card .btn { margin-block-start: .4rem; }
.join-card:hover .btn-primary { background: var(--burgundy-hover); }

.role-dots { display: inline-flex; gap: 7px; }
.role-dots i {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--tan);
  opacity: .4;
  transition: opacity .35s, scale .45s var(--ease-spring);
}
.role-dots i:nth-child(2) { background: var(--gold); }
.role-dots i:nth-child(3) { background: var(--burgundy); }
.role-dots i.on { opacity: 1; scale: 1.25; }
.join-card:hover .role-dots i { opacity: 1; }
.join-card:hover .role-dots i.on { scale: 1.6; }

.join-closing {
  margin-block-start: 2.5rem;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.5;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 1.1rem;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
  transition: transform .35s var(--ease-out), box-shadow .35s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.contact-card h3 { font-size: 1.2rem; }
.contact-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--sand);
  color: var(--burgundy);
}
.contact-icon .icon { width: 24px; height: 24px; }
.contact-value { font-weight: 700; font-size: 1.08rem; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block-start: auto;
  padding-block-start: .5rem;
}
#copy-number.is-done { background: var(--tint-burgundy); color: var(--burgundy); border-color: var(--burgundy); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sand);
  padding-block: 1.5rem calc(5.5rem + env(safe-area-inset-bottom));
}
@media (min-width: 700px) { .site-footer { padding-block-end: 2.5rem; } }
.footer-inner {
  display: grid;
  justify-items: center;
  gap: .6rem;
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
}
.footer-inner img { width: auto; height: 56px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  left: calc(18px + env(safe-area-inset-left));
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .45);
  transition: transform .3s var(--ease-out), box-shadow .3s;
  animation: pop .7s var(--ease-spring) 1.4s both;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08); box-shadow: 0 16px 32px -10px rgba(0, 0, 0, .5); }
.wa-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: ring 2.4s ease-out 2.2s 2;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: .65rem 1.3rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--cream);
  font-weight: 700;
  font-size: .95rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  translate: -50% 16px;
  pointer-events: none;
  transition: opacity .3s, translate .35s var(--ease-out);
}
.toast.is-on { opacity: 1; translate: -50% 0; }
.toast:empty { display: none; }

/* ---------- Dialogs (shared) ---------- */
html.has-dialog { overflow: hidden; }

dialog::backdrop { background: rgba(26, 18, 13, .55); }
dialog[open]::backdrop { animation: fade-in .3s ease both; }
dialog.is-closing::backdrop { animation: fade-out .25s ease both; }

/* Interest bottom sheet */
.sheet {
  width: 100%;
  max-width: none;
  max-height: 100dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.sheet::backdrop { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-panel {
  position: relative;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.sheet[open] .sheet-panel { animation: sheet-up .45s var(--ease-out) both; }
.sheet.is-closing .sheet-panel { animation: sheet-down .28s ease-in both; }
@media (min-width: 700px) {
  .sheet { width: min(580px, calc(100% - 32px)); margin: auto; }
  .sheet-panel { border-radius: 26px; padding: 2rem 2rem 1.75rem; }
  .sheet[open] .sheet-panel { animation-name: sheet-zoom; }
  .sheet.is-closing .sheet-panel { animation-name: sheet-zoom-out; }
}
.sheet-close { position: absolute; top: 14px; inset-inline-end: 14px; }
.interest-form { display: grid; gap: 1rem; }
.interest-form h2 { font-size: 1.6rem; font-weight: 800; }
.sheet-sub { color: var(--muted); margin-block-start: -.5rem; }

.field { display: grid; gap: .35rem; min-width: 0; }
.field label { font-weight: 700; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 520px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field input[type="text"],
.field input[type="tel"],
.field select {
  width: 100%;
  min-height: 50px;
  padding: .55rem .95rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  font-size: 16px; /* ≥16px avoids iOS zoom on focus */
  line-height: 1.5;
  transition: border-color .2s, box-shadow .2s;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A8B7C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-position: left .9rem center;
  background-size: 18px;
  background-repeat: no-repeat;
  padding-inline-end: 2.6rem;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--tint-gold); }
.field [aria-invalid="true"], .phone-field:has([aria-invalid="true"]) { border-color: var(--error); }

.phone-field {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.phone-field:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--tint-gold); }
.phone-prefix {
  display: grid;
  place-items: center;
  padding-inline: .9rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}
.phone-field input[type="tel"] { flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; }
.phone-field input[type="tel"]:focus { box-shadow: none; }
.field-hint { font-size: .82rem; color: var(--muted); }
.field-error { font-size: .85rem; color: var(--error); font-weight: 700; }
.field-error:empty { display: none; }

.check { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; font-weight: 400 !important; line-height: 1.6; }
.check input { width: 22px; height: 22px; margin: .15rem 0 0; flex: none; accent-color: var(--burgundy); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: .95rem; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }
.form-status a { color: var(--burgundy); }
.sheet-note { font-size: .85rem; color: var(--muted); text-align: center; }

.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.is-loading .btn-spinner { display: inline-block; }

.sheet-success { display: grid; justify-items: center; gap: .9rem; padding-block: 1.5rem .5rem; text-align: center; }
.sheet-success:focus { outline: none; }
.sheet-success h2 { font-size: 1.7rem; }
.success-mark {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--tint-burgundy);
  color: var(--burgundy);
  animation: pop .6s var(--ease-spring) both;
}
.success-mark .icon { width: 36px; height: 36px; }

/* Lightbox */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 10, 8, .97);
  color: #FFFFFF;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { animation: fade-in .3s ease both; }
.lightbox.is-closing { animation: fade-out .25s ease both; }
.lb-inner {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  padding: calc(64px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
  touch-action: pan-y;
}
.lb-figure {
  display: grid;
  justify-items: center;
  gap: .9rem;
  max-width: min(1200px, 100%);
  margin: 0;
}
.lb-stage { display: grid; place-items: center; }
#lb-img {
  max-width: 100%;
  max-height: calc(100dvh - 230px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
  transition: opacity .3s ease;
}
#lb-img.is-loading { opacity: 0; }
.lightbox[open] #lb-img { animation: zoom-in .4s var(--ease-out) both; }
.lb-caption { display: grid; justify-items: center; gap: .3rem; max-width: 62ch; text-align: center; }
.lb-title { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
.lb-photo-caption { font-size: .98rem; }
.lb-desc { font-size: .9rem; opacity: .8; }
/* Physical sides: the counter is dir="ltr", so logical insets would flip. */
.lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; }
.lb-counter {
  position: absolute;
  top: calc(22px + env(safe-area-inset-top));
  right: 18px;
  font-weight: 700;
  opacity: .85;
}
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { inset-inline-start: 12px; }
.lb-next { inset-inline-end: 12px; }
@media (max-width: 699px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); translate: none; }
  .lb-inner { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ---------- Scroll reveal ---------- */
/* Hidden only when JS is running, so content never disappears without it. */
.js [data-reveal] {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .8s ease, translate .9s var(--ease-out), scale .9s var(--ease-out);
}
.js [data-reveal="zoom"] { translate: none; scale: .96; }
.js [data-reveal="fade-start"] { translate: 32px 0; }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }

.js [data-reveal][data-stagger] { opacity: 1; translate: none; }
.js [data-stagger] > * {
  opacity: 0;
  translate: 0 20px;
  transition:
    opacity .7s ease calc(var(--i, 0) * 80ms),
    translate .8s var(--ease-out) calc(var(--i, 0) * 80ms),
    transform .35s var(--ease-out),
    box-shadow .35s;
}
.js .is-in[data-stagger] > *,
.js .is-in [data-stagger] > * { opacity: 1; translate: 0 0; }

/* Section-head flourishes */
.js .section-head .dots i { scale: 0; transition: scale .5s var(--ease-spring); }
.js .section-head.is-in .dots i { scale: 1; }
.js .section-head.is-in .dots i:nth-child(2) { transition-delay: .1s; }
.js .section-head.is-in .dots i:nth-child(3) { transition-delay: .2s; }
.js .section-head h2::after { scale: 0 1; transition: scale .9s var(--ease-out) .3s; }
.js .section-head.is-in h2::after { scale: 1 1; }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
@keyframes header-in { from { opacity: 0; translate: 0 -100%; } to { opacity: 1; translate: 0 0; } }
@keyframes pop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: var(--fx, 0) var(--fy, -10px); }
}
@keyframes parallax { to { transform: translateY(70px); } }
@keyframes kb-a {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.6%, -1.2%); }
}
@keyframes kb-b {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.08) translate(1.6%, 1.2%); }
}
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes heart-pop { 0% { scale: 1; } 40% { scale: 1.35; } 100% { scale: 1; } }
@keyframes ring { 0% { opacity: .7; scale: 1; } 100% { opacity: 0; scale: 1.6; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes zoom-in { from { opacity: 0; scale: .96; } }
@keyframes sheet-up { from { translate: 0 100%; } }
@keyframes sheet-down { to { translate: 0 100%; } }
@keyframes sheet-zoom { from { opacity: 0; scale: .94; translate: 0 12px; } }
@keyframes sheet-zoom-out { to { opacity: 0; scale: .96; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal], .js [data-stagger] > *, .hero-item, .show-caption > * {
    opacity: 1 !important;
    translate: none !important;
    scale: none !important;
  }
  .circle { animation: none !important; }
  .slide .slide-main { animation: none !important; }
  .ribbon { -webkit-mask-image: none; mask-image: none; }
  .ribbon-row { overflow-x: auto; scrollbar-width: thin; }
  .ribbon-track { animation: none !important; }
  .ribbon-set[aria-hidden="true"] { display: none; }
  .wa-float::after { display: none; }
}
