/* ==========================================================================
   SySolve, sysolve.co.il
   Wave one, 2026-09-21. Tokens and rules come from brand-spec.md in the repo
   root; the design system is shared with the BI2AI landing page.
   Hand-written CSS, no framework, logical properties only (RTL page).
   ========================================================================== */

/* --- Fonts: Assistant, variable weight, self-hosted ----------------------- */
@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/assets/fonts/assistant-hebrew-wght-normal.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('/assets/fonts/assistant-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens (brand-spec.md, section 3) ------------------------------------ */
:root {
  --ink:    #0F2854;   /* headings, big numbers, footer ground                 */
  --accent: #1B4F91;   /* buttons, links, marks. The one action color           */
  --accent-hover: #164178;
  --sky:    #4A80C4;   /* decorative marks only, never text on light            */
  --body:   #22304A;   /* body text                                             */
  --muted:  #54688F;   /* secondary text, 5.59 on white, 5.02 on band           */
  --white:  #FFFFFF;
  --band:   #EAF4FB;   /* alternating section ground                            */
  --soft:   #CDE8F7;   /* hero and closing ground                               */
  --tint:   #D7E5F3;   /* pills, card fill on white                             */
  --faint:  #F8FCFF;   /* card fill on band                                     */
  --border: #B9D3E8;

  --font: Assistant, 'Segoe UI', Arial, sans-serif;

  /* Type scale (brand-spec.md, section 2). Endpoints at 375px and 1440px. */
  --fs-h1:    clamp(40px, 30px + 2vw, 58px);
  --fs-h2:    clamp(30px, 26px + 0.85vw, 38px);
  --fs-sub:   21px;
  --fs-card:  22px;
  --fs-body:  17px;
  --fs-small: 15px;
  --fs-stat:  clamp(44px, 38px + 1.1vw, 54px);

  --lh-body: 1.75;

  --content: 1120px;
  --measure: 680px;
  --gutter:  24px;
  --pad-y:   104px;
  --radius:  16px;
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--body);
  background: var(--white);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
b, strong { font-weight: 700; }

h1 { font-size: var(--fs-h1); font-weight: 700; line-height: 1.14; letter-spacing: -0.01em; color: var(--ink); }
h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.2;  letter-spacing: -0.005em; color: var(--ink); }
h3 { font-size: var(--fs-card); font-weight: 700; line-height: 1.35; color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--white); padding: 12px 20px; text-decoration: none;
}
.skip-link:focus { inset-inline-start: 0; }

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

/* --- Layout helpers ------------------------------------------------------- */
.content {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto; padding-inline: var(--gutter);
}

section { padding-block: var(--pad-y); }
.ground--band { background: var(--band); }
.ground--soft { background: var(--soft); }

/* --- Buttons and pills ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font-family: inherit; font-size: var(--fs-body); font-weight: 600; line-height: 1;
  color: var(--white); background: var(--accent);
  border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  transition: background-color .18s ease;
}
.btn:hover { background: var(--accent-hover); }

.pill {
  display: inline-block; padding: 6px 14px;
  font-size: var(--fs-small); font-weight: 600; line-height: 1.4;
  color: var(--ink); background: var(--tint); border-radius: 999px;
}

/* --- Header --------------------------------------------------------------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); }
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 76px;
}
.site-header__logo img { height: 40px; width: auto; }
.site-header .btn { min-height: 44px; padding: 0 22px; font-size: var(--fs-small); }

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-block: 96px 104px; }
.hero__inner { max-width: 760px; margin-inline: auto; text-align: center; }
.hero h1 { margin-top: 20px; }
.hero__sub {
  margin: 24px auto 0; max-width: 720px;
  font-size: var(--fs-sub); line-height: 1.6; color: var(--body);
}
.hero .btn { margin-top: 36px; }
.hero__trust {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 44px auto 0; padding-top: 28px; max-width: 640px;
  border-top: 1px solid var(--border);
  text-align: start;
}
.hero__trust img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.hero__trust p { font-size: var(--fs-small); line-height: 1.55; color: var(--body); }
.hero__trust small { display: block; font-size: 14px; color: var(--body); font-weight: 600; }

/* --- Prose sections (problem) --------------------------------------------- */
.prose h2 { max-width: var(--measure); }
.prose p  { max-width: var(--measure); margin-top: 20px; }
.prose h2 + p { margin-top: 28px; }

/* --- Cards ---------------------------------------------------------------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px;
}
.card {
  background: var(--faint); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px;
}
.ground--band .card { background: var(--white); }
.card__name { font-size: var(--fs-card); font-weight: 700; line-height: 1.35; color: var(--ink); }
.card__role { display: block; margin-top: 4px; font-size: var(--fs-body); font-weight: 400; color: var(--muted); }
.card .card__product { margin-top: 6px; font-size: var(--fs-small); font-weight: 600; color: var(--muted); }
.card p { margin-top: 16px; }

.section-intro { max-width: 760px; margin-top: 24px; }

/* --- Method list (how we work) -------------------------------------------- */
.method { margin-top: 36px; max-width: 760px; display: grid; gap: 24px; }
.method li { position: relative; padding-inline-start: 30px; }
.method li::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 11px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--sky);
}

/* --- Proof ---------------------------------------------------------------- */
.proof { margin-top: 36px; padding: 40px; max-width: 880px; }
.proof h3.pill { margin-bottom: 20px; font-size: var(--fs-small); line-height: 1.4; }
.proof p + p { margin-top: 18px; }

/* --- Numbers -------------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px;
}
.stat { padding: 32px; }
.stat__num {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px;
  color: var(--ink); font-weight: 700; line-height: 1;
}
.stat__num bdi { font-size: var(--fs-stat); }
.stat__num span { font-size: var(--fs-card); line-height: 1.2; }
.stat p { margin-top: 18px; }

/* --- Founder -------------------------------------------------------------- */
.founder {
  display: grid; grid-template-columns: 160px 1fr; gap: 40px; align-items: start;
  max-width: 880px;
}
.founder img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.founder h2 { font-size: clamp(26px, 22px + 0.6vw, 30px); }
.founder p { margin-top: 20px; }
.founder h2 + p { margin-top: 24px; }

/* --- Close ---------------------------------------------------------------- */
.close { border-top: 1px solid var(--border); padding-block: 88px 96px; }
.close__inner { max-width: 720px; margin-inline: auto; text-align: center; }
.close p { margin-top: 20px; }
.close .btn { margin-top: 36px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--ink); color: var(--white);
  padding-block: 44px; text-align: center; font-size: var(--fs-small); line-height: 1.6;
}
.site-footer a { display: inline-block; padding-block: 4px; color: var(--white); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border); }
.site-footer a:hover { text-decoration-color: var(--white); }
.site-footer__links { margin-top: 12px; }

/* --- Legal pages and 404 -------------------------------------------------- */
.page { padding-block: 80px 104px; }
.page__inner { max-width: calc(760px + 2 * var(--gutter)); margin-inline: auto; }
.page h1 { font-size: var(--fs-h2); }
.page h2 { font-size: var(--fs-card); margin-top: 40px; }
.page p  { margin-top: 20px; }
.page ul { list-style: disc; padding-inline-start: 24px; margin-top: 16px; }
.page li { margin-top: 8px; }
.page a  { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.policy-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.policy-table th, .policy-table td {
  padding: 12px 16px; text-align: start; vertical-align: top;
  border: 1px solid var(--border);
}
.policy-table th { background: var(--band); color: var(--ink); font-weight: 700; }

.notfound { text-align: center; padding-block: 140px; }
.notfound h1 { font-size: var(--fs-h2); }
.notfound p  { margin-top: 20px; }

/* ==========================================================================
   /bi2ai, the product page. Added 2026-09-22. Same tokens, a few more shapes.
   ========================================================================== */

/* Secondary button: the one place the site has two actions side by side */
.btn--secondary { background: var(--white); color: var(--ink); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--faint); border-color: var(--accent); }

/* Card link on the home page, BI2AI card only. The whole card is the click area:
   the link stretches over the card, so a screen reader still reads only the link text. */
.card__link {
  display: inline-block; margin-top: 18px;
  color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.card--linked { position: relative; transition: border-color .18s ease, box-shadow .18s ease; }
.card--linked .card__link::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }
.card--linked:hover { border-color: var(--accent); box-shadow: 0 2px 12px rgba(15, 40, 84, .10); }
.card--linked:focus-within { border-color: var(--accent); }

/* Hero with the form beside the text */
.hero--product { padding-block: 80px 72px; }
.hero--product__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start;
}
.hero--product__text { text-align: start; max-width: 680px; }
.hero--product h1 { margin-top: 20px; }
.hero--product .hero__sub { margin-inline: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__actions .btn { margin-top: 0; }
.hero__note {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 26px; max-width: 560px;
  font-size: var(--fs-small); line-height: 1.6; color: var(--body);
}
.hero__note svg { flex: none; margin-top: 4px; color: var(--muted); }
.hero__proof { margin-top: 18px; font-weight: 700; color: var(--ink); max-width: 600px; }
.systems {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: var(--fs-small); color: var(--body); font-weight: 600; /* muted fails on soft, 4.39 */
}
.systems bdi { color: var(--ink); }

/* Lead form */
.lead-form { padding: 28px; background: var(--white); }
.lead-form__field + .lead-form__field { margin-top: 16px; }
.lead-form label { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.lead-form__optional { font-weight: 400; color: var(--muted); }
.lead-form input {
  width: 100%; min-height: 48px; padding: 0 14px;
  font: inherit; font-size: var(--fs-body); color: var(--body);
  background: var(--white); border: 1px solid var(--muted); border-radius: 10px; /* 5.59 on white, WCAG 1.4.11 needs 3 */
}
.lead-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.lead-form input[aria-invalid="true"] { border-color: #B42318; }
.lead-form__error { margin-top: 8px; font-size: var(--fs-small); line-height: 1.5; color: #B42318; }
.lead-form .btn { width: 100%; margin-top: 20px; }
.lead-form__hint { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.lead-form__done { font-weight: 700; color: var(--ink); text-align: center; padding-block: 12px; }
.lead-form__hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Steps, numbered cards */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; counter-reset: step; }
.step { position: relative; padding-top: 36px; }
.step__num {
  position: absolute; top: 32px; inset-inline-start: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--tint); color: var(--ink); font-weight: 700; font-size: var(--fs-small);
}
.step h3 { margin-top: 20px; font-size: 20px; }
.step p { margin-top: 12px; }
.note { margin-top: 20px; max-width: 760px; font-size: var(--fs-small); line-height: 1.7; color: var(--muted); }
.steps + .note { margin-top: 36px; }

/* Demo figure, then the method */
.demo { max-width: 960px; margin-inline: auto; }
.demo video {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  background: var(--ink); border-radius: var(--radius); border: 1px solid var(--border);
}
.demo figcaption { margin-top: 14px; text-align: center; font-size: var(--fs-small); color: var(--muted); }
.demo__desc { max-width: 960px; margin: 12px auto 0; font-size: var(--fs-small); color: var(--body); }
.demo__desc summary { width: fit-content; margin-inline: auto; padding: 6px 4px; cursor: pointer; color: var(--accent); font-weight: 600; }
.demo__desc p { margin-top: 8px; max-width: 680px; margin-inline: auto; line-height: 1.7; }
.demo__live { margin-top: 20px; text-align: center; }
.demo__live a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.method-block { margin-top: 88px; }
.method-block .method { margin-top: 32px; }
.selfbuild { margin-top: 48px; max-width: 760px; padding: 32px; background: var(--band); border-radius: var(--radius); }
.selfbuild h3 { font-size: 20px; }
.selfbuild p { margin-top: 14px; }

/* Results: three short, one full case as a card, in the locked order */
.results { margin-top: 44px; max-width: 880px; display: grid; gap: 32px; }
.result h3 { font-size: 20px; }
.result__tag { display: block; margin-top: 2px; font-size: var(--fs-small); font-weight: 400; color: var(--muted); }
.result p { margin-top: 12px; }
.result--case { padding: 40px; }
.result--case h3.pill { font-size: var(--fs-small); line-height: 1.4; }
.result--case p { margin-top: 18px; }
.result--case h3 + p { margin-top: 22px; }

/* Price */
.price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; margin-top: 44px; }
.price__card { background: var(--soft); border-color: var(--border); }
.price__figure b { display: block; font-size: clamp(26px, 22px + 0.8vw, 32px); line-height: 1.25; color: var(--ink); margin-bottom: 8px; }
.price__figure bdi { white-space: nowrap; }
.price__card p + p { margin-top: 18px; }
.price__terms p + p { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.price__terms .note { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); max-width: none; }
.price__terms .btn { margin-top: 28px; }

/* FAQ, native details */
.faq-block { max-width: calc(880px + 2 * var(--gutter)); }
.faq { margin-top: 36px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq details + details { border-top: 1px solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 26px; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { content: ''; }
.faq summary svg { flex: none; color: var(--muted); transition: transform .2s ease; }
.faq details[open] summary svg { transform: rotate(180deg); color: var(--accent); }
.faq summary:focus-visible { outline-offset: -2px; border-radius: 0; }
.faq details p { padding: 0 26px 22px; max-width: none; }
.faq-block__cta { margin-top: 36px; }

/* Close: button, credit, siblings */
.credit { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; text-align: start; }
.credit img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.credit p { margin: 0; line-height: 1.5; }
.siblings { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); font-size: var(--fs-small); color: var(--muted); }

/* Sticky CTA, phones only */
.sticky-cta {
  display: none; position: fixed; inset-inline: 0; bottom: 0; z-index: 50;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--border);
}
.sticky-cta .btn { width: 100%; }
.sticky-cta[hidden] { display: none; }

/* --- Home: icons, mid-page lead block (08/10) ------------------------------ */
.icon { display: block; width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--tint); color: var(--accent); flex: none; }
.icon-list { margin-top: 36px; max-width: 820px; display: grid; gap: 28px; }
.icon-list li { display: flex; gap: 20px; align-items: flex-start; }
.icon-list p { margin: 0; }
.cards--icons .icon { margin-bottom: 18px; }
.lead-block__inner { display: grid; grid-template-columns: 1fr 380px; gap: 56px; align-items: center; }
.lead-block p { margin-top: 16px; max-width: var(--measure); }
.stats + .proof { margin-top: 48px; }
.proof h3 { font-size: var(--fs-card); font-weight: 700; line-height: 1.35; color: var(--ink); margin-bottom: 18px; }
.proof p.pill { display: inline-block; margin-bottom: 16px; font-size: var(--fs-small); line-height: 1.4; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  :root { --pad-y: 64px; }
  .hero { padding-block: 56px 64px; }
  .hero__sub { font-size: 19px; }
  .cards, .stats { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
  .card, .stat, .proof { padding: 24px; }
  .founder { grid-template-columns: 1fr; gap: 24px; }
  .founder img { width: 120px; height: 120px; }
  .close { padding-block: 64px; }
  .site-header__logo img { height: 34px; }

  /* /bi2ai */
  .hero--product { padding-block: 48px 56px; }
  .hero--product__inner { grid-template-columns: 1fr; gap: 32px; }
  .lead-form { padding: 24px; }            /* shown on phones too since 08/10 (Eddi, conference QR); was desktop only from 22/09 */
  .lead-block__inner { grid-template-columns: 1fr; gap: 28px; }
  .icon-list li { gap: 14px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .systems { margin-top: 32px; }
  .steps { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
  .step { padding-top: 24px; }
  .step__num { position: static; margin-bottom: 4px; }
  .step h3 { margin-top: 12px; }
  .method-block { margin-top: 56px; }
  .selfbuild, .result--case { padding: 24px; }
  .price { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
  .faq summary { padding: 16px 18px; font-size: 17px; }
  .faq details p { padding: 0 18px 18px; }
  .sticky-cta:not([hidden]) { display: block; }
  body:has(.sticky-cta:not([hidden])) .site-footer { padding-bottom: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
