/* ==========================================================================
   Mikvah Delhi — mini site
   Mobile-first. Desktop layout follows the 1920px InDesign design.
   ========================================================================== */

/* ---------- Fonts (from the design package) ---------- */
@font-face {
  font-family: "Almoni";
  src: url("../fonts/almoni-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Almoni";
  src: url("../fonts/almoni-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Shoofra";
  src: url("../fonts/bushoofra.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Leibushor";
  src: url("../fonts/yael-leibushor.woff2") format("woff2");
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --brown: #332517;
  --brown-deep: #22180e;
  --copper: #bd6d31;
  --gold: #ffc57b;
  --gold-pale: #feeea2;
  --gold-warm: #e3a05c;
  --paper: #ffffff;
  --sand: #faf6f0;
  --line: #e6ddd1;
  --muted: #7a6a58;
  --error: #b3261e;

  --gold-grad: linear-gradient(90deg, var(--copper) 0%, var(--gold) 41%, var(--gold-pale) 73%, var(--gold-warm) 100%);
  --gold-grad-text: linear-gradient(90deg, var(--copper) 0%, var(--gold) 35%, var(--gold-pale) 60%, var(--gold) 80%, var(--gold-warm) 100%);

  --font-body: "Almoni", "Assistant", "Heebo", "Arial Hebrew", Arial, sans-serif;
  --font-display: "Shoofra", var(--font-body);
  --font-script: "Leibushor", var(--font-body);

  --gutter: 20px;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--brown);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .story p, .hero__lead { text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-warm); outline-offset: 3px; }

.gold-text {
  background: var(--gold-grad-text);
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.copper { color: var(--copper); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 52px;
  padding: .7em 1.8em;
  border: 0;
  border-radius: 999px;
  font: 700 1.1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--gold {
  background: var(--gold-grad);
  color: var(--brown);
  box-shadow: 0 8px 24px rgba(189, 109, 49, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.btn--gold:hover { box-shadow: 0 12px 30px rgba(189, 109, 49, .5), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn--brown {
  background: var(--brown);
  color: var(--gold);
  box-shadow: 0 8px 22px rgba(51, 37, 23, .28);
}
.btn--brown:hover { box-shadow: 0 12px 28px rgba(51, 37, 23, .38); filter: brightness(1.12); }
.btn--small { min-height: 44px; padding: .55em 1.3em; font-size: 1rem; }
.btn__arrow { width: 1.1em; height: 1.1em; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brown);
  color: var(--paper);
  padding: 0 var(--gutter) calc(22vw + 24px);
  text-align: center;
}

/* Photo — on mobile it sits on top and fades down into the brown */
.hero__media {
  position: absolute;
  inset: 0 0 auto 0;
  height: 128vw;
  max-height: 760px;
  z-index: -2;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0,0,0,.45) 74%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 52%, rgba(0,0,0,.45) 74%, transparent 96%);
}
.hero__media img,
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
/* The video sits over the still photo and fades in once it is actually playing */
.hero__video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero__video.is-playing { opacity: 1; }

/* Top darkening band (the 58% multiply strip in the design) */
.hero__shade {
  position: absolute;
  inset: 0 0 auto 0;
  height: 40%;
  max-height: 420px;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(34, 24, 14, .62), rgba(34, 24, 14, 0));
  pointer-events: none;
}

.hero__sweep { display: none; }

.hero__logo {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 64px;
  z-index: 2;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35));
}

.hero__content {
  position: relative;
  padding-top: min(66vw, 440px);   /* keeps the button clear of iOS Safari's floating address bar */
  max-width: 560px;
  margin: 0 auto;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(84px, 27vw, 150px);
  line-height: .82;
  letter-spacing: -.025em;
  filter: drop-shadow(0 6px 24px rgba(20, 12, 4, .45));   /* also shades the gradient-clipped line */
}
.hero__title-line { display: block; }

/* Mikvah name — the main header above the slogan */
.hero__name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  margin-bottom: .55em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(21px, 6.6vw, 32px);
  line-height: 1.2;
  letter-spacing: .06em;
  white-space: nowrap;   /* the name always stays on one line; the side rules shrink instead */
}
.hero__name::before,
.hero__name::after {
  content: "";
  flex: 0 1 1.6em;
  min-width: .6em;
  height: 1.5px;
  background: linear-gradient(to right, var(--gold), transparent);
  transform-origin: left;
}
.hero__name::after {
  background: linear-gradient(to left, var(--gold), transparent);
  transform-origin: right;
}
.hero__name-text {
  filter: drop-shadow(0 1px 2px rgba(20, 12, 4, .9)) drop-shadow(0 2px 12px rgba(20, 12, 4, .7));   /* legible over the photo */
  background: var(--gold-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero__script {
  font-family: var(--font-script);
  font-size: clamp(44px, 13vw, 76px);
  line-height: 1;
  margin-top: .08em;
}

.hero__lead {
  margin: 22px auto 0;
  max-width: 30em;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .92);
}
.hero__lead br { display: none; }

.hero__cta { margin-top: 28px; }

.hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: calc(22vw + 26px);
  display: block;
  pointer-events: none;
}

/* ==========================================================================
   STORY
   ========================================================================== */
.story {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px var(--gutter) 56px;
  text-align: center;
  font-size: 18px;
  line-height: 1.7;
}
/* Water drop that falls and ripples, on a loop */
.drip { position: relative; width: 64px; height: 58px; margin: 0 auto 16px; }
.drip__drop { position: absolute; left: 50%; top: 0; width: 22px; height: 30px; margin-left: -11px; transform-origin: 50% 100%; }
.drip__ripple {
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 56px;
  height: 12px;
  margin-left: -28px;
  border: 2px solid var(--gold-warm);
  border-radius: 50%;
  opacity: 0;
}
.drip.is-in .drip__drop { animation: drip 5s infinite; }
.drip.is-in .drip__ripple { animation: ripple 5s infinite ease-out; }
.drip.is-in .drip__ripple + .drip__ripple { animation-delay: .22s; border-width: 1.5px; }
.story p + p { margin-top: .55em; }
.story__call {
  margin-top: 1.1em !important;
  font-weight: 700;
  font-size: 1.12em;
  line-height: 1.5;
}
.story__moshiach { color: var(--copper); }

/* ==========================================================================
   AMOUNTS (gold band)
   ========================================================================== */
.give {
  position: relative;
  background: var(--gold-grad);
  padding: 40px var(--gutter) 44px;
  text-align: center;
  scroll-margin-top: 0;
}
.give { overflow: hidden; }
.give::before {   /* soft sheen + a slow light sweep across the gold */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .38) 50%, transparent 62%) -30% 0 / 250% 100% no-repeat,
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .25), transparent 60%);
  animation: shine 9s ease-in-out 2s infinite;
  pointer-events: none;
}
.give__title {
  position: relative;
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 26px;
}

.amounts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 16px 18px;
}

.amount { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.amount input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.amount__disc {
  display: grid;
  place-items: center;
  width: clamp(88px, 26vw, 112px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brown);
  box-shadow: 0 8px 20px rgba(51, 37, 23, .28);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.amount__value {
  font-weight: 700;
  font-size: clamp(21px, 6.2vw, 27px);
  line-height: 1;
  direction: ltr;
  background: var(--gold-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.amount:hover .amount__disc { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(51, 37, 23, .35); }
.amount input:focus-visible + .amount__disc { outline: 3px solid var(--brown); outline-offset: 4px; }
.amount input:checked + .amount__disc {
  transform: scale(1.08);
  background: radial-gradient(circle at 50% 35%, #4a3622, var(--brown) 70%);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px rgba(51, 37, 23, .25), 0 16px 34px rgba(51, 37, 23, .4);
}
.amount input:checked + .amount__disc::after {   /* check badge */
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23332517' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  box-shadow: 0 2px 6px rgba(51, 37, 23, .3);
}

.other-amount {
  position: relative;
  max-width: 300px;
  margin: 26px auto 0;
  animation: rise .35s var(--ease);
}
.other-amount label { display: block; font-weight: 700; margin-bottom: 8px; }
.other-amount__field {
  display: flex;
  align-items: center;
  direction: ltr;
  background: var(--paper);
  border-radius: 999px;
  padding: 0 22px;
  box-shadow: 0 8px 20px rgba(51, 37, 23, .2);
}
.other-amount__currency { font-weight: 700; font-size: 26px; color: var(--copper); }
.other-amount input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: 700 26px/1 var(--font-body);
  color: var(--brown);
  padding: 14px 8px;
  text-align: center;
}
.other-amount input:focus { outline: none; }
.other-amount__field:focus-within { outline: 3px solid var(--brown); outline-offset: 3px; }

/* One-time / monthly tabs on the gold band */
.give-tabs {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: min(340px, 100%);
  margin-bottom: 26px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(51, 37, 23, .12);
  box-shadow: inset 0 1px 3px rgba(51, 37, 23, .18);
}
.give-tabs__tab { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.give-tabs__tab input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.give-tabs__tab span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 19px;
  color: var(--brown);
  transition: background .25s var(--ease), color .25s, box-shadow .25s;
}
.give-tabs__tab input:checked + span { background: var(--brown); color: var(--gold); box-shadow: 0 6px 16px rgba(51, 37, 23, .3); }
.give-tabs__tab input:focus-visible + span { outline: 3px solid var(--brown); outline-offset: 2px; }
.give-panel { position: relative; }
.give-panel[hidden] { display: none; }

/* Monthly packages: amount × months inside the disc, the package total under it */
.amount__disc { align-content: center; }
.amount__months {
  margin-top: 4px;
  font-size: clamp(11px, 3.2vw, 14px);
  font-weight: 700;
  line-height: 1;
  color: var(--gold-pale);
  white-space: nowrap;
}
.amount__total {
  display: block;
  margin-top: 8px;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 700;
  color: var(--brown);
  white-space: nowrap;
}
.amounts--monthly { row-gap: 14px; }

.other-monthly { max-width: 380px; }
.other-monthly__row { display: grid; grid-template-columns: 1fr 112px; gap: 12px; }
.other-monthly__row > div { min-width: 0; }
.other-monthly input { width: 100%; }
.other-monthly .other-amount__field { padding: 0 16px; }
.other-monthly__total { min-height: 1.5em; margin-top: 12px; font-weight: 700; }
.other-monthly__total.is-error { color: var(--error); }
.give__note { position: relative; margin-top: 22px; font-size: 16px; color: var(--brown); }

/* ==========================================================================
   DONATE
   ========================================================================== */
.donate {
  padding: 52px var(--gutter) 64px;
  scroll-margin-top: 12px;
  overflow-x: clip;   /* side slide-ins never cause a horizontal scrollbar */
}
.donate__inner {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
}
.donate__title {
  font-weight: 700;
  font-size: clamp(36px, 11vw, 56px);
  line-height: 1;
  text-align: center;
}
.donate__title span { display: inline-block; }   /* inline-block so each word can slide in */
.donate__title .copper {   /* copper words with a gold glint that sweeps across now and then */
  /* repeats (copper at both edges) so the text is always fully covered while the glint moves */
  background: linear-gradient(100deg, var(--copper) 42%, #f3bd7f 50%, var(--copper) 58%) 130% 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.donate__title .donate__moshiach {
  display: block;
  margin-top: .45em;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: .56em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--brown);
}

.donate-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px 20px;
  box-shadow: 0 24px 60px -24px rgba(51, 37, 23, .25);
}
.donate-form__summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--sand);
  font-size: 17px;
}
.donate-form__amount { font-size: 24px; color: var(--copper); direction: ltr; unicode-bidi: isolate; }
.donate-form__amount.is-empty { font-size: 17px; color: var(--muted); font-weight: 400; }
.donate-form__change { margin-inline-start: auto; font-size: 15px; color: var(--muted); }

.donate-form__plan { font-size: 16px; font-weight: 700; color: var(--copper); }

.donate-form__group {
  border: 0;
  margin: 22px 0 0;
  padding: 0;
  min-width: 0;
}
.donate-form__group legend {
  padding: 0;
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--copper);
}

.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label { font-size: 15px; font-weight: 700; }
.field__hint { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font: 400 17px var(--font-body);
  color: var(--brown);
  transition: border-color .2s, box-shadow .2s;
}
.field input[dir="ltr"] { text-align: left; }
.field input::placeholder { color: #b4a898; }
.field input:focus {
  outline: none;
  border-color: var(--gold-warm);
  box-shadow: 0 0 0 4px rgba(255, 197, 123, .35);
}
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-row { display: grid; gap: 0 12px; }

.field-error { color: var(--error); font-size: 14px; }
.field-error--amount { margin-top: 8px; padding-inline-start: 4px; }

.donate-form__secure {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--sand);
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
}
.donate-form__secure svg { flex: none; width: 20px; height: 20px; color: var(--copper); }
.donate-form__submit { width: 100%; min-height: 58px; font-size: 1.2rem; }

.thanks {
  text-align: center;
  padding: 40px 22px;
  border-radius: 22px;
  background: var(--sand);
  animation: rise .5s var(--ease);
}
.thanks:focus { outline: none; }
.thanks__icon { width: 34px; height: 46px; margin: 0 auto 14px; }
.thanks h3 { font-size: 34px; margin-bottom: 8px; }
.thanks strong { color: var(--copper); direction: ltr; unicode-bidi: isolate; }
.thanks__receipt { display: inline-block; margin-top: 14px; font-weight: 700; color: var(--copper); }
.thanks__receipt[hidden] { display: none; }

/* ==========================================================================
   PAYMENT WINDOW (Kesher's page in an iframe)
   Bottom sheet on phones, centred window on larger screens.
   ========================================================================== */
html.is-paying { overflow: hidden; }
.pay {
  width: 100%;
  max-width: none;
  height: min(640px, 100dvh - 12px);
  max-height: none;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  background: #fff;
  color: var(--brown);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.pay[open] { display: flex; flex-direction: column; animation: payIn .45s var(--ease); }
.pay::backdrop { background: rgba(34, 24, 14, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pay__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  padding-inline-start: 20px;
  background: var(--brown);
  color: var(--paper);
}
.pay__lock { flex: none; width: 22px; height: 22px; color: var(--gold); }
.pay__title { font-weight: 700; font-size: 17px; line-height: 1.2; }
.pay__summary { font-size: 15px; color: var(--gold); }
.pay__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-inline-start: auto;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: var(--paper);
  cursor: pointer;
}
.pay__close:hover { background: rgba(255, 255, 255, .22); }
.pay__close svg { width: 20px; height: 20px; }
.pay__body { position: relative; flex: 1; min-height: 0; }
.pay__frame { display: block; width: 100%; height: 100%; border: 0; }
.pay__state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: #fff;
  color: var(--muted);
}
.pay__state[hidden] { display: none; }
.pay__spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--copper);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.pay__error-title { font-weight: 700; font-size: 22px; color: var(--brown); }
.pay__error-text:empty { display: none; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  /* extra bottom room so iPhone Safari's floating address bar never covers the last line */
  padding: 48px var(--gutter) calc(96px + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid var(--line);
}
.site-footer__logo { width: 84px; margin: 0 auto 22px; }
.site-footer__name {
  font-weight: 700;
  font-size: 22px;
  color: var(--copper);
  margin-bottom: 10px;
}
.site-footer__motto {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.7;
  color: var(--copper);
  text-wrap: balance;
}

/* ==========================================================================
   STICKY CTA (mobile)
   ========================================================================== */
.sticky-cta {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 8px;
  padding-inline-start: 20px;
  border-radius: 999px;
  background: rgba(51, 37, 23, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--paper);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
  transform: translateY(calc(100% + 40px));
  transition: transform .4s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta__text { font-size: 16px; }
.sticky-cta__text strong { color: var(--gold); direction: ltr; unicode-bidi: isolate; }

/* ==========================================================================
   MOTION
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes payIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes shine { 0% { background-position: -30% 0, 0 0; } 45%, 100% { background-position: 130% 0, 0 0; } }

/* Hero entrance (from-only keyframes animate to the element's normal style;
   "backwards" fill means hover effects keep working once they finish) */
@keyframes heroMedia { from { opacity: 0; transform: scale(1.1); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-18px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } }
@keyframes slideFromStart { from { opacity: 0; transform: translateX(80px); filter: blur(10px); } }
@keyframes writeIn { from { clip-path: inset(-30% 0 -30% 100%); } to { clip-path: inset(-30% 0 -30% 0); } }
@keyframes waveIn { from { transform: translateY(40%); } }
@keyframes flameRise { from { clip-path: inset(100% 0 0 0); transform: translateY(14%); } to { clip-path: inset(0); transform: none; } }
@keyframes flameSway {
  0%   { transform: skewY(0deg) scaleX(1); }
  35%  { transform: skewY(-1.6deg) scaleX(1.08); }
  70%  { transform: skewY(.8deg) scaleX(.95); }
  100% { transform: skewY(-.6deg) scaleX(1.04); }
}
@keyframes drip {
  0%   { opacity: 0; transform: translateY(-6px) scale(.3); animation-timing-function: ease-out; }
  14%  { opacity: 1; transform: translateY(0) scale(1); }
  26%  { opacity: 1; transform: translateY(0) scale(1, 1.06); animation-timing-function: cubic-bezier(.55, 0, .9, .4); }
  38%  { opacity: 1; transform: translateY(26px) scale(.9, 1.12); }
  41%  { opacity: 0; transform: translateY(28px) scale(1.5, .4); }
  100% { opacity: 0; transform: translateY(28px) scale(1.5, .4); }
}
@keyframes ripple {
  0%, 38% { opacity: 0; transform: scale(.2); }
  41%     { opacity: .9; transform: scale(.3); }
  85%     { opacity: 0; transform: scale(1.35); }
  100%    { opacity: 0; transform: scale(1.35); }
}

@keyframes lineGrow { from { transform: scaleX(0); opacity: 0; } }
@keyframes ctaPulse {
  0%       { box-shadow: 0 8px 24px rgba(189, 109, 49, .35), inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 0 rgba(255, 197, 123, .55); }
  70%, 100% { box-shadow: 0 8px 24px rgba(189, 109, 49, .35), inset 0 1px 0 rgba(255, 255, 255, .5), 0 0 0 16px rgba(255, 197, 123, 0); }
}
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 4px; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes glint { 0% { background-position: 130% 0; } 40%, 100% { background-position: -30% 0; } }

/* Hero entrance. JS replays the headline part of it each time the film loops
   (see .is-leaving / .is-resetting below); the paragraph and button stay put. */
.hero__media  { animation: heroMedia 2.4s var(--ease) backwards; }
.hero__name-text {
  background-size: 220% 100%;
  animation: fadeDown 1s .1s var(--ease) backwards, shimmer 7s 1.2s ease-in-out infinite alternate;
}
.hero__name::before,
.hero__name::after { animation: lineGrow 1.3s .55s var(--ease) backwards; }
.hero__logo   { animation: fadeDown 1s .6s var(--ease) backwards; }
.hero__wave   { animation: waveIn 1.6s .1s var(--ease) backwards; }
.hero__title-line:not(.gold-text) { animation: slideFromStart 1.2s .35s var(--ease) backwards; }
.hero__script { animation: writeIn 1.7s 1.05s cubic-bezier(.45, 0, .25, 1) backwards; }
.hero__lead   { animation: fadeUp 1s 1.4s var(--ease) backwards; }
.hero__cta    { animation: fadeUp 1s 1.6s var(--ease) backwards, ctaPulse 2.6s 3s ease-out infinite; }
.hero__cta .btn__arrow { animation: nudge 1.6s ease-in-out infinite; }
.hero__sweep  {
  transform-origin: 0 100%;
  animation: flameRise 2s .3s var(--ease) backwards, flameSway 7s 2.3s ease-in-out infinite alternate;
}

.gold-text--shimmer {
  background-size: 220% 100%;
  animation: shimmer 7s ease-in-out infinite alternate;
}
.hero__title-line.gold-text--shimmer {
  animation: slideFromStart 1.2s .55s var(--ease) backwards, shimmer 7s 2s ease-in-out infinite alternate;
}

/* Replay: fade the headline out, then cancel + restart its entrance animations */
.hero.is-leaving :is(.hero__name, .hero__title, .hero__script) {
  opacity: 0;
  filter: blur(8px);
  transition: opacity .6s ease, filter .6s ease;
}
.hero.is-resetting :is(.hero__name-text, .hero__title-line, .hero__script),
.hero.is-resetting .hero__name::before,
.hero.is-resetting .hero__name::after { animation: none !important; }

/* Continuous loops below the hero */
.amount__disc { animation: bob 4.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.4s); }
.donate__title .copper { animation: glint 7s ease-in-out infinite; animation-delay: calc(1s + var(--i, 0) * .25s); }

/* Scroll reveals — JS adds .is-in. --i staggers siblings. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal="pop"] {
  transform: translateY(24px) scale(.7);
  transition-timing-function: var(--ease), cubic-bezier(.34, 1.5, .64, 1);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__video { display: none; }
}

/* ==========================================================================
   TABLET+
   ========================================================================== */
@media (min-width: 640px) {
  .amounts { grid-template-columns: repeat(6, auto); gap: 14px; }
  .amount__disc { width: clamp(76px, 13vw, 184px); }
  .amount__value { font-size: clamp(18px, 3.3vw, 54px); }
}
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .donate-form { padding: 28px 28px 24px; }
  /* Kesher's page switches to a wide layout at 768px, so keep the window narrower */
  .pay {
    width: min(520px, 100vw - 32px);
    height: min(640px, 100dvh - 40px);
    margin: auto;
    border-radius: 22px;
  }
}

/* ==========================================================================
   DESKTOP — follows the 1920px design proportions
   ========================================================================== */
@media (min-width: 900px) {
  :root { --gutter: 4vw; }
  body { font-size: 19px; }

  /* The hero fills one screen. Sizes use --u, which follows the width on
     tall screens and the height on short/wide ones, so the button never
     drops below the fold. */
  .hero {
    --u: min(1vw, 1.38vh);
    --wave-h: min(20.3vw, 21vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: max(560px, min(100vh, 68vw));
    min-height: max(560px, min(100svh, 68vw));
    padding: 3vh 9.5vw calc(var(--wave-h) + 1vh);
    text-align: right;
  }

  /* Landscape film fills the left of the hero edge to edge and fades
     into the brown under the text column on the right */
  .hero__media {
    inset: 0 auto 0 0;
    width: 76vw;
    height: auto;
    max-height: none;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 48%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.15) 86%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 48%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.15) 86%, transparent 100%);
  }
  .hero__media img,
  .hero__video { object-position: 50% 50%; }

  /* Top strip + a soft darkening behind the text column */
  .hero__shade {
    inset: 0;
    height: auto;
    max-height: none;
    background:
      linear-gradient(to bottom, rgba(34, 24, 14, .62), rgba(34, 24, 14, 0) 30%),
      linear-gradient(to left, rgba(51, 37, 23, .7) 0%, rgba(51, 37, 23, .35) 45%, rgba(51, 37, 23, 0) 62%);
  }
  .hero__lead { text-shadow: 0 2px 14px rgba(20, 12, 4, .55); }

  /* The gold "flame" on the left edge (sits under the wave, like the design) */
  .hero__sweep {
    display: block;
    position: absolute;
    left: 0;
    top: 16%;
    height: 98%;
    width: auto;
    aspect-ratio: 170 / 1320;
    pointer-events: none;
  }

  .hero__logo { top: max(24px, calc(4 * var(--u))); left: 4.5vw; width: clamp(72px, calc(6.4 * var(--u)), 124px); }

  .hero__content {
    margin: 0;                   /* RTL: block sits on the right, over the brown */
    width: 46vw;
    max-width: 880px;
    padding-top: 0;
  }
  .hero__title { font-size: clamp(84px, calc(13 * var(--u)), 260px); }
  .hero__name {
    justify-content: flex-start;          /* right-aligned, line trails to the left */
    font-size: clamp(24px, calc(3.8 * var(--u)), 64px);
    margin-bottom: .45em;
  }
  .hero__name::before { display: none; }
  .hero__name::after { flex-basis: 3.2em; }
  .hero__script { font-size: clamp(44px, calc(6.6 * var(--u)), 128px); margin-top: .02em; margin-inline-start: 0; }
  .hero__lead {
    margin: calc(2 * var(--u)) 0 0;
    max-width: none;
    font-size: clamp(17px, calc(1.85 * var(--u)), 34px);
    line-height: 1.5;
  }
  .hero__lead br { display: inline; }
  .hero__cta { margin-top: calc(2.4 * var(--u)); font-size: clamp(1rem, calc(1.25 * var(--u)), 1.5rem); }

  .hero__wave { height: var(--wave-h); }

  .story {
    max-width: 72vw;
    margin-top: -2.5vw;
    position: relative;
    padding: 0 var(--gutter) 5vw;
    font-size: clamp(20px, 1.75vw, 36px);
  }
  .story__drop { width: 26px; height: 36px; }

  .give { padding: 4.2vw var(--gutter) 4.6vw; }
  .give__title { font-size: clamp(30px, 3.1vw, 60px); margin-bottom: 2.6vw; }
  .amounts { gap: 3vw; }
  .amount__disc { width: clamp(110px, 9.6vw, 184px); }
  .amount__value { font-size: clamp(26px, 2.6vw, 54px); }
  .amount input:checked + .amount__disc::after { width: 32px; height: 32px; background-size: 20px; top: 4%; right: 4%; }
  .other-amount { margin-top: 2.6vw; }

  .donate { padding: 6vw var(--gutter) 7vw; }
  .donate__inner {
    max-width: 1400px;
    grid-template-columns: minmax(0, 640px) auto;
    align-items: center;
    column-gap: 5vw;
    justify-content: center;
  }
  .donate__title {
    order: 2;               /* left side in RTL, as in the design */
    font-size: clamp(76px, 7vw, 136px);
    line-height: .98;
    text-align: right;
  }
  .donate__title span { display: block; }
  .donate__title .donate__moshiach { font-size: .36em; margin-top: .55em; }
  .donate-form { max-width: 640px; width: 100%; justify-self: end; padding: 34px 36px 28px; }

  .site-footer { padding: 4vw var(--gutter) 3.6vw; border-top: 0; }
  .site-footer__motto { font-size: clamp(20px, 1.5vw, 28px); letter-spacing: .2em; }

  /* Side slide-ins on desktop (on phones they rise from below) */
  .js [data-reveal="from-left"]  { transform: translateX(-90px); }
  .js [data-reveal="from-right"] { transform: translateX(90px); }
  .js .site-footer__motto[data-reveal] {
    transform: none;
    letter-spacing: .6em;
    transition: opacity 1.4s var(--ease), letter-spacing 2s var(--ease);
  }
  .js .site-footer__motto[data-reveal].is-in { letter-spacing: .2em; }

  .sticky-cta { display: none; }
}
