/* finup.co.il - one stylesheet, no external fonts, no JS.
   Colour tokens mirror src/Shared/FinUpBrandPalette.cs (BrandBlue 1070B0, BrandNavy 0E2A4F, BrandNavyDeep 081C36,
   Accent 0E7CA8, AccentSoft E3F1F7, SurfaceBackground F3F5F8, SurfaceBorder D8DEE6, TextPrimary 1B222C,
   TextSecondary 5A6574, TextOnDark ECF1F7, TextOnDarkMuted B8C4D4). Dark scheme uses the navy surfaces of the same palette. */

:root {
  --brand: #1070B0;
  --brand-hover: #2080C0;
  --brand-pressed: #0C588C;
  --navy: #0E2A4F;
  --navy-deep: #081C36;
  --accent: #0E7CA8;
  --accent-soft: #E3F1F7;
  --bg: #F3F5F8;
  --card: #FFFFFF;
  --border: #D8DEE6;
  --border-strong: #C5CDD8;
  --text: #1B222C;
  --muted: #5A6574;
  --link: #0C588C;
  --on-dark: #ECF1F7;
  --on-dark-muted: #B8C4D4;
  --focus: #0E7CA8;
  --ok: #166C3C;
  --err: #B31F1F;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #081C36;
    --card: #0E2A4F;
    --border: #274569;
    --border-strong: #3A5A80;
    --text: #ECF1F7;
    --muted: #B8C4D4;
    --link: #8FCBF0;
    --accent-soft: #15385C;
    --focus: #8FCBF0;
    --ok: #7FD3A0;
    --err: #FF9B9B;
  }
}

* { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans Hebrew", Arial, "Helvetica Neue", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  text-align: right;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { color: var(--brand-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

main:focus { outline: none; }

h1, h2, h3 { line-height: 1.25; color: var(--text); margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; margin-top: 1.2em; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.4em; }
li { margin-bottom: 0.35em; }
code { font-family: Consolas, "Courier New", monospace; font-size: 0.95em; direction: ltr; unicode-bidi: isolate; }
[dir="ltr"] { unicode-bidi: isolate; }
.lead { font-size: 1.2rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* skip link */
.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  background: var(--navy);
  color: var(--on-dark);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* header */
.site-header {
  background: var(--navy);
  color: var(--on-dark);
  border-bottom: 3px solid var(--brand);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-dark); text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 8px; background: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.3px; }
.brand-tag { font-size: 0.85rem; color: var(--on-dark-muted); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--on-dark);
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.18); text-decoration: underline; text-underline-offset: 0.25em; }
.site-nav a.cta { background: var(--brand); color: #fff; }
.site-nav a.cta:hover { background: var(--brand-hover); }
.site-nav a:focus-visible { outline-color: #fff; }

/* main blocks */
main.wrap { padding-top: 32px; padding-bottom: 48px; min-height: 50vh; }  /* .wrap (0,1,0) would override a bare main selector */
a[href^="tel:"], a[href^="mailto:"] { white-space: nowrap; }
.hero { padding: 24px 0 8px; }
.hero h1 { color: var(--text); }
.hero .lead { max-width: 56ch; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0 8px; }
.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}
.button:hover { background: var(--brand-hover); color: #fff; }
.button:active { background: var(--brand-pressed); }
.button.secondary { background: transparent; color: var(--link); border-color: var(--brand); }
.button.secondary:hover { background: var(--accent-soft); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 20px 0; padding: 0; list-style: none; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 6px 24px rgba(8, 28, 54, 0.06);
}
.card h2, .card h3 { margin-top: 0; font-size: 1.2rem; }
.card p:last-child { margin-bottom: 0; }
.card a.more { font-weight: 600; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
  margin: 20px 0;
}
.panel.soft { background: var(--accent-soft); border-color: transparent; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
dl.facts dt { color: var(--muted); font-weight: 600; }
dl.facts dd { margin: 0; }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-inline-start: 1.6em; }
.checklist li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }

table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.98rem; }
th, td { text-align: right; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; }

.notice { border-inline-start: 4px solid var(--brand); padding: 10px 16px; background: var(--accent-soft); border-radius: 8px; margin: 16px 0; }
.notice.warn { border-inline-start-color: #B56B00; }

/* forms */
form { max-width: 640px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}
textarea { min-height: 160px; resize: vertical; }
.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-box { margin: 18px 0; min-height: 70px; }

/* legal / long text */
.legal h2 { font-size: 1.3rem; }
.legal .updated { color: var(--muted); font-size: 0.95rem; }
.toc { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; margin: 16px 0 24px; }
.toc ul { margin: 0; }

/* footer */
.site-footer { background: var(--navy-deep); color: var(--on-dark); margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; padding-top: 28px; padding-bottom: 28px; align-items: start; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: #fff; }
.site-footer a:focus-visible { outline-color: #fff; }
.entity { font-weight: 700; margin-bottom: 6px; }
.entity-contact { color: var(--on-dark-muted); margin-bottom: 0; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.copyright { grid-column: 1 / -1; color: var(--on-dark-muted); font-size: 0.9rem; margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 14px; }

/* 404 */
.notfound { text-align: center; padding: 40px 0; }
.notfound .code { font-size: 4rem; font-weight: 800; color: var(--brand); line-height: 1; margin-bottom: 8px; }

@media (max-width: 720px) {
  body { font-size: 1rem; }
  .header-row { flex-direction: column; align-items: stretch; }
  .site-nav ul { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 10px; }
  .panel { padding: 18px; }
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav a, .button, a { transition: background-color 120ms ease, color 120ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer .footer-nav, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
