/* ==========================================================================
   Base: reset, document defaults, typography, utilities
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }

/* ---------- Headings ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: 400;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
p { text-wrap: pretty; }

/* Latin runs inside Hebrew text keep their own direction */
[dir="ltr"] { unicode-bidi: isolate; }

/* ---------- Focus (visible, two-tone so it works on light and plum) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--plum-700);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.9);
  border-radius: 6px;
}
.on-dark :focus-visible,
.testimonials :focus-visible {
  outline-color: var(--white);
  box-shadow: 0 0 0 6px rgba(42, 4, 39, 0.6);
}

::selection { background: var(--orchid-300); color: var(--plum-950); }

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

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--plum-700);
  color: var(--white);
  border-radius: var(--radius-pill);
  transition: top var(--dur-2) var(--ease-out);
}
.skip-link:focus { top: 16px; }

/* Content that could not be captured from the live site – visible on purpose */
.pending {
  background: repeating-linear-gradient(135deg, #fff4c2 0 8px, #ffeaa0 8px 16px);
  color: #5b4400;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.nowrap { white-space: nowrap; }
