/* ═══════════════════════════════════════════════════════════════════
   thegrossclinic.com — shared design system (port of the Veritas look)
   Black monochrome · Heebo + JetBrains Mono · square corners · hairlines
   Markup for every component: docs/components.md
   No inline styles anywhere (CSP). Page-only CSS goes in home.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ───────────────────────── TOKENS ───────────────────────── */
:root {
  --bg:           #000000;
  --bg-section:   #080808;   /* .section--alt */
  --bg-card:      #0F0F0F;   /* panels, ribbon, notices */
  --bg-hover:     #141414;   /* card hover */
  --text-primary: #FFFFFF;   /* headings */
  --text-body:    #AAAAAA;   /* body copy — 7.5:1+ on every bg */
  --text-muted:   #8C8C8C;   /* mono labels, meta — 5.2:1+ on every bg (v2 fix: was #767676) */
  --text-soft:    #C8C8C8;   /* notices, ribbon, footer micro */
  --accent:       #FFFFFF;
  --border:       #1A1A1A;
  --hair:         rgba(255, 255, 255, 0.08);
  --hair-strong:  rgba(255, 255, 255, 0.12);
  --hair-bold:    rgba(255, 255, 255, 0.25);

  --font-sans: 'Heebo', 'Arial Hebrew', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;  /* English-only labels */
  --font-mono-he: 'JetBrains Mono', 'Heebo', sans-serif;  /* labels that may hold Hebrew: Hebrew falls back to Heebo */

  --gutter: 2rem;            /* container side padding; 16px at ≤600px */
  --section-pad: 140px;      /* 90px at ≤768px */
  --hero-ecg-h: clamp(120px, 15vw, 210px);
  /* Height of the fixed header (demo ribbon + nav). site.js measures the real
     value and overwrites this; the numbers below are only the no-JS fallback. */
  --header-h: 122px;
}

/* ───────────────────────── RESET & BASE ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 100%;                       /* v2: respect the user's font size */
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background-color: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

body.menu-open { overflow: hidden; }

::selection { background: #ffffff33; color: #fff; }

:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

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

a { color: inherit; text-decoration: none; }

button { cursor: pointer; font-family: var(--font-sans); color: inherit; }

ul, ol { list-style: none; }

strong, b { font-weight: 700; color: var(--text-primary); }

/* Off-screen textarea used by site.js for the copy fallback */
.copy-buffer { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* Keep an LTR run (time range "08:00–20:00", e-mail, URL) in reading order inside Hebrew text */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

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

/* ───────────────────────── SKIP LINK ───────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  right: 0;
  background: #ffffff;
  color: #000000;
  padding: 0.8rem 1.4rem;
  font-weight: 700;
  font-size: 1rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ───────────────────────── TYPOGRAPHY ───────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 1.4rem;
  direction: ltr;              /* English mono label: keep "// 02 — X" in order */
  text-align: right;
  unicode-bidi: isolate;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.05;
}
h1 { font-size: clamp(3rem, 8vw, 6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }

p {
  color: var(--text-body);
  font-weight: 300;
  max-width: 640px;
}

.section-lead {
  font-size: 1.1rem;
  line-height: 1.75;
  margin-top: 1.6rem;
}

.prose p { font-size: 1.05rem; margin-bottom: 1.4rem; }
.prose p:last-child { margin-bottom: 0; }

.text-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s;
}
.text-link:hover { opacity: 0.75; }

/* Small "fictional" tag: "דמויות בדויות לצורכי הדגמה" */
.note-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-soft);
  border: 1px solid var(--hair-bold);
  padding: 0.2rem 0.7rem;
  line-height: 1.6;
}
.note-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--text-soft);
  flex-shrink: 0;
}

/* ───────────────────────── LAYOUT ───────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-pad) 0;
  background: var(--bg);
  position: relative;
}
.section--alt { background: var(--bg-section); }

/* Two equal columns (about text + creds, hours + details, info + chat panel) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
  margin-top: 4rem;
}
.split > * { min-width: 0; }

/* ───────────────────────── BUTTONS ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 2.2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.8;
  text-align: center;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.btn-primary { background: var(--accent); color: #000000; border-color: var(--accent); }
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.btn-ghost:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.04); }

/* Small text action: "שאלו את מאיה ←" */
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0.2rem 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.6;
  transition: border-color 0.2s, gap 0.2s;
}
.btn-link::after { content: '←'; font-weight: 400; }
.btn-link:hover { border-bottom-color: #ffffff; gap: 0.75rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

/* ───────────────────────── HEADER: DEMO RIBBON + NAV ───────────────────────── */
.site-header {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 1000;
}

.demo-ribbon {
  background: var(--bg-card);
  border-bottom: 1px solid var(--hair-strong);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 0.42rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}
.demo-ribbon-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--text-primary);
  border: 1px solid var(--hair-bold);
  padding: 0 0.45rem;
  flex-shrink: 0;
  direction: ltr;
}
.demo-ribbon a {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.demo-ribbon a:hover { opacity: 0.8; }

#nav {
  padding: 1.4rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid transparent;   /* always 1px so the header height never jumps */
  transition: background 0.3s, border-color 0.3s;
}
#nav.scrolled {
  background: rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo svg { width: 36px; height: 20px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  margin-right: auto;            /* RTL: push the link group toward the centre/end */
  margin-left: auto;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-body);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a[aria-current] { color: var(--text-primary); }
.nav-links a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

.nav-cta { flex-shrink: 0; }
.nav-cta .btn { padding: 0.55rem 1.4rem; font-size: 0.9rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin: -10px -10px -10px -10px;   /* 44px touch target, 24px visual */
  padding: 10px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
html.no-js .hamburger { display: none !important; }   /* without JS the footer nav is the fallback */

/* Mobile menu overlay (sits under the fixed header, so the ribbon + close X stay visible) */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#mobile-menu[hidden] { display: none; }
#mobile-menu.open { animation: menu-in 0.25s ease; }
@keyframes menu-in { from { opacity: 0; } to { opacity: 1; } }

.mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
}
.mobile-links a {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  transition: opacity 0.2s;
}
.mobile-links a:hover { opacity: 0.6; }
.mobile-links a[aria-current] { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }

/* ───────────────────────── ECG DIVIDER + HERO TRACE ───────────────────────── */
.ecg-divider {
  width: 100%;
  height: 60px;
  overflow: hidden;
  display: block;
}
.ecg-divider svg { width: 100%; height: 100%; }

.ecg-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
/* Hidden-then-drawn only when JS runs (v2: no JS ⇒ the line is simply there).
   Every .ecg-path carries pathLength="1000". */
html.js .ecg-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.6s ease;
}
html.js .ecg-path.drawn { stroke-dashoffset: 0; }

/* Large hero heartbeat line: a band along the bottom of the hero, under the content
   (it doubles as the first divider, so no .ecg-divider directly after .hero). */
.hero-ecg {
  position: absolute;
  right: 0; left: 0;
  bottom: 0;
  height: var(--hero-ecg-h);
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.hero-ecg svg { width: 100%; height: 100%; }
.hero-ecg .ecg-path { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.5; }
html.js .hero-ecg .ecg-path { transition-duration: 2.6s; }
/* A bright blip that runs along the hero trace, like a monitor sweep */
.ecg-pulse {
  fill: none;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 36 964;
  stroke-dashoffset: 1000;
  opacity: 0;
}
html.js .ecg-pulse.drawn {
  opacity: 1;
  animation: ecg-run 7s linear 2.4s infinite;
}
@keyframes ecg-run { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

/* ───────────────────────── BACKGROUND VIDEO (optional) ───────────────────────── */
.video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.video-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.video-bg video.loaded { opacity: 1; }
.video-bg::after {               /* darker than Veritas (.72) so muted text keeps AA */
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 1;
}
.section > .container { position: relative; z-index: 2; }

/* ───────────────────────── HERO ───────────────────────── */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 3.5rem) 0 calc(var(--hero-ecg-h) + 2.5rem);
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 70%; height: 70%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.035) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; }
.hero-h1 { margin-bottom: 1.6rem; letter-spacing: -0.02em; }
.hero-body {
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 2.4rem;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
}
.hero .notice { margin-top: 2.4rem; }

/* ───────────────────────── TRUST STRIP ───────────────────────── */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hair-strong);
}
.trust-item {
  font-family: var(--font-mono-he);
  font-size: 0.74rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  white-space: nowrap;
}
/* The "//" separators come from CSS (no bidi reordering of a typed "//") */
.trust-item + .trust-item::before {
  content: '//';
  margin-left: 1.4rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* ───────────────────────── CREDENTIALS GRID (3 cards) ───────────────────────── */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  margin-top: 5rem;
}
.cred-card {
  padding: 2.4rem 2rem;
  border-left: 1px solid var(--border);
}
.cred-card:last-child { border-left: none; }
.cred-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.8rem;
  direction: ltr;
  text-align: right;
}
.cred-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.cred-sub { font-size: 0.9rem; color: var(--text-muted); display: block; line-height: 1.6; }

/* ───────────────────────── HAIRLINE CARD GRID ───────────────────────── */
/* 1px gap on a border-coloured background draws the hairlines.
   Default 2 columns · .cards--3 three columns · .cards--5 = 3 + 2 (no empty cell). */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 4rem;
}
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--5 { grid-template-columns: repeat(6, 1fr); }
.cards--5 > .card { grid-column: span 2; }
.cards--5 > .card:nth-child(n+4) { grid-column: span 3; }

.card {
  background: var(--bg);
  padding: 3rem 2.6rem;
  border-top: 2px solid transparent;
  transition: background 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.section--alt .card { background: var(--bg-section); }
.card:hover { background: var(--bg-hover); border-top-color: var(--accent); }
.card-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 1.4rem;
}
.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
  line-height: 1.3;
}
.card-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 1.8rem;
}
.card .btn-link { margin-top: auto; }

/* ───────────────────────── TEAM: MONOGRAM TILES ───────────────────────── */
/* Borders on the tiles (not the 1px-gap trick) so an incomplete last row shows no grey cells. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  margin-top: 4rem;
}
.team-grid--3 { grid-template-columns: repeat(3, 1fr); }
.member {
  padding: 2.4rem 2rem;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.monogram {
  width: 72px; height: 72px;
  border: 1px solid var(--hair-bold);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 1.6rem;
  letter-spacing: 0.02em;
}
.member-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.3rem;
}
.member-role { font-size: 0.92rem; color: var(--text-body); line-height: 1.6; }
.member-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.9rem;
  direction: ltr;
  text-align: right;
}
.team-note { margin-top: 2rem; }

/* ───────────────────────── TIMELINE ───────────────────────── */
.timeline {
  margin-top: 4rem;
  position: relative;
  padding-right: 2rem;
}
.timeline::before {               /* the vertical line (start side, RTL = right) */
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--hair-bold) 5%, var(--hair-bold) 95%, transparent);
}
.timeline-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
  padding-bottom: 3rem;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::after {           /* dot sits ON the line */
  content: '';
  position: absolute;
  top: 9px;
  right: calc(-2rem - 3px);
  width: 7px; height: 7px;
  background: var(--text-primary);
  border-radius: 50%;
}
.timeline-content { padding-right: 1rem; min-width: 0; }
.timeline-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.timeline-content p { font-size: 0.95rem; color: var(--text-body); max-width: 620px; }
.timeline-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  white-space: nowrap;
  padding-top: 4px;
  text-align: left;
  direction: ltr;
  text-transform: uppercase;
}

/* ───────────────────────── FAQ ACCORDION ───────────────────────── */
.faq-list { margin-top: 4rem; max-width: 900px; }
.faq-item { border-top: 1px solid var(--hair); }
.faq-item:last-child { border-bottom: 1px solid var(--hair); }
.faq-heading { font-size: inherit; font-weight: inherit; line-height: inherit; }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: right;
  padding: 1.6rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
  transition: opacity 0.2s;
}
.faq-question:hover { opacity: 0.8; }
.faq-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  position: relative;
  opacity: 0.6;
  transition: transform 0.3s, opacity 0.3s;
}
.faq-icon::before,
.faq-icon::after { content: ''; position: absolute; background: var(--text-primary); }
.faq-icon::before { width: 1px; height: 100%; top: 0; left: 50%; transform: translateX(-50%); }
.faq-icon::after { width: 100%; height: 1px; top: 50%; left: 0; transform: translateY(-50%); }
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); opacity: 1; }

/* v2: collapsed answers are [hidden] (gone for screen readers too), no height clip.
   Without JS (html.no-js) every answer is shown. */
.faq-answer[hidden] { display: none; }
html.no-js .faq-answer[hidden] { display: block; }
html.no-js .faq-icon { display: none; }
.faq-answer:not([hidden]) { animation: faq-in 0.3s ease; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.faq-answer p,
.faq-answer ul {
  padding-bottom: 1.6rem;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 740px;
}
.faq-answer p + p { margin-top: -0.6rem; }
.faq-answer a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ───────────────────────── CONTACT-INFO LIST ───────────────────────── */
.contact-info { min-width: 0; }
.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-info-item:first-child { border-top: 1px solid var(--border); }
.contact-label {
  font-family: var(--font-mono-he);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.contact-value {
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.6;
}
.contact-value a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.2s; }
.contact-value a:hover { opacity: 0.7; }
.contact-sub { display: block; font-size: 0.88rem; color: var(--text-muted); font-weight: 300; margin-top: 0.2rem; }

/* ───────────────────────── CHAT CTA PANEL ───────────────────────── */
.chat-cta {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  padding: 2.6rem 2.4rem;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.chat-cta-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  direction: ltr;
}
.chat-cta-status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-primary);
  animation: status-blink 2.4s ease-in-out infinite;
}
@keyframes status-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.chat-cta-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}
.chat-cta-text { font-size: 1rem; line-height: 1.75; margin-bottom: 1.8rem; }
.chat-cta .btn { width: 100%; }
.chat-cta .notice { margin-top: 1.8rem; }
.chat-cta-ecg {                   /* optional decorative trace at the panel foot */
  height: 40px;
  margin: 2rem -2.4rem -2.6rem;
  opacity: 0.9;
}
.chat-cta-ecg svg { width: 100%; height: 100%; }

/* ───────────────────────── s.11 AI + PRIVACY NOTICE ───────────────────────── */
.notice {
  max-width: 640px;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
  border-right: 2px solid var(--hair-bold);
  padding: 0.95rem 1.2rem;
}
.notice p { color: var(--text-soft); max-width: none; font-size: inherit; line-height: inherit; }
.notice p + p { margin-top: 0.4rem; }
.notice strong { color: var(--text-primary); font-weight: 700; }
.notice a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.notice a:hover { opacity: 0.8; }

/* ───────────────────────── PROMPT CHIPS ───────────────────────── */
.chips-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  direction: ltr;
  text-align: right;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.chips button,
.chip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 0.6rem 1.1rem;
  text-align: right;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: border-color 0.2s, background 0.2s;
}
.chips button::before,
.chip::before {
  content: '';
  width: 6px; height: 6px;
  border: 1px solid var(--text-muted);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.chips button:hover,
.chip:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.05); }
.chips button:hover::before,
.chip:hover::before { background: #ffffff; border-color: #ffffff; }
.chips-hint { font-size: 0.86rem; color: var(--text-muted); margin-top: 1rem; }

/* ───────────────────────── TOAST (polite live region) ───────────────────────── */
/* Always rendered (opacity only) so screen readers keep the live region. */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  z-index: 1100;
  transform: translate(-50%, 12px);
  max-width: min(92vw, 420px);
  width: max-content;
  background: #ffffff;
  color: #000000;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  padding: 0.85rem 1.4rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  text-align: center;
}
.toast:empty { padding: 0; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ───────────────────────── HOURS TABLE ───────────────────────── */
.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.hours caption {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding-bottom: 1rem;
}
.hours th,
.hours td {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  text-align: right;
  vertical-align: baseline;
}
.hours tr:first-child th,
.hours tr:first-child td { border-top: 1px solid var(--border); }
.hours th { font-weight: 400; color: var(--text-primary); }
.hours td {
  font-family: var(--font-mono-he);
  font-size: 0.92rem;
  color: var(--text-body);
  text-align: left;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.hours .is-closed th,
.hours .is-closed td { color: var(--text-muted); }

/* ───────────────────────── FOR-CLINICS BAND ───────────────────────── */
.for-clinics {
  background: var(--bg-card);
  border-top: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair-strong);
  padding: 110px 0;
  position: relative;
  overflow: hidden;
}
.for-clinics-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: end;
  position: relative;
  z-index: 2;
}
.for-clinics h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 1.4rem; }
.for-clinics p { font-size: 1.05rem; }
.for-clinics .btn { white-space: nowrap; }

/* ───────────────────────── SUB-PAGE HEAD (legal pages, 404) ───────────────────────── */
.page-hero {
  padding: calc(var(--header-h) + 5rem) 0 4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 1.2rem; }
.page-meta {
  font-family: var(--font-mono-he);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.page-hero .notice { margin-top: 2rem; }

/* ───────────────────────── LEGAL PROSE ───────────────────────── */
.legal {
  max-width: 760px;
  padding: 4.5rem 0 7rem;
  counter-reset: none;
}
.legal > * + * { margin-top: 1.1rem; }
.legal h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 900;
  line-height: 1.25;
  margin-top: 3.6rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--border);
}
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-top: 2.2rem;
}
.legal h2 + *, .legal h3 + * { margin-top: 0.9rem; }
.legal p,
.legal li { font-size: 1.02rem; line-height: 1.85; color: var(--text-body); max-width: none; }
.legal ul,
.legal ol { padding-right: 1.4rem; }
.legal ul { list-style: square; }
.legal ol { list-style: decimal; }
.legal li + li { margin-top: 0.45rem; }
.legal li::marker { color: var(--text-muted); }
.legal a { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal a:hover { opacity: 0.8; }
.legal .legal-callout {
  border: 1px solid var(--hair-bold);
  background: var(--bg-card);
  padding: 1.4rem 1.6rem;
  color: var(--text-soft);
}
.legal .legal-callout p { color: var(--text-soft); }
.legal [id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Table of contents */
.toc {
  border: 1px solid var(--border);
  padding: 1.6rem 1.8rem;
  margin-bottom: 3.2rem;
}
.toc-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  direction: ltr;
  text-align: right;
}
.legal .toc ol,
.toc ol { list-style: none; padding: 0; counter-reset: toc; columns: 2; column-gap: 2.4rem; }
.toc li { counter-increment: toc; break-inside: avoid; margin: 0 0 0.45rem; font-size: 0.98rem; line-height: 1.6; }
.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 0.7rem;
  letter-spacing: 0.08em;
}
.legal .toc a,
.toc a { color: var(--text-body); text-decoration: none; transition: color 0.2s; }
.legal .toc a:hover,
.toc a:hover { color: var(--text-primary); text-decoration: underline; opacity: 1; }

/* Tables in legal pages */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 520px;
}
.legal th,
.legal td {
  text-align: right;
  vertical-align: top;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.6;
}
.legal thead th {
  font-family: var(--font-mono-he);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  border-bottom-color: var(--hair-bold);
}
.legal tbody th { font-weight: 700; color: var(--text-primary); }
.legal td { color: var(--text-body); }

/* ───────────────────────── 404 ───────────────────────── */
.nf {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 4rem) 0 6rem;
  position: relative;
  overflow: hidden;
}
.nf-code {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(4.5rem, 16vw, 11rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.6rem;
  direction: ltr;
  text-align: right;
}
.nf h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.2rem; }
.nf p { font-size: 1.1rem; margin-bottom: 2.4rem; }
.nf { padding-bottom: calc(var(--hero-ecg-h) + 2rem); }

/* ───────────────────────── FOOTER ───────────────────────── */
#footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 0 6.5rem;           /* bottom room so the chat bubble never covers the micro line */
}
.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem 3rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.18em;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-brand-name { direction: ltr; text-align: right; }
.footer-brand-sub {
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  letter-spacing: 0;
  font-weight: 300;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}
.footer-nav a {
  font-size: 0.86rem;
  color: var(--text-body);
  transition: color 0.2s;
}
.footer-nav a:hover,
.footer-nav a[aria-current] { color: var(--text-primary); }
.footer-nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

.footer-emergency {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--hair-bold);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 2rem;
  max-width: none;
}
.footer-emergency::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--text-primary);
  flex-shrink: 0;
}
.footer-emergency a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.footer-micro {
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.9;
  color: var(--text-soft);           /* v2: was #333 (1.7:1) — now 11:1 */
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono-he);
  letter-spacing: 0.04em;
  max-width: none;
}
.footer-micro a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-micro a:hover,
.footer-micro a[aria-current] { color: var(--text-primary); }
.footer-micro .sep { color: var(--text-muted); margin: 0 0.35rem; }
.footer-legal { display: block; margin-top: 0.3rem; }

/* ───────────────────────── FLOATING: BACK TO TOP (bottom-RIGHT) ───────────────────────── */
#back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 44px; height: 44px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--hair-bold);
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  opacity: 0;
  visibility: hidden;                /* v2: invisible ⇒ not focusable, not clickable */
  transition: opacity 0.3s, border-color 0.2s, visibility 0s linear 0.3s;
}
#back-top.visible { opacity: 1; visibility: visible; transition: opacity 0.3s, border-color 0.2s, visibility 0s; }
#back-top:hover { border-color: #ffffff; }

/* ───────────────────────── FIXER CHAT WIDGET (injected by widget.js) ───────────────────────── */
/* A black bubble vanishes on this black site: white bubble, black icon (BRIEF §6). */
#fixer-widget-button{background:#fff !important;color:#000 !important;box-shadow:0 4px 24px rgba(0,0,0,.5) !important}
#fixer-widget-button:focus-visible { outline: 2px solid #ffffff !important; outline-offset: 4px !important; }

/* While the full-screen mobile menu is open, the floating chat chrome steps aside */
body.menu-open #fixer-widget-button,
body.menu-open .chat-label,
body.menu-open #back-top { visibility: hidden !important; }

/* "צ׳אט AI · הדגמה" label beside the 56px bubble (bubble sits at left:20px, bottom:20px) */
.chat-label {
  position: fixed;
  left: 88px;
  bottom: 36px;
  z-index: 899;
  font-family: var(--font-mono-he);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--text-soft);
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid var(--hair-bold);
  padding: 0.2rem 0.65rem;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.chat-label:hover { color: #ffffff; border-color: #ffffff; }

/* ───────────────────────── SCROLL ANIMATION ───────────────────────── */
/* v2: hidden only when JS runs; site.js reveals what is already on screen first. */
html.js .fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .fade-up.in-view { opacity: 1; transform: none; }

/* ═══════════════════════════ RESPONSIVE ═══════════════════════════ */
@media (max-width: 1100px) {
  .nav-links { gap: 1.5rem; }
  .nav-links a { font-size: 0.92rem; }
}

@media (max-width: 900px) {
  :root { --header-h: 110px; }

  /* nav → hamburger (6 links + CTA no longer fit) */
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .split { grid-template-columns: 1fr; gap: 3rem; }

  .credentials-grid { grid-template-columns: 1fr; }
  .cred-card { border-left: none; border-top: 1px solid var(--border); padding: 2rem 0; }
  .cred-card:first-child { border-top: none; }

  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .cards--3 > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cards--5 { grid-template-columns: repeat(2, 1fr); }
  .cards--5 > .card,
  .cards--5 > .card:nth-child(n+4) { grid-column: auto; }
  .cards--5 > .card:last-child { grid-column: 1 / -1; }

  .team-grid,
  .team-grid--3 { grid-template-columns: repeat(2, 1fr); }

  .for-clinics-inner { grid-template-columns: 1fr; gap: 2.4rem; align-items: start; }
}

@media (max-width: 768px) {
  :root { --section-pad: 90px; --header-h: 104px; }

  h1 { font-size: clamp(2.4rem, 10vw, 3.6rem); }
  h2 { font-size: clamp(2rem, 8vw, 2.8rem); }

  #nav { padding: 1.1rem 1.4rem; }

  .cards,
  .cards--3,
  .cards--5 { grid-template-columns: 1fr; }
  .cards > .card,
  .cards--5 > .card:last-child,
  .cards--3 > .card:last-child:nth-child(odd) { grid-column: auto; }
  .card { padding: 2.2rem 1.6rem; }

  .member { padding: 2rem 1.4rem; }

  .hero-buttons { margin-bottom: 3rem; }

  .footer-main { flex-direction: column; gap: 1.6rem; }

  #back-top { bottom: 1.2rem; right: 1.2rem; }
  .toast { bottom: 96px; }           /* above the chat bubble row */

  .for-clinics { padding: 80px 0; }
  .toc ol, .legal .toc ol { columns: 1; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }          /* v2: 16px phone gutter */
  #nav { padding: 0.9rem var(--gutter); }

  .demo-ribbon { font-size: 0.74rem; gap: 0.5rem; padding: 0.4rem var(--gutter); }
  .demo-ribbon-tag { display: none; }

  .hero-body { font-size: 1.08rem; }
  .hero-buttons .btn { flex: 1 1 100%; }

  .trust-strip { flex-direction: column; gap: 0.5rem; }
  .trust-item::before,
  .trust-item + .trust-item::before { content: '//'; margin-left: 0.8rem; color: var(--text-muted); opacity: 0.8; }

  .timeline { padding-right: 1.4rem; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.3rem; padding-bottom: 2.4rem; }
  .timeline-item::after { right: calc(-1.4rem - 3px); }
  .timeline-content { padding-right: 0.6rem; }
  .timeline-meta { grid-row: 1; text-align: right; padding-right: 0.6rem; padding-top: 0; }

  .chat-cta { padding: 2rem 1.4rem; }
  .chat-cta-ecg { margin: 1.6rem -1.4rem -2rem; }
  .notice { padding: 0.85rem 1rem; }

  .chips { flex-direction: column; align-items: stretch; }
  .chips button, .chip { width: 100%; }

  .hours td { font-size: 0.86rem; letter-spacing: 0.02em; }

  .legal { padding: 3.2rem 0 5rem; }
  .toc { padding: 1.3rem 1.2rem; }
  .page-hero { padding: calc(var(--header-h) + 3rem) 0 3rem; }
}

@media (max-width: 480px) {
  .chat-label { display: none; }
  .team-grid,
  .team-grid--3 { grid-template-columns: 1fr; }
  .member { display: grid; grid-template-columns: auto 1fr; gap: 0 1.2rem; align-items: center; padding: 1.4rem 1.2rem; }
  .member .monogram { width: 60px; height: 60px; font-size: 1.35rem; margin-bottom: 0; grid-row: span 3; }
  .member-meta { margin-top: 0.3rem; }
  .mobile-links a { font-size: 1.75rem; }
  .btn { padding: 0.8rem 1.6rem; }
}

/* ═══════════════════════════ REDUCED MOTION ═══════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .fade-up { opacity: 1; transform: none; transition: none; }
  html.js .ecg-path { transition: none; stroke-dashoffset: 0; }
  .ecg-pulse,
  html.js .ecg-pulse.drawn { animation: none; opacity: 0; }
  .chat-cta-status::before { animation: none; }
  #mobile-menu.open,
  .faq-answer:not([hidden]) { animation: none; }
  .video-bg video { display: none; }
  .btn, .btn-link, .card, .faq-icon, .hamburger span, .toast, #back-top, .chips button, .chip, .skip-link, #nav { transition: none; }
}
