/* Palette and type taken from the Minyan Santiago letterhead */
:root {
  --brown: #743018;
  --brown-text: #7f341a;
  --rust: #b2461f;
  --yellow: #fbd849;
  --ink: #3b2a22;
  --ink-soft: #6b5a50;
  --paper: #ffffff;
  --cream: #faf6ef;
  --line: #eadfd2;
  --radius: 12px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Barlow", "Bahnschrift", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}
h1, h2, h3 { font-family: "Barlow Semi Condensed", "Bahnschrift", "Barlow", sans-serif; line-height: 1.15; color: var(--brown); margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--rust); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600; color: var(--rust); margin-bottom: .6em; display: block; }

/* Buttons */
.btn { display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 1rem; border: 2px solid transparent; transition: transform .15s, background .15s, color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brown); color: #fff; }
.btn-primary:hover { background: #5e2613; }
.btn-ghost { border-color: var(--brown); color: var(--brown); background: rgba(255,255,255,.7); }
.btn-ghost:hover { background: var(--brown); color: #fff; }
.btn-yellow { background: var(--yellow); color: var(--brown); }
.btn-yellow:hover { background: #ffe36b; }

/* ---------- Front page ---------- */
.front {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.front-main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 40px;
  overflow: hidden;
}
.front-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/img/sketch.jpg") center bottom / cover no-repeat;
  opacity: .9;
  z-index: 0;
}
.front-main::after {
  /* keep the text area readable over the sketch */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, rgba(255,255,255,.92) 0%, rgba(255,255,255,.6) 60%, rgba(255,255,255,0) 100%);
  z-index: 0;
}
.front-card {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 620px;
}
.front-card .logo { width: min(420px, 82vw); margin: 0 auto 26px; }
.front-card h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  letter-spacing: .02em;
  margin-bottom: .35em;
}
.front-card .blurb { font-size: 1.15rem; color: var(--ink); max-width: 52ch; margin: 0 auto 28px; }
.front-card .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Letterhead-style footer with wave */
.lh-footer { position: relative; background: var(--paper); }
.lh-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  font-family: "Barlow Semi Condensed", "Bahnschrift", sans-serif;
  color: #fff;
  font-size: 1rem;
  line-height: 1.35;
  padding-top: 4px;
  padding-bottom: 18px;
}
.lh-info a { color: #fff; text-decoration: none; }
.lh-info a:hover { color: var(--yellow); }
.lh-info .right { text-align: right; }
.wave { display: block; width: 100%; height: auto; margin-bottom: -1px; }
.wave-bar { background: var(--brown); color: #fff; padding: 0 0 20px; }
.wave-bar .copyright { font-size: .85rem; border-top: 1px solid rgba(255,255,255,.18); padding-top: 14px; }

/* ---------- Inner pages ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brown); font-family: "Barlow Semi Condensed", sans-serif; font-weight: 600; font-size: 1.25rem; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .97rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brown); background: var(--cream); }
.nav .btn { padding: 9px 18px; font-size: .92rem; color: #fff; }
.nav .btn:hover { color: #fff; background: #5e2613; }

.page-hero { background: var(--cream); border-bottom: 1px solid var(--line); padding: 64px 0 56px; }
.page-hero p { max-width: 56ch; font-size: 1.12rem; color: var(--ink-soft); }

section { padding: 72px 0; }

/* Direct debit page */
.dd-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 28px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 56px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 38px; height: 38px; border-radius: 50%; background: var(--brown); color: var(--yellow); display: grid; place-items: center; font-weight: 700; }
.amounts { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; padding: 0; border: 0; }
.amount-picker { border: 0; padding: 0; margin: 10px 0 0; min-width: 0; }
.featured-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.featured-amount { position: relative; display: block; cursor: pointer; flex: 1 1 220px; max-width: 280px; }
.featured-amount > span { height: 100%; }
.featured-amount.secondary { flex: 0 1 220px; }
@media (max-width: 520px) {
  .featured-amount, .featured-amount.secondary { flex: 1 1 100%; max-width: none; }
}
.featured-amount.secondary strong { font-size: 1.55rem; }
.featured-amount input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.featured-amount > span { display: block; border: 2px solid var(--line); background: var(--cream); border-radius: 14px; padding: 16px 22px; transition: background .15s, border-color .15s, color .15s; }
.featured-amount strong { display: block; font-family: "Barlow Semi Condensed", "Bahnschrift", sans-serif; font-size: 2rem; line-height: 1.1; color: var(--brown); }
.featured-amount strong em { font-style: normal; font-size: 1.05rem; font-weight: 500; }
.featured-amount small { display: block; font-size: .95rem; color: var(--ink-soft); margin-top: 4px; }
.featured-amount:hover > span { border-color: var(--brown); }
.featured-amount input:checked + span { background: var(--brown); border-color: var(--brown); }
.featured-amount input:checked + span strong, .featured-amount input:checked + span small { color: #fff; }
.featured-amount input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }
.other-label { font-size: .88rem; color: var(--ink-soft); margin: 16px 0 0; }
.amounts.small { margin-top: 8px; gap: 8px; }
.amounts.small .chip span { min-width: 60px; padding: 6px 14px; font-size: .92rem; border-width: 1.5px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; min-width: 76px; text-align: center; background: var(--cream); border: 2px solid var(--line); border-radius: 999px; padding: 9px 18px; font-weight: 600; font-size: 1.05rem; color: var(--brown); transition: background .15s, border-color .15s, color .15s; }
.chip:hover span { border-color: var(--brown); }
.chip input:checked + span { background: var(--brown); border-color: var(--brown); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 2px; }

.other-amount { margin: 4px 0 8px; }
.other-amount.js { display: none; }
.other-amount.js.open { display: block; }
.other-amount label { display: block; font-weight: 600; color: var(--brown); margin-bottom: 6px; font-size: .95rem; }
.other-amount small { color: var(--ink-soft); }
.money { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 0 12px; }
.money:focus-within { border-color: var(--brown); }
.money span { font-weight: 600; color: var(--brown); }
.money input { border: 0; outline: 0; font: inherit; font-size: 1.1rem; padding: 10px 6px; width: 130px; background: transparent; }

.checkbox { display: flex; gap: 12px; align-items: flex-start; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; font-size: .92rem; color: var(--ink-soft); line-height: 1.5; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brown); }
.checkbox strong { color: var(--brown); }

.btn-lg { font-size: 1.08rem; padding: 15px 30px; border: 0; cursor: pointer; font-family: inherit; }
.btn[disabled] { opacity: .7; cursor: wait; transform: none; }
.secure-note { font-size: .88rem; color: var(--ink-soft); margin-top: 12px; }
.form-error { background: #fdecea; border: 1px solid #f3b8b0; color: #8a2414; border-radius: 10px; padding: 12px 16px; margin-bottom: 22px; font-weight: 500; }
.bank-table { width: 100%; border-collapse: collapse; margin: 6px 0 4px; }
.bank-table th, .bank-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.bank-table th { color: var(--ink-soft); font-weight: 500; width: 45%; }
.side-card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: sticky; top: 96px; }
.side-card ul { padding-left: 20px; margin: 0 0 1em; color: var(--ink-soft); }
.guarantee { font-size: .9rem; color: var(--ink-soft); border-left: 3px solid var(--yellow); padding-left: 14px; margin-top: 24px; }

@media (max-width: 820px) {
  .dd-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  section { padding: 56px 0; }
  .lh-info { flex-direction: column; align-items: flex-start; }
  .lh-info .right { text-align: left; }
  .brand span { display: none; }
}

/* Front page: intro on the left, weekly zemanim on the right */
.front-main { min-height: 88vh; min-height: 88svh; padding: 48px 20px; }
.front-main::after { background: rgba(255,255,255,.72); }
.front-grid { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.front-card { text-align: left; max-width: 520px; }
.front-card .logo { margin: 0 0 24px; width: min(380px, 82vw); }
.front-card .blurb { margin: 0 0 28px; }
.front-card .actions { flex-direction: column; align-items: flex-start; gap: 10px; }
.front-card .actions .btn { width: 290px; max-width: 100%; text-align: center; }

.zemanim { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 26px 22px; text-align: center; box-shadow: 0 14px 40px rgba(116, 48, 24, .10); scroll-margin-top: 16px; }
.zemanim .eyebrow { margin-bottom: .3em; }
.zemanim h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: .2em; }
.zemanim-note { color: var(--ink-soft); font-size: .92rem; margin: 0 0 16px; }
.zemanim-sheet { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.zemanim-sheet img { width: 100%; height: auto; display: block; }
.zemanim-actions { margin-top: 16px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-live { display: inline-flex; align-items: center; gap: 9px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 0 rgba(251,216,73,.7); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(251,216,73,.7); } 70% { box-shadow: 0 0 0 8px rgba(251,216,73,0); } 100% { box-shadow: 0 0 0 0 rgba(251,216,73,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

@media (max-width: 900px) {
  .front-grid { grid-template-columns: 1fr; gap: 40px; }
  .front-card { text-align: center; margin: 0 auto; }
  .front-card .logo { margin: 0 auto 24px; }
  .front-card .actions { align-items: center; }
  .zemanim { padding: 22px 14px 18px; }
}

/* Charity Extra / Achisomoch logo buttons */
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.platform { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 16px 12px 12px; text-decoration: none; transition: border-color .15s, transform .15s; }
.platform:hover { border-color: var(--brown); transform: translateY(-1px); }
.platform img { height: 44px; width: auto; max-width: 100%; object-fit: contain; }
.platform strong { height: 44px; display: grid; place-items: center; color: var(--brown); }
.platform span { font-size: .85rem; font-weight: 600; color: var(--brown); text-align: center; line-height: 1.3; }
.zemanim-season { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.zemanim-season p { font-size: .9rem; color: var(--ink-soft); margin: 0 0 10px; }
.zemanim-season .btn { white-space: normal; }

/* Season zemanim page */
.season-page { padding: 48px 0 64px; }
.season-sheet { display: block; max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 14px 40px rgba(116, 48, 24, .10); }
.season-sheet img { width: 100%; height: auto; display: block; }
.season-page .zemanim-actions { margin-top: 24px; }

/* Front page donate tiles (logos side by side) */
.front-donate { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; }
.front-donate .platform { padding: 14px 10px 12px; min-height: 112px; }
.front-donate .platform img { height: 40px; }
.platform.featured { border-color: var(--brown); }
.dd-mark { height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--brown); line-height: 1; }
.dd-mark b { font-family: "Barlow Semi Condensed", "Bahnschrift", sans-serif; font-size: 1rem; font-weight: 600; margin-top: 2px; }
.front-donate .platform > span:last-child { font-size: .8rem; }
@media (max-width: 900px) {
  .front-donate { margin: 0 auto; }
}
@media (max-width: 420px) {
  .front-donate { gap: 8px; }
  .front-donate .platform { padding: 12px 6px 10px; min-height: 100px; }
  .front-donate .platform img { height: 30px; }
  .front-donate .platform > span:last-child { font-size: .72rem; }
}
.dd-mark svg { width: 28px; height: 28px; flex: none; }

/* Front page donate tiles: slimmer and uniform */
.front-donate .platform { min-height: 0; padding: 10px 8px 9px; gap: 6px; justify-content: flex-start; }
.front-donate .platform img { height: 34px; width: 100%; max-width: 130px; object-fit: contain; }
.front-donate .platform > span:last-child { font-size: .76rem; line-height: 1.25; min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
@media (max-width: 420px) {
  .front-donate .platform { padding: 8px 5px 7px; }
  .front-donate .platform img { height: 26px; max-width: 96px; }
  .front-donate .platform > span:last-child { font-size: .68rem; }
}
.front-donate .platform { border-width: 1px; padding: 7px 8px 6px; gap: 3px; border-radius: 10px; }
.front-donate .platform img { height: 28px; }
.front-donate .platform > span:last-child { min-height: 0; }
@media (max-width: 420px) {
  .front-donate .platform { padding: 6px 5px 5px; }
  .front-donate .platform img { height: 22px; }
  .front-donate .platform > span:last-child { min-height: 2.5em; }
}

/* Left column centred over the donate tiles */
.front-card { text-align: center; max-width: 540px; margin: 0 auto; }
.front-card .logo { margin: 0 auto 22px; }
.front-card .blurb { margin: 0 auto 24px; }
.front-donate { margin: 0 auto; width: 100%; }
