/* ===========================================================================
   Habayit — Home Away From Home
   Design system: warm, calm and trustworthy. Teal + slate blue from the mark.
   =========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* Brand */
  --teal-50:  #f0fafb;
  --teal-100: #d9f2f4;
  --teal-200: #b3e6e9;
  --teal-300: #8bd8dd;
  --teal-400: #68ccd1;
  --teal-500: #45b3ba;
  --teal-600: #2f939b;
  --teal-700: #24747b;

  --blue-50:  #f1f6fc;
  --blue-100: #dfeaf7;
  --blue-200: #bcd3ec;
  --blue-300: #92b6de;
  --blue-400: #6d99cf;
  --blue-500: #4a7bb5;
  --blue-600: #3a6296;
  --blue-700: #2d4c76;

  --coral: #f0705f;
  --gold:  #d8a53d;

  /* Neutrals */
  --ink:        #16232b;
  --ink-soft:   #3d4d57;
  --ink-muted:  #6b7c86;
  --ink-faint:  #97a5ad;
  --line:       #e3eaee;
  --line-soft:  #eff4f6;
  --surface:    #ffffff;
  --surface-2:  #f7fafb;
  --surface-3:  #eef4f6;

  /* Type */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  /* Fluid scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.13vw, 0.89rem);
  --step-0:  clamp(1rem, 0.96rem + 0.18vw, 1.09rem);
  --step-1:  clamp(1.19rem, 1.12rem + 0.34vw, 1.4rem);
  --step-2:  clamp(1.42rem, 1.29rem + 0.63vw, 1.8rem);
  --step-3:  clamp(1.69rem, 1.48rem + 1.05vw, 2.32rem);
  --step-4:  clamp(2.01rem, 1.68rem + 1.65vw, 2.99rem);
  --step-5:  clamp(2.4rem, 1.88rem + 2.57vw, 3.85rem);

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(22, 35, 43, 0.06), 0 1px 3px rgba(22, 35, 43, 0.05);
  --shadow:    0 4px 12px rgba(22, 35, 43, 0.07), 0 2px 4px rgba(22, 35, 43, 0.04);
  --shadow-lg: 0 18px 40px rgba(22, 35, 43, 0.1), 0 6px 14px rgba(22, 35, 43, 0.05);

  --container: 1180px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video, picture { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 var(--sp-4);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 var(--sp-4); }
a { color: var(--blue-500); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-600); }

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25rem; }
li { margin-bottom: var(--sp-2); }

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.container--narrow { max-width: 760px; }
.container--mid { max-width: 940px; }

.section { padding-block: var(--sp-8); }
.section--lg { padding-block: var(--sp-9); }
.section--tint { background: var(--surface-2); }
.section--deep {
  background: linear-gradient(160deg, var(--blue-700), var(--blue-500) 55%, var(--teal-600));
  color: rgba(255, 255, 255, 0.9);
}
.section--deep h1, .section--deep h2, .section--deep h3 { color: #fff; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  text-decoration: none;
}
.nav__brand img { height: 44px; width: auto; }
.nav__brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav__brand-name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.14em;
}
.nav__brand-tag {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.nav__links a:hover { background: var(--teal-50); color: var(--teal-700); }
.nav__links a[aria-current='page'] { color: var(--teal-700); background: var(--teal-50); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-3); }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: background 0.2s var(--ease);
}
.nav__toggle span::before, .nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav__toggle[aria-expanded='true'] span { background: transparent; }
.nav__toggle[aria-expanded='true'] span::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded='true'] span::after { top: 0; transform: rotate(-45deg); }

/* Between the widest layout and the mobile menu the seven nav links plus two
   buttons no longer fit. Tighten the links and drop the secondary button so
   "Donate" is never pushed off the edge. */
@media (max-width: 1400px) {
  .nav__links a { padding-inline: var(--sp-2); font-size: 0.81rem; letter-spacing: 0.02em; }
  .nav__actions .btn--ghost { display: none; }
}

@media (max-width: 1040px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-3) var(--sp-5) var(--sp-5);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__links a {
    padding: var(--sp-4) var(--sp-2);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }
  .nav__actions .btn--ghost { display: none; }
}

@media (max-width: 480px) {
  .nav__brand img { height: 38px; }
  .nav__brand-name { font-size: 1rem; letter-spacing: 0.1em; }
  .nav__brand-tag { font-size: 0.5rem; }
}

/* Small Android handsets and the iPhone SE: drop the tagline and tighten the
   gutters so the brand, Donate button and menu toggle still fit on one row. */
@media (max-width: 400px) {
  .container { padding-inline: var(--sp-4); }
  .nav__brand-tag { display: none; }
  .nav__brand { gap: var(--sp-2); }
  .nav__actions { gap: var(--sp-2); }
  .btn--sm { padding: 0.5rem 0.85rem; }
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.82rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
    background 0.18s var(--ease), color 0.18s var(--ease);
  min-height: 46px;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--teal-500), var(--blue-500));
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 123, 181, 0.28);
}
.btn--primary:hover { color: #fff; box-shadow: 0 8px 22px rgba(74, 123, 181, 0.34); }

.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #0d1a21; color: #fff; }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--teal-400); color: var(--teal-700); background: var(--teal-50); }

.btn--white { background: #fff; color: var(--blue-600); }
.btn--white:hover { color: var(--blue-700); }

.btn--outline-white {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.btn--outline-white:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.btn--lg { padding: 1rem 2rem; font-size: 1rem; min-height: 54px; }
.btn--sm { padding: 0.55rem 1rem; font-size: 0.82rem; min-height: 38px; }
.btn--block { width: 100%; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--blue-700);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(16, 39, 59, 0.9) 0%,
    rgba(20, 52, 76, 0.78) 42%,
    rgba(45, 118, 132, 0.5) 100%
  );
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-9) var(--sp-8);
  max-width: 660px;
  color: rgba(255, 255, 255, 0.92);
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4rem 0.9rem;
  margin-bottom: var(--sp-5);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  backdrop-filter: blur(6px);
}
.hero h1 { color: #fff; margin-bottom: var(--sp-5); text-wrap: balance; }
.hero__lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--sp-6);
  max-width: 56ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

@media (max-width: 640px) {
  .hero { min-height: 0; }
  .hero__inner { padding-block: var(--sp-8) var(--sp-7); }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* Compact page banner for interior pages */
.page-hero {
  position: relative;
  padding-block: calc(var(--sp-8) + 1rem) var(--sp-8);
  background: linear-gradient(155deg, var(--blue-700), var(--blue-500) 60%, var(--teal-600));
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
  pointer-events: none;
}
.page-hero__inner { position: relative; z-index: 1; max-width: 720px; }
.page-hero h1 { color: #fff; margin-bottom: var(--sp-4); }
.page-hero p { font-size: var(--step-1); color: rgba(255, 255, 255, 0.86); margin-bottom: 0; }
.page-hero--image .page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero--image .page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero--image .page-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(16, 39, 59, 0.92), rgba(45, 118, 132, 0.72));
}

.breadcrumb {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }

/* --- Section headings ----------------------------------------------------- */
.section-head { max-width: 680px; margin-bottom: var(--sp-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: var(--sp-3);
}
.section--deep .eyebrow { color: var(--teal-200); }
.lead { font-size: var(--step-1); line-height: 1.6; color: var(--ink-soft); }

/* --- Grid & cards --------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: var(--sp-7);
  align-items: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal-200);
}
.card h3 { margin-bottom: var(--sp-3); }
.card p:last-child { margin-bottom: 0; }

.card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal-100), var(--blue-100));
  color: var(--blue-600);
  margin-bottom: var(--sp-4);
}
.card__icon svg { width: 26px; height: 26px; }

/* --- Stats ---------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--sp-5);
}
.stat { text-align: center; padding: var(--sp-4) var(--sp-2); }
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 600;
  color: var(--teal-600);
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.section--deep .stat__value { color: #fff; }
.stat__label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.section--deep .stat__label { color: rgba(255, 255, 255, 0.78); }

/* --- Media / gallery ------------------------------------------------------ */
.media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--surface-3);
}
.media-frame img { width: 100%; }

.ratio { position: relative; width: 100%; }
.ratio > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.ratio--16x9 { aspect-ratio: 16 / 9; }
.ratio--4x3 { aspect-ratio: 4 / 3; }
.ratio--1x1 { aspect-ratio: 1 / 1; }
.ratio iframe { border: 0; }

/* Click-to-play video poster */
.video-facade {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  margin: 0;
  background: var(--surface-3);
  cursor: pointer;
  overflow: hidden;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 39, 59, 0.1), rgba(16, 39, 59, 0.45));
  transition: opacity 0.3s var(--ease);
}
.video-facade:hover::after { opacity: 0.7; }
.video-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue-600);
  box-shadow: 0 8px 26px rgba(16, 39, 59, 0.35);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.video-facade:hover .video-facade__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #fff;
}
.video-facade__play svg { width: 34px; height: 34px; margin-left: 4px; }
.video-facade__error {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: var(--sp-4);
  background: rgba(16, 39, 59, 0.92);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
}
.video-facade__error a { color: var(--teal-300); }

@media (max-width: 640px) {
  .video-facade__play { width: 60px; height: 60px; }
  .video-facade__play svg { width: 26px; height: 26px; }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--sp-4);
}
.gallery__item {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  background: var(--surface-3);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.gallery__item:hover img { transform: scale(1.05); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  background: rgba(11, 22, 29, 0.92);
  padding: var(--sp-5);
}
.lightbox[open], .lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox__close { top: var(--sp-5); right: var(--sp-5); }
.lightbox__nav--prev { left: var(--sp-4); top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: var(--sp-4); top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--prev { left: var(--sp-2); }
  .lightbox__nav--next { right: var(--sp-2); }
}

/* --- Sponsor wall --------------------------------------------------------- */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-4);
  align-items: center;
}
.sponsor-grid__item {
  display: grid;
  place-items: center;
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 108px;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.sponsor-grid__item:hover { box-shadow: var(--shadow); border-color: var(--teal-200); }
.sponsor-grid__item img {
  max-height: 62px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.sponsor-grid__item:hover img { filter: grayscale(0); opacity: 1; }

/* --- Forms ---------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-5); }
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--sp-4);
}
.field { display: grid; gap: var(--sp-2); }
.field > label, .field-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.field .hint { font-size: 0.8rem; color: var(--ink-muted); }
.field .req { color: var(--coral); }

input[type='text'], input[type='email'], input[type='tel'], input[type='number'],
input[type='date'], input[type='password'], input[type='search'], select, textarea {
  width: 100%;
  padding: 0.78rem 0.95rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  min-height: 48px;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7c86' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  padding-right: 2.4rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(104, 204, 209, 0.22);
}
input[aria-invalid='true'], textarea[aria-invalid='true'], select[aria-invalid='true'] {
  border-color: var(--coral);
}
::placeholder { color: var(--ink-faint); }

.field-error {
  font-size: 0.8rem;
  color: var(--coral);
  font-weight: 500;
  min-height: 0;
}

.checkbox, .radio {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
  font-size: 0.94rem;
  line-height: 1.5;
}
.checkbox input, .radio input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--teal-500);
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--sp-3);
}
.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.checkbox-card:hover { border-color: var(--teal-300); background: var(--teal-50); }
.checkbox-card:has(input:checked) { border-color: var(--teal-500); background: var(--teal-50); }
.checkbox-card input { accent-color: var(--teal-500); width: 20px; height: 20px; margin-top: 2px; }
.checkbox-card span { font-size: 0.92rem; }

.fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin: 0;
}
.fieldset legend {
  padding-inline: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--ink);
  font-weight: 600;
}

.form-note { font-size: 0.85rem; color: var(--ink-muted); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.alert {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  font-size: 0.94rem;
  border: 1px solid transparent;
}
.alert--success { background: #eafaf3; border-color: #b6e8d2; color: #1c6647; }
.alert--error { background: #fdeeec; border-color: #f8cfc9; color: #a53525; }
.alert--info { background: var(--teal-50); border-color: var(--teal-200); color: var(--teal-700); }
.alert[hidden] { display: none; }

/* --- Donation widget ------------------------------------------------------ */
.donate-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6);
}
@media (min-width: 720px) { .donate-card { padding: var(--sp-7); } }

.freq-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
  padding: var(--sp-1);
  background: var(--surface-3);
  border-radius: 999px;
  margin-bottom: var(--sp-5);
}
.freq-toggle button {
  padding: 0.7rem 1rem;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), box-shadow 0.22s var(--ease);
  min-height: 46px;
}
.freq-toggle button[aria-selected='true'] {
  background: var(--surface);
  color: var(--blue-600);
  box-shadow: var(--shadow-sm);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (max-width: 400px) { .amount-grid { grid-template-columns: repeat(2, 1fr); } }

.amount-btn {
  padding: 0.9rem 0.5rem;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
  min-height: 58px;
}
.amount-btn:hover { border-color: var(--teal-400); transform: translateY(-2px); }
.amount-btn[aria-pressed='true'] {
  border-color: var(--teal-500);
  background: linear-gradient(135deg, var(--teal-500), var(--blue-500));
  color: #fff;
}

.amount-custom { position: relative; margin-bottom: var(--sp-5); }
.amount-custom span {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-muted);
  pointer-events: none;
}
.amount-custom input {
  padding-left: 2.1rem;
  font-size: 1.1rem;
  font-weight: 600;
  min-height: 54px;
}

.impact-note {
  padding: var(--sp-4);
  background: var(--teal-50);
  border-left: 3px solid var(--teal-400);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--teal-700);
  margin-bottom: var(--sp-5);
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  font-size: 0.82rem;
  color: var(--ink-muted);
}
.secure-note svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Progress bar */
.progress {
  height: 10px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--sp-3);
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-400), var(--blue-500));
  border-radius: 999px;
  transition: width 0.8s var(--ease);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: 0.88rem;
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.progress-meta strong { color: var(--ink); font-size: 1.05rem; }

/* Tier cards (Sefer Torah) */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: var(--sp-4);
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--sp-6);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.tier:hover { border-color: var(--teal-300); transform: translateY(-3px); box-shadow: var(--shadow); }
.tier--featured { border-color: var(--gold); }
.tier__badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.85rem;
  background: var(--gold);
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tier__label {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--ink);
  margin-bottom: var(--sp-2);
}
.tier__amount {
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--teal-600);
  font-family: var(--font-display);
  margin-bottom: var(--sp-3);
}
.tier__desc { font-size: 0.9rem; color: var(--ink-muted); margin-bottom: var(--sp-5); flex: 1; }

/* --- Timeline / steps ----------------------------------------------------- */
.steps { display: grid; gap: var(--sp-5); counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--sp-4);
  align-items: start;
}
.step__num {
  counter-increment: step;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-400), var(--blue-500));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 600;
}
.step__num::before { content: counter(step); }
.step h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.step p { margin-bottom: 0; font-size: 0.95rem; }

/* --- Quote / testimonial -------------------------------------------------- */
.quote {
  position: relative;
  padding: var(--sp-7);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}
.quote::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 24px;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--teal-200);
}
.quote blockquote {
  position: relative;
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
}
.quote cite {
  font-style: normal;
  font-size: 0.86rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- Memorial page -------------------------------------------------------- */
.memorial {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.memorial__portrait {
  width: min(340px, 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-inline: auto;
}
.memorial__name {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--ink);
  text-align: center;
  margin-top: var(--sp-5);
}
.memorial__dates {
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- FAQ ------------------------------------------------------------------ */
.faq { display: grid; gap: var(--sp-3); }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--teal-600);
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
  line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__body { padding: 0 var(--sp-5) var(--sp-5); color: var(--ink-soft); }
.faq__body p:last-child { margin-bottom: 0; }

/* --- CTA band ------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--blue-600), var(--teal-600));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--sp-7);
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: var(--sp-4); }
.cta-band p { color: rgba(255, 255, 255, 0.88); max-width: 56ch; margin-inline: auto; }
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-5);
}

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--sp-8) var(--sp-5);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-6);
  margin-bottom: var(--sp-7);
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--sp-3); }
.site-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.site-footer a:hover { color: var(--teal-300); }
.footer-brand p { max-width: 40ch; line-height: 1.7; }

.footer-brand__lockup {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.footer-brand__lockup img { height: 56px; width: auto; }
.footer-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.footer-brand__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #fff;
}
.footer-brand__tag {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.social a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s var(--ease);
}
.social a:hover { background: var(--teal-600); }
.social svg { width: 19px; height: 19px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.52);
}

/* --- Utilities ------------------------------------------------------------ */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.stack > * + * { margin-top: var(--sp-4); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge--teal { background: var(--teal-100); color: var(--teal-700); }
.badge--gold { background: #fdf3dd; color: #8a6413; }
.badge--muted { background: var(--surface-3); color: var(--ink-muted); }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* Spinner used on submitting buttons */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media print {
  .site-header, .site-footer, .cta-band { display: none !important; }
  body { color: #000; }
}
