/* ===== Design tokens ===== */
:root {
  --ink:          #221a0f;   /* near-black warm ink — קריא */
  --ink-soft:     #2c2417;   /* טקסט גוף כהה לקריאוּת נוחה */
  --paper:        #f1eed2;   /* aged paper — brighter */
  --paper-2:      #e5e0b8;   /* deeper sand */
  --card:         #faf7e6;   /* lighter cream — "notes on the page" */
  --line:         #cdc083;   /* faded rule */
  --rule:         #bca85d;
  --gold:         #9a7a3c;   /* aged gold */
  --gold-deep:    #6d5121;
  --gold-light:   #b6904f;
  --accent:       #7a4a24;   /* warm umber-brown (less red) */
  --accent-2:     #8a5a2e;
  --max:          1040px;
  --radius:       2px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Frank Ruhl Libre", "David Libre", Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 80% at 50% 0%, rgba(250,249,232,.45), transparent 70%),
    radial-gradient(140% 130% at 50% 115%, rgba(85,82,38,.05), transparent 62%);
  font-size: 1.28rem;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Frank Ruhl Libre", Georgia, serif; font-weight: 700; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

.container { max-width: var(--max); margin-inline: auto; padding-inline: 24px; }

/* ===== מסגרת קלף מעוטרת (קבועה) ===== */
.frame { position: fixed; inset: 14px; pointer-events: none; z-index: 40;
  border: 1px solid #86671f;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px #86671f, 0 0 40px rgba(80,75,45,.10) inset;
}
.frame__c { position: absolute; width: 94px; height: 94px; opacity: .9; }
.frame__c--tl { top: -3px; left: -3px; }
.frame__c--tr { top: -3px; right: -3px; transform: scaleX(-1); }
.frame__c--bl { bottom: -3px; left: -3px; transform: scaleY(-1); }
.frame__c--br { bottom: -3px; right: -3px; transform: scale(-1, -1); }
@media (max-width: 600px) { .frame { inset: 8px; } .frame__c { width: 64px; height: 64px; } }
.frame__s { position: absolute; width: 60px; height: 215px; opacity: 1; top: 50%; }
.frame__s--l { left: -2px; transform: translateY(-50%); }
.frame__s--r { right: -2px; transform: translateY(-50%) scaleX(-1); }
@media (max-width: 600px) { .frame__s { width: 40px; height: 143px; } }

/* מסכות היעלמות — הטקסט מתעמעם לפני שייגע במסגרת */
body::before, body::after {
  content: ""; position: fixed; left: 0; right: 0; height: 56px;
  z-index: 39; pointer-events: none;
}
body::before { top: 0;    background: linear-gradient(to bottom, var(--paper) 0, var(--paper) 34px, rgba(239,230,198,0) 56px); }
body::after  { bottom: 0; background: linear-gradient(to top,    var(--paper) 0, var(--paper) 34px, rgba(239,230,198,0) 56px); }

/* ===== Nav ===== */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin-inline: auto; padding: 50px 28px 22px;
}
.nav--center { justify-content: center; text-align: center; border-bottom: 1px solid var(--rule); padding-bottom: 28px; margin-bottom: 10px; }
.nav__brand { font-family: "Frank Ruhl Libre", serif; font-weight: 600; font-size: clamp(1.25rem, 2.5vw, 1.75rem); letter-spacing: .3px; color: var(--gold-deep); }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.nav__links a { color: var(--ink-soft); transition: color .2s; }
.nav__links a:hover { color: var(--accent); }

/* ===== Hero ===== */
.hero { background: transparent; }
.hero__inner { max-width: 820px; margin-inline: auto; padding: 56px 24px 80px; text-align: center; }
.hero__inner::after {
  content: "❦"; display: block; color: var(--gold); font-size: 1.5rem;
  margin: 1.4em auto 0; opacity: .8;
}
.hero__intro {
  max-width: 680px; margin: 0 auto; color: var(--ink-soft);
  font-size: clamp(1.3rem, 2.4vw, 1.55rem); line-height: 1.85;
  border-bottom: 1px solid var(--rule); padding-bottom: 1.5em;
}
.hero__points::before {
  content: "❦"; display: block; text-align: center;
  color: var(--gold); font-size: 1.6rem; opacity: .85; margin: 1.9em 0 1.4em;
}
.hero__intro p { margin: 0 0 .45em; }
.hero__intro p:first-child { font-size: 1.85em; font-weight: 700; color: var(--ink); margin-bottom: .55em; }
.hero__intro p:nth-child(2), .hero__intro p:nth-child(3) { font-size: 1.22em; color: var(--ink); }
.hero__intro p:last-child { margin-bottom: 0; }
.hero__title {
  font-family: "Suez One", "Frank Ruhl Libre", serif;
  font-size: clamp(2.3rem, 5.6vw, 3.9rem); margin: 0 0 .7em; font-weight: 400;
  color: var(--ink); letter-spacing: .5px; line-height: 1.2;
}
.hero__title::after {
  content: ""; display: block; width: 64px; height: 1px; margin: .55em auto 0;
  background: var(--rule);
}
.hero__lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 640px; margin: 0 auto 2em; }

/* רשימת הנקודות העיקריות במבוא — כל נקודה בשורה משלה */
.hero__points { list-style: none; padding: 0; margin: 0 auto; max-width: 620px; text-align: center; }
.hero__points li {
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  color: var(--ink); font-weight: 500; padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.hero__points li:first-child { border-top: 1px solid var(--line); }
.hero__points li strong { color: var(--gold-deep); font-weight: 700; }
.hero__points a { display: block; color: inherit; text-decoration: none; cursor: pointer; transition: color .2s, transform .2s; }
.hero__points a:hover { transform: translateY(-1px); }
.hero__points a:hover strong { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; }
/* הפרדה בין כפתור המבוא לשאר תוכן העניינים */
.hero__points li:first-child { border-bottom: none; }
.hero__points li:first-child::after {
  content: "❖"; display: block; text-align: center;
  color: var(--gold); font-size: 1.3rem; opacity: .8; margin: 16px 0 4px;
}
/* כותרת קטנה מעל רשימת הרשומות */
.hero__points li.hero__toc {
  font-size: .82rem; letter-spacing: .22em; font-weight: 600;
  color: var(--gold-deep); opacity: .7;
  padding: 2px 0 12px; border: none;
}
.hero__points li.hero__toc + li { border-top: 1px solid var(--line); }
/* "סוף דבר" בתפריט — נפרד בקישוט ❖ כמו המבוא */
.hero__points li.hero__after { border: none; }
.hero__points li.hero__after::before {
  content: "❖"; display: block; text-align: center;
  color: var(--gold); font-size: 1.3rem; opacity: .8; margin: 8px 0 14px;
}

/* ===== אקורדיון העקרונות — מלבנים מאורכים נפתחים ===== */
.accordion { max-width: 820px; margin: 3em auto 0; }
.acc {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  margin-bottom: 16px; overflow: hidden; scroll-margin-top: 90px;
  transition: border-color .2s, box-shadow .2s;
}
.acc[open] { border-color: var(--gold); box-shadow: 0 12px 34px rgba(154,123,63,.16); }
.acc:target { border-color: var(--gold); box-shadow: 0 12px 34px rgba(154,123,63,.25); }
.acc__head {
  cursor: pointer; list-style: none; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(20px, 4vw, 32px);
  font-family: "Frank Ruhl Libre", serif; font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2rem); color: var(--gold-deep);
  transition: background .2s;
}
.acc__head:hover { background: rgba(154,123,63,.05); }
.acc__head::-webkit-details-marker { display: none; }
.acc__head::after {
  content: "+"; flex: none; font-family: "Heebo", sans-serif; font-weight: 400;
  font-size: 1.6rem; line-height: 1; color: var(--gold); transition: transform .25s;
}
.acc[open] .acc__head::after { content: "–"; }
.acc__body {
  padding: 0 clamp(20px, 4vw, 32px) 26px;
  color: var(--ink-soft); font-size: 1.52rem; line-height: 1.6;
}
.acc__body p { margin: 0 0 .7em; }
.acc__body p:last-child { margin-bottom: 0; }

/* רשומת "איך זה עובד כאן" — נראות שונה (התנהלות האתר, לא תוכן רעיוני) */
.acc--meta {
  background: #eae6d6;
  border: 1px solid #c7be9f;
  border-radius: var(--radius);
  margin-bottom: 2.6em;
}
.acc--meta .acc__head { color: var(--ink-soft); font-style: italic; font-weight: 500; }
.acc--meta .acc__head::after { color: var(--ink-soft); }
.acc--meta[open] { border-color: #b6aa86; box-shadow: 0 8px 24px rgba(80,75,45,.10); }
.acc--meta .acc__head:hover { background: rgba(80,75,45,.05); }
/* מפריד גרפי קטן לפני "סוף דבר" באקורדיון */
.acc__sep { text-align: center; color: var(--gold); font-size: 1.5rem; opacity: .8; margin: 2.4em 0 1.6em; }
/* פרח קבוע ממורכז בסוף "סוף דבר" — מחוץ לטקסט הנערך כדי שלא יימחק */
.after-flower { text-align: center; margin: 0.5em 0 1.1em; line-height: 1; }

/* ===== קטע הרשמה ===== */
.reg { padding: 2.5em 0 3.5em; }
.reg__title { font-family: "Frank Ruhl Libre", serif; font-weight: 700; text-align: center; color: var(--gold-deep); font-size: clamp(2.1rem, 4.2vw, 3rem); margin: 0; }
.reg__sep { text-align: center; color: var(--gold); font-size: 1.3rem; opacity: .8; margin: 10px 0 26px; }
.reg__intro { max-width: 640px; margin: 0 auto 2em; text-align: center; color: var(--ink-soft); font-size: 1.28rem; line-height: 1.8; }
.reg__form { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.reg__row { display: flex; gap: 18px; }
.reg__row .reg__field { flex: 1; }
.reg__field { display: flex; flex-direction: column; gap: 7px; }
.reg__field > span { font-weight: 600; color: var(--gold-deep); font-size: 1.1rem; }
.reg__field input, .reg__field select, .reg__field textarea {
  font-family: "Frank Ruhl Libre", serif; font-size: 1.15rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 11px 14px; width: 100%; box-sizing: border-box;
}
.reg__field textarea { resize: vertical; line-height: 1.7; }
.reg__field input:focus, .reg__field select:focus, .reg__field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(154,123,63,.15);
}
.reg__submit {
  align-self: center; margin-top: 10px; cursor: pointer;
  font-family: "Frank Ruhl Libre", serif; font-weight: 700; font-size: 1.25rem;
  color: var(--paper); background: var(--gold-deep); border: none; border-radius: var(--radius);
  padding: 12px 48px; transition: background .2s, transform .2s;
}
.reg__submit:hover { background: var(--accent); transform: translateY(-1px); }
@media (max-width: 600px) { .reg__row { flex-direction: column; gap: 18px; } }

/* נטרול סגנונות נסתרים (inline) מהעריכה — אחידות פונט בלי לגעת בטקסט/בפסקאות */
.acc__body, .acc__body p, .acc__body span, .acc__body font, .acc__body div {
  font-size: 1.52rem !important;
  line-height: 1.6 !important;
  font-family: "Frank Ruhl Libre", serif !important;
  color: var(--ink-soft) !important;
}
.hero__intro span, .hero__intro font {
  font-size: inherit !important; line-height: inherit !important;
  font-family: inherit !important; color: inherit !important;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: var(--radius);
  font-family: "Heebo", sans-serif; font-weight: 500; font-size: 1rem;
  cursor: pointer; transition: all .2s ease; border: 1px solid transparent;
}
.btn--ghost { border-color: var(--gold); color: var(--gold-deep); background: transparent; }
.btn--ghost:hover { background: var(--gold); color: var(--paper); }

/* ===== Sections ===== */
.section { padding: 76px 0; background: transparent; }
.section--articles { border-top: 1px solid var(--line); }
.section--idea { border-top: 1px solid var(--line); }
.section__title { font-size: clamp(2.1rem, 4.2vw, 3rem); text-align: center; margin: 0 0 .25em; color: var(--gold-deep); }
.section__title::after {
  content: "❦"; display: block; font-size: 1.1rem; color: var(--gold); margin-top: .35em; opacity: .8;
  -webkit-text-fill-color: var(--gold);
}
.section__intro {
  text-align: center; color: var(--ink-soft); max-width: 640px; margin: 0 auto 2.8em;
  font-style: italic; font-size: 1.3rem;
}

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin-top: 3em; }
.card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 34px 30px; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28,26,23,.07); }
.card h3 { font-size: 1.3rem; margin: 0 0 .5em; color: var(--gold-deep); }
.card p { color: var(--ink-soft); margin: 0; }

/* ===== Articles ===== */
.articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.article-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 30px 28px; display: flex; flex-direction: column; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(28,26,23,.08); border-color: var(--gold); }
.article-card__tag { font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 12px; }
.article-card__title { font-size: 1.4rem; margin: 0 0 .4em; }
.article-card__excerpt { color: var(--ink-soft); font-size: .98rem; margin: 0 0 1.2em; flex: 1; }
.article-card__more { font-weight: 500; color: var(--gold-deep); font-size: .95rem; }

/* ===== Path / steps ===== */
.path { max-width: 720px; }
.steps { list-style: none; padding: 0; margin: 3em 0 2em; display: grid; gap: 28px; }
.step { display: flex; gap: 24px; align-items: flex-start; }
.step__num {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Frank Ruhl Libre", serif;
  font-weight: 700; font-size: 1.4rem; color: var(--gold-deep);
  background: var(--card); border: 1px solid var(--rule);
}
.step h3 { margin: 6px 0 .3em; font-size: 1.3rem; color: var(--gold-deep); }
.step p { color: var(--ink-soft); margin: 0; }
.path__note { text-align: center; color: var(--ink-soft); font-style: italic; font-size: 1rem; margin-top: 2em; }

/* ===== Footer ===== */
.footer { background: transparent; border-top: 1px solid var(--line); color: var(--ink-soft); text-align: center; padding: 34px 24px; font-size: .95rem; }
.footer::before { content: "❧"; display: block; color: var(--gold); font-size: 1.3rem; margin-bottom: .5em; opacity: .8; }
.footer p { margin: 0; font-style: italic; }

/* ===== Article modal ===== */
.modal {
  position: fixed; inset: 0; background: rgba(28,26,23,.55);
  display: none; align-items: flex-start; justify-content: center;
  padding: 6vh 20px; overflow-y: auto; z-index: 50;
}
.modal.is-open { display: flex; }
.modal__box {
  background: var(--card); max-width: 680px; width: 100%;
  border-radius: var(--radius); padding: 48px clamp(24px, 5vw, 56px);
  box-shadow: 0 30px 70px rgba(0,0,0,.3); position: relative;
}
.modal__close {
  position: absolute; inset-inline-start: 18px; top: 16px;
  background: none; border: none; font-size: 1.8rem; line-height: 1;
  cursor: pointer; color: var(--ink-soft);
}
.modal__tag { font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-deep); }
.modal__title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: .3em 0 .8em; }
.modal__body { color: var(--ink-soft); font-size: 1.08rem; }
.modal__body p { margin: 0 0 1.1em; }

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .nav__links { display: none; }
  .section { padding: 64px 0; }
}

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== מצב עריכה מקומי (אדמין) ===== */
body.editing [contenteditable="true"] { outline: 1px dashed var(--gold); outline-offset: 4px; border-radius: 2px; cursor: text; }
body.editing [contenteditable="true"]:focus { outline: 2px solid var(--gold); background: rgba(154,123,63,.07); }
body.editing { padding-bottom: 60px; }
.admin-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: #2a2415; color: #f3ead0;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center;
  padding: 10px 16px; font-family: "Heebo", sans-serif; font-size: .92rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
}
.admin-bar button {
  font-family: inherit; font-size: .9rem; background: var(--gold); color: #211c0e;
  border: none; padding: 7px 14px; border-radius: 4px; cursor: pointer;
}
.admin-bar button:hover { background: var(--gold-light); }
