/* Base styles: reset, typography, layout helpers. Loaded after tokens.css */

*, *::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) + 56px);
}
/* very short windows (a phone on its side, a desktop at 200–400% zoom): the header stops being sticky
   (components.css), so anchors need only a little room above them (S, 7.11, a11y #6) */
@media (max-height: 560px) {
  html { scroll-padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--blue-900); text-wrap: balance; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
@media (min-width: 768px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 1.75rem; }
}

p + p { margin-top: 0.75em; }
small { font-size: 0.875rem; }
strong, b { font-weight: 700; }
ul, ol { padding-inline-start: 1.25em; }
ul.plain, ol.plain { list-style: none; padding: 0; }

a { color: var(--blue-700); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; color: var(--blue-900); }
/* S (7.11, a11y #1, WCAG 1.4.1): a link inside running text is underlined, not only blue (the blue is
   1.6:1 against the body text). Not buttons, not navigation lists (header / footer / table of contents
   are lists of links styled on their own). Zero specificity from :where/:not, so any component that
   styles its own links (cards, buttons) still wins. */
:where(p, li, dd, small, label, td, figcaption, blockquote) a:not(:where(.btn, [role="button"], nav a)) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:where(p, li, dd, small, label, td, figcaption, blockquote) a:not(:where(.btn, [role="button"], nav a)):hover {
  text-decoration-thickness: 2px;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { cursor: pointer; background: none; border: 0; padding: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* "Skip to content" link (shell.js adds it as the first element in <body>).
   Invisible until it receives keyboard focus, then shows at the top start corner. */
.skip-link {
  position: fixed;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 120;
  padding: 10px 16px;
  background: var(--blue-700);
  color: var(--white);
  font-weight: 500;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
  transform: translateY(-200%);
  opacity: 0;
}
.skip-link:focus, .skip-link:focus-visible {
  transform: none;
  opacity: 1;
  outline: 3px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(30,99,214,.45), var(--shadow-2);
  text-decoration: none;
}
main:focus { outline: none; }

/* Prevents accidental horizontal scroll from any wide child */
html, body { overflow-x: clip; }

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 760px; }

.section { padding-block: var(--space-7); }
.section--tint { background: var(--sky-50); }
.section--sky { background: var(--sky-100); }
.section__title { text-align: center; margin-bottom: var(--space-2); }
.section__lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto var(--space-6); }
@media (min-width: 768px) {
  .section { padding-block: var(--space-8); }
}

.grid { display: grid; gap: var(--space-4); }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 899.98px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.center { text-align: center; }
.muted { color: var(--muted); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }

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

/* honeypot בטפסים (שלב ב'): שדה שרק בוטים ממלאים. מחוץ למסך, לא נגיש למקלדת (tabindex=-1) ולקורא מסך (aria-hidden). */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
}

[hidden] { display: none !important; }
