/* Beis Shneur — shared styles */
:root {
  --teal: #11515d;
  --teal-dark: #0b3c45;
  --teal-soft: #e6efef;
  --gold: #b88a4a;
  --gold-soft: #f3eadb;
  --ink: #1d2a2e;
  --muted: #5f6f73;
  --line: #e4e0d8;
  --paper: #fbf9f5;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(17, 81, 93, .05), 0 12px 40px -12px rgba(17, 81, 93, .18);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html, body { margin: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -200px, var(--teal-soft), transparent 70%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

.bh {
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: "Frank Ruhl Libre", serif;
  font-size: 14px;
  color: var(--muted);
  direction: rtl;
}

/* ---------- Top bar (inner pages) ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.topbar-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 44px; width: auto; mix-blend-mode: multiply; }
.brand-text { line-height: 1.15; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--teal); }
.brand-sub { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  border: 0;
  font: 600 16px/1 var(--sans);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 8px 24px -8px rgba(17, 81, 93, .6);
}
.btn-primary:hover { color: #fff; background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(17, 81, 93, .7); }
.btn-ghost {
  color: var(--teal);
  background: transparent;
  border: 1.5px solid currentColor;
  padding: 10px 20px;
  font-size: 14px;
}
.btn-ghost:hover { background: var(--teal-soft); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Home ---------- */
.hero {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 56px 16px 40px;
}
.hero-card {
  width: 100%;
  max-width: 560px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 44px 36px 36px;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--teal));
}
.hero-logo { width: 100%; max-width: 380px; height: auto; display: block; margin: 0 auto 8px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 6vw, 44px);
  line-height: 1.1;
  color: var(--teal);
  margin: 8px 0 4px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px auto;
  max-width: 220px;
  color: var(--gold);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider span { width: 7px; height: 7px; transform: rotate(45deg); background: currentColor; }
.lead { color: var(--muted); margin: 0 auto 26px; max-width: 400px; }

.secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.secure svg { width: 14px; height: 14px; }

.note {
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px dashed var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Invoice page ---------- */
.page {
  flex: 1;
  width: 100%;
  /* The embedded payment form is ~730px wide; size the page around it */
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 48px;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 42px);
  line-height: 1.1;
  color: var(--teal);
  margin: 4px 0 6px;
}
.page-head p { margin: 0; color: var(--muted); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel iframe { display: block; width: 100%; height: 800px; border: 0; }

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  color: var(--muted);
  font-size: 14px;
}
.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--teal-soft);
  border-top-color: var(--teal);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  text-align: center;
  padding: 56px 24px;
}
.empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold-soft);
  color: var(--gold);
}
.empty-icon svg { width: 26px; height: 26px; }
.empty h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--teal); margin: 0 0 8px; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 24px; }

.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}
.page-foot .secure { margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 24px 16px 32px;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--teal); }

/* The donation modal's close button (from the original site) */
[role="dialog"] button[aria-label="Close"] { padding: 0; }

@media (max-width: 560px) {
  .hero { padding-top: 44px; }
  .hero-card { padding: 36px 20px 24px; }
  .brand img { height: 36px; }
  .brand-text { display: none; }
  .page { padding-top: 28px; }
  .panel iframe { height: 900px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .spinner { transition: none; animation: none; }
}
