/* SV-001 «Мастерская-витрина». Светлая витрина + детали пульта: янтарное табло, шильдики-паспорта, кнопки с лампочкой.
   Правила проекта: текст от 17 px, кнопки и ссылки от 48 px, letter-spacing не задаётся, отступы логические. */
:root{
  --bg:#eef0ec; --card:#fff; --line:#c6ccc5; --txt:#1b2421; --txt2:#46514c;
  --glass:#0c1512; --amber:#ffc46a; --amber2:#d9b47a;
  --plate:#e7eae4; --plate2:#d4d9d1; --plate-edge:#99a299;
  --key:#1f2b27; --key2:#0f1715; --lamp-off:#7d877f; --lamp-on:#ffb347; --lamp-ok:#46c46e;
  --todo:#fff1d1; --todo-edge:#b98a2e;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Hebrew", "Arial Hebrew", Arial, sans-serif;
}
*{ box-sizing:border-box; }
[hidden]{ display:none !important; }
html{ -webkit-text-size-adjust:100%; }
body{ margin:0; background:var(--bg); color:var(--txt); font:1.125rem/1.55 var(--font); overflow-x:hidden; }
img{ max-width:100%; }
a{ color:inherit; }
h1,h2,h3{ line-height:1.2; margin:0; }
p{ margin:0; }
:focus-visible{ outline:3px solid var(--txt); outline-offset:3px; }

.wrap{ max-width:1200px; margin-inline:auto; padding-inline:16px; }
@media (min-width:700px){ .wrap{ padding-inline:24px; } }

/* --- переворот листа при смене языка (≤ 0,4 с; при «уменьшить движение» выключен) --- */
.page{ transform-origin:50% 50%; }
.page.flip-out{ animation:leaf .3s ease-in forwards; transform-origin:0% 50%; }
[dir="rtl"] .page.flip-out{ transform-origin:100% 50%; animation-name:leaf-rtl; }
@keyframes leaf{ to{ transform:perspective(1400px) rotateY(-75deg); opacity:0; } }
@keyframes leaf-rtl{ to{ transform:perspective(1400px) rotateY(75deg); opacity:0; } }
@media (prefers-reduced-motion: reduce){ .page.flip-out{ animation:none; } }

/* --- шапка --- */
.top{ background:linear-gradient(#f8f9f6, #e9ece6); border-bottom:1px solid var(--line); box-shadow:inset 0 1px 0 #fff; }
.top-in{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding-block:8px; }
.brand{ display:inline-flex; align-items:center; min-height:48px; font-size:1.3125rem; font-weight:800; text-decoration:none; }
.brand .sep{ color:var(--txt2); padding-inline:.35em; }
.lang{ margin-inline-start:auto; display:flex; gap:2px; padding:3px; border-radius:999px; background:var(--plate2); border:1px solid var(--plate-edge); box-shadow:inset 0 2px 4px rgba(0,0,0,.25); }
.lang a, .lang span{ display:inline-flex; align-items:center; justify-content:center; min-height:48px; min-width:48px; padding:0 14px; border-radius:999px; font-weight:700; font-size:1.0625rem; text-decoration:none; }
.lang span{ background:linear-gradient(#fbfcf9, #e1e5de); box-shadow:0 2px 0 var(--plate-edge), 0 3px 6px rgba(0,0,0,.2), inset 0 1px 0 #fff; font-weight:800; }
.lang a:hover{ background:rgba(255,255,255,.5); }
.menu{ order:3; width:100%; display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.menu a{ display:flex; align-items:center; min-height:48px; padding:6px 12px; border-radius:10px; font-weight:700; font-size:1.0625rem; line-height:1.25; text-decoration:none; }
.menu a{ background:rgba(255,255,255,.55); box-shadow:inset 0 0 0 1px var(--line); }
.menu a:hover{ background:#dfe3dc; }
.menu a[aria-current="page"]{ background:var(--card); box-shadow:inset 0 0 0 1px var(--line); text-decoration:underline; text-underline-offset:5px; }
@media (max-width:599.98px){   /* SV-012: телефон — шапка ≤ 180 px: имя и язык в строку, меню — две строки по ширине пунктов */
  .top-in{ gap:4px; padding-block:4px; }
  .brand{ font-size:1.0625rem; }
  .brand .sep{ padding-inline:.2em; }
  .lang a, .lang span{ padding:0 6px; }
  .menu{ display:flex; flex-wrap:wrap; }
  .menu a{ flex:1 1 auto; justify-content:center; padding:6px 10px; }
}
@media (min-width:1000px){
  .menu{ order:0; width:auto; display:flex; margin-inline-start:24px; }
  .menu a{ background:none; box-shadow:none; }
}

main{ padding-block:24px 56px; }
.section{ margin-top:48px; }
.section-head{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px 16px; margin-bottom:16px; }
h2.h{ font-size:1.625rem; }
.lead{ font-size:1.25rem; color:var(--txt2); max-width:40em; }
.note{ font-size:1.0625rem; color:var(--txt2); }

/* --- физические кнопки с лампочкой --- */
.acts{ display:flex; flex-wrap:wrap; gap:12px; }
.pb{ display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:52px; padding:8px 20px; border-radius:12px; font:800 1.125rem/1.2 var(--font); text-decoration:none; text-align:center;
  border:1px solid var(--plate-edge); background:linear-gradient(#fbfcf9, #d9ded6); color:var(--txt);
  box-shadow:0 4px 0 #8f998f, 0 6px 12px rgba(0,0,0,.18), inset 0 1px 0 #fff; }
.pb .lamp{ width:12px; height:12px; flex:none; border-radius:50%; background:var(--lamp-off); box-shadow:inset 0 1px 2px rgba(0,0,0,.5); }
.pb.main{ background:linear-gradient(#34433e, var(--key)); color:#fff; border-color:var(--key2); box-shadow:0 4px 0 var(--key2), 0 6px 12px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.18); }
.pb.main .lamp{ background:var(--lamp-on); box-shadow:0 0 8px 2px rgba(255,179,71,.7), inset 0 -1px 2px rgba(0,0,0,.3); }
.pb:hover{ filter:brightness(1.04); }
.pb:active{ transform:translateY(3px); box-shadow:0 1px 0 #8f998f, 0 2px 4px rgba(0,0,0,.2), inset 0 1px 0 #fff; }
@media (prefers-reduced-motion: reduce){ .pb:active{ transform:none; } }

/* --- первый экран --- */
.hero{ display:grid; gap:24px; align-items:center; padding-block:8px 8px; }
.hero h1{ font-size:clamp(2.75rem, 5.6vw, 4rem); line-height:1.1; font-weight:800; max-width:18em; }   /* SV-005: имя — крупнее всего на первом экране */
.hero .claim{ margin-top:12px; font-size:clamp(1.375rem, 2.6vw, 1.875rem); line-height:1.3; font-weight:700; max-width:24em; }   /* SV-005 */
.rank{ font-size:1.1875rem; font-weight:700; color:var(--txt2); }
.hero .rank{ margin-top:8px; }
.hero .line{ margin-block:12px 24px; font-size:1.25rem; color:var(--txt2); max-width:34em; }
@media (min-width:900px){ .hero{ grid-template-columns:minmax(0, 1.5fr) minmax(300px, 1fr); gap:40px; } }

/* --- янтарное табло --- */
.board{ background:var(--glass); color:var(--amber); border-radius:14px; border:6px solid #c3cac1; padding:18px 20px;
  box-shadow:inset 0 0 0 2px #000, inset 0 10px 26px rgba(0,0,0,.65), 0 1px 0 #fff, 0 8px 18px rgba(0,0,0,.12);
  text-shadow:0 0 8px rgba(255,196,106,.35); position:relative; }
.board::after{ content:""; position:absolute; inset:0; pointer-events:none; border-radius:8px;
  background:repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.07), transparent 60%); }
.board h2{ font-size:1.125rem; color:var(--amber2); font-weight:700; margin-bottom:8px; }
.board dl{ margin:0; }
.board .row{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding-block:8px; border-bottom:1px dashed rgba(255,196,106,.25); }
.board .row:last-child{ border-bottom:0; }
.board dt{ font-size:1.125rem; }
.board dd{ margin:0; font-weight:800; font-size:1.125rem; text-align:end; }
.board .big{ font-size:2.5rem; line-height:1; font-variant-numeric:tabular-nums; }

/* --- шильдик (паспорт, бирки) --- */
.plate{ background:linear-gradient(var(--plate), var(--plate2)); border:1px solid var(--plate-edge); border-radius:10px;
  box-shadow:inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.1); padding:6px 16px; }
.plate h2{ font-size:1.25rem; padding-block:10px 4px; }
.plate dl{ margin:0; }
.plate .row{ display:grid; grid-template-columns:1fr; gap:2px; padding-block:10px; border-top:1px solid rgba(0,0,0,.12); }
.plate .row:first-child{ border-top:0; }
.plate dt{ font-weight:700; color:var(--txt2); font-size:1.0625rem; }
.plate dd{ margin:0; font-weight:600; }
@media (min-width:600px){ .plate .row{ grid-template-columns:minmax(10em, 1fr) 2fr; gap:16px; } }
.todo{ display:inline-block; padding:0 10px; border:1px dashed var(--todo-edge); border-radius:8px; background:var(--todo); font-weight:700; }
.tags{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.tags li{ font-size:1.0625rem; padding:2px 10px; border-radius:8px; border:1px solid var(--plate-edge); background:linear-gradient(var(--plate), var(--plate2)); }
.tags li.ok{ font-weight:800; }
.tags li.ok::before{ content:""; display:inline-block; width:10px; height:10px; border-radius:50%; background:var(--lamp-ok); margin-inline-end:8px; box-shadow:0 0 6px rgba(70,196,110,.7); }

/* --- избранная работа: крупная карточка --- */
.feature{ display:grid; background:var(--card); border:1px solid var(--line); border-radius:18px; overflow:hidden; box-shadow:0 10px 26px rgba(0,0,0,.08); }
.feature .pic{ background:linear-gradient(#dfe4dd, #cfd5cd); display:flex; justify-content:center; padding:24px 24px 0; height:380px; overflow:hidden; }
.feature .pic img{ width:280px; height:auto; align-self:flex-start; border-radius:16px 16px 0 0; border:3px solid #b7bfb5; border-bottom:0; background:#fff; }
.feature .body{ padding:24px; display:flex; flex-direction:column; gap:16px; }
.feature h3{ font-size:clamp(1.5rem, 3vw, 2rem); }
@media (min-width:900px){
  .feature{ grid-template-columns:minmax(0, 1fr) minmax(0, 1.3fr); }
  .feature .pic{ height:auto; min-height:440px; max-height:520px; }
  .feature .body{ padding:32px; justify-content:center; }
}

/* --- полки и каталог --- */
.shelves{ display:grid; gap:16px; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); }
.shelf{ display:flex; flex-direction:column; gap:4px; min-height:48px; padding:18px 20px; border-radius:14px; background:var(--card); border:1px solid var(--line); text-decoration:none; }
.shelf b{ font-size:1.25rem; }
.shelf span{ color:var(--txt2); }
.shelf:hover{ border-color:var(--txt2); }
.services{ margin-top:24px; display:inline-flex; align-items:center; gap:10px; padding:10px 16px; border-radius:10px; border:1px dashed var(--plate-edge); font-weight:700; }
.services .lamp{ width:12px; height:12px; border-radius:50%; background:var(--lamp-on); box-shadow:0 0 6px rgba(255,179,71,.6); }

.filter{ display:flex; flex-wrap:wrap; gap:8px; margin-block:8px 8px; }
.chip{ display:inline-flex; align-items:center; min-height:48px; padding:0 16px; border-radius:999px; border:1px solid var(--plate-edge); background:linear-gradient(#fbfcf9, #e1e5de); font-weight:700; font-size:1.0625rem; text-decoration:none; }
.chip[aria-pressed="true"]{ background:var(--key); color:#fff; border-color:var(--key2); }
.shelf-sec{ margin-top:40px; scroll-margin-top:16px; }
.shelf-sec h2{ font-size:1.5rem; }
.shelf-sec .desc{ color:var(--txt2); margin-block:4px 16px; }

.grid{ display:grid; gap:20px; grid-template-columns:repeat(auto-fill, minmax(min(100%, 300px), 1fr)); grid-auto-rows:1fr; }
.catalog-grid{ margin-top:24px; grid-template-columns:minmax(0, 1fr); }
@media (min-width:900px){ .catalog-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
.card{ display:flex; flex-direction:column; min-width:0; background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; }
.card .pic{ height:200px; flex:none; display:flex; justify-content:center; background:linear-gradient(#dfe4dd, #cfd5cd); padding:16px 16px 0; overflow:hidden; }
.card .pic img{ width:170px; height:auto; align-self:flex-start; border-radius:12px 12px 0 0; border:2px solid #b7bfb5; border-bottom:0; background:#fff; }
.card .pic.mock{ align-items:center; padding:16px; background:var(--glass); color:var(--amber); }
.card .pic.mock span{ font-size:2.25rem; font-weight:800; font-variant-numeric:tabular-nums; text-shadow:0 0 8px rgba(255,196,106,.35); }
.card .body{ flex:1; display:flex; flex-direction:column; gap:10px; padding:18px 20px 20px; }
.card h3{ font-size:1.25rem; overflow-wrap:anywhere; }
.card .short{ color:var(--txt2); overflow-wrap:anywhere; }
.card .tags{ margin-top:auto; }
.card .acts .pb{ min-height:48px; padding-inline:16px; }
.mark{ align-self:flex-start; font-weight:800; font-size:1.0625rem; padding:2px 10px; border-radius:8px; background:var(--todo); border:1px dashed var(--todo-edge); }

.banner{ margin-block:8px 24px; padding:20px 24px; border-radius:14px; background:var(--todo); border:3px dashed var(--todo-edge); font-size:clamp(1.375rem, 3vw, 1.875rem); font-weight:800; line-height:1.25; }

/* --- страница работы --- */
.work{ display:grid; gap:24px; grid-template-areas:"head" "open" "shot" "pass" "inside"; }   /* SV-011: на телефоне «Открыть» — до снимка */
.work .head{ grid-area:head; display:flex; flex-direction:column; gap:12px; }
.work h1{ font-size:clamp(1.875rem, 4vw, 2.75rem); }
.work .by{ font-weight:700; color:var(--txt2); }
.work .benefit{ font-size:1.25rem; max-width:36em; }
.work .shot{ grid-area:shot; margin:0; text-align:center; }
.work .shot img{ display:block; width:100%; max-width:360px; height:auto; margin-inline:auto; border-radius:18px; border:4px solid #b7bfb5; background:#fff; box-shadow:0 10px 24px rgba(0,0,0,.12); }
.work .shot figcaption{ margin-top:8px; color:var(--txt2); }
.work .open{ grid-area:open; display:flex; flex-direction:column; gap:10px; align-items:flex-start; }
.work .pass{ grid-area:pass; }
.work .inside{ grid-area:inside; }
.work .inside h2{ font-size:1.5rem; margin-bottom:8px; }
.work .inside ul{ margin:0; padding-inline-start:1.2em; }
.work .inside li + li{ margin-top:8px; }
@media (min-width:900px){
  .work{ grid-template-columns:minmax(0, 380px) minmax(0, 1fr); column-gap:48px; grid-template-areas:"shot head" "shot open" "shot pass" "shot inside"; align-items:start; }
  .work .shot{ position:sticky; top:16px; }
}

/* --- простые страницы --- */
.text{ max-width:44em; display:flex; flex-direction:column; gap:16px; }
.text h1{ font-size:clamp(1.875rem, 4vw, 2.5rem); }
.text h2{ font-size:1.5rem; margin-top:16px; }
.text p{ font-size:1.1875rem; }
.stub{ padding:16px 20px; border:2px dashed var(--todo-edge); border-radius:12px; background:var(--todo); display:flex; flex-direction:column; gap:6px; }
.stub b{ font-size:1.125rem; }
.contacts{ display:flex; flex-wrap:wrap; gap:12px; }
.contacts .pb{ gap:12px; }
.contacts .pb{ flex-wrap:wrap; max-width:100%; }   /* SV-003: не помещается — подпись и номер в две строки */
bdi.num{ font-variant-numeric:tabular-nums; white-space:nowrap; }   /* номер не разрывается */
.text .points{ margin:0; padding-inline-start:1.2em; }
.text .points li + li{ margin-top:8px; }
.text .cv{ padding:4px 20px 16px; }
.text .cv h2{ margin-top:0; }
.text .cv p{ margin:0; }
.board .svc{ display:flex; align-items:center; gap:10px; padding-top:10px; margin-top:4px; border-top:1px dashed rgba(255,196,106,.25); font-weight:700; }
.board .svc .lamp{ width:12px; height:12px; flex:none; border-radius:50%; background:var(--lamp-on); box-shadow:0 0 8px 2px rgba(255,179,71,.6); }

/* --- SV-006: работа-рассказ (Пульт) — шаги, правило, широкие снимки во всю колонку --- */
.feat-more{ margin-top:20px; }
.card .pic.wide{ align-items:center; padding:16px; }
.card .pic.wide img{ width:100%; height:auto; border-radius:8px; border:2px solid #b7bfb5; background:#fff; }
.story{ display:flex; flex-direction:column; gap:24px; max-width:60rem; }
.story .head{ display:flex; flex-direction:column; gap:12px; }
.story h1{ font-size:clamp(1.875rem, 4vw, 2.75rem); }
.story .benefit{ font-size:1.25rem; max-width:36em; }
.story h2{ font-size:1.5rem; margin-bottom:8px; }
.story section p{ font-size:1.1875rem; max-width:40em; }
.story .steps{ margin:0; padding-inline-start:1.6em; font-size:1.1875rem; }
.story .steps li + li{ margin-top:8px; }
.story .rule{ font-size:1.25rem; font-weight:800; padding:14px 18px; border-inline-start:6px solid var(--amber2); border-radius:10px; background:var(--card); box-shadow:inset 0 0 0 1px var(--line); }
.story .wide-shot{ margin:0; }
.story .wide-shot a{ display:block; }
.story .wide-shot img{ display:block; width:100%; height:auto; border:2px solid #b7bfb5; border-radius:12px; background:#fff; }
.story .wide-shot figcaption{ margin-top:8px; color:var(--txt2); }
.story .wide-shot .zoom-hint{ margin-top:4px; font-size:1.0625rem; color:var(--txt2); }   /* SV-012 */
.story .pass h2{ margin-bottom:0; }

/* --- SV-007: работа с подробным описанием (клиника) — списки с выделенным началом, галерея снимков телефона --- */
.case .steps b{ font-weight:800; }
.case section p + p, .case .steps + p{ margin-top:12px; }
.case .gallery{ display:grid; grid-template-columns:minmax(0, 1fr); gap:24px; }
@media (min-width:700px){ .case .gallery{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (min-width:1000px){ .case .gallery{ grid-template-columns:repeat(3, minmax(0, 1fr)); } }
.case .phone-shot{ margin:0; }
.case .result{ font-size:1.25rem; font-weight:800; }
.case [data-open]{ flex-direction:column; align-items:flex-start; }   /* SV-011: примечание — под кнопкой */
.case .phone-shot a{ display:block; }
.case .phone-shot img{ display:block; width:100%; height:auto; border:2px solid #b7bfb5; border-radius:14px; background:#fff; }
.case .phone-shot figcaption{ margin-top:8px; color:var(--txt2); }

/* --- SV-009: широкий снимок (окно симуляции) в галерее — во всю строку --- */
.case .phone-shot.wide{ grid-column:1 / -1; }
/* SV-017: карточки работ на главной и в каталоге — выпуклые плитки, как клавиши пульта; вся карточка — ссылка на описание
   (.tile-link в заголовке растянута на карточку). Только карточки с классом tile: учебный образец works/demo/ — как прежде. */
.tile{ position:relative; border-color:var(--plate-edge); box-shadow:0 5px 0 var(--plate-edge), 0 10px 22px rgba(0,0,0,.18); transition:transform .18s ease, box-shadow .18s ease; }
.tile .tile-link{ display:flex; align-items:center; min-height:48px; color:inherit; text-decoration:none; }   /* нажимаемое — не меньше 48 px */
.tile .tile-link::after{ content:""; position:absolute; top:0; right:0; bottom:0; left:0; z-index:1; border-radius:16px; box-shadow:inset 0 2px 0 rgba(255,255,255,.9); }
.feature.tile .tile-link::after{ border-radius:18px; }
.tile .tile-link:focus{ outline:none; }   /* рамка — вокруг всей карточки */
.tile:focus-within{ outline:3px solid var(--txt); outline-offset:4px; }
@media (hover:hover){
  .tile:hover{ transform:translateY(-4px); box-shadow:0 9px 0 var(--plate-edge), 0 18px 32px rgba(0,0,0,.22); }
  .tile:hover .tile-link{ text-decoration:underline; text-underline-offset:5px; }
}
.tile:active{ transform:translateY(4px); box-shadow:0 1px 0 var(--plate-edge), 0 2px 4px rgba(0,0,0,.12); transition-duration:.06s; }
@media (prefers-reduced-motion: reduce){ .tile{ transition:none; } .tile:hover, .tile:active{ transform:none; } }
