/* Rubik (SIL Open Font License, see fonts/RUBIK-LICENSE.txt), self-hosted because the CSP allows only 'self'.
   Variable font: any weight 300–900. Files from @fontsource-variable/rubik@5.2.8. */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("fonts/rubik-hebrew.woff2") format("woff2-variations"), url("fonts/rubik-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("fonts/rubik-latin.woff2") format("woff2-variations"), url("fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Warm, cheerful palette: coral/orange action colour, teal secondary, sunny highlights. */
:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --text: #2a211c;
  --muted: #6b5a50;
  --border: #f0dfd2;
  --accent: #c2410c;          /* buttons; white text on it passes contrast */
  --accent-ink: #ffffff;
  --accent-soft: #ffe8d9;
  --teal: #0f766e;
  --teal-soft: #d8f3ef;
  --sun: #f59e0b;
  --sun-soft: #fff1c9;
  --sun-ink: #92400e;
  --danger: #b3261e;
  --danger-soft: #fbeaea;
  --warn-soft: #fff1c9;
  --focus: #2563eb;
  --radius: 18px;
  --hero-bg: linear-gradient(135deg, #ffe3d1 0%, #fff4cf 55%, #d8f3ef 100%);
  --font: "Rubik", "Segoe UI", "Arial Hebrew", Arial, "Noto Sans Hebrew", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1411;
    --surface: #241c18;
    --text: #f5ece6;
    --muted: #c4b3a8;
    --border: #3d302a;
    --accent: #fb8a5a;
    --accent-ink: #2a1208;
    --accent-soft: #3d2519;
    --teal: #5fd3c5;
    --teal-soft: #173431;
    --sun: #fbbf24;
    --sun-soft: #3a2f12;
    --sun-ink: #fbbf24;
    --danger: #ff8a80;
    --danger-soft: #3a1f1d;
    --warn-soft: #3a2f12;
    --hero-bg: linear-gradient(135deg, #3a2218 0%, #33290f 55%, #12302c 100%);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;            /* audience 45–65: generous base size */
  line-height: 1.6;
}

a { color: var(--accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 640px; padding-top: 48px; padding-bottom: 48px; }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(var(--accent) 0 40%, var(--sun) 40% 70%, var(--teal) 70% 100%); }
.lang-switch { font-weight: 600; text-decoration: none; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--teal); }

/* Hero */
.hero { padding: 56px 0 48px; background: var(--hero-bg); margin-bottom: 32px; }
.eyebrow { color: var(--teal); font-weight: 700; margin: 0 0 8px; }
.hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); line-height: 1.25; margin: 0 0 16px; max-width: 24ch; }
.lead { font-size: 1.18rem; color: var(--text); max-width: 60ch; margin: 0 0 14px; }
.hero .btn { margin-top: 12px; }
.btn-big { font-size: 1.2rem; padding: 16px 44px; border-radius: 999px; box-shadow: 0 6px 18px rgba(194, 65, 12, 0.25); }

/* Information page */
.info-stack { display: grid; gap: 24px; padding-bottom: 56px; }
.info-pair { display: grid; gap: 24px; }
@media (min-width: 800px) { .info-pair { grid-template-columns: 1fr 1fr; } }
.cta-card { text-align: center; background: var(--sun-soft); border-color: transparent; }
.cta-card .btn { margin-bottom: 10px; }
.form-page { padding-top: 24px; }
.form-card h1 { margin: 0 0 8px; font-size: 1.7rem; }

/* Layout */
.grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding-bottom: 56px; }
@media (min-width: 900px) {
  .grid { grid-template-columns: 1fr 1.05fr; align-items: start; }
  .form-card { position: sticky; top: 16px; }
}
.info { display: grid; gap: 24px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card h2 { margin: 0 0 12px; font-size: 1.35rem; }
.card p { margin: 0 0 8px; }
.muted { color: var(--muted); }

/* Steps timeline */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: var(--accent-soft); color: var(--accent);
}
.step:nth-child(3n+2) .step-num { background: var(--teal-soft); color: var(--teal); }
.step:nth-child(3n+3) .step-num { background: var(--sun-soft); color: var(--sun-ink); }
.step strong { display: block; }
.step-when { display: block; color: var(--muted); font-size: 0.95rem; }

/* Form */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; min-height: 50px;
}
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:focus { border-color: var(--accent); }
.has-error input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.95rem; margin: 6px 0 0; font-weight: 600; }

.consent { border: 1.5px solid var(--border); border-radius: 12px; padding: 16px; margin: 8px 0 22px; }
.consent.has-error { border-color: var(--danger); }
.consent legend { font-weight: 700; padding: 0 6px; }
.consent-text { max-height: 220px; overflow-y: auto; font-size: 0.98rem; background: var(--bg); border-radius: 8px; padding: 8px 14px; margin-bottom: 14px; }
.consent-text ul { margin: 6px 0; padding-inline-start: 20px; }
.consent-text li { margin-bottom: 6px; }
.draft-note { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 3px 0 0; accent-color: var(--accent); flex: none; }

.alert { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 12px 14px; margin: 0 0 18px; font-weight: 600; }
.alert.alert-warn { background: var(--warn-soft); color: var(--text); }

/* Buttons */
.btn {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 0; border-radius: 12px; padding: 14px 28px; min-height: 52px;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }

/* Message pages */
.message { text-align: center; padding: 40px 24px; }
.message h1 { margin: 0 0 12px; font-size: 1.8rem; }
.message p { margin: 0 auto 20px; max-width: 48ch; }
.message.warn { background: var(--warn-soft); }

.footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.9rem; }
