/* ──────────────────────────────────────────────────────────
   Simvy legal site — "Nocturnal Atelier" tokens for the web.
   Mirrors the app's design tokens 1:1:
     dark  ← src/theme/nocturnalAtelier.ts  (atelier-dark, the app default)
     light ← src/theme/galleryLight.ts      (L3 "Gallery Color-Block")
   Dark is the default; light applies via prefers-color-scheme.
   Fonts are self-hosted — a privacy policy must not leak visitor IPs.
   ────────────────────────────────────────────────────────── */

/* ─── Fonts (variable, 200–800 weight axis) ─────────────── */
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/assistant-hebrew.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/assistant-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Atelier Dark — the default ────────────────────────── */
:root {
  color-scheme: dark light;

  --bg: #101413;
  --surface: rgba(28, 32, 31, 0.72);
  --surface-solid: #1C201F;
  --text: #E8ECEA;
  --body: #C0C8C3;
  --sub: #C0C8C3;
  --dim: rgba(192, 200, 195, 0.45);
  --accent: #BEEDD9;
  --accent-hover: #A2D0BD;
  --border: rgba(190, 237, 217, 0.15);
  --border-soft: rgba(190, 237, 217, 0.10);
  --card: rgba(190, 237, 217, 0.045);
  --warn: #E1C1A1;
  --warn-bg: rgba(225, 193, 161, 0.07);
  --warn-text: #E4D2BC;

  /* Monogram tile */
  --mono-bg: rgba(190, 237, 217, 0.10);
  --mono-fg: #BEEDD9;
  --mono-ring: rgba(190, 237, 217, 0.22);

  /* Document hero — plain in dark, an emerald colour-block in light */
  --hero-bg: transparent;
  --hero-pad: 0;
  --hero-radius: 0;
  --hero-title: var(--text);
  --hero-kicker: #BEEDD9;
  --hero-sub: rgba(192, 200, 195, 0.45);

  --maxw: 720px;
  --radius: 8px;
  --radius-sm: 4px;
}

/* ─── Gallery Light ─────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ECE8DE;
    --surface: rgba(255, 253, 246, 0.82);
    --surface-solid: #FFFDF6;
    --text: #1C1A14;
    --body: rgba(40, 36, 28, 0.88);
    --sub: rgba(60, 56, 46, 0.72);
    --dim: rgba(60, 56, 46, 0.42);
    --accent: #16493A;
    --accent-hover: #0F3428;
    --border: rgba(28, 26, 20, 0.14);
    --border-soft: rgba(28, 26, 20, 0.08);
    --card: rgba(22, 73, 58, 0.04);
    --warn: #B0573C;
    --warn-bg: rgba(176, 87, 60, 0.07);
    --warn-text: rgba(60, 40, 32, 0.92);

    --mono-bg: #16493A;
    --mono-fg: #BEEDD9;
    --mono-ring: transparent;

    --hero-bg: #16493A;
    --hero-pad: 18px 20px 20px;
    --hero-radius: 6px;
    --hero-title: #F1F8F3;
    --hero-kicker: #9EDCC0;
    --hero-sub: rgba(214, 246, 230, 0.72);
  }
}

/* ─── Base ──────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { direction: rtl; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: 'Assistant', 'Heebo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  text-align: start;
  -webkit-font-smoothing: antialiased;
}

/* ─── Top bar ───────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar .inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}
.mono {
  width: 27px;
  height: 27px;
  border-radius: var(--radius-sm);
  background: var(--mono-bg);
  box-shadow: inset 0 0 0 1px var(--mono-ring);
  color: var(--mono-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.topnav {
  display: flex;
  gap: 16px;
  font-size: 14px;
}
.topnav a {
  color: var(--sub);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.topnav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.topnav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* ─── Layout ────────────────────────────────────────────── */
main {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 30px 22px 72px;
}

/* ─── Document hero ─────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  padding: var(--hero-pad);
  border-radius: var(--hero-radius);
  margin-bottom: 30px;
}
.kicker {
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--hero-kicker);
  margin: 0 0 8px;
}
.doc-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.4px;
  color: var(--hero-title);
  margin: 0 0 4px;
}
.updated {
  color: var(--hero-sub);
  font-size: 14px;
  margin: 0;
}

/* ─── Typography ────────────────────────────────────────── */
h2 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 40px 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 72px;
}
h2::before {
  content: "";
  display: inline-block;
  vertical-align: 2px;
  width: 3px;
  height: 15px;
  border-radius: 1px;
  background: var(--accent);
  margin-inline-end: 9px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 6px;
}
p { margin: 0 0 15px; }
ul, ol { margin: 0 0 15px; padding-inline-start: 22px; }
li { margin: 0 0 9px; }
li::marker { color: var(--accent); }
strong { color: var(--text); font-weight: 600; }
em { color: var(--sub); }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ─── Onerous-clause emphasis (חוק החוזים האחידים) ───────
   Also inlined in privacy.html / terms.html so the emphasis
   survives even if this stylesheet fails to load.            */
.legal-highlight {
  background: var(--warn-bg);
  border-inline-start: 3px solid var(--warn);
  border-radius: 0;
  padding: 2px 20px 16px;
  margin: 32px 0;
}
.legal-highlight h2 {
  color: var(--warn);
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 20px;
}
.legal-highlight h2::before { background: var(--warn); }
.legal-highlight p,
.legal-highlight li { color: var(--warn-text); }
.legal-highlight strong { color: var(--warn-text); font-weight: 700; }
.legal-highlight > :last-child { margin-bottom: 0; }

/* ─── Cards / callouts ──────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 14px;
}
.card > :last-child { margin-bottom: 0; }
.card h3 { margin-top: 0; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }

.callout {
  background: var(--card);
  border-inline-start: 3px solid var(--accent);
  border-radius: 0;
  padding: 14px 18px;
  margin: 0 0 24px;
  color: var(--sub);
  font-size: 15.5px;
}
.callout.danger-note {
  border-inline-start-color: var(--warn);
  background: var(--warn-bg);
  color: var(--warn-text);
}
.callout > :last-child { margin-bottom: 0; }

.steps { margin: 0; padding-inline-start: 20px; }
.contact { font-size: 17px; font-weight: 600; }

/* ─── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
footer .inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 22px;
  color: var(--dim);
  font-size: 13.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
}
footer a { color: var(--sub); text-decoration: none; }
footer a:hover { color: var(--accent); }
.footlinks { display: flex; gap: 16px; }

/* ─── Skip link ─────────────────────────────────────────── */
.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus {
  inset-inline-start: 12px;
  top: 12px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  z-index: 20;
}

/* ─── Small screens ─────────────────────────────────────── */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .doc-title { font-size: 26px; }
  h2 { font-size: 19px; margin-top: 32px; }
  main { padding: 22px 18px 56px; }
  .topbar .inner { padding: 10px 18px; }
  .topnav { gap: 12px; font-size: 13px; }
  footer .inner { padding: 20px 18px; }
}

/* ─── Print — always light, chrome removed ──────────────── */
@media print {
  .topbar, footer, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  main { max-width: none; padding: 0; }
  .hero { background: none; padding: 0; }
  .doc-title, h2, h3, strong { color: #000; }
  .updated { color: #444; }
  .kicker { color: #444; }
  h2 { border-bottom: 1px solid #999; }
  h2::before { background: #000; }
  .legal-highlight {
    background: none;
    border: 1.5pt solid #000;
    border-inline-start-width: 4pt;
    padding: 8pt 12pt;
  }
  .legal-highlight h2, .legal-highlight p, .legal-highlight li, .legal-highlight strong { color: #000; }
  a { color: #000; }
}
