/* PulsarERP — page base, header and the opening copy. Every value comes from assets/tokens.css.
   The product window is in product.css, the background trials in backdrops.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-text);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear;
}
h1, p, ol, figure { margin: 0; }
a { color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icons { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--radius-sm); }

.wrap { width: min(100% - 2 * var(--gutter), var(--page-max)); margin-inline: auto; }
.site-header, main { position: relative; z-index: 1; }
main { overflow-x: clip; }

.skip { position: absolute; inset-inline-start: var(--space-4); top: -4rem; padding: var(--space-2) var(--space-4); background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { top: var(--space-4); }

/* ---- Mixed Hebrew / Latin ---- */

/* Keep "ב־Priority" on one line. */
.join { white-space: nowrap; }

/* The Hebrew maqaf sits near the top of the letters (0.48–0.59em in Noto Serif Hebrew, 0.53–0.61em
   in Plex). Before a Latin word or a figure it reads as raised, so it is lowered to the middle of
   the Hebrew letter. The character stays a maqaf for copying and for screen readers. */
.maqaf { display: inline-block; transform: translateY(0.2em); }

.latin {
  font-family: var(--font-latin);
  font-style: italic;
  font-weight: 400;
  font-size: var(--latin-scale);
  letter-spacing: 0;
  color: var(--accent);
}

/* ---- Header ---- */

.site-header { border-block-end: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-height: 4.5rem; }

.brand { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand svg { width: 1.6rem; height: 1.6rem; color: var(--accent); stroke-width: 1.4; }
.brand-erp { color: var(--muted); font-weight: 500; }

.nav { display: flex; gap: var(--space-6); }
.nav a { color: var(--ink-2); text-decoration: none; transition: color var(--dur-fast) linear; }
.nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  background: transparent; color: var(--ink); cursor: pointer; font-size: 1.1rem;
  transition: background-color var(--dur-fast) linear;
}
.theme-toggle:hover { background: var(--surface); }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* ---- Buttons ---- */

.button {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--accent); border-radius: var(--radius-md);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: var(--fs-body); line-height: 1.4; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) linear;
}
.button:hover { filter: brightness(1.06); }
.button:active { transform: translateY(1px); }
.button-small { padding: var(--space-2) var(--space-4); font-size: var(--fs-small); }
.button-ghost { background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--ink); border-color: var(--line-strong); backdrop-filter: blur(6px); }
.button-ghost:hover { background: var(--surface); filter: none; }
.button-arrow { font-size: 1.05em; }

/* ---- Opening copy ---- */

.opening { padding-block: var(--space-8) var(--space-9); }
.opening-copy { text-align: center; position: relative; z-index: 1; }

.kicker {
  font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
  margin-block-end: var(--space-5);
}

h1 {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: -0.012em;
  font-weight: 700;
  text-wrap: balance;
}
h1 .line { display: block; }
h1 .line-1 { font-weight: 400; color: var(--muted); }

.intro {
  max-width: 44rem; margin: var(--space-6) auto 0;
  font-size: var(--fs-lead); line-height: var(--lh-text); color: var(--ink-2);
  text-wrap: pretty;
}

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-block-start: var(--space-6); }

.note { display: inline-flex; align-items: center; gap: var(--space-2); margin-block-start: var(--space-5); font-size: var(--fs-small); color: var(--muted); }
.note svg { font-size: 1.05em; }

/* ---- Narrow screens ---- */

@media (max-width: 52rem) {
  .nav { display: none; }
  .wide-only { display: none; }
}
@media (max-width: 30rem) {
  .opening { padding-block: var(--space-7) var(--space-8); }
  .actions .button { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
