/* ==========================================================================
   Gassenbauer — Base: fonts, reset, typography, layout primitives
   ========================================================================== */

@font-face { font-family: "FUP Begin"; font-weight: 300; font-display: swap; src: url("../assets/fonts/fup-begin-light.woff2") format("woff2"), url("../assets/fonts/fup-begin-light.woff") format("woff"); }
@font-face { font-family: "FUP Begin"; font-weight: 400; font-display: swap; src: url("../assets/fonts/fup-begin-regular.woff2") format("woff2"), url("../assets/fonts/fup-begin-regular.woff") format("woff"); }
@font-face { font-family: "FUP Begin"; font-weight: 500; font-display: swap; src: url("../assets/fonts/fup-begin-medium.woff2") format("woff2"), url("../assets/fonts/fup-begin-medium.woff") format("woff"); }
@font-face { font-family: "FUP Begin"; font-weight: 600; font-display: swap; src: url("../assets/fonts/fup-begin-semibold.woff2") format("woff2"), url("../assets/fonts/fup-begin-semibold.woff") format("woff"); }
@font-face { font-family: "FUP Begin"; font-weight: 700; font-display: swap; src: url("../assets/fonts/fup-begin-bold.woff2") format("woff2"), url("../assets/fonts/fup-begin-bold.woff") format("woff"); }
@font-face { font-family: "FUP Begin"; font-weight: 800; font-display: swap; src: url("../assets/fonts/fup-begin-extrabold.woff2") format("woff2"), url("../assets/fonts/fup-begin-extrabold.woff") format("woff"); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body { min-height: 100vh; }
img, picture, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

/* ---------- Document ---------- */
html { scroll-padding-top: calc(var(--header-h) + var(--space-5)); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--text-body-weight);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

[data-surface] { background-color: var(--color-bg); color: var(--color-text); }

::selection { background: var(--orange-300); color: var(--green-900); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* ---------- Typography ---------- */
.t-mega, .t-d1, .t-d2 {
  font-family: var(--text-display-family);
  font-weight: var(--text-display-weight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
}
.t-mega { font-size: var(--fs-mega); line-height: var(--lh-tight); }
.t-d1   { font-size: var(--fs-d1);   line-height: var(--lh-tight); }
.t-d2   { font-size: var(--fs-d2);   line-height: var(--lh-display); }

h1, .t-h1 { font-size: var(--fs-h1); line-height: var(--lh-heading); font-weight: var(--weight-extrabold); color: var(--color-text-strong); letter-spacing: var(--tracking-tight); }
h2, .t-h2 { font-size: var(--fs-h2); line-height: var(--lh-heading); font-weight: var(--text-heading-weight); color: var(--color-text-strong); }
h3, .t-h3 { font-size: var(--fs-h3); line-height: var(--lh-heading); font-weight: var(--text-heading-weight); color: var(--color-text-strong); }
h4, .t-h4 { font-size: var(--fs-h4); line-height: 1.3; font-weight: var(--weight-semibold); color: var(--color-text-strong); }

.t-lead  { font-size: var(--fs-lead); line-height: 1.5; font-weight: var(--weight-light); color: var(--color-text); }
.t-body  { font-size: var(--fs-body); }
.t-small { font-size: var(--fs-small); line-height: 1.55; }
.t-label {
  font-size: var(--fs-label);
  line-height: 1.3;
  font-weight: var(--text-label-weight);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.t-muted  { color: var(--color-text-muted); }
.t-accent { color: var(--color-text-accent); }
.t-num { font-variant-numeric: tabular-nums lining-nums; }

/* הדגשה כתומה — "מרקר" בסגנון מצגת הזום */
.t-mark {
  background: linear-gradient(transparent 58%, var(--orange-300) 58%, var(--orange-300) 92%, transparent 92%);
  color: inherit;
  padding-inline: 0.1em;
}
[data-surface="dark"] .t-mark, [data-surface="deep"] .t-mark {
  background: linear-gradient(transparent 58%, rgba(216,132,24,.55) 58%, rgba(216,132,24,.55) 92%, transparent 92%);
}

.prose > * + * { margin-block-start: 1em; }
.prose { max-width: 62ch; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  gap: var(--grid-gap);
}
.section { padding-block: var(--section-y); }
.section--sm { padding-block: var(--section-y-sm); }

.stack > * + * { margin-block-start: var(--stack-gap, var(--space-5)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster-gap, var(--space-4)); align-items: center; }

.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;
}

/* גרעיניות נייר עדינה — משמשת על משטחים גדולים */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.19 0 0 0 0 0.17 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-surface="dark"].grain::after, [data-surface="deep"].grain::after { mix-blend-mode: screen; opacity: .35; }
