/* ==========================================================================
   JH Property — core stylesheet
   Classic Jerusalem look: warm limestone, gold accents, serif display.
   RTL-first (Hebrew default); uses CSS logical properties so the same rules
   serve the LTR English pages by flipping <html dir>.
   ========================================================================== */

@import url('../fonts/fonts.css');

/* ---------- Design tokens ---------- */
:root {
  /* Brand golds (sampled from logo, confirmed by Koby) */
  --gold:        #8a7d1d;   /* olive-gold — primary brand */
  --gold-bright: #f5d20a;   /* bright gold — accents/highlights, used sparingly */
  --gold-deep:   #6b5f12;   /* darker gold — for text/links on white (AA contrast) */

  /* Warm limestone neutrals — the "Jerusalem stone" feel */
  --bg:          #faf7f0;   /* page background, warm off-white */
  --surface:     #ffffff;   /* cards */
  --surface-alt: #f3eee1;   /* alternating section band */
  --line:        #e6ddc7;   /* hairline borders */

  /* Ink */
  --ink:         #2a2723;   /* primary text (warm near-black) */
  --ink-soft:    #5c554a;   /* secondary text */

  /* Utility */
  --wa:          #25d366;   /* WhatsApp green */
  --wa-dark:     #128c7e;

  /* Type */
  --serif: 'Frank Ruhl Libre', 'Times New Roman', Georgia, serif;
  --sans:  'Assistant', 'Segoe UI', Arial, sans-serif;

  /* Rhythm */
  --maxw: 1180px;
  --radius: 6px;
  --shadow: 0 10px 30px rgba(42, 39, 35, 0.08);
  --shadow-hover: 0 16px 44px rgba(42, 39, 35, 0.14);
  --section-pad: clamp(3rem, 7vw, 6rem);
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p  { margin: 0 0 1rem; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-start: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 1000;
  transition: inset-block-start 0.2s;
}
.skip-link:focus { inset-block-start: 1rem; }

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.2rem); }
.section { padding-block: var(--section-pad); }
.section--alt { background: var(--surface-alt); }

.section__head { max-width: 720px; margin-block-end: 2.5rem; }
.section__eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-block-end: 0.6rem;
}
.section__lead { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 1.2em; height: 1.2em; }

.btn--primary { background: var(--gold); color: #fff; box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--gold-deep); box-shadow: var(--shadow-hover); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--wa { background: var(--wa); color: #fff; box-shadow: var(--shadow); }
.btn--wa:hover { background: var(--wa-dark); box-shadow: var(--shadow-hover); }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background: rgba(250, 247, 240, 0.92);
  backdrop-filter: blur(8px);
  border-block-end: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}
.nav__brand { display: flex; align-items: center; gap: 0.6rem; }
.nav__brand img { height: 44px; width: auto; }
.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.8rem);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__menu a {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
  padding-block: 0.4rem;
  position: relative;
}
.nav__menu a:hover { color: var(--gold-deep); text-decoration: none; }
.nav__menu a[aria-current="page"]::after {
  content: ""; position: absolute;
  inset-inline: 0; inset-block-end: -2px;
  height: 2px; background: var(--gold);
}
.nav__actions { display: flex; align-items: center; gap: 0.8rem; }

/* Language switch */
.lang-switch { display: flex; gap: 0.3rem; font-family: var(--sans); font-weight: 700; font-size: 0.9rem; }
.lang-switch a { color: var(--ink-soft); padding: 0.2rem 0.45rem; border-radius: 4px; }
.lang-switch a[aria-current="true"] { background: var(--gold); color: #fff; }
.lang-switch a:hover { text-decoration: none; }

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 0.4rem; color: var(--ink);
}
.nav__toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: fixed;
    inset-block-start: 64px;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-block-start: 1px solid var(--line);
    padding: 0.5rem 1.2rem 1.2rem;
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .nav__menu.is-open { transform: translateY(0); }
  .nav__menu a { padding-block: 0.85rem; border-block-end: 1px solid var(--line); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: clamp(460px, 72vh, 680px);
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(26,24,20,0.35), rgba(26,24,20,0.62)),
              var(--hero-img, none) center/cover no-repeat;
}
.hero__inner { max-width: 680px; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,0.4); }
.hero__tagline {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-style: italic;
  color: var(--gold-bright);
  margin-block-end: 0.4rem;
}
.hero__sub { font-size: 1.15rem; color: #f3eee1; margin-block-end: 1.8rem; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__actions .btn--ghost { color: #fff; border-color: #fff; }
.hero__actions .btn--ghost:hover { background: #fff; color: var(--ink); }

/* ==========================================================================
   Listings
   ========================================================================== */
.grid-listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-alt); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__badge {
  position: absolute;
  inset-block-start: 0.8rem; inset-inline-start: 0.8rem;
  background: var(--gold); color: #fff;
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem; border-radius: 4px;
}
.card__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__hood { display: inline-flex; align-items: center; gap: 0.35rem; font-family: var(--sans); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); }
.card__hood svg { width: 1.05em; height: 1.05em; flex: none; }
.card__title { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; margin: 0; }
.card__meta { display: flex; flex-wrap: wrap; gap: 0.9rem; color: var(--ink-soft); font-size: 0.92rem; margin-block: 0.2rem; }
.card__meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.card__meta svg { width: 1.05em; height: 1.05em; color: var(--gold-deep); }
.card__price { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--ink); margin-block-start: auto; }
.card__cta { margin-block-start: 0.8rem; }
.card__cta .btn { width: 100%; justify-content: center; }

/* ---------- Listings filter ---------- */
.filter {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-block-end: 2rem;
}
.filter__btn {
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 0.45rem 1.1rem; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter__btn:hover { border-color: var(--gold); }
.filter__btn[aria-pressed="true"] { background: var(--gold); color: #fff; border-color: var(--gold); }
.listings-empty { color: var(--ink-soft); font-size: 1.05rem; padding-block: 2rem; }

/* ==========================================================================
   Why Heller (feature row) + profile
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.feature__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--gold-deep);
  margin-block-end: 1rem;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { margin-block-end: 0.4rem; }
.feature p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

.profile {
  display: grid;
  grid-template-columns: minmax(0, 280px) 1fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
}
.profile__photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
.profile__quote { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--gold-deep); }
@media (max-width: 680px) {
  .profile { grid-template-columns: 1fr; }
  .profile__photo { max-width: 240px; }
}

/* ==========================================================================
   Neighborhoods strip
   ========================================================================== */
.hoods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.hood {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hood:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.hood__icon { color: var(--gold); margin-block-end: 0.5rem; }
.hood__icon svg { width: 28px; height: 28px; }
.hood__name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.hood__name-en { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.8rem; color: var(--ink-soft); letter-spacing: 0.04em; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #fdf8e6; max-width: 56ch; margin-inline: auto; }
.cta-band .btn--wa { margin-block-start: 0.5rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: #d9d2c4;
  padding-block: 3rem 1.5rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--gold-bright); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-block-end: 2rem;
}
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 1rem; letter-spacing: 0.05em; margin-block-end: 0.8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-block-end: 0.5rem; }
.footer__brand img { height: 50px; margin-block-end: 0.8rem; filter: brightness(1.4); }
.footer__bottom {
  border-block-start: 1px solid rgba(255,255,255,0.12);
  padding-block-start: 1.2rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  justify-content: space-between;
  color: #a59e8f; font-size: 0.85rem;
}
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Floating WhatsApp button
   ========================================================================== */
.wa-float {
  position: fixed;
  inset-block-end: 1.4rem;
  inset-inline-end: 1.4rem;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(18,140,126,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.wa-float:hover { transform: scale(1.08); text-decoration: none; }
.wa-float svg { width: 32px; height: 32px; }

/* ==========================================================================
   Accessibility widget
   ========================================================================== */
.a11y-toggle {
  position: fixed;
  inset-block-end: 1.4rem;
  inset-inline-start: 1.4rem;
  z-index: 90;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.a11y-toggle svg { width: 28px; height: 28px; }
.a11y-panel {
  position: fixed;
  inset-block-end: 5.6rem;
  inset-inline-start: 1.4rem;
  z-index: 91;
  width: 250px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 1rem;
  display: none;
}
.a11y-panel.is-open { display: block; }
.a11y-panel h2 { font-family: var(--sans); font-size: 1rem; margin-block: 0 0.7rem; }
.a11y-panel button {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  font-family: var(--sans); font-size: 0.92rem; text-align: start;
  background: var(--surface-alt); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0.55rem 0.7rem; margin-block-end: 0.45rem; cursor: pointer;
}
.a11y-panel button:hover { border-color: var(--gold); }
.a11y-panel button[aria-pressed="true"] { background: var(--gold); color: #fff; border-color: var(--gold); }

/* Accessibility modes toggled on <html> */
html.a11y-contrast {
  --bg: #fff; --surface: #fff; --surface-alt: #f0f0f0;
  --ink: #000; --ink-soft: #222; --gold-deep: #5a5000; --line: #000;
}
html.a11y-contrast body { background: #fff; }
html.a11y-links a { text-decoration: underline !important; font-weight: 700; }
html.a11y-no-motion *, html.a11y-no-motion *::before, html.a11y-no-motion *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* font-scale set via inline style on <html>; rem-based sizing scales with it */

/* ==========================================================================
   Generic utilities
   ========================================================================== */
.text-center { text-align: center; }
.mt-2 { margin-block-start: 2rem; }
