/* Chadut: bright, airy, precise. Warm white, near-black ink, one magenta
   accent (the colour an anti-reflective coat throws back), WhatsApp in its
   own deepened green. Rubik throughout: light and tight for display, regular
   for reading. The base rules are the finished still; motion is layered on
   under html[data-motion="on"] and the no-preference gate at the end. */

@font-face {
  font-family: 'Rubik';
  src: url('assets/rubik-hebrew.woff2') format('woff2');
  font-weight: 300 600;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Rubik';
  src: url('assets/rubik-latin.woff2') format('woff2');
  font-weight: 300 600;
  font-display: swap;
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #fbfbf9;
  --paper-2: #f2f2ee;
  --paper-3: #e9e9e4;
  --ink: #141517;
  --ink-2: #4b4e54;
  --ink-3: #6a6d73;
  --line: #e0dfd9;
  --accent: #c8175d;
  --wa: #12833f;
  --wa-bubble: #d9fdd3;
  --header-h: 60px;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1180px;
  --radius: 20px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --rig-w: min(94vw, 880px, calc((100svh - var(--header-h)) * 0.95));
  --rig-h: calc(var(--rig-w) * 0.42);
  --rest: 0.6;          /* the rig rests at this share of the stage height */
  --pin: 45svh;
  color-scheme: light;
}
@media (min-width: 700px) {
  :root { --rig-w: min(64vw, 880px, calc((100svh - var(--header-h)) * 0.95)); --pin: 90svh; --rest: 0.63; }
}
@media (min-width: 900px) {
  :root { --header-h: 68px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (min-width: 900px) { body { font-size: 1.125rem; } }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: fixed; inset-block-start: 8px; inset-inline-start: 8px; z-index: 100;
  padding: 12px 16px; background: var(--ink); color: var(--paper); border-radius: 12px;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: 8px;
  padding-inline: var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; min-height: 44px; align-items: center; margin-inline-end: auto; }
.brand-mark { width: 34px; height: 17px; color: var(--ink); align-self: center; }
.brand-name { font-weight: 500; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand-tag { color: var(--ink-3); font-size: 1rem; }
.nav { display: flex; align-items: center; }
.menu-toggle, .lang-toggle {
  min-width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lang-toggle { font-weight: 500; font-size: 1rem; padding-inline: 10px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-list {
  list-style: none; display: none;
  position: absolute; inset-inline: 0; top: var(--header-h);
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 16px;
  box-shadow: 0 24px 40px -24px rgb(20 21 23 / 0.25);
}
.nav-list.open { display: block; }
.nav-list a {
  display: flex; align-items: center; min-height: 52px;
  font-size: 1.25rem; text-decoration: none; border-bottom: 1px solid var(--line);
}
.nav-list li:last-child a { border-bottom: 0; }
@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .nav-list {
    display: flex; position: static; gap: 4px; padding: 0; border: 0; box-shadow: none; background: none;
  }
  .nav-list a { min-height: 44px; padding-inline: 12px; font-size: 1rem; border: 0; color: var(--ink-2); border-radius: 10px; }
  .nav-list a:hover { color: var(--ink); background: var(--paper-2); }
}

/* ---------- buttons and the contact kit ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; background: var(--paper);
  font-weight: 500; font-size: 1.0625rem; line-height: 1.2; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn-wa { background: var(--wa); color: #fff; }
.btn-line { border-color: var(--ink); background: transparent; }
.btn-glass { background: rgb(255 255 255 / 0.92); border-color: rgb(20 21 23 / 0.12); }
.btn-mark { border-color: var(--line); background: var(--paper); min-height: 48px; padding: 0 16px; }
.btn-mark img { width: 22px; height: 22px; border-radius: 6px; }
.btn-wide { width: 100%; }
.kit-note {
  margin-top: 12px; padding: 14px 16px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  box-shadow: 0 12px 32px -20px rgb(20 21 23 / 0.35);
  display: grid; gap: 8px; max-width: 34rem;
}
.kit-note[hidden] { display: none; }
.kit-note q { display: block; font-weight: 500; quotes: none; }
.kit-note .note-close {
  justify-self: start; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper-2); cursor: pointer;
}

/* ---------- the showpiece: the street comes into focus ---------- */
.focus { position: relative; height: calc(100svh - var(--header-h)); min-height: 560px; }
.focus-stage {
  position: relative; height: calc(100svh - var(--header-h)); min-height: 560px;
  overflow: hidden; background: var(--paper-3); isolation: isolate;
}
.street, .street img { position: absolute; inset: 0; width: 100%; height: 100%; }
.street img { object-fit: cover; object-position: 50% 55%; }
.veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgb(251 251 249 / 0.95) 0%, rgb(251 251 249 / 0.9) 22%, rgb(251 251 249 / 0) 42%),
    linear-gradient(to top, rgb(251 251 249 / 0.92) 0%, rgb(251 251 249 / 0.75) 14%, rgb(251 251 249 / 0) 30%);
}
.rig {
  position: absolute; z-index: 2;
  width: var(--rig-w); height: var(--rig-h);
  left: calc(50% - var(--rig-w) / 2);
  top: calc(var(--rest) * 100% - var(--rig-h) / 2);
  transform-origin: 50% 50%;
}
.lens-window {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask: url('assets/lens-mask.svg') 0 0 / 100% 100% no-repeat;
  mask: url('assets/lens-mask.svg') 0 0 / 100% 100% no-repeat;
}
/* Untransformed, the inner street covers the stage exactly; the script keeps
   it there in px and undoes the rig's transform, so it never moves. */
.lens-street {
  position: absolute;
  width: 100vw; height: calc(100svh - var(--header-h));
  left: calc(var(--rig-w) / 2 - 50vw);
  top: calc(var(--rig-h) / 2 - var(--rest) * (100svh - var(--header-h)));
}
.lens-street .street img { object-position: 50% 55%; }
.glasses { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 18px 22px rgb(20 21 23 / 0.28)); }

.focus-copy {
  position: absolute; z-index: 3; inset-inline: 0; top: clamp(20px, 5svh, 56px);
  padding-inline: var(--gutter);
  display: grid; justify-items: center; text-align: center; gap: 12px;
}
.eyebrow { font-size: 1rem; color: var(--ink-2); letter-spacing: 0.01em; }
.hero-title {
  font-weight: 300; font-size: clamp(2.6rem, 7.4vw, 5.6rem); line-height: 1.02;
  letter-spacing: -0.025em; text-wrap: balance; max-width: 14ch;
}
.hero-actions { justify-content: center; margin-top: 8px; }
@media (min-width: 700px) { .hero-title { max-width: none; } }
.focus-copy .kit-note { text-align: start; justify-self: center; }
.focus-foot {
  position: absolute; z-index: 3; inset-inline: 0; bottom: 0;
  padding: 0 var(--gutter) 14px;
  display: grid; justify-items: center; text-align: center;
}
.caption {
  grid-area: 1 / 1; font-size: clamp(1.2rem, 3.2vw, 1.75rem); font-weight: 400;
  letter-spacing: -0.01em; text-wrap: balance; max-width: 26ch;
}
.caption-sharp { opacity: 0; }
.hint { grid-area: 2 / 1; display: none; align-items: center; gap: 6px; color: var(--ink-2); font-size: 1rem; margin-top: 4px; }
.place { grid-area: 3 / 1; color: var(--ink-3); font-size: 1rem; margin-top: 6px; }
@media (min-width: 700px) {
  .focus-foot { padding-bottom: 22px; }
  .place { position: absolute; inset-inline-end: var(--gutter); bottom: 22px; margin: 0; }
}

/* motion on: a pin, the glasses below the frame until the script places them */
html[data-motion="pending"] .rig { opacity: 0; }
html[data-motion="on"] .focus { height: calc(100svh - var(--header-h) + var(--pin)); }
html[data-motion="on"] .focus-stage { position: sticky; top: var(--header-h); }
html[data-motion="on"] .rig { will-change: transform; }
html[data-motion="on"] .lens-street { will-change: transform; }
html[data-motion="on"] .street-blur { will-change: opacity; }
html[data-motion="on"] .hint { display: inline-flex; }

/* ---------- section scaffolding (each section lays itself out differently) ---------- */
.kicker { color: var(--accent); font-weight: 500; font-size: 1rem; letter-spacing: 0.01em; }
.section-title {
  font-weight: 300; font-size: clamp(2.1rem, 5.6vw, 3.8rem); line-height: 1.06;
  letter-spacing: -0.022em; text-wrap: balance; margin-top: 6px;
}
.lede { color: var(--ink-2); max-width: 36rem; margin-top: 14px; text-wrap: pretty; }
.small { color: var(--ink-3); font-size: 1rem; }

/* ---------- booking ---------- */
.booking {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 10vw, 128px) var(--gutter);
  display: grid; gap: 28px;
}
.booking-form { display: grid; gap: 22px; }
.choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.choice legend { font-weight: 500; padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 1rem; user-select: none;
}
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.field { display: grid; gap: 8px; max-width: 22rem; }
.field-label { font-weight: 500; }
.field small { color: var(--ink-3); font-weight: 400; font-size: 1rem; }
.field input {
  min-height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); font: inherit; color: inherit;
}
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.preview {
  background: var(--paper-2); border-radius: 28px; padding: clamp(20px, 4vw, 32px);
  display: grid; gap: 14px; align-content: start;
}
.preview-label { color: var(--ink-3); font-size: 1rem; }
.bubble {
  background: var(--wa-bubble); border-radius: 20px 20px 6px 20px; padding: 16px 18px;
  font-size: 1.0625rem; line-height: 1.55; box-shadow: 0 1px 0 rgb(20 21 23 / 0.08);
  min-height: 5.5em;
}
[dir="rtl"] .bubble { border-radius: 20px 20px 20px 6px; }
@media (min-width: 900px) {
  .booking { grid-template-columns: 1.15fr 0.85fr; column-gap: 64px; align-items: start; }
  .booking-head { grid-column: 1 / -1; }
  .preview { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- the eye test, as a chart: each step a line, largest to smallest ---------- */
.exam { background: var(--paper-2); padding: clamp(56px, 10vw, 128px) var(--gutter); }
.exam-head { max-width: var(--max); margin: 0 auto clamp(28px, 5vw, 56px); }
.chart { list-style: none; max-width: 960px; margin: 0 auto; background: var(--paper); border-radius: 28px; padding: clamp(8px, 2vw, 24px) clamp(16px, 4vw, 48px); box-shadow: 0 30px 60px -40px rgb(20 21 23 / 0.35); }
.row {
  display: grid; grid-template-columns: 3.2rem 1fr; column-gap: 12px; align-items: baseline;
  padding: clamp(16px, 2.6vw, 26px) 0; border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.acuity { grid-row: 1 / span 2; color: var(--ink-3); font-size: 1rem; font-variant-numeric: tabular-nums; direction: ltr; text-align: start; }
.row-title {
  grid-column: 2; font-weight: 500; letter-spacing: 0.02em; line-height: 1.08; text-align: center;
  font-size: clamp(calc(2.6rem - var(--row) * 0.28rem), calc(7.4vw - var(--row) * 1.16vw), calc(5.2rem - var(--row) * 0.78rem));
}
.row-text { grid-column: 2; color: var(--ink-2); text-align: center; margin-top: 6px; text-wrap: pretty; max-width: 34rem; justify-self: center; }
.row:last-child .row-title { color: var(--accent); }
@media (min-width: 700px) { .row { grid-template-columns: 4.5rem 1fr 4.5rem; } .acuity { grid-row: auto; } }

/* ---------- frames ---------- */
.frames { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 10vw, 128px) var(--gutter); }
.frames-head { margin-bottom: clamp(24px, 4vw, 44px); }
.frame-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.frame-card figure { background: var(--paper-2); border-radius: var(--radius); overflow: hidden; height: 100%; display: grid; grid-template-rows: auto 1fr; }
.frame-card img { width: 100%; aspect-ratio: 720 / 430; object-fit: cover; object-position: 50% 62%; }
.frame-card figcaption { padding: 4px 14px 16px; display: grid; gap: 2px; }
.frame-name { font-weight: 500; font-size: 1.0625rem; }
.frame-detail { color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.frames-note { margin-top: 14px; }
.frames-more { display: grid; gap: 0; margin-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--line); }
.more { padding: 20px 0; border-bottom: 1px solid var(--line); }
.more h3 { font-weight: 500; font-size: 1.25rem; }
.more p { color: var(--ink-2); margin-top: 4px; max-width: 34rem; }
@media (min-width: 900px) {
  .frame-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .frames-more { grid-template-columns: 1fr 1fr; column-gap: 48px; border-top: 0; }
  .more { border-top: 1px solid var(--line); border-bottom: 0; }
}

/* ---------- contact lenses ---------- */
.lenses {
  background: var(--ink); color: var(--paper);
  padding: clamp(56px, 10vw, 128px) var(--gutter);
}
.lenses > * { max-width: var(--max); margin-inline: auto; }
.lenses .kicker { color: #ff7fb0; }
.lens-points { list-style: none; display: grid; gap: 0; margin-top: clamp(28px, 4vw, 48px); }
.lens-points li { display: grid; grid-template-columns: 3rem 1fr; gap: 12px; align-items: baseline; padding: 20px 0; border-top: 1px solid rgb(251 251 249 / 0.16); }
.num { font-weight: 300; font-size: 2rem; line-height: 1; color: #ff7fb0; }
.lens-points p { font-size: 1.1875rem; color: rgb(251 251 249 / 0.88); }
.lenses-actions { margin-top: 28px; }
.lenses .kit-note { color: var(--ink); }
@media (min-width: 900px) {
  .lens-points { grid-template-columns: repeat(3, 1fr); column-gap: 40px; }
  .lens-points li { grid-template-columns: 1fr; }
}

/* ---------- contact ---------- */
.contact { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 10vw, 128px) var(--gutter); }
.contact-grid { display: grid; gap: 24px; margin-top: 28px; }
.contact-main { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-label { color: var(--ink-3); font-size: 1rem; margin-bottom: 10px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: auto auto auto; justify-content: start; column-gap: 48px; align-items: end; } }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 40px var(--gutter) 48px;
  display: grid; gap: 10px; max-width: var(--max); margin: 0 auto; color: var(--ink-2);
}
.footer-mark { width: 40px; height: 20px; color: var(--ink); }
.footer-small { color: var(--ink-3); font-size: 1rem; }
.footer-top { display: inline-flex; align-items: center; min-height: 44px; justify-self: start; }

/* ---------- motion, only when the visitor has not asked for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .chip span, .menu-toggle, .lang-toggle { transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
  .btn:active, .chip:active span, .menu-toggle:active, .lang-toggle:active { transform: scale(0.97); }
  .kit-note:not([hidden]) { animation: note-in 220ms var(--ease-out); }
  .nav-list.open { animation: menu-in 200ms var(--ease-out); }
  .bubble.updated { animation: bubble-in 260ms var(--ease-out); }
  @keyframes note-in { from { opacity: 0; transform: translateY(-6px); } }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
  @keyframes bubble-in { from { opacity: 0.4; transform: translateY(4px) scale(0.99); } }
}
@media (hover: hover) and (pointer: fine) {
  .btn-mark:hover, .btn-line:hover { background: var(--paper-2); }
  .btn-wa:hover { background: #0f7337; }
}
