/* yoffe.tech — grayscale engineering style. One stylesheet for RTL (he) and LTR (en): logical properties only. */
:root {
  --bg: #f4f4f2;
  --surface: #ffffff;
  --tint: #e4e8e9;      /* light cool gray band (echo of the Wix light-blue band) */
  --mid: #c5ced0;       /* video band */
  --gray: #dadada;      /* animations band */
  --ink: #1f1f1f;
  --ink-2: #3a3a3a;
  --muted: #5e6163;
  --line: #cfd2d3;
  --dark: #2b2b2b;
  --dark-2: #444;
  --accent: #6f8790;    /* muted steel — used sparingly for small headings */
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --step--1: clamp(.82rem, .8rem + .1vw, .9rem);
  --step-0: clamp(.95rem, .92rem + .15vw, 1.05rem);
  --step-1: clamp(1.1rem, 1.05rem + .3vw, 1.3rem);
  --step-2: clamp(1.45rem, 1.3rem + .8vw, 2rem);
  --step-3: clamp(1.8rem, 1.4rem + 2vw, 3rem);
  --wrap: 1140px;
}
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--step-0); line-height: 1.7; text-rendering: optimizeLegibility; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: rgba(0,0,0,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap.narrow { max-width: 860px; }
.center { text-align: center; }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--dark); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip:focus { inset-inline-start: 1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244,244,242,.94); backdrop-filter: saturate(1.2) blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; gap: .25rem 1.25rem; flex-wrap: wrap; align-items: center; font-size: var(--step--1); font-weight: 500; }
.nav a { text-decoration: none; padding: .35rem 0; color: var(--ink-2); border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav .lang { border: 1px solid var(--line); padding: .2rem .7rem; border-radius: var(--radius); }
.nav .lang:hover { border-color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); width: 44px; height: 40px; padding: 9px 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 4px 0; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1rem; gap: 0; font-size: var(--step-0); }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav .lang { margin-top: .75rem; text-align: center; }
  .brand img { height: 44px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem 1.3rem; border-radius: var(--radius); font: inherit; font-weight: 500; font-size: var(--step--1); letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 1px solid var(--dark); transition: background .15s, color .15s; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--dark); color: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Hero */
.hero { position: relative; background: #111; color: #fff; overflow: hidden; }
.hero picture img { width: 100%; height: clamp(320px, 42vw, 560px); object-fit: cover; filter: grayscale(1) contrast(1.05); opacity: .72; }
.hero-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero h1 { font-size: var(--step-3); font-weight: 800; max-width: 22ch; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.hero-sub { font-size: var(--step-1); font-weight: 300; letter-spacing: .03em; opacity: .95; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }
.hero .btn-dark { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn-dark:hover { background: #e9e9e9; }
.hero .btn-line { color: #fff; border-color: rgba(255,255,255,.8); }
.hero .btn-line:hover { background: #fff; color: var(--ink); }

/* Bands */
.band { padding-block: clamp(3rem, 6vw, 5.5rem); }
.band-tint { background: var(--tint); }
.band-mid { background: var(--mid); }
.band-gray { background: var(--gray); }
.section-h { font-size: var(--step-2); font-weight: 800; margin-bottom: 1.5rem; }
.section-h::after { content: ""; display: block; width: 48px; height: 3px; background: var(--ink); margin-top: .6rem; }
.center .section-h::after { margin-inline: auto; }
.lead { color: var(--ink-2); font-size: var(--step-1); font-weight: 300; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-sub { font-size: var(--step-1); font-weight: 700; color: var(--ink-2); }
.about-photo { margin: 0; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 380px; margin-inline: auto; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* Service cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1.25rem; box-shadow: var(--shadow); font-size: var(--step--1); line-height: 1.75; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; margin-bottom: 1rem; filter: saturate(.85); }
.card h3 { font-size: var(--step-1); color: var(--ink); padding-bottom: .6rem; border-bottom: 1px solid var(--line); margin-bottom: .8rem; }
.card p:last-child { margin-bottom: 0; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

/* Videos */
.video-list { display: grid; gap: 1.75rem; }
.video { margin: 0; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video video, .video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: #000; }
.video figcaption { background: var(--dark); color: #f1f1f1; padding: .8rem 1rem; font-weight: 500; }
.video figcaption small { display: block; font-weight: 300; color: #cfcfcf; margin-top: .3rem; line-height: 1.6; }

/* Vimeo click-to-load tiles */
.vimeo-tile { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; color: #fff; font: inherit; overflow: hidden; }
.vimeo-tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .3s, opacity .3s; }
.vimeo-tile.big img { aspect-ratio: 16 / 9; }
.vimeo-tile:hover img { transform: scale(1.02); opacity: .85; }
.vimeo-tile .play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; background: rgba(0,0,0,.55); border: 2px solid #fff; }
.vimeo-tile .play::before { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-block: 11px solid transparent; border-left: 18px solid #fff; transform: translateX(3px); }
.vimeo-tile .tile-title { position: absolute; inset-inline: 0; bottom: 0; padding: .5rem .7rem; font-size: var(--step--1); text-align: start; background: linear-gradient(transparent, rgba(0,0,0,.75)); line-height: 1.35; }
.vimeo-frame { position: relative; width: 100%; aspect-ratio: 16 / 10; background: #000; }
.vimeo-frame.big { aspect-ratio: 16 / 9; }
.vimeo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.anim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
@media (max-width: 760px) { .anim-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .anim-grid { grid-template-columns: 1fr; } }

/* Projects: two panoramas full width, the rest in a masonry of natural aspect ratios */
.proj-wide { display: grid; gap: .6rem; margin-bottom: .6rem; }
.proj-masonry { column-count: 3; column-gap: .6rem; }
.proj-masonry .proj { break-inside: avoid; margin-bottom: .6rem; }
.proj { margin: 0; position: relative; overflow: hidden; border-radius: 2px; background: #ddd; }
.proj a { display: block; }
.proj img { width: 100%; height: auto; transition: transform .35s; }
.proj-wide .proj img { aspect-ratio: 3 / 1; object-fit: cover; }
.proj:hover img { transform: scale(1.03); }
.proj figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: .45rem .7rem; color: #fff; font-size: var(--step--1); background: linear-gradient(transparent, rgba(0,0,0,.7)); pointer-events: none; text-align: start; }
@media (max-width: 900px) { .proj-masonry { column-count: 2; } }
@media (max-width: 520px) { .proj-masonry { column-count: 1; } .proj-wide .proj img { aspect-ratio: 2 / 1; } }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10,10,10,.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; object-fit: contain; }
.lb-cap { color: #eee; margin-top: .6rem; text-align: center; }
.lightbox button { position: fixed; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius); font-size: 1.8rem; line-height: 1; width: 48px; height: 48px; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Clients */
.clients { list-style: none; padding: 0; margin: 0; display: flex; direction: ltr; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem 3rem; }
.clients img { max-height: 60px; max-width: 190px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .8; mix-blend-mode: multiply; transition: filter .2s, opacity .2s; }
.clients a:hover img { filter: none; opacity: 1; }

/* Forms */
.js-form label { display: block; margin-bottom: 1rem; }
.js-form label > span { display: block; font-size: var(--step--1); font-weight: 500; color: var(--ink-2); margin-bottom: .3rem; }
.js-form input, .js-form textarea, .js-form select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .65rem .8rem; min-height: 46px; }
.js-form input:focus, .js-form textarea:focus, .js-form select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.js-form [aria-invalid="true"] { border-color: #8a2b2b; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 680px) { .row2, .row3 { grid-template-columns: 1fr; } }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: .8rem 0 0; min-height: 1.5em; font-size: var(--step--1); }
.form-status.ok { color: #1f5130; }
.form-status.err { color: #8a2b2b; }

/* Footer */
.site-footer { background: #d7dcde; color: var(--ink); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem; padding-block: 3.5rem 2rem; }
.footer-write { background: #a9b6ba; margin-block: -3.5rem -2rem; padding: 3.5rem 2rem 2rem; }
.footer-h { font-size: var(--step-0); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.2rem; }
.quick-form label { margin-bottom: .7rem; }
.quick-form input, .quick-form textarea { background: rgba(255,255,255,.92); border-color: transparent; }
.footer-contact address { font-style: normal; line-height: 1.95; font-size: var(--step--1); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; border-top: 1px solid #bfc6c9; padding-block: 1.2rem; font-size: var(--step--1); }
.social { display: flex; gap: .8rem; }
.social a { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #9aa4a8; border-radius: 50%; }
.social a:hover { background: var(--dark); color: #fff; border-color: var(--dark); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.copy { margin: 0; color: var(--muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-write { grid-column: 1 / -1; margin: -3.5rem calc(50% - 50vw) 0; padding-inline: max(1.25rem, calc(50vw - 50%)); padding-bottom: 2.5rem; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Inner pages */
.page { padding-block: clamp(2.5rem, 6vw, 5rem); min-height: 60vh; }
.page-h { font-size: var(--step-3); font-weight: 800; margin-bottom: .2rem; }
.page-h-en { font-size: var(--step-1); color: var(--muted); margin-bottom: 2rem; }
.pay-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.pay-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pay-card h2 { font-size: var(--step-1); }
.pay-btns { margin-top: auto; display: flex; gap: .6rem; flex-wrap: wrap; }
@media (max-width: 760px) { .pay-intro, .pay-grid { grid-template-columns: 1fr; } }
.vcard { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.vcard-photo { border-radius: var(--radius); width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.vcard-en { color: var(--muted); }
.vcard-list { list-style: none; padding: 0; margin: 0 0 1.5rem; line-height: 2; }
@media (max-width: 600px) { .vcard { grid-template-columns: 1fr; } .vcard-photo { max-width: 220px; } }

/* Hero tuning for small screens and the long English headline */
@media (max-width: 700px) {
  .hero picture img { height: 440px; }
  .hero h1 { font-size: clamp(1.6rem, 6.5vw, 2.1rem); }
  .hero:lang(en) h1, html[lang="en"] .hero h1 { font-size: clamp(1.35rem, 5.6vw, 1.8rem); }
}
