/* === Reset & base === */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  font-family: "Heebo", "Assistant", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: #2d2a26;
  background:
    radial-gradient(circle at 20% 10%, #ffe9d6 0%, transparent 55%),
    radial-gradient(circle at 80% 90%, #d4f0e2 0%, transparent 55%),
    #fff7f0;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Hebrew web font (system fallback if offline) */
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/heebo/v26/NGSpv5_NC0k9P_v6ZUCbLRAHxK1EiSysd1U.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }

/* === Layout === */
.container {
  max-width: 560px;
  margin-inline: auto;
  padding: clamp(20px, 6vw, 40px) clamp(16px, 5vw, 28px);
  padding-block-end: max(40px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 4vw, 28px);
}

/* === Title === */
.title {
  margin: 0;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  color: #2d2a26;
}

/* === Hero image === */
.hero {
  margin: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: #ffeada;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 12px 32px -16px rgba(120, 80, 40, 0.25);
  opacity: 0;
  transform: scale(0.98);
  transition: opacity .45s ease, transform .45s ease;
}
.hero.is-ready {
  opacity: 1;
  transform: scale(1);
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Celebrate when she's here */
.hero.is-yes { animation: bounce 1.2s ease both; }
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.04) rotate(-1deg); }
  40% { transform: scale(0.98) rotate(1deg); }
  60% { transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .hero, .hero.is-yes { animation: none; transition: none; opacity: 1; transform: none; }
}

/* === Message === */
.message {
  margin: 0;
  font-size: clamp(17px, 4.5vw, 20px);
  text-align: center;
  color: #4a3f36;
  white-space: pre-wrap;
  max-width: 42ch;
}
.message:empty { display: none; }

/* === FAQ link button === */
.faq-link {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 18px;
  border-radius: 999px;
  color: #6b5a4a;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: background .2s ease;
}
.faq-link:hover, .faq-link:focus-visible {
  background: rgba(255, 220, 190, 0.55);
  outline: none;
}

/* === FAQ modal === */
.faq-modal {
  border: 0;
  padding: 0;
  border-radius: 24px;
  width: min(92vw, 480px);
  max-height: 80dvh;
  background: #fffaf4;
  color: #2d2a26;
  box-shadow: 0 30px 80px -20px rgba(80, 40, 10, 0.35);
}
.faq-modal::backdrop {
  background: rgba(45, 30, 20, 0.45);
  backdrop-filter: blur(2px);
}
.faq-content { display: flex; flex-direction: column; max-height: 80dvh; }
.faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 8px;
}
.faq-header h2 { margin: 0; font-size: 22px; font-weight: 700; }
.faq-close {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #6b5a4a;
  padding: 4px 10px;
  border-radius: 12px;
}
.faq-close:hover { background: #ffeada; }
.faq-body {
  padding: 8px 22px 22px;
  overflow-y: auto;
}
.faq-empty { color: #8a7a6b; text-align: center; }

.faq-item {
  border-block-end: 1px solid #f0e2d0;
  padding-block: 12px;
}
.faq-item:last-child { border-block-end: 0; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px;
  border-radius: 10px;
  transition: background .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: #fff5e9; }
.faq-item summary:focus-visible {
  outline: 2px solid #f4a261;
  outline-offset: 2px;
}
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: #b08c6e;
  line-height: 1;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 8px 4px 4px;
  color: #4a3f36;
  line-height: 1.6;
}
@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
}

/* === Admin page === */
.page-admin .container { max-width: 520px; }

.admin-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: clamp(18px, 5vw, 28px);
  box-shadow: 0 12px 32px -20px rgba(120, 80, 40, 0.25);
}

.toggle-group {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.toggle-group legend {
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0;
}
.toggle-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid transparent;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
}
.toggle-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.toggle-option:hover { background: #fff5e9; }
.toggle-option:has(input:checked) {
  background: #ffe2c6;
  border-color: #f4a261;
}
.toggle-option:has(input:focus-visible) {
  outline: 2px solid #f4a261;
  outline-offset: 2px;
}
.toggle-option:active { transform: scale(0.98); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 700; }
.field-hint {
  font-size: 13px;
  color: #8a7a6b;
  text-align: end;
}
textarea {
  font: inherit;
  resize: vertical;
  min-height: 100px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid #e9d8c5;
  background: #fff;
  color: inherit;
  width: 100%;
}
textarea:focus-visible {
  outline: 2px solid #f4a261;
  outline-offset: 1px;
  border-color: #f4a261;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-primary, .btn-secondary {
  flex: 1;
  appearance: none;
  border: 0;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  transition: transform .1s, background .15s, box-shadow .15s;
}
.btn-primary {
  background: #f4a261;
  color: #2d2a26;
  box-shadow: 0 6px 18px -8px rgba(244, 162, 97, 0.7);
}
.btn-primary:hover { background: #f0934a; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }

.btn-secondary {
  background: #fff;
  color: #4a3f36;
  border: 1.5px solid #e9d8c5;
}
.btn-secondary:hover { background: #fff5e9; }

.status-msg {
  margin: 0;
  min-height: 1.4em;
  font-size: 14px;
  text-align: center;
  color: #6b5a4a;
}
.status-msg.is-error { color: #b94a4a; }
.status-msg.is-success { color: #2f8a5b; }

/* === Loading state === */
[aria-busy="true"] .hero { opacity: 0; }
