/*
 * עמוד "כל הנכסים" (index.html). נטען אחרי shared/site.css ומשתמש באותם משתנים, גופן וכפתורים.
 * ההבדל היחיד בפלטה: רקע בגוון נייר חם במקום לבן. הטקסט וצבע ההדגשה זהים לדפי הנכסים.
 */
:root {
  --bg: #f6f2ec;
  --surface: #fbf8f3;
  --line: #ddd5c7;
  --edge: #83877f;                     /* גבול של רכיב לחיץ: ניגודיות 3.28:1 מול הרקע (לפחות 3:1) */
  --ease-io: cubic-bezier(.87, 0, .13, 1);   /* expo.inOut, לתנועות בין שני מצבים */
}
.home .site-header { background: rgba(246, 242, 236, .92); }
/* בעמוד הזה הקישור "כל הנכסים" בכותרת מוביל לעמוד עצמו, ולכן לא מוצג */
.home .site-header nav a[href="index.html"]:not(.btn) { display: none; }
@media (max-width: 899px) { .home .mobile-cta { background: rgba(246, 242, 236, .96); } }

.mask { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.mask > * { display: block; }
.kicker { color: var(--muted); font-weight: 500; font-size: 15px; letter-spacing: .02em; }
.display {
  font-size: clamp(56px, 13.5vw, 208px); font-weight: 800; line-height: .94; letter-spacing: -.03em;
}
.display--m { font-size: clamp(44px, 8.4vw, 132px); }
.section { padding: clamp(72px, 12vw, 190px) var(--gutter); }

/* ================= פתיחה ================= */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden;
  background: var(--bg); color: #fff;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; background: #1b1d1a; }
.hero-media-inner { position: absolute; inset: 0; }
.hero-media picture { position: absolute; inset: 0; }
.hero-poster, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video { opacity: 0; transition: opacity .6s var(--ease-out); }
.hero-media.has-video .hero-video { opacity: 1; }
/* מסך כהה מאחורי הטקסט, כדי שהניגודיות תישמר על כל פריים בסרטון */
.hero-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(12, 14, 12, .88) 0%, rgba(12, 14, 12, .66) 30%, rgba(12, 14, 12, .22) 54%, rgba(12, 14, 12, 0) 70%);
}
.hero-copy { text-shadow: 0 1px 28px rgba(0, 0, 0, .35); }

/* השם: במצב הסופי הוא נמצא בכותרת העליונה, וכאן הוא נשאר לקוראי מסך בלבד */
.hero-name {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.hero-copy {
  position: absolute; inset-inline: var(--gutter); bottom: clamp(84px, 13vh, 132px);
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px;
}
.hero-sentence {
  font-size: clamp(32px, 5.6vw, 84px); font-weight: 800; line-height: 1.04; letter-spacing: -.02em;
  max-width: 17ch; text-wrap: balance; text-align: right;
}
.hero-sentence .ph { font-size: .42em; white-space: normal; }

.hero-scroll {
  position: absolute; bottom: 22px; left: 50%; margin-left: -24px; width: 48px; height: 48px;
  display: grid; place-items: center; border-radius: 50%; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .55);
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.hero-scroll svg { width: 20px; height: 20px; }
.hero-scroll:hover { background: #fff; color: var(--ink); }
html.motion .hero-scroll svg { animation: nudge 2.2s var(--ease-io) 3.6s 2; }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateY(5px); } }

.hero-toggle {
  position: absolute; top: calc(var(--header-h) + 16px); inset-inline-end: var(--gutter);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(12, 14, 12, .38); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.hero-toggle[hidden] { display: none; }
.hero-toggle svg { width: 18px; height: 18px; }
.hero-toggle .i-play, .hero-toggle[aria-pressed="true"] .i-pause { display: none; }
.hero-toggle[aria-pressed="true"] .i-play { display: block; }
.hero :focus-visible { outline-color: #fff; }
/* גילוי על סרטון הפתיחה */
.hero-note {
  position: absolute; z-index: 2; top: calc(var(--header-h) + 22px); inset-inline-start: var(--gutter);
  max-width: min(34ch, calc(100% - 2 * var(--gutter) - 60px));
  background: rgba(12, 14, 12, .6); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.4;
  padding: 5px 12px; border-radius: 14px; pointer-events: none;
}
.hero-note[hidden] { display: none; }

@media (max-width: 899px) {
  .hero-copy { bottom: calc(69px + env(safe-area-inset-bottom) + 86px); gap: 14px; flex-direction: column; align-items: flex-start; }
  .hero-scroll { bottom: calc(69px + env(safe-area-inset-bottom) + 18px); }
}

/* ---------- האינטרו: המצב ההתחלתי, לפני שהאנימציה מתחילה ---------- */
html.intro-on, html.intro-on body { overflow: hidden; }
html.intro-on .site-header, html.intro-on .mobile-cta,
html.intro-on .hero-scroll, html.intro-on .hero-toggle, html.intro-on .hero-note { opacity: 0; }
html.intro-on .site-brand .bw { visibility: hidden; }
html.intro-on .hero-copy .mask > * { transform: translateY(115%); }
/* פתח סגור: דלת ברוחב אפס במחשב, פס בגובה אפס בטלפון */
html.intro-on .hero-media { clip-path: inset(17% 50% 17% 50%); }
html.intro-on .hero-name {
  position: fixed; inset: 0; z-index: 120; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink); pointer-events: none; text-align: center;
  font-size: min(17vw, 27vh); font-size: min(17vw, 27svh); font-weight: 800; line-height: .92; letter-spacing: -.03em;
}
html.intro-on .hero-name .ln { display: block; overflow: hidden; padding: .04em .1em .16em; margin-bottom: -.2em; will-change: transform; }
html.intro-on .hero-name .w { display: inline-block; white-space: nowrap; transform: translateY(118%); will-change: transform; }
@media (max-width: 899px) and (orientation: portrait) {
  html.intro-on .hero-media { clip-path: inset(50% 22% 50% 22%); }
  html.intro-on .hero-name { font-size: min(29vw, 16vh); font-size: min(29vw, 16svh); }
}

/* ================= הנכסים ================= */
.sec-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 28px 48px; margin-bottom: clamp(36px, 6vw, 96px);
}
.filters { display: flex; flex-wrap: wrap; gap: 14px 36px; }
.filters[hidden] { display: none; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.filter legend { float: inline-start; padding: 0; margin-inline-end: 6px; color: var(--muted); font-size: 15px; line-height: 44px; }
.chip {
  min-height: 44px; min-width: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--edge); background: transparent; color: var(--ink);
  font-weight: 500; font-size: 16px; font-variant-numeric: tabular-nums;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: clamp(56px, 14vw, 96px); }
.card { min-width: 0; }
.card[hidden] { display: none; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.card-counter, .card-reveal, .card-pic { position: absolute; inset: 0; }
.card-reveal { background: var(--line); overflow: hidden; }
.card-pic { display: block; }
.card-noimg { display: grid; place-items: center; }
.card-img, .card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-img { transition: transform 1.2s var(--ease-out); }
.card.is-zoom .card-img { transform: scale(1.09); transition: transform 7s linear; }
.card-video { opacity: 0; transition: opacity .5s var(--ease-out); }
.card.is-playing .card-video { opacity: 1; }
/* התווית "הדמיה ממוחשבת" מופיעה כשהסרטון מתנגן */
.card-vnote {
  position: absolute; z-index: 2; bottom: 12px; inset-inline-end: 12px;
  background: rgba(27, 29, 26, .76); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.4;
  padding: 4px 12px; border-radius: 999px; pointer-events: none;
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.card.is-playing .card-vnote { opacity: 1; }
/* כפתור עצירת הסרטונים (טלפון) */
.video-stop { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; }
.video-stop[hidden] { display: none; }
.video-stop svg { width: 16px; height: 16px; flex: none; }
.video-stop .i-play, .video-stop.is-off .i-pause { display: none; }
.video-stop.is-off .i-play { display: block; }

.card-stamp {
  position: absolute; z-index: 2; top: clamp(14px, 2vw, 28px); inset-inline-start: clamp(14px, 2vw, 28px);
  padding: .28em .9em; border: 2px solid #fff; border-radius: 6px; color: #fff; background: rgba(27, 29, 26, .5);
  font-size: clamp(16px, 1.5vw, 22px); font-weight: 800; letter-spacing: .1em; line-height: 1.2;
  transform: rotate(-6deg);
}
.card[data-status="נמכר"] .card-img, .card[data-status="נמכר"] .card-video { filter: saturate(.7); }

.card-info { padding-top: 18px; display: grid; gap: 8px; }
.card-kicker { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-status { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 600; }
.card-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.card[data-status="נמכר"] .card-status { color: var(--ink); }
.card-title { font-size: clamp(28px, 3.3vw, 48px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.card-loc { color: var(--muted); }
.card-facts { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 16px; }
.card-facts li { white-space: nowrap; }
/* הנקודה המפרידה באה אחרי הפריט, כדי ששורה שנשברת לא תתחיל בנקודה */
.card-facts li:not(:last-child)::after { content: '·'; margin-inline-start: 18px; color: var(--muted); }
.card-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-top: 4px; }
.card-price { font-size: clamp(21px, 2vw, 28px); font-weight: 600; line-height: 1.2; }
.card-price small { font-size: 14px; font-weight: 400; color: var(--muted); margin-inline-start: 8px; }
.card-go { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--accent); font-weight: 600; }
.card-go svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.card-link:hover .card-go svg { transform: translateX(-6px); }
.card-link:hover .card-title { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .14em; }

/* טלפון: טור אחד, ברוחבים ובגבהים מתחלפים */
@media (max-width: 899px) {
  .card[data-slot="lead"] { margin-inline: calc(var(--gutter) * -1); }
  .card[data-slot="lead"] .card-info { padding-inline: var(--gutter); }
  .card[data-slot="lead"] .card-title { font-size: clamp(40px, 11.5vw, 64px); }
  .card[data-slot="a"] { width: 88%; }
  .card[data-slot="b"] { width: 76%; margin-inline-start: auto; }
  .card[data-slot="b"] .card-media { aspect-ratio: 3 / 4; }
  .card[data-slot="c"] .card-media { aspect-ratio: 4 / 3; }
  .card[data-slot="d"] { width: 80%; }
  .card[data-slot="e"] { width: 88%; margin-inline-start: auto; }
  .card[data-slot="e"] .card-media { aspect-ratio: 1; }
}

/* מחשב: רשת של 12 עמודות, כל נכס במקום ובגודל אחר */
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 2.6vw, 48px); row-gap: clamp(88px, 11vw, 190px); align-items: start; }
  .card[data-slot="lead"] { grid-column: 1 / -1; }
  .card[data-slot="lead"] .card-media { aspect-ratio: 16 / 8.4; }
  .card[data-slot="lead"] .card-info { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 48px; align-items: end; padding-top: 26px; }
  .card[data-slot="lead"] .card-kicker { grid-column: 1 / -1; }
  .card[data-slot="lead"] .card-title { font-size: clamp(56px, 8.6vw, 140px); line-height: .96; grid-row: 2 / span 3; letter-spacing: -.03em; }
  .card[data-slot="lead"] .card-loc, .card[data-slot="lead"] .card-facts, .card[data-slot="lead"] .card-foot { grid-column: 2; }
  .card[data-slot="a"] { grid-column: 1 / span 7; }
  .card[data-slot="a"] .card-media { aspect-ratio: 4 / 3; }
  .card[data-slot="b"] { grid-column: 9 / span 4; margin-top: clamp(80px, 16vw, 260px); }
  .card[data-slot="b"] .card-media { aspect-ratio: 4 / 5; }
  .card[data-slot="c"] { grid-column: 4 / span 9; }
  .card[data-slot="c"] .card-media { aspect-ratio: 2 / 1; }
  .card[data-slot="d"] { grid-column: 1 / span 5; }
  .card[data-slot="d"] .card-media { aspect-ratio: 4 / 5; }
  .card[data-slot="e"] { grid-column: 7 / span 6; margin-top: clamp(60px, 10vw, 160px); }
  .card[data-slot="e"] .card-media { aspect-ratio: 3 / 2; }
}

.empty { padding: clamp(40px, 8vw, 96px) 0; display: grid; gap: 18px; justify-items: start; font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; }
.empty[hidden] { display: none; }
.noscript { font-size: 18px; }

/* התווית שעוקבת אחרי הסמן, במחשב בלבד */
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 150; pointer-events: none;
  padding: 13px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 15px; white-space: nowrap; opacity: 0; visibility: hidden;
}

/* מעבר לדף נכס: התמונה שנלחצה מתרחבת למסך מלא */
.page-wipe { position: fixed; inset: 0; z-index: 300; overflow: hidden; background: #1b1d1a; }
.page-wipe-inner { position: absolute; inset: 0; }
.page-wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-wipe-white { position: absolute; inset: 0; background: #fff; opacity: 0; }

/* ================= על ענבל ================= */
.about { display: grid; gap: clamp(36px, 6vw, 110px); border-top: 1px solid var(--line); }
.about-photo {
  aspect-ratio: 4 / 5; width: min(100%, 520px); position: relative; overflow: hidden;
  display: grid; place-items: center; background: var(--surface);
}
.about-photo.is-empty { border: 2px dashed var(--ph-ink); }
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* כרטיס הביקור: רחב, מוצג במלואו ובלי חיתוך, עם פינות מעוגלות כמו בדפי הנכסים */
.about-photo.is-wide { aspect-ratio: auto; width: 100%; max-width: 640px; display: block; background: none; border-radius: var(--radius); }
.about-photo.is-wide img { position: static; width: 100%; height: auto; object-fit: contain; border-radius: var(--radius); }
/* במחשב הטקסט ארוך, ולכן הכרטיס נשאר במסך לצדו לאורך הקריאה */
@media (min-width: 900px) { .about-photo.is-wide { align-self: start; position: sticky; top: calc(var(--header-h) + 40px); } }
.about-text { display: grid; gap: 22px; align-content: end; }
.about-body { display: grid; gap: 14px; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.65; max-width: 56ch; }
.about-body p:first-child { font-size: 1.15em; font-weight: 500; line-height: 1.5; }
.about-services { display: grid; gap: 0; border-top: 1px solid var(--line); }
.about-services li { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; align-items: center; gap: 12px; }
.about-services li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.about-meta { display: flex; flex-wrap: wrap; gap: 20px clamp(32px, 6vw, 88px); padding-top: 22px; border-top: 1px solid var(--line); }
.about-meta dt { color: var(--muted); font-size: 14px; }
.about-meta dd { font-size: clamp(18px, 1.8vw, 24px); font-weight: 600; line-height: 1.35; }
/* במחשב: הטקסט מימין, כרטיס הביקור משמאל */
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; } .about-photo { order: 2; } }

/* ================= יצירת קשר ================= */
.cta { border-top: 1px solid var(--line); display: grid; gap: 18px; justify-items: start; }
.cta .display { margin-top: 4px; }
.cta-lead { font-size: clamp(18px, 1.9vw, 26px); color: var(--muted); max-width: 30ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.cta-phone { margin-top: 6px; }
.cta-phone a {
  font-size: clamp(34px, 6.4vw, 100px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  text-decoration: none; font-variant-numeric: tabular-nums;
  background: linear-gradient(currentColor, currentColor) no-repeat 100% 100% / 0 .05em;
  transition: background-size .5s var(--ease-out);
}
.cta-phone a:hover { background-size: 100% .05em; }

@media (prefers-reduced-motion: reduce) {
  .card.is-zoom .card-img { transform: none; }
}
