/* =========================================================
   Avrech sponsorship page – styles
   Warm autumn palette (from the original flyer) + navy ink.
   ========================================================= */

:root {
  color-scheme: light;

  --cream: #fbf5ea;
  --paper: #fffdf8;
  --sand-50: #fcefd9;
  --sand-100: #f6dfbb;
  --sand-200: #ebcb98;
  --line: #eadcc6;
  --line-strong: #dcc3a0;

  --ink: #1e2740;
  --ink-2: #39415a;
  --muted: #6f6457;
  --brown: #6b3a1e;
  --amber: #e8a54b;
  --amber-soft: #f0b45e;
  --cta: #b4531a;
  --cta-hover: #9a4514;
  --danger: #b42318;
  --ok: #2f7d4f;
  --wa: #1f8f4e;

  --serif: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --sans: "Heebo", "Assistant", "Segoe UI", Arial, sans-serif;

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(74, 44, 14, .06), 0 4px 12px -2px rgba(74, 44, 14, .08);
  --shadow: 0 2px 6px rgba(74, 44, 14, .05), 0 24px 56px -16px rgba(74, 44, 14, .24);
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--cta);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);

  --wrap: 1180px;
  --gutter: 20px;
  --hdr: 0px; /* visible sticky-header height, set by JS */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 100% 0%, rgba(240, 180, 94, .18), transparent 60%),
    radial-gradient(800px 600px at 0% 100%, rgba(129, 152, 181, .14), transparent 60%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: rgba(232, 165, 75, .35); }

.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
/* no double-tap zoom on controls (rapid taps on + / − or slots) */
a, button, input, label, .slot { touch-action: manipulation; }
.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; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Test banner ---------- */
.test-banner {
  position: relative; z-index: 3;
  background: repeating-linear-gradient(-45deg, #fff1d6 0 14px, #ffe8bd 14px 28px);
  border-bottom: 1px solid var(--sand-200);
  color: var(--brown);
  font-size: 14.5px;
  text-align: center;
  padding: 8px var(--gutter);
}
.tb-short { display: none; }
.test-banner code { background: rgba(255,255,255,.7); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

/* ---------- Header ---------- */
.topline { position: relative; z-index: 41; padding-top: 10px; }
.bsd { display: block; font-family: var(--serif); font-weight: 700; color: var(--brown); font-size: 13.5px; letter-spacing: .02em; }

.site-header {
  position: relative; z-index: 40;
  transition: transform .4s var(--ease), background-color .3s, box-shadow .3s;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { color: var(--ink); flex: none; transition: transform .4s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-logo { height: 66px; width: auto; max-width: 220px; object-fit: contain; transition: transform .4s var(--spring); }
.brand:hover .brand-logo { transform: scale(1.03); }
.brand.has-logo .brand-text strong { display: none; }
.brand.has-logo .brand-text { padding-inline-start: 14px; border-inline-start: 1.5px solid var(--line-strong); }
.brand.has-logo .brand-text small { font-size: 16px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-weight: 800; font-size: 17px; }
.brand-text small { color: var(--cta); font-weight: 700; font-size: 14px; }

.header-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { position: relative; display: inline-flex; align-items: center; padding: 6px 2px; font-weight: 700; font-size: 15.5px; color: var(--ink-2); text-decoration: none; }
.nav-link::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--cta); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav-link:hover::after { transform: scaleX(1); }

@media (min-width: 921px) {
  .site-header { position: sticky; top: 0; }
  .site-header.is-scrolled {
    background: rgba(251, 245, 234, .84);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 rgba(234, 220, 198, .9), 0 12px 30px -20px rgba(74, 44, 14, .4);
  }
  .site-header.is-hidden { transform: translateY(-105%); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 16.5px; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { min-height: 42px; padding: 8px 18px; font-size: 15.5px; }
.btn-lg { min-height: 54px; padding-inline: 28px; font-size: 17.5px; }
.btn-block { width: 100%; }
.btn-primary {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--cta); color: #fff;
  box-shadow: 0 10px 22px -10px rgba(180, 83, 26, .8);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .3) 50%, transparent 70%);
  transform: translateX(110%); transition: transform .9s var(--ease);
}
.btn-primary:hover { background: var(--cta-hover); box-shadow: 0 14px 28px -12px rgba(180, 83, 26, .9); }
.btn-primary:hover::after { transform: translateX(-110%); }
.btn-primary[disabled] { opacity: .6; cursor: progress; transform: none; }
.btn-ghost { background: rgba(255, 253, 248, .75); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: #18773f; }
.btn-outline-light { background: transparent; color: #fff; border-color: #3a4462; }
.btn-outline-light:hover { border-color: #fff; }
.link-btn {
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  color: var(--cta); font-weight: 700; font-size: 15px;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal]:not(.is-in) { opacity: 0; }
[data-reveal].is-in { animation: revealUp .9s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 110ms); }
[data-reveal="scale"].is-in { animation-name: revealScale; }
@keyframes revealUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes revealScale { from { opacity: 0; transform: translateY(24px) scale(.95); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: 8px 44px; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -160px 0 0; z-index: -2;
  background:
    radial-gradient(700px 420px at 82% 18%, rgba(244, 184, 98, .45), transparent 65%),
    radial-gradient(520px 360px at 8% 70%, rgba(232, 165, 75, .22), transparent 65%),
    linear-gradient(180deg, #fbe6c8 0%, rgba(251, 245, 234, 0) 100%);
}
.hero-branch { position: absolute; z-index: -1; pointer-events: none; }
.hero-branch--a { width: min(420px, 46vw); top: -24px; left: 0; opacity: .9; animation: drift 14s ease-in-out infinite alternate; }
.hero-branch--b { width: min(260px, 34vw); bottom: 0; right: 0; opacity: .7; animation: drift 17s ease-in-out -4s infinite alternate-reverse; }
.leaf {
  opacity: .85;
  transform-box: fill-box; transform-origin: 0% 50%;
  animation: sway 6s ease-in-out infinite alternate;
  animation-delay: calc(var(--s, 0) * -.9s);
}
@keyframes sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes drift { to { transform: translate(6px, 5px) rotate(.8deg); } }

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px; align-items: center; padding-block: 36px 8px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--brown);
  background: rgba(255, 253, 248, .75); border: 1px solid var(--sand-200);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cta);
  box-shadow: 0 0 0 0 rgba(180, 83, 26, .5); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(180, 83, 26, 0); } 100% { box-shadow: 0 0 0 0 rgba(180, 83, 26, 0); } }
.hero h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -.01em; line-height: 1.1;
  color: var(--ink);
}
.hero h1 span {
  color: var(--cta);
  background: linear-gradient(180deg, #c8652a, #8f3f12);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lead { margin-top: 20px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 36em; }
.lead q { font-family: var(--serif); font-weight: 700; color: var(--brown); quotes: "״" "״"; white-space: nowrap; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.trust { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14.5px; color: var(--muted); font-weight: 500; }
.trust svg { color: var(--ok); flex: none; }

.price-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 253, 248, .97), rgba(255, 250, 240, .93));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 30px 24px;
  text-align: center;
}
.price-card::before {
  content: ""; position: absolute; inset: 10px; border-radius: 18px;
  border: 1px dashed var(--sand-200); pointer-events: none;
}
.price-label { font-weight: 700; color: var(--muted); font-size: 16px; }
.price { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 4px; font-family: var(--serif); line-height: 1; }
.price-num {
  font-size: clamp(4.2rem, 9vw, 5.8rem); font-weight: 900;
  color: var(--cta);
  background: linear-gradient(180deg, #d0702a, #8f3f12);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.price-cur { font-size: 2.2rem; font-weight: 700; color: var(--brown); }

.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 4px 8px; font-size: 15px; color: var(--ink-2); text-align: start; }
.progress-head strong { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pct { font-weight: 800; color: var(--cta); font-variant-numeric: tabular-nums; }
.progress {
  height: 14px; margin: 0 4px; border-radius: 999px;
  background: #f1e4cf; overflow: hidden; box-shadow: inset 0 1px 2px rgba(74, 44, 14, .12);
}
.progress-fill {
  position: relative; display: block; height: 100%; width: 0; border-radius: inherit; overflow: hidden;
  background: linear-gradient(270deg, #b4531a, #e8a54b);
  transition: width 1.6s var(--ease);
}
.progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  transform: translateX(100%); animation: sheen 3.2s ease-in-out 2s infinite;
}
@keyframes sheen { 0% { transform: translateX(100%); } 55%, 100% { transform: translateX(-100%); } }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
}
.stats dt { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.stats dd { margin: 2px 0 0; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }

.steps {
  list-style: none; margin: 40px auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.steps li {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(255, 253, 248, .75); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
}
.steps li:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--sand-200); }
.step-n {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--amber-soft);
  font-family: var(--serif); font-weight: 900; font-size: 18px;
}
.steps strong { display: block; font-size: 16.5px; }
.steps p { font-size: 14.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Donor ticker ---------- */
.donor-band {
  border-block: 1px solid var(--line);
  background: rgba(255, 253, 248, .72);
  animation: fadeIn .8s var(--ease);
}
.ticker-row { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.ticker-label {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--sand-50); border: 1px solid var(--sand-200);
  font-weight: 800; font-size: 14.5px; color: var(--brown);
}
.ticker-label::before {
  content: ""; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.4C.9 8 3.3 4 7.2 4c2 0 3.5 1.1 4.8 2.8C13.3 5.1 14.8 4 16.8 4c3.9 0 6.3 4 4.8 7.6C19.5 16.4 12 21 12 21z' fill='%23b4531a'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ticker {
  position: relative; flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker var(--dur, 80s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker-list li { position: relative; display: inline-flex; align-items: baseline; gap: 8px; padding-inline: 20px; white-space: nowrap; font-size: 15px; }
.ticker-list li::after {
  content: ""; position: absolute; inset-inline-end: -3px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--amber); opacity: .7;
}
.t-name { font-weight: 800; color: var(--ink); }
.t-num { font-size: 13px; color: var(--muted); }
@keyframes ticker { to { transform: translateX(50%); } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- Campaign layout ---------- */
.campaign {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px;
  gap: 32px; align-items: start;
  padding-block: 40px 72px;
}
#board { scroll-margin-top: 90px; }
.section-head { margin-bottom: 18px; }
.section-head h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-sub { color: var(--muted); margin-top: 6px; }

.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.seg {
  display: inline-flex; gap: 2px; padding: 4px;
  background: rgba(255, 253, 248, .85); border: 1px solid var(--line); border-radius: 999px;
}
.seg button {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 6px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); font-weight: 700; font-size: 15px; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s, box-shadow .25s;
}
.seg button:hover:not([aria-pressed="true"]) { background: var(--sand-50); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 8px 16px -10px rgba(30, 39, 64, .7); }
.seg-count {
  min-width: 26px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: rgba(30, 39, 64, .08); font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.seg button[aria-pressed="true"] .seg-count { background: rgba(255, 255, 255, .18); }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.dot-open { background: var(--paper); border: 1.5px dashed var(--line-strong); }
.dot-sponsored { background: linear-gradient(160deg, var(--sand-50), var(--sand-100)); border: 1px solid var(--sand-200); }

.search { position: relative; flex: 1 1 220px; max-width: 320px; }
.search svg { position: absolute; top: 50%; inset-inline-start: 15px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 46px; padding-inline: 42px 16px;
  border: 1.5px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .92);
  font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: #a39686; }
.search input:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px rgba(180, 83, 26, .16); }

.board-note {
  margin-bottom: 14px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: #fff4e5; border: 1px solid var(--sand-200); color: var(--brown); font-size: 15px;
}
.board-empty {
  padding: 40px 16px; text-align: center; color: var(--muted);
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: rgba(255, 253, 248, .6);
}

/* ---------- Board ---------- */
.board {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 10px;
}
.js .board:not(.is-settled) .slot-item { opacity: 0; }
.board.is-in:not(.is-settled) .slot-item { animation: slotIn .65s var(--ease) both; animation-delay: calc(var(--i, 0) * 16ms); }
@keyframes slotIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }

.slot {
  position: relative; width: 100%; height: 100%; min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  padding: 12px 14px; text-align: start;
  background: rgba(255, 253, 248, .92);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .2s, background-color .25s, color .25s;
  -webkit-tap-highlight-color: transparent;
}
.slot-top { display: flex; align-items: baseline; gap: 6px; }
.slot-label { font-size: 13.5px; font-weight: 700; color: var(--muted); transition: color .25s; }
.slot-num { font-family: var(--serif); font-weight: 900; font-size: 1.75rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; transition: color .25s; }
.slot-body { display: flex; flex-direction: column; min-width: 0; font-size: 14px; line-height: 1.35; }
.slot-free { color: var(--muted); }
.slot-free b { color: var(--cta); font-weight: 800; }
.slot-check {
  position: absolute; top: 10px; inset-inline-end: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--amber-soft); color: var(--ink);
  transform: scale(0) rotate(-45deg); transition: transform .35s var(--spring);
}
.slot-by { font-size: 12.5px; color: var(--brown); opacity: .85; font-weight: 500; }
.slot-name {
  font-weight: 800; color: var(--brown); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.slot-note { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.slot:not(.is-sponsored):not(.is-selected):hover {
  border-color: var(--cta); border-style: solid; transform: translateY(-3px);
  box-shadow: 0 12px 24px -14px rgba(180, 83, 26, .55);
}
.slot:not(.is-sponsored):not(.is-selected):hover .slot-num { color: var(--cta); }

.slot.is-selected {
  background: var(--ink); border: 1.5px solid var(--ink); color: #fff;
  box-shadow: 0 14px 28px -12px rgba(30, 39, 64, .65);
  transform: translateY(-2px);
}
.slot.is-selected .slot-label { color: #c9cfe0; }
.slot.is-selected .slot-num { color: #fff; }
.slot.is-selected .slot-free { color: var(--amber-soft); font-weight: 700; }
.slot.is-selected .slot-check { transform: none; }

.slot.is-sponsored {
  cursor: default;
  background: linear-gradient(160deg, var(--sand-50) 0%, var(--sand-100) 100%);
  border: 1px solid var(--sand-200);
}
.slot.is-sponsored .slot-num { color: var(--brown); }
.slot.is-sponsored::after {
  content: ""; position: absolute; top: 12px; inset-inline-end: 12px; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4C10 4 4 9 4 17c0 1 .1 2 .3 3C6 13 11 9 17 8c-5 2-9 6-11 12h1c2-4 6-6 9-6 3-1 4-4 4-10z' fill='%23c9682a'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .8;
}
.slot.is-mine { box-shadow: 0 0 0 2.5px var(--cta), 0 10px 24px -12px rgba(180, 83, 26, .55); }
.slot.is-mine .slot-by::after { content: " · תודה!"; color: var(--cta); font-weight: 800; }
.slot.is-match { box-shadow: 0 0 0 2.5px var(--amber), 0 10px 24px -12px rgba(232, 165, 75, .7); }

.slot.pop { animation: pop .4s var(--spring); }
.slot.just-sponsored { animation: glow 1.6s ease-out 2; }
@keyframes pop { 40% { transform: translateY(-2px) scale(1.06); } }
@keyframes glow {
  0% { box-shadow: 0 0 0 0 rgba(232, 165, 75, .85); }
  100% { box-shadow: 0 0 0 18px rgba(232, 165, 75, 0); }
}

.board.is-loading .slot-body { visibility: hidden; }
.board.is-loading .slot { background: linear-gradient(90deg, rgba(255,253,248,.9) 0%, #f7ecd9 50%, rgba(255,253,248,.9) 100%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Donation panel ---------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 24px 24px;
  scroll-margin-top: 16px;
}
.panel.is-sticky { position: sticky; top: calc(var(--hdr) + 16px); transition: top .4s var(--ease); }

.checkout {
  list-style: none; margin: 0 0 18px; padding: 0 0 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  border-bottom: 1px solid var(--line);
}
.checkout li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--muted); text-align: center;
  transition: color .3s;
}
.checkout li::before {
  content: ""; position: absolute; top: 14px; inset-inline-start: calc(50% + 15px);
  width: calc(100% - 24px); height: 2px; border-radius: 2px;
  background: linear-gradient(270deg, var(--cta) 50%, var(--line) 50%) 0 0 / 200% 100% no-repeat;
  transition: background-position .6s var(--ease);
}
.checkout li:last-child::before { display: none; }
.checkout li.is-done::before { background-position: 100% 0; }
.ck-n {
  position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream); border: 1.5px solid var(--line-strong); color: var(--muted);
  font-size: 14px; font-weight: 800;
  transition: background-color .35s var(--ease), border-color .35s, color .35s, box-shadow .35s, transform .35s var(--spring);
}
.checkout li.is-active { color: var(--ink); }
.checkout li.is-active .ck-n { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 0 0 5px rgba(30, 39, 64, .1); transform: scale(1.06); }
.checkout li.is-done { color: var(--ink-2); }
.checkout li.is-done .ck-n {
  color: transparent; border-color: var(--cta);
  background: var(--cta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
}

.panel-step.is-entering { animation: stepIn .55s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.panel-title { font-family: var(--serif); font-weight: 900; font-size: 1.6rem; margin-bottom: 12px; }

.pick-label { font-weight: 700; font-size: 15.5px; margin-bottom: 8px; }
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: #fff; padding: 3px;
}
.stepper-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: var(--sand-50); color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1;
  cursor: pointer; transition: background-color .15s, transform .2s var(--spring);
}
.stepper-btn:hover:not([disabled]) { background: var(--sand-100); }
.stepper-btn:active:not([disabled]) { transform: scale(.9); }
.stepper-btn[disabled] { opacity: .4; cursor: not-allowed; }
.stepper-val { min-width: 44px; text-align: center; font-family: var(--serif); font-weight: 900; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button {
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; font-weight: 700; cursor: pointer;
  transition: border-color .15s, background-color .2s, color .2s, transform .2s var(--spring);
}
.quick button:hover:not([disabled]) { border-color: var(--ink); transform: translateY(-1px); }
.quick button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.quick button[disabled] { opacity: .4; cursor: not-allowed; }

.chosen { margin-top: 12px; min-height: 40px; }
.chosen-empty { font-size: 14.5px; color: var(--muted); background: var(--cream); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 9px 12px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-height: 132px; overflow-y: auto; }
.chips li { animation: chipIn .35s var(--spring) both; }
@keyframes chipIn { from { opacity: 0; transform: scale(.7); } }
.chips button {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 4px 8px 4px 12px; border-radius: 999px;
  border: 0; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: background-color .2s;
}
.chips button:hover { background: var(--ink-2); }
.chips .x { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.16); font-size: 13px; line-height: 1; }

.total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 16px 0; padding: 12px 16px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--sand-50), #fbe7c8);
  border: 1px solid var(--sand-200);
}
.total-row span { font-weight: 700; color: var(--brown); }
.total-row strong { font-family: var(--serif); font-weight: 900; font-size: 1.9rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.total-row strong.bump { animation: bump .45s var(--spring); }
@keyframes bump { 40% { transform: scale(1.1); color: var(--cta); } }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 14.5px; }
.req { color: var(--cta); }
.hint { font-weight: 500; color: var(--muted); font-size: 13px; }
.field input:not([type="checkbox"]) {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder { color: #a39686; }
.field input:hover { border-color: #c9ab83; }
.field input:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 3px rgba(180, 83, 26, .18); }
.field input[aria-invalid="true"] { border-color: var(--danger); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.field input:disabled { background: var(--cream); color: var(--muted); }
.field-err { font-size: 13.5px; color: var(--danger); }
.field-err:empty { display: none; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500 !important; cursor: pointer; width: fit-content; }
.check input { width: 18px; height: 18px; accent-color: var(--cta); margin: 0; }
.add-ded { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; text-align: start; padding: 4px 0; }
.add-ded .hint { margin-inline-start: 4px; }
#dedicationField:not([hidden]) { animation: stepIn .4s var(--ease); }

.form-err { color: var(--danger); font-weight: 700; font-size: 14.5px; margin: 12px 0 0; }
.form-err:empty { display: none; }
#donorForm .btn-primary { margin-top: 18px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }
.secure-note svg { color: var(--ok); flex: none; }

/* Pay step */
.pay-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pay-summary { font-weight: 700; color: var(--ink-2); }
.frame-wrap { position: relative; min-height: 280px; }
#NedarimFrame { display: block; width: 100%; height: 0; border: 0; overflow: hidden; transition: height .35s var(--ease); }
.frame-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--muted); font-weight: 500;
}
.frame-wrap.is-ready .frame-loading { display: none; }
.frame-wrap.is-ready { min-height: 0; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--sand-100); border-top-color: var(--cta); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Thanks step */
.thanks { text-align: center; padding-block: 8px; outline: none; }
.thanks-badge { color: var(--ok); display: grid; place-items: center; margin-bottom: 10px; }
.thanks-badge svg { animation: popIn .6s var(--spring) both; }
.thanks-badge .ring { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s .05s var(--ease) forwards; }
.thanks-badge .tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .55s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } }
.thanks-title { font-family: var(--serif); font-weight: 900; font-size: 2rem; }
.thanks-text { margin-top: 10px; font-size: 17px; color: var(--ink-2); }
.thanks-small { margin-top: 8px; font-size: 14px; color: var(--muted); }
.thanks-actions { display: grid; gap: 10px; margin-top: 22px; }

.confetti { position: fixed; inset: 0; z-index: 70; pointer-events: none; }

/* ---------- Quote band ---------- */
.quote-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 240px at 85% 0%, rgba(240, 180, 94, .22), transparent 70%),
    radial-gradient(500px 220px at 10% 100%, rgba(240, 180, 94, .12), transparent 70%),
    var(--ink);
  color: #f7ead6;
  text-align: center;
  padding-block: 64px;
}
.quote-band figure { margin: 0 auto; }
.quote-band blockquote { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 4.2vw, 2.9rem); line-height: 1.3; }
.quote-band blockquote::before, .quote-band blockquote::after { content: "״"; color: var(--amber-soft); }
.quote-band figcaption { margin-top: 10px; color: #c9cfe0; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: #182035; color: #cfd5e6; padding-block: 48px 100px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 36px; }
.footer-logo { height: 76px; width: auto; margin-bottom: 10px; }
.footer-org { font-family: var(--serif); font-weight: 900; font-size: 1.4rem; color: #fff; line-height: 1.25; }
.footer-branch { color: var(--amber-soft); font-weight: 700; margin-top: 2px; }
.footer-h { font-weight: 800; color: #fff; margin-bottom: 6px; }
.footer-text { color: #aab2c8; font-size: 14px; margin-bottom: 12px; }
.contact { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.contact a { color: #f0c88a; text-decoration: none; }
.contact a:hover { text-decoration: underline; }
.pay-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pay-chips li { padding: 4px 12px; border-radius: 999px; border: 1px solid #3a4462; font-size: 13.5px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 36px; padding-top: 18px; border-top: 1px solid #2a3350;
  color: #8d96b0; font-size: 13.5px;
}

/* ---------- Floating donate bar (shown when the panel is off-screen) ---------- */
.mobile-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50; display: flex;
  align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px; padding-inline-start: 18px;
  background: rgba(30, 39, 64, .96); color: #fff; border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px -12px rgba(30, 39, 64, .6);
  transform: translateY(150%); transition: transform .45s var(--ease);
}
.mobile-bar.is-visible { transform: none; }
.mobile-bar-text { min-width: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-bar-text strong { color: var(--amber-soft); font-size: 17px; }
.mobile-bar .btn { min-height: 46px; padding-inline: 22px; }
@media (min-width: 921px) {
  .mobile-bar { left: 50%; right: auto; width: 560px; margin-left: -280px; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 15px; text-align: center;
  box-shadow: 0 16px 40px -12px rgba(30, 39, 64, .6);
  transition: opacity .25s, transform .35s var(--spring);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
body.has-bar .toast { bottom: 92px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .campaign { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
}
@media (max-width: 920px) {
  .header-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .price-card { max-width: 520px; width: 100%; margin-inline: auto; }
  .campaign { grid-template-columns: 1fr; }
  .panel { max-width: 640px; width: 100%; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
  .steps li { padding: 12px 14px; }
  .search { max-width: none; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .brand-text strong { font-size: 15.5px; }
  .brand-logo { height: 48px; }
  .brand.has-logo .brand-text small { font-size: 14.5px; }
  .hero-grid { padding-top: 20px; }
  .hero-actions .btn { width: 100%; }
  .price-card { padding: 24px 18px 18px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .slot { min-height: 96px; padding: 10px 12px; }
  .seg { width: 100%; }
  .seg button { flex: 1; justify-content: center; padding-inline: 8px; }
  .panel { padding: 18px 16px 20px; border-radius: 20px; }
  .field-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .ticker-label { padding-inline: 10px; font-size: 13.5px; }
  .hero-branch--a { width: 50vw; top: -40px; opacity: .4; }
  .hero-branch--b { display: none; }
}

/* ---------- Touch & small-screen refinements ---------- */
@media (min-width: 921px) and (hover: hover) {
  body { background-attachment: fixed; }
}
/* Finger-sized tap targets (44px) on touch screens */
@media (pointer: coarse) {
  .nav-link, .add-ded, .check { min-height: 44px; }
}
/* Touch screens keep :hover after a tap – undo hover-only effects there */
@media (hover: none) {
  .btn:hover, .steps li:hover, .quick button:hover:not([disabled]) { transform: none; }
  .btn-primary:hover { background: var(--cta); }
  .btn-primary:hover::after { transform: translateX(110%); }
  .btn-ghost:hover { border-color: var(--line-strong); background: rgba(255, 253, 248, .75); }
  .steps li:hover { box-shadow: none; border-color: var(--line); }
  .slot:not(.is-sponsored):not(.is-selected):hover { transform: none; box-shadow: none; border-color: var(--line-strong); border-style: dashed; }
  .slot:not(.is-sponsored):not(.is-selected):hover .slot-num { color: var(--ink); }
  .seg button:hover:not([aria-pressed="true"]) { background: transparent; }
  .slot:not(.is-sponsored):active { transform: scale(.97); }
  .btn:active { transform: scale(.98); }
}
@media (max-width: 560px) {
  .tb-long { display: none; }
  .tb-short { display: inline; }
  .test-banner { font-size: 13.5px; padding-block: 6px; }
}
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .hero h1 { font-size: 2rem; }
  .price-num { font-size: 3.8rem; }
  .seg button { padding-inline: 6px; font-size: 14px; gap: 5px; }
  .seg-count { min-width: 22px; padding-inline: 5px; }
  .slot { padding: 10px; }
  .slot-num { font-size: 1.55rem; }
  .mobile-bar { padding-inline-start: 14px; }
  .mobile-bar-text { font-size: 14px; }
  .mobile-bar .btn { padding-inline: 16px; }
  .quick button { min-width: 42px; padding-inline: 10px; }
}
/* Landscape phones: short screens */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-grid { padding-top: 12px; }
  .mobile-bar { bottom: calc(8px + env(safe-area-inset-bottom)); padding-block: 6px; }
  .mobile-bar .btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::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]:not(.is-in), .js .board:not(.is-settled) .slot-item { opacity: 1; }
  .ticker-track { animation: none !important; }
  .thanks-badge .ring, .thanks-badge .tick { stroke-dashoffset: 0; }
}
