/* Memory Center (Cortex) – RTL, accessible, no frameworks.
   Colour contrast (against white) checked for WCAG AA:
   text #1f2933 = 14:1 | blue #0b5d86 = 7.0:1 | link hover #08435f = 10:1 */

:root {
  --text: #1f2933;
  --muted: #475569;       /* 7.5:1 on white */
  --blue: #0b5d86;
  --blue-dark: #08435f;
  --accent: #1a9ad6;      /* decorative only, never for text */
  --tint: #eaf4fa;
  --line: #cbd5e1;
  --white: #ffffff;
  --focus: #b45309;       /* strong orange ring, 4.9:1 on white */
  --radius: 14px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Segoe UI", "Heebo", "Assistant", Arial, "Noto Sans Hebrew", sans-serif;
  font-size: 1.125rem;      /* 18px */
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.25; color: var(--text); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.3rem; }
.text-col > h1 + h2, .section > .wrap > h2:first-child { margin-top: 0; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
li { margin-bottom: .4em; }

a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); }

/* visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.skip-link {
  position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100;
  background: var(--text); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 0; color: #fff; }

main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: 780px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .8rem; flex-wrap: wrap; }
.brand img { width: auto; height: 64px; }
.main-nav ul { list-style: none; display: flex; gap: .3rem 1.2rem; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav li { margin: 0; }
.main-nav a { display: inline-block; padding: .55rem .35rem; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--blue); border-bottom-color: var(--accent); }
.main-nav a.active, .main-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.nav-toggle { display: none; font: inherit; font-weight: 600; background: #fff; color: var(--text); border: 2px solid var(--text); border-radius: 10px; padding: .5rem 1.1rem; cursor: pointer; }

@media (max-width: 760px) {
  .js .nav-toggle { display: inline-block; }
  .main-nav { width: 100%; }
  .js .main-nav { display: none; }
  .js .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
  .main-nav a { display: block; padding: .9rem .25rem; border-bottom: 1px solid var(--line); }
}

/* breadcrumb */
.breadcrumb { max-width: var(--max); margin-inline: auto; padding: 1rem 1.25rem 0; font-size: .95rem; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-inline-end: .3rem; color: var(--muted); }
.breadcrumb a { color: var(--blue); }

/* sections */
.section { padding-block: 3rem; }
.section.tint { background: var(--tint); }
.section-intro { max-width: 46rem; font-size: 1.2rem; color: var(--muted); }
.lead { font-size: 1.3rem; color: var(--muted); max-width: 46rem; }

/* hero */
.hero { background: linear-gradient(180deg, var(--tint), #fff); padding-block: 3rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.hero-media img { border-radius: var(--radius); box-shadow: 0 8px 28px rgba(8,67,95,.18); width: 100%; }
@media (max-width: 820px) { .hero-grid, .two-col { grid-template-columns: 1fr !important; } }

/* buttons: dark fill, white text = 7:1 */
.btn {
  display: inline-block; background: var(--blue); color: #fff; text-decoration: none;
  padding: .8rem 1.6rem; border-radius: 10px; font: inherit; font-weight: 700; border: 2px solid var(--blue); cursor: pointer;
  margin-block: .2rem;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); }
.btn-outline:hover { background: var(--tint); color: var(--blue-dark); }
.more { font-weight: 700; }

/* layout helpers */
.two-col { display: grid; grid-template-columns: 3fr 2fr; gap: 3rem; align-items: start; }
.media-col img { border-radius: var(--radius); box-shadow: 0 6px 22px rgba(8,67,95,.16); width: 100%; }
.side-col { background: var(--tint); border-radius: var(--radius); padding: 1.5rem; }
.side-col h2 { margin-top: 0; font-size: 1.4rem; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; border-top: 5px solid var(--accent); }
.card h3 { margin-top: 0; }
.card ul { padding-inline-start: 1.1rem; margin-bottom: 0; }

.svc-grid { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.6rem; }
.svc-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc-card > a { display: block; text-decoration: none; color: var(--text); }
.svc-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.svc-title { display: block; padding: 1rem 1.2rem .2rem; font-size: 1.25rem; font-weight: 700; color: var(--blue); text-decoration: underline; text-underline-offset: .2em; }
.svc-card p { padding: 0 1.2rem 1.2rem; margin: 0; color: var(--muted); }

.link-list { list-style: none; padding: 0; }
.link-list li { margin-bottom: .7rem; font-size: 1.15rem; }

.clients { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: center; }
.clients li { margin: 0; background: #fff; padding: .8rem 1.2rem; border-radius: 10px; }
.clients img { height: 70px; width: auto; }

.cta-band { background: var(--blue); color: #fff; padding-block: 3rem; text-align: center; }
.cta-band h2 { color: #fff; margin-top: 0; }
.cta-band .btn { background: #fff; color: var(--blue-dark); border-color: #fff; }
.cta-band .btn:hover { background: var(--tint); }
.cta-band :focus-visible { outline-color: #fff; }

/* articles / stories */
.article p { margin-bottom: 1.2em; }
.poem { line-height: 2; padding-inline-start: 1rem; border-inline-start: 4px solid var(--accent); }
.signature { font-weight: 700; }
.story-list { list-style: none; padding: 0; }
.story-item { padding: 1.4rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.story-item h2 { margin: 0 0 .3em; font-size: 1.6rem; }
.story-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 2rem; }

/* form */
.contact-form { margin-top: 1.5rem; }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); padding: .75rem .9rem; border: 2px solid #64748b; border-radius: 10px; background: #fff;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--text); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.required-note, .privacy-note { color: var(--muted); font-size: 1rem; }
.error-box { border: 3px solid #b91c1c; background: #fef2f2; border-radius: 10px; padding: 1rem 1.3rem; margin-bottom: 1.5rem; }
.error-box h2 { margin-top: 0; font-size: 1.3rem; color: #7f1d1d; }

/* footer */
.site-footer { background: #0f2a3a; color: #fff; padding-block: 2.5rem 1.5rem; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #cfe9f7; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { font-weight: 700; font-size: 1.25rem; margin-bottom: .4rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.copyright { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.25); font-size: 1rem; color: #e2e8f0; }

/* respect user preferences */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (prefers-contrast: more) { :root { --muted: #1f2933; --line: #64748b; } }
@media print { .site-header, .site-footer, .cta-band, .skip-link, .nav-toggle { display: none; } body { font-size: 12pt; } a { color: #000; } }

/* ===== Accessibility toolbar ===== */
.a11y-wrap { position: fixed; inset-inline-start: 1rem; bottom: 1rem; z-index: 1000; font-size: 1rem; line-height: 1.4; }
.a11y-open { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .6rem 1.1rem; font: inherit; font-weight: 700;
  background: var(--blue-dark); color: #fff; border: 2px solid #fff; border-radius: 999px; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,.35); }
.a11y-open:hover { background: #000; }
.a11y-panel { position: absolute; bottom: 3.7rem; inset-inline-start: 0; width: min(22rem, calc(100vw - 2rem)); max-height: calc(100vh - 6rem); overflow-y: auto;
  background: #fff; color: var(--text); border: 2px solid var(--text); border-radius: 14px; padding: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.a11y-title { font-size: 1.2rem; margin: 0; }
.a11y-close { font: inherit; font-size: 1.6rem; line-height: 1; width: 44px; height: 44px; background: #fff; color: var(--text); border: 2px solid var(--text); border-radius: 10px; cursor: pointer; }
.a11y-group { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.a11y-size { font-weight: 700; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .8rem; }
.a11y-panel button[data-id] { font: inherit; font-size: .95rem; min-height: 44px; padding: .45rem .6rem; background: #fff; color: var(--text); border: 2px solid #64748b; border-radius: 10px; cursor: pointer; }
.a11y-panel button[data-id]:hover:not(:disabled) { background: var(--tint); }
.a11y-panel button[aria-pressed="true"] { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }
.a11y-panel button:disabled { opacity: .5; cursor: not-allowed; }
.a11y-reset { width: 100%; }
.a11y-foot { margin: .8rem 0 0; font-size: .95rem; }

/* ===== modes switched on by the toolbar ===== */
html.a11y-invert { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert img { filter: invert(1) hue-rotate(180deg); }
html.a11y-gray { filter: grayscale(1); }

html.a11y-contrast body, html.a11y-contrast .site-header, html.a11y-contrast .section, html.a11y-contrast .section.tint, html.a11y-contrast .hero,
html.a11y-contrast .card, html.a11y-contrast .svc-card, html.a11y-contrast .side-col, html.a11y-contrast .clients li { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast h1, html.a11y-contrast h2, html.a11y-contrast h3, html.a11y-contrast p, html.a11y-contrast li, html.a11y-contrast .lead, html.a11y-contrast .section-intro,
html.a11y-contrast .breadcrumb, html.a11y-contrast label, html.a11y-contrast .svc-card p, html.a11y-contrast .privacy-note, html.a11y-contrast .required-note { color: #fff !important; }
html.a11y-contrast a, html.a11y-contrast .svc-title, html.a11y-contrast .main-nav a { color: #ffff00 !important; }
html.a11y-contrast .btn, html.a11y-contrast .cta-band .btn { background: #ffff00 !important; color: #000 !important; border-color: #ffff00 !important; }
html.a11y-contrast .btn-outline { background: #000 !important; color: #ffff00 !important; }
html.a11y-contrast .cta-band, html.a11y-contrast .site-footer { background: #000 !important; border-top: 2px solid #fff; }
html.a11y-contrast .field input, html.a11y-contrast .field textarea { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-contrast .a11y-open, html.a11y-contrast .a11y-panel { background: #000; color: #fff; border-color: #fff; }
html.a11y-contrast .a11y-panel button[data-id], html.a11y-contrast .a11y-close { background: #000; color: #fff; border-color: #fff; }
html.a11y-contrast .a11y-panel button[aria-pressed="true"] { background: #ffff00; color: #000; }
html.a11y-contrast .a11y-panel a { color: #ffff00 !important; }

html.a11y-links a { background: #ffff00 !important; color: #000 !important; text-decoration: underline !important; outline: 2px solid #000; }
html.a11y-font body, html.a11y-font .a11y-panel, html.a11y-font button, html.a11y-font input, html.a11y-font textarea { font-family: Arial, Verdana, "Noto Sans Hebrew", sans-serif !important; }
html.a11y-spacing body { line-height: 2.1 !important; letter-spacing: .06em; word-spacing: .16em; }
html.a11y-cursor, html.a11y-cursor * { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'><path d='M6 3l30 18-13 3 8 15-6 3-8-15-9 9z' fill='black' stroke='white' stroke-width='3'/></svg>") 6 3, auto !important; }
html.a11y-focus :focus, html.a11y-focus :focus-visible { outline: 5px solid #ff0 !important; outline-offset: 3px !important; box-shadow: 0 0 0 8px #000 !important; }

@media print { .a11y-wrap { display: none; } }
