/* ==========================================================================
   אביה סטודיו — בסיס
   איפוס, טיפוגרפיה, פריסה, נגישות. RTL בלבד: אין left/right, רק inline.
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--av-bg);
  color: var(--av-text);
  font-family: var(--av-font-body);
  font-size: var(--av-t-body);
  line-height: var(--av-lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--av-font-display);
  margin: 0;
  font-weight: 400;
  text-wrap: balance;
}
h1 { font-size: var(--av-t-h1); line-height: var(--av-lh-h1); font-weight: var(--av-w-display); letter-spacing: -0.02em; }
h2 { font-size: var(--av-t-h2); line-height: var(--av-lh-h2); font-weight: var(--av-w-display); letter-spacing: -0.015em; }
h3 { font-size: var(--av-t-h3); line-height: var(--av-lh-h3); font-weight: var(--av-w-display); }
h4 { font-size: var(--av-t-h4); line-height: var(--av-lh-h4); font-weight: 400; }
h5 { font-size: var(--av-t-h5); line-height: var(--av-lh-h5); font-weight: 400; }

p { margin: 0 0 var(--av-s-2); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--av-link); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--av-t-fast); }
a:hover { color: var(--av-text); }

ul, ol { margin: 0 0 var(--av-s-2); padding-inline-start: var(--av-s-3); }

/* --- מיקוד: מתאר זהב, לעולם לא מוסר (ספר המותג) --- */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--av-gold-warm);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- דילוג לתוכן --- */
.av-skip {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-start: var(--av-s-2);
  z-index: 999;
  background: var(--av-black);
  color: var(--av-cream);
  padding: var(--av-s-2) var(--av-s-3);
  border-radius: var(--av-r-control);
  font-weight: 600;
  text-decoration: none;
}
.av-skip:focus { inset-block-start: var(--av-s-2); color: var(--av-cream); }

/* --- פריסה --- */
.av-wrap {
  max-width: calc(var(--av-content) + var(--av-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--av-gutter);
}
.av-section { padding-block: var(--av-section); }
.av-dark { background: var(--av-black); color: var(--av-cream); }
/* לגופן התצוגה משקל אחד, ולכן על רקע כהה, שבו טקסט בהיר נקרא דק
   יותר, מוסיפים שבריר עובי אופטי במקום לעלות משקל. */
.av-dark h1, .av-dark h2, .av-dark h3, .av-dark h4, .av-dark h5,
.av-charcoal h1, .av-charcoal h2, .av-charcoal h3, .av-charcoal h4, .av-charcoal h5 {
  color: var(--av-cream);
  -webkit-text-stroke: 0.35px currentColor;
}
.av-dark p { color: var(--av-stone); }
.av-dark a { color: var(--av-gold-warm); }
.av-dark a:hover { color: var(--av-cream); }
.av-charcoal { background: var(--av-charcoal); color: var(--av-cream); }
.av-raised { background: var(--av-bg-raised); }

.av-grid { display: grid; gap: var(--av-grid-gap); }
.av-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.av-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.av-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) { .av-grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 782px) {
  .av-grid-2, .av-grid-3, .av-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- טיפוגרפיה בשירות --- */
h2.av-over, h3.av-over { margin: 0; font-family: var(--av-font-body); font-weight: 400; }
.av-over {
  font-size: var(--av-t-over);
  line-height: 1;
  letter-spacing: var(--av-ls-over);
  color: var(--av-gold-deep);
  display: block;
}
.av-dark .av-over, .av-charcoal .av-over { color: var(--av-gold-warm); }

.av-long { font-size: var(--av-t-long); line-height: var(--av-lh-long); color: var(--av-text-2); }
.av-small { font-size: var(--av-t-small); line-height: var(--av-lh-small); }
.av-meta { font-size: 14px; line-height: 22px; color: var(--av-text-3); }
.av-num { font-variant-numeric: tabular-nums; }

/* --- קו הזהב עם הנקודה: החתימה של ספר המותג --- */
.av-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block: var(--av-s-3);
}
.av-rule::before {
  content: "";
  width: clamp(52px, 6vw, 84px);
  height: 2px;
  background: var(--av-gold);
  flex-shrink: 0;
}
.av-rule::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 4px;
  background: var(--av-gold-warm);
  flex-shrink: 0;
}
.av-rule--center { justify-content: center; }

/* --- סריג מגן דוד -----------------------------------------------------------
   אווירה בפינה, לא קישוט מעל טקסט. הוא נשאר מחוץ לעמודת הקריאה,
   ובמסך צר הוא נעלם לגמרי כי אין שם פינה פנויה. */
.av-lattice {
  position: absolute;
  inset-block-start: -120px;
  inset-inline-end: -140px;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}
.av-lattice path { stroke: var(--av-gold); stroke-width: 0.4; fill: none; }

@media (max-width: 1024px) { .av-lattice { display: none; } }

/* --- טבלאות --- */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: start; padding: 14px 18px; }

/* --- קורא מסך בלבד --- */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- תנועה מופחתת --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- טקסט תוכן ארוך ------------------------------------------------------- */
.av-prose { font-size: var(--av-t-long); line-height: var(--av-lh-long); color: var(--av-text-2); }
.av-prose > :first-child { margin-block-start: 0; }
.av-prose .av-lead { font-size: var(--av-t-lead); line-height: var(--av-lh-lead); color: var(--av-text);
  margin-block-end: var(--av-s-5); }
.av-prose h2 { font-size: var(--av-t-h3); line-height: var(--av-lh-h3); color: var(--av-text);
  margin-block: var(--av-s-7) var(--av-s-3); }
.av-prose h3 { font-size: var(--av-t-h5); line-height: var(--av-lh-h5); font-weight: 400;
  color: var(--av-text); margin-block: var(--av-s-4) var(--av-s-1); }
.av-prose p { margin-block-end: var(--av-s-3); }
.av-prose ul, .av-prose ol { margin-block-end: var(--av-s-3); padding-inline-start: var(--av-s-3); }
.av-prose li { margin-block-end: var(--av-s-1); }
.av-prose li::marker { color: var(--av-gold-deep); }
.av-prose strong { color: var(--av-text); font-weight: 600; }
.av-prose table { margin-block: var(--av-s-3) var(--av-s-4); border: 1px solid var(--av-line-light);
  font-size: 16px; }
.av-prose th { background: var(--av-bg-raised); font-weight: 600; font-size: 14px;
  border-block-end: 1px solid var(--av-line-light); }
.av-prose td { border-block-end: 1px solid var(--av-line-light); color: var(--av-text-2); }
.av-prose tr:last-child td { border-block-end: 0; }

/* קו החריטה בין מקטעים ארוכים */
.av-prose h2:not(:first-of-type)::before {
  content: "";
  display: block;
  width: 74px;
  height: 1px;
  background: var(--av-gold);
  margin-block-end: var(--av-s-4);
}

/* טבלה שרוחבה חורג: גלילה בתוך עצמה, לא בגוף העמוד */
.av-prose table { display: block; overflow-x: auto; max-width: 100%; }

/* פריטי grid ו-flex מקבלים min-width: auto כברירת מחדל, ולכן ילד רחב
   (תמונה או מילה ארוכה) מרחיב את הטור ומוציא את העמוד לגלילה אופקית. */
.av-grid > *, .av-pdp > *, .av-hero > *, .av-band > *, .av-checkout > *,
.av-shop-body > *, .av-shop-head__grid > *, .av-footer__cols > * { min-width: 0; }

/* --- תוצאות חיפוש: עמודים -------------------------------------------------- */
.av-searchpages { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--av-s-4) var(--av-s-5); }
.av-searchpages > * { min-width: 0; }
.av-searchpages li { border-block-start: 1px solid var(--av-line-light); padding-block-start: var(--av-s-2); }
.av-searchpages a { font-family: var(--av-font-display); font-size: var(--av-t-h5);
  line-height: var(--av-lh-h5); font-weight: 400; color: var(--av-text); text-decoration: none; }
.av-searchpages a:hover { color: var(--av-gold-deep); }
.av-searchpages p { font-size: 16px; line-height: 26px; color: var(--av-text-2);
  margin-block-start: var(--av-s-1); }
@media (max-width: 782px) { .av-searchpages { grid-template-columns: 1fr; } }
