/* פורטלי יהדות — iddoperez.ai
   Bright RTL Hebrew portals. Palette + type matched to the apex site.
   לעילוי נשמת סבתא שיפרה ז"ל */

:root {
  --bg:        #faf8f2;
  --bg-soft:   #f2efe6;
  --panel:     #ffffff;
  --panel-2:   #f5f2ea;
  --line:      #e2ddd0;
  --line-soft: #ece8de;
  --ink:       #1b1f26;
  --ink-dim:   #3d4452;
  --ink-mute:  #6b7384;
  --accent:    #b9772a;   /* warm amber */
  --accent-2:  #2f6f8c;   /* deep teal */
  --gold:      #957a31;   /* memorial gold */
  --ner:       #d39a26;   /* candle flame */
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1100px;
  --shadow:    0 16px 44px -30px rgba(60,50,30,.45);
  --shadow-sm: 0 8px 24px -18px rgba(60,50,30,.5);
  --sans:   "Inter", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --hebrew: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --serif:  "Fraunces", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:#0e1014; --bg-soft:#14171d; --panel:#181c24; --panel-2:#1f2530;
    --line:#2a313d; --line-soft:#222834;
    --ink:#eef1f6; --ink-dim:#b9c0cd; --ink-mute:#7e8798;
    --accent:#e8a14b; --accent-2:#6fb3d2; --gold:#d9b870; --ner:#ffd98a;
    --shadow:0 18px 50px -28px rgba(0,0,0,.75);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--hebrew);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #1a1407; font-family: var(--serif);
  background: linear-gradient(135deg, var(--ner), var(--accent));
}
.brand small { display: block; font-size: 11.5px; color: var(--ink-mute); font-family: var(--sans); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 16px; font-size: 15.5px; font-family: var(--sans); }
.nav-links a { color: var(--ink-dim); font-weight: 600; }
.nav-cta {
  background: var(--accent); color: #fff !important; padding: 7px 14px;
  border-radius: 999px; font-weight: 700;
}
.nav-cta:hover { text-decoration: none; filter: brightness(1.05); }
@media (max-width: 760px){ .nav-links a:not(.nav-cta){ display:none; } }

/* ---------- HERO ---------- */
.hero { padding: 64px 0 36px; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  padding: 5px 13px; border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ner); box-shadow: 0 0 10px var(--ner); }
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.12; margin: 18px 0 10px; font-weight: 700; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(18px, 2.6vw, 22px); color: var(--ink-dim); max-width: 60ch; margin: 6px 0 22px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans);
  font-weight: 700; font-size: 16px; padding: 12px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { text-decoration: none; filter: brightness(1.06); }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); }

/* ---------- SECTIONS ---------- */
section { padding: 30px 0; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 6px; }
.section-head p { color: var(--ink-mute); margin: 0; max-width: 64ch; }
.kicker { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }

/* card grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px; box-shadow: var(--shadow-sm); position: relative;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 22px; }
.card .ico { font-size: 26px; line-height: 1; margin-bottom: 10px; display: block; }
.card p { margin: 0 0 14px; color: var(--ink-dim); font-size: 16px; }
.links { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: 15px; }
.links li { margin: 4px 0; }
.links a { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.links a::after { content: "↗"; font-size: 12px; opacity: .55; }
.links a.internal::after { content: "←"; }

/* feature / dialog block */
.feature {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.note {
  font-family: var(--sans); font-size: 14px; border-radius: var(--radius-sm);
  padding: 12px 15px; margin-top: 14px; border: 1px dashed;
}
.note.warn { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, var(--panel)); }
.note.live { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, var(--line)); background: color-mix(in srgb, var(--accent-2) 7%, var(--panel)); border-style: solid; }

/* chat box */
.chat { display: grid; gap: 12px; margin-top: 18px; }
.chat-row { display: flex; gap: 10px; }
.chat input[type=text] {
  flex: 1; font-family: var(--hebrew); font-size: 17px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink);
}
.chat input[type=text]:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
#answers { display: grid; gap: 12px; }
.passage {
  background: var(--panel); border: 1px solid var(--line); border-right: 4px solid var(--accent);
  border-radius: 12px; padding: 14px 18px;
}
.passage .src { font-family: var(--sans); font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 6px; display: flex; justify-content: space-between; }
.passage .src .score { color: var(--ink-mute); font-weight: 500; }
.passage .txt { font-size: 18px; line-height: 1.85; }
.muted { color: var(--ink-mute); font-family: var(--sans); font-size: 14px; }

/* pull-quote */
.quote {
  text-align: center; font-size: clamp(24px, 4.5vw, 40px); line-height: 1.4;
  color: var(--accent); margin: 10px auto; max-width: 22ch; font-weight: 500;
}
.quote small { display: block; font-size: 15px; color: var(--ink-mute); font-family: var(--sans); margin-top: 10px; }

/* ---------- DEDICATION ---------- */
.dedication {
  text-align: center; padding: 40px 0 18px; border-top: 1px solid var(--line); margin-top: 30px;
}
.ner-flame { font-size: 34px; line-height: 1; }
.dedication .he-ded { font-size: 22px; color: var(--gold); margin: 8px 0 2px; font-weight: 700; }
.dedication .sub { color: var(--ink-mute); font-family: var(--sans); font-size: 13.5px; }

/* ---------- FOOTER ---------- */
footer { padding: 26px 0 48px; color: var(--ink-mute); font-family: var(--sans); font-size: 14px; text-align: center; }
footer a { color: var(--ink-dim); font-weight: 600; }
.foot-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
