/* מכון 'דעת' – גיליון עיצוב משותף לכל עמודי האתר */
:root {
  /* המבנה: האתר נפתח כשער ספר על בד כריכה כחול עם הטבעת זהב; פנים האתר כדף ספר, כותרות צד מימין ותוכן משמאל */
  --cloth: #1b2540;
  --cloth-raised: #26314f;
  --foil: #c9a75e;
  --foil-ink: #7d5f24;
  --paper: #f4f2ec;
  --paper-deep: #ebe7dc;
  --sheet: #fbfaf6;
  --ink: #1b2030;
  --muted: #555b69;
  --rule: #d6cfbf;
  --on-cloth: #ece6d6;
  --on-cloth-muted: #b4b0a4;

  --font-display: "Frank Ruhl Libre", "David Libre", "David", "Times New Roman", serif;
  --font-body: "IBM Plex Sans Hebrew", "Assistant", "Segoe UI", Arial, sans-serif;
  --font-rashi: "Noto Rashi Hebrew", "Frank Ruhl Libre", "David", serif;

  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
}

h1, h2, h3 { text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: var(--cloth); }
:focus-visible { outline: 2px solid var(--foil-ink); outline-offset: 3px; }
.on-cloth :focus-visible { outline-color: var(--foil); }

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px;
  background: var(--foil); color: var(--cloth); padding: 8px 14px; z-index: 10;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- כותרת עליונה ---------- */
.site-header { background: var(--cloth); color: var(--on-cloth); border-bottom: 1px solid rgba(201, 167, 94, .35); }
.site-header .inner {
  max-width: var(--wrap); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 32px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1.2;
  color: var(--foil); text-decoration: none; white-space: nowrap;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-nav a {
  color: var(--on-cloth); text-decoration: none; font-size: .95rem;
  padding: 4px 0; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--foil); }

/* ---------- השער ---------- */
.cover {
  position: relative; overflow: hidden;
  background: var(--cloth); color: var(--on-cloth);
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px) clamp(28px, 4vw, 44px);
}
.cover-frame {
  position: relative; max-width: 1000px; margin: 0 auto;
  border: 1px solid var(--foil);
  padding: clamp(44px, 7vw, 84px) clamp(18px, 5vw, 64px) clamp(36px, 5vw, 56px);
  text-align: center;
}
.cover-frame::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid rgba(201, 167, 94, .5); pointer-events: none;
}
.cover-frame > * { position: relative; z-index: 2; }

.cover-kicker {
  font-family: var(--font-display); font-weight: 500; color: var(--foil);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); letter-spacing: .35em; margin: 0 0 .1em;
}
.cover-title {
  font-family: var(--font-display); font-weight: 900; color: var(--foil);
  font-size: clamp(4.6rem, 13vw, 9rem); line-height: .95; margin: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}
.ornament { display: block; width: 150px; height: 14px; margin: 22px auto 24px; color: var(--foil); }
.cover-lead {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.3rem, 2.7vw, 1.8rem); line-height: 1.45;
  max-width: 28ch; margin: 0 auto 1.4em; color: var(--on-cloth);
}
.cover-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 16px; margin-top: clamp(28px, 5vw, 52px); }
.cover-actions .btn { font-size: 1.15rem; padding: 1em 2em; min-height: 3.6rem; }
.btn-two .btn-sub::before { content: "·"; margin-inline-end: .5em; }
@media (max-width: 560px) {
  .btn-two { flex-direction: column; gap: .1em; }
  .btn-two .btn-sub { font-weight: 400; font-size: .92em; }
  .btn-two .btn-sub::before { display: none; }
}
/* מקום ושנה – מתחת למסגרת, כבתחתית שער של ספר */
.imprint {
  margin: 14px 0 0; text-align: center; color: var(--foil); opacity: .85;
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .14em;
}

.cover--page .cover-title { font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1.1; }

/* ---------- כפתורים ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.3;
  padding: .78em 1.45em; border-radius: 2px; border: 1px solid; cursor: pointer;
  text-decoration: none; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-foil { background: var(--foil); border-color: var(--foil); color: var(--cloth); }
.btn-foil:hover { background: #d9b96f; border-color: #d9b96f; }
.btn-line { background: transparent; border-color: var(--foil); color: var(--foil); }
.btn-line:hover { background: rgba(201, 167, 94, .13); }
.btn-ink { background: var(--cloth); border-color: var(--cloth); color: #f3eee1; }
.btn-ink:hover { background: var(--cloth-raised); }
.btn-ink-line { background: transparent; border-color: var(--cloth); color: var(--cloth); }
.btn-ink-line:hover { background: rgba(27, 37, 64, .07); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---------- מקטעים: כותרת צד + תוכן ---------- */
.section {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(52px, 8vw, 92px) 24px;
  display: grid; grid-template-columns: minmax(190px, 1fr) 3fr; gap: 20px 56px;
}
.section + .section { border-top: 1px solid var(--rule); }
.section-head h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2; margin: 0;
}
.gloss {
  font-family: var(--font-rashi); color: var(--muted);
  font-size: .98rem; line-height: 1.65; margin: .7em 0 0;
}
.section-body { min-width: 0; }
.prose { max-width: 62ch; font-size: 1.125rem; }
.prose strong { font-weight: 600; }

@media (max-width: 780px) {
  .section { grid-template-columns: 1fr; }
}

/* ---------- השירותים כסימנים ---------- */
.simanim { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.simanim li {
  display: grid; grid-template-columns: 3.4rem 1fr; gap: 0 20px;
  padding: 24px 0; border-bottom: 1px solid var(--rule);
}
.siman-letter {
  font-family: var(--font-display); font-weight: 900; color: var(--foil-ink);
  font-size: 2.5rem; line-height: 1; padding-top: 4px; text-align: center;
}
.simanim h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1.3; margin: 0 0 .2em; }
.simanim p { margin: 0; max-width: 60ch; }
.after-list { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
.after-list p { margin: 0; font-size: 1.05rem; }

/* ---------- רשימת תוכנות מקוצרת ---------- */
.shelf { list-style: none; margin: 0 0 28px; padding: 0; border-top: 1px solid var(--rule); }
.shelf li {
  display: grid; grid-template-columns: minmax(150px, 1fr) 2.2fr auto; align-items: baseline; gap: 4px 24px;
  padding: 18px 0; border-bottom: 1px solid var(--rule);
}
.shelf .name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.shelf .desc { color: var(--muted); }
@media (max-width: 640px) {
  .shelf li { grid-template-columns: 1fr auto; }
  .shelf .desc { grid-column: 1 / -1; grid-row: 2; }
}

.chip {
  display: inline-block; white-space: nowrap; font-size: .82rem; font-weight: 600; line-height: 1.5;
  padding: .12em .8em; border-radius: 999px; border: 1px solid;
}
.chip-free { color: #2c5a37; background: #e4eee5; border-color: #9fbea7; }
.chip-ready { color: var(--cloth); background: #e6e9f1; border-color: #aab3c8; }
.chip-soon { color: var(--muted); background: var(--paper-deep); border-color: var(--rule); }

/* ---------- מפענח נעלמים: ריבוע מרכזי ---------- */
.feature { padding: clamp(52px, 8vw, 92px) 16px; border-top: 1px solid var(--rule); background: var(--paper-deep); }
.feature-box {
  position: relative; max-width: 860px; margin: 0 auto;
  background: var(--cloth); color: var(--on-cloth); border: 1px solid var(--foil);
  padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 60px);
  text-align: center; box-shadow: 0 18px 40px -24px rgba(27, 37, 64, .55);
}
.feature-box::before {
  content: ""; position: absolute; inset: 7px; border: 1px solid rgba(201, 167, 94, .5); pointer-events: none;
}
.feature-box > * { position: relative; }
.feature-kicker { font-family: var(--font-display); color: var(--foil); letter-spacing: .14em; margin: 0 0 .3em; font-size: 1.05rem; }
.feature-title {
  font-family: var(--font-display); font-weight: 900; color: var(--foil);
  font-size: clamp(2.5rem, 6.5vw, 4rem); line-height: 1.05; margin: 0;
}
.feature-sub { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.25rem, 2.6vw, 1.6rem); margin: .35em 0 0; color: #fff; }
.feature-box .ornament { margin: 20px auto 26px; }
.feature-text { max-width: 60ch; margin: 0 auto; text-align: start; font-size: 1.1rem; }
.feature-text strong { color: #fff; font-weight: 600; }
.feature-steps {
  list-style: none; margin: 30px 0 26px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: start;
}
.feature-steps li {
  border: 1px solid rgba(201, 167, 94, .35); background: var(--cloth-raised);
  padding: 18px 18px 20px; font-size: .98rem; line-height: 1.6; color: var(--on-cloth);
}
.feature-steps b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff; margin: 10px 0 4px; }
.step-num {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--foil); color: var(--foil); font-family: var(--font-display); font-weight: 700;
}
@media (max-width: 720px) { .feature-steps { grid-template-columns: 1fr; } }
.feature-box a:not(.btn) { color: var(--foil); }
.feature-actions { display: flex; justify-content: center; margin: 30px 0 4px; }
.feature-actions .btn { font-size: clamp(1.2rem, 2.4vw, 1.4rem); padding: 1em 2.6em; }
.feature-steps:last-child { margin-bottom: 0; }

/* ---------- צור קשר ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px 48px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.details { margin: 0; display: grid; gap: 18px; }
.details dt { font-size: .9rem; color: var(--muted); }
.details dd { margin: 0; font-size: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.copy-btn {
  font: 600 .85rem var(--font-body); color: var(--cloth); background: transparent;
  border: 1px solid var(--rule); border-radius: 2px; padding: .25em .8em; cursor: pointer;
}
.copy-btn:hover { border-color: var(--cloth); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--sheet);
  border: 1px solid #c9c1ae; border-radius: 2px; padding: .6em .75em; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--foil-ink); outline-offset: 0; border-color: var(--foil-ink); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* שדה מלכודת לרובוטים: מוסתר בלי להזיז אותו מחוץ לעמוד (בעמוד מימין לשמאל זה היה יוצר גלילה הצידה) */
.hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; opacity: 0;
}
.form-msg { min-height: 1.5em; margin: 0; font-weight: 600; }
.form-msg.is-error { color: #8a2b1f; }
.form-msg.is-ok { color: #2c5a37; }
button[disabled] { opacity: .6; cursor: progress; }

.thanks {
  background: var(--sheet); border: 1px solid var(--rule); border-inline-start: 3px solid var(--foil);
  padding: 22px 24px;
}
.thanks h3 { font-family: var(--font-display); font-size: 1.35rem; margin: 0 0 .3em; }
.thanks p { margin: 0; }

/* ---------- חלון ההרשמה להורדה ---------- */
.dl-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  border: 1px solid var(--rule); border-top: 4px solid var(--foil); border-radius: 2px;
  padding: clamp(22px, 4vw, 34px); background: var(--sheet); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(27, 37, 64, .6);
}
.dl-dialog::backdrop { background: rgba(27, 37, 64, .55); }
.dl-dialog h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 0 0 .25em; padding-inline-end: 36px; }
.dl-dialog .lead { color: var(--muted); margin-bottom: 1.2em; }
.dl-close {
  position: absolute; top: 10px; inset-inline-end: 12px; width: 36px; height: 36px;
  border: 0; background: transparent; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.dl-close:hover { color: var(--ink); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; line-height: 1.6; cursor: pointer; }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: .25em; flex: none; accent-color: var(--cloth); }
.btn-wide { min-width: 9rem; font-size: 1.1rem; }
#dl-step-done .form-actions { margin-top: 18px; }

/* ---------- שלוחת התוכנות ---------- */
.programs { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 72px) 24px clamp(52px, 8vw, 92px); }
.program {
  display: grid; grid-template-columns: minmax(200px, 1fr) 2.4fr; gap: 16px 56px;
  padding: 40px 0; border-bottom: 1px solid var(--rule);
}
.program:first-child { padding-top: 0; }
.program-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 2.8vw, 2rem); line-height: 1.2; margin: 0 0 .35em; }
.program-head .tagline { font-family: var(--font-rashi); color: var(--muted); margin: .6em 0 0; font-size: .98rem; }
.program-body { min-width: 0; }
.program-body > p { max-width: 62ch; }
.features { margin: 0 0 22px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; max-width: 760px; }
.features li { position: relative; padding-inline-start: 18px; line-height: 1.6; }
.features li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .62em;
  width: 7px; height: 7px; background: var(--foil); transform: rotate(45deg);
}
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.program-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.program-actions .aside-link { font-size: .98rem; }
.program--more { border-bottom: 0; }
.program--more .program-body { border: 1px dashed #c4bba6; padding: 22px 24px; }
@media (max-width: 780px) { .program { grid-template-columns: 1fr; } }

.rights-note {
  max-width: var(--wrap); margin: 0 auto 72px; padding: 0 24px;
}
.rights-note p {
  margin: 0; padding: 18px 22px; background: var(--paper-deep); font-size: .98rem; color: var(--muted);
}

/* ---------- כותרת תחתונה ---------- */
.site-footer { background: var(--cloth); color: var(--on-cloth-muted); font-size: .95rem; }
.site-footer .inner {
  max-width: var(--wrap); margin: 0 auto; padding: 40px 24px 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px 40px;
}
.site-footer .wordmark { font-size: 1.6rem; }
.site-footer .motto { font-family: var(--font-display); color: var(--on-cloth); margin: .3em 0 0; font-size: 1.05rem; }
.site-footer h2 { font-size: .85rem; font-weight: 600; letter-spacing: .08em; color: var(--foil); margin: 0 0 .6em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: var(--on-cloth); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer address { font-style: normal; display: grid; gap: 4px; justify-items: start; }
.site-footer .legal {
  grid-column: 1 / -1; border-top: 1px solid rgba(201, 167, 94, .25); padding-top: 18px; margin: 8px 0 0; font-size: .88rem;
}
@media (max-width: 760px) { .site-footer .inner { grid-template-columns: 1fr; } }
