/* ============================================================
   יונתן ארי — שירותי חשמל  |  vaimos.net
   One stylesheet serves both /he/ (RTL) and /en/ (LTR).
   Layout uses CSS logical properties, so nothing is mirrored by hand.
   ============================================================ */

:root {
  color-scheme: light;

  /* Brand */
  --navy:        #013569;
  --navy-deep:   #012247;
  --navy-soft:   #0a4a8a;
  --yellow:      #fdce03;
  --yellow-deep: #e0b600;

  /* Neutrals */
  --ink:    #11213a;
  --ink-mid:#46556e;
  --line:   #d9e0ea;
  --mist:   #f3f6fa;
  --paper:  #ffffff;

  /* Type */
  --font: "Heebo", "Segoe UI", "Arial Hebrew", system-ui, -apple-system, sans-serif;
  --step--1: clamp(.82rem, .79rem + .15vw, .9rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.09rem);
  --step-1:  clamp(1.17rem, 1.1rem + .35vw, 1.35rem);
  --step-2:  clamp(1.4rem, 1.27rem + .6vw, 1.75rem);
  --step-3:  clamp(1.7rem, 1.47rem + 1.1vw, 2.4rem);
  --step-4:  clamp(2.05rem, 1.6rem + 2.1vw, 3.4rem);

  /* Space */
  --gut: clamp(1.1rem, 4vw, 2rem);
  --sec: clamp(3.2rem, 7vw, 5.5rem);
  --maxw: 1140px;
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p  { margin: 0 0 1em; max-width: 68ch; }
ul { margin: 0 0 1em; padding-inline-start: 1.25em; }
li { margin-bottom: .4em; }
a  { color: var(--navy-soft); text-underline-offset: .22em; }
a:hover { color: var(--navy); }
img, svg { max-width: 100%; }
strong { font-weight: 700; }

/* --- Focus: visible on every interactive element.
   Navy on light backgrounds (12.3:1), yellow on navy backgrounds (8.2:1).
   Yellow on white is only 1.5:1 and would fail WCAG 1.4.11. --- */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-head :focus-visible,
.site-foot :focus-visible,
.hero :focus-visible,
.facts :focus-visible,
.callbar :focus-visible,
.a11y-fab:focus-visible {
  outline-color: var(--yellow);
}

/* --- Skip link --- */
.skip {
  position: absolute; inset-inline-start: 0; inset-block-start: -100px;
  background: var(--yellow); color: var(--navy-deep);
  padding: .7rem 1.2rem; font-weight: 700; z-index: 999;
  transition: inset-block-start .15s ease;
}
.skip:focus { inset-block-start: 0; }

/* --- Layout helpers --- */
.wrap { width: min(100% - (var(--gut) * 2), var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--sec); }
.section--mist { background: var(--mist); }
.section__lead { font-size: var(--step-1); color: var(--ink-mid); max-width: 62ch; }
.eyebrow {
  display: inline-block; font-size: var(--step--1); font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--navy-soft); margin-bottom: .6rem;
}
.eyebrow::after {
  content: ""; display: block; width: 2.6rem; height: 4px;
  background: var(--yellow); margin-block-start: .45rem; border-radius: 2px;
}

/* ============================================================
   Header
   ============================================================ */
.site-head {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: var(--navy); color: #fff;
  border-block-end: 4px solid var(--yellow);
}
.site-head__bar {
  display: flex; align-items: center; gap: 1rem;
  min-height: 72px; padding-block: .6rem;
}
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; margin-inline-end: auto; }
.brand__mark { width: 54px; flex: none; color: #fff; }
.brand__mark svg { display: block; width: 100%; height: auto; }
.brand__name { font-weight: 800; font-size: 1.12rem; line-height: 1.15; letter-spacing: -.01em; }
.brand__role { display: block; font-weight: 500; font-size: .76rem; color: #cfe0f3; letter-spacing: .02em; white-space: nowrap; }

/* Technical values such as 3×80A keep their own direction inside Hebrew text,
   and don't break across lines. .wrap-ok is for longer isolated phrases. */
bdi { white-space: nowrap; }
bdi.wrap-ok { white-space: normal; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  color: #e8f0fa; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .5rem .72rem; border-radius: 8px;
}
.nav a:hover { background: rgba(255,255,255,.12); color: #fff; }

.head-actions { display: flex; align-items: center; gap: .5rem; }

.lang {
  display: flex; align-items: center; gap: .2rem;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .15rem;
}
.lang a {
  color: #dbe7f5; text-decoration: none; font-weight: 700; font-size: .82rem;
  padding: .28rem .62rem; border-radius: 999px; line-height: 1.4;
}
.lang a[aria-current="true"] { background: var(--yellow); color: var(--navy-deep); }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.4);
  color: #fff; border-radius: 9px; padding: .45rem .6rem; cursor: pointer;
}
.nav-toggle svg { display: block; width: 22px; height: 22px; }

@media (max-width: 1000px) {
  .nav {
    display: none; position: absolute; inset-inline: 0; inset-block-start: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-deep); padding: .5rem var(--gut) 1rem;
    border-block-end: 4px solid var(--yellow);
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .8rem .4rem; border-block-end: 1px solid rgba(255,255,255,.1); border-radius: 0; }
  .nav-toggle { display: block; order: 3; }
  .site-head__bar { position: relative; }
}
@media (max-width: 520px) {
  .brand__mark { width: 42px; }
  .brand__name { font-size: 1rem; }
  .brand__role { font-size: .72rem; }
  .brand__lic { display: none; }   /* licence number stays in the hero, about panel and footer */
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-size: 1rem; line-height: 1.25;
  padding: .85rem 1.4rem; border-radius: 10px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, color .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--yellow); color: var(--navy-deep); border-color: var(--yellow); }
.btn--primary:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); color: var(--navy-deep); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: var(--navy); color: #fff;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero::before {
  content: ""; position: absolute; inset-block: -20%; inset-inline-end: -14%;
  width: 56%;
  background: linear-gradient(180deg, rgba(253,206,3,.16), rgba(253,206,3,.04));
  transform: skewX(-13deg);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero__lead { font-size: var(--step-1); color: #d6e4f4; max-width: 54ch; margin-block: 1rem 1.6rem; }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: 1.25fr .75fr; align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } .hero__art { display: none; } }
.hero__art { color: rgba(255,255,255,.9); }
.hero__art svg { width: 100%; height: auto; }

.hero__creds {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: 2rem;
  padding-block-start: 1.5rem; border-block-start: 1px solid rgba(255,255,255,.2);
}
.cred {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: .35rem .85rem;
  font-size: .85rem; font-weight: 600; color: #e9f1fb;
}
.cred b { color: var(--yellow); font-weight: 800; }

/* ============================================================
   Cards / grids
   ============================================================ */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  position: relative;
}
.card--lead { border-color: var(--navy); border-width: 2px; }
.card__tag {
  position: absolute; inset-block-start: -.75rem; inset-inline-start: 1.25rem;
  background: var(--yellow); color: var(--navy-deep);
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .22rem .6rem; border-radius: 999px;
}
.card__icon { color: var(--navy); margin-bottom: .85rem; }
.card__icon svg { width: 34px; height: 34px; display: block; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { font-size: .95rem; color: var(--ink-mid); }

/* Process steps */
.steps { counter-reset: step; display: grid; gap: 1rem; margin-block-start: 2rem; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
}
.step__n {
  counter-increment: step;
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  background: var(--navy); color: var(--yellow);
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
}
.step__n::before { content: counter(step); }
.step h3 { margin-bottom: .25rem; }
.step p { margin-bottom: 0; color: var(--ink-mid); }

/* Scope note */
.note {
  border-inline-start: 5px solid var(--yellow);
  background: var(--mist); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.4rem; margin-block-start: 2rem;
}
[dir="ltr"] .note { border-radius: var(--radius) 0 0 var(--radius); }
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--navy); }

/* Projects */
.project {
  display: grid; grid-template-columns: 300px 1fr; gap: 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--paper);
}
@media (max-width: 780px) { .project { grid-template-columns: 1fr; } }
.project__media { background: var(--mist); min-height: 210px; position: relative; }
.project__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project__body { padding: 1.5rem 1.5rem 1.5rem 0; }
[dir="rtl"] .project__body { padding: 1.5rem 0 1.5rem 1.5rem; }
@media (max-width: 780px) {
  .project__body, [dir="rtl"] .project__body { padding: 1.5rem; }
}
.project__role {
  display: inline-block; font-size: .78rem; font-weight: 700;
  background: var(--navy); color: #fff; border-radius: 999px;
  padding: .2rem .7rem; margin-bottom: .6rem;
}
.project__role--own { background: var(--yellow); color: var(--navy-deep); }
.project__meta { font-size: .88rem; color: var(--ink-mid); margin-bottom: 0; }

/* Placeholder art */
.ph {
  display: grid; place-items: center; gap: .4rem; height: 100%;
  background:
    repeating-linear-gradient(45deg, #e8edf5 0 12px, #eef2f8 12px 24px);
  color: #51607a; font-size: .82rem; font-weight: 600; text-align: center;
  padding: 1rem; min-height: 210px;
}
.ph svg { width: 34px; height: 34px; opacity: .65; }

/* Client logos */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.logo-slot {
  display: grid; place-items: center; height: 92px;
  border: 1px dashed var(--line); border-radius: 10px;
  background: var(--paper); color: #51607a;
  font-size: .82rem; font-weight: 600;
}
.logo-slot img { max-height: 54px; width: auto; }

/* Testimonials */
.quote {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
  display: flex; flex-direction: column;
}
.quote__mark { color: var(--yellow); font-size: 2.6rem; line-height: .7; font-weight: 800; margin-bottom: .4rem; }
.quote p { font-size: 1.02rem; margin-bottom: 1rem; }
.quote footer { margin-block-start: auto; font-size: .88rem; color: var(--ink-mid); font-weight: 600; }
.quote footer b { display: block; color: var(--navy); font-size: .98rem; }

/* Partners */
.partner {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
}
.partner__who { font-size: .85rem; font-weight: 700; color: var(--navy-soft); margin-bottom: .2rem; }

/* About */
.about { display: grid; grid-template-columns: 1fr 340px; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.facts { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 1.6rem; }
.facts h3 { color: #fff; font-size: 1.05rem; }
.facts dl { margin: 0; display: grid; gap: .9rem; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--yellow); font-weight: 700; }
.facts dd { margin: 0; font-weight: 600; }

/* ============================================================
   Contact
   ============================================================ */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .9rem; }
.contact-list li { margin: 0; }
.contact-list a, .contact-list span {
  display: flex; align-items: center; gap: .85rem;
  text-decoration: none; color: var(--ink); font-weight: 600;
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper);
}
.contact-list a:hover { border-color: var(--navy); background: var(--mist); }
.contact-list svg { width: 22px; height: 22px; flex: none; color: var(--navy); }
.contact-list small { display: block; font-weight: 500; font-size: .78rem; color: var(--ink-mid); }
.contact-list b { font-size: 1.05rem; letter-spacing: .01em; }

form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.field { margin-bottom: 1.05rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .35rem; color: var(--navy); }
.field .hint { font-weight: 500; color: var(--ink-mid); font-size: .82rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--paper);
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); }
textarea { min-height: 120px; resize: vertical; }
/* Honeypot: hidden from people without moving the page's scroll width,
   and without display:none (which some bots skip). */
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.form-note { font-size: .84rem; color: var(--ink-mid); margin-block-start: .9rem; margin-bottom: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-foot { background: var(--navy-deep); color: #c9d8ea; padding-block: 3rem 2rem; font-size: .93rem; }
.site-foot h4 { color: #fff; font-size: .95rem; margin-bottom: .7rem; }
.site-foot a { color: #e4eefa; }
.site-foot__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 2rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .4rem; }
.site-foot__bottom {
  margin-block-start: 2rem; padding-block-start: 1.3rem;
  border-block-start: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .85rem; color: #a9bdd4;
}

/* Sticky mobile call bar */
.callbar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 60;
  display: none; gap: 1px; background: rgba(1,53,105,.25);
  box-shadow: 0 -6px 18px rgba(1,34,71,.18);
}
.callbar a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem .5rem; text-decoration: none; font-weight: 700; font-size: .97rem;
}
.callbar svg { width: 20px; height: 20px; }
.callbar .cb-wa { background: #1faa59; color: #fff; }
.callbar .cb-tel { background: var(--navy); color: #fff; }
@media (max-width: 760px) {
  .callbar { display: flex; }
  body { padding-block-end: 58px; }
  .a11y-fab { inset-block-end: 70px !important; }
}

/* ============================================================
   Accessibility widget
   ============================================================ */
.a11y-fab {
  position: fixed; inset-block-end: 18px; inset-inline-start: 18px; z-index: 70;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--navy); color: #fff; border: 2px solid #fff;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(1,34,71,.35);
}
.a11y-fab svg { width: 26px; height: 26px; }
.a11y-panel {
  position: fixed; inset-block-end: 78px; inset-inline-start: 18px; z-index: 71;
  width: min(300px, calc(100vw - 36px));
  background: #fff; border: 2px solid var(--navy); border-radius: var(--radius);
  padding: 1.1rem; box-shadow: 0 10px 34px rgba(1,34,71,.25);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 1.02rem; margin-bottom: .2rem; }
.a11y-panel .a11y-sub { font-size: .8rem; color: var(--ink-mid); margin-bottom: .9rem; }
.a11y-opts { display: grid; gap: .45rem; }
.a11y-opts button {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  font: inherit; font-size: .92rem; font-weight: 600; text-align: start;
  background: var(--mist); border: 1.5px solid var(--line); color: var(--ink);
  border-radius: 9px; padding: .6rem .8rem; cursor: pointer;
}
.a11y-opts button:hover { border-color: var(--navy); }
.a11y-opts button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.a11y-panel__foot { margin-block-start: .9rem; font-size: .82rem; display: flex; justify-content: space-between; gap: .6rem; }
.a11y-panel__foot button {
  font: inherit; font-weight: 700; background: none; border: none; cursor: pointer;
  color: var(--navy-soft); text-decoration: underline; padding: 0;
}

/* Accessibility modes (set on <html>) */
html[data-a11y-size="1"] body { font-size: calc(var(--step-0) * 1.14); }
html[data-a11y-size="2"] body { font-size: calc(var(--step-0) * 1.3); }
html[data-a11y-size="1"] h1, html[data-a11y-size="2"] h1,
html[data-a11y-size="1"] h2, html[data-a11y-size="2"] h2 { word-break: break-word; }

html[data-a11y-contrast="true"] { --mist: #ffffff; --ink: #000000; --ink-mid: #1b1b1b; --line: #000000; --navy-soft: #003c7a; }
html[data-a11y-contrast="true"] body { background: #fff; }
html[data-a11y-contrast="true"] .hero::before,
html[data-a11y-contrast="true"] .ph { background: none; }
html[data-a11y-contrast="true"] .card,
html[data-a11y-contrast="true"] .step,
html[data-a11y-contrast="true"] .quote,
html[data-a11y-contrast="true"] .partner,
html[data-a11y-contrast="true"] form { border-width: 2px; }

html[data-a11y-links="true"] a:not(.btn):not(.brand):not(.skip) { text-decoration: underline 2px; font-weight: 700; }

html[data-a11y-motion="true"] *, html[data-a11y-motion="true"] *::before { animation: none !important; transition: none !important; }
html[data-a11y-motion="true"] { scroll-behavior: auto; }

html[data-a11y-font="true"] body,
html[data-a11y-font="true"] h1, html[data-a11y-font="true"] h2,
html[data-a11y-font="true"] h3, html[data-a11y-font="true"] h4 {
  font-family: Verdana, "Arial Hebrew", Arial, sans-serif;
  letter-spacing: .02em; word-spacing: .08em;
}

/* Utility */
.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;
}
.prose h2 { margin-block-start: 2rem; }
.prose h3 { margin-block-start: 1.5rem; }

@media print {
  .site-head, .callbar, .a11y-fab, .a11y-panel, form, .nav-toggle { display: none !important; }
  body { color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
