/* OPTIK61 A1 — фундамент: шрифты, токены, общие компоненты (кнопки, иконки, шкала).
   Подключается после стилей темы Technics. Глобально меняем только шрифт; всё остальное — классы o61-,
   чтобы недоделанные страницы темы оставались прежними. Токены — из макета D:\work\optik61-design\home\styles.css. */

@font-face { font-family: "Manrope"; src: url(../../fonts/optik61/manrope-cyr.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; src: url(../../fonts/optik61/manrope-lat.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; src: url(../../fonts/optik61/golos-cyr.woff2) format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url(../../fonts/optik61/golos-lat.woff2) format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* примитивы */
  --navy-950: #061229;
  --navy-900: #0A1B3D;
  --navy-850: #0E2450;
  --navy-800: #13306A;
  --navy-700: #1C3F86;
  --blue-600: #1D57DB;   /* кнопки: 5,6:1 к белому */
  --blue-500: #2C68F0;
  --blue-100: #E6EEFE;
  --blue-50:  #F2F6FF;
  --gold-300: #F9DC8A;
  --gold-400: #F2C14E;
  --gold-500: #E2A52C;
  --gold-600: #B9821A;
  --ink-900: #0C1730;
  --ink-700: #3B4763;   /* 9,4:1 */
  --ink-500: #5F6B85;   /* 5,3:1 */
  --ink-400: #8A94AB;   /* только декор и неактивное */
  --line: #E3E8F1;
  --line-2: #D3DAE7;
  --bg: #FFFFFF;
  --bg-soft: #F5F7FB;
  --bg-tint: #EEF2F9;
  --ok-600: #138A4A;    /* 4,7:1 */
  --ok-100: #E2F5EA;
  --no-500: #C9CFDB;
  --err-600: #C93A3A;
  --err-100: #FCE9E9;

  /* семантика */
  --c-accent: var(--gold-400);
  --c-action: var(--blue-600);
  --g-gold: linear-gradient(180deg, #FADF8F 0%, #F2C14E 48%, #E3A62F 100%);
  --g-navy: radial-gradient(120% 140% at 78% 40%, #1B3B80 0%, #0E2450 38%, #081834 72%, #061229 100%);

  /* шкала текста 1,25 */
  --t-12: 12px; --t-14: 14px; --t-16: 16px; --t-20: 20px; --t-25: 25px; --t-31: 31px; --t-39: 39px; --t-49: 49px;
  /* отступы */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px; --s-24: 24px; --s-32: 32px; --s-48: 48px; --s-64: 64px; --s-96: 96px;
  --r-8: 8px; --r-12: 12px; --r-16: 16px; --r-20: 20px; --r-28: 28px;

  --sh-1: 0 1px 2px rgba(10, 27, 61, .06), 0 1px 1px rgba(10, 27, 61, .04);
  --sh-2: 0 6px 18px -6px rgba(10, 27, 61, .14), 0 2px 4px rgba(10, 27, 61, .05);
  --sh-3: 0 24px 48px -18px rgba(6, 18, 41, .32), 0 6px 14px -6px rgba(6, 18, 41, .14);
  --sh-gold: 0 10px 22px -12px rgba(6, 18, 41, .55), inset 0 1px 0 rgba(255, 255, 255, .55);

  --ease: cubic-bezier(.4, 0, .2, 1);
  --wrap: 1320px;
  --f-head: "Manrope", "Golos Text", system-ui, sans-serif;
  --f-ui: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Новые шрифты на всём сайте, включая старые блоки темы (тема задаёт Fira Sans инлайном в <head>) */
body.o61-shell,
.o61-shell button, .o61-shell input, .o61-shell optgroup, .o61-shell select, .o61-shell textarea,
.o61-shell .fancybox-container { font-family: var(--f-ui); }
.o61-shell h1, .o61-shell h2, .o61-shell h3, .o61-shell .h1, .o61-shell .h2, .o61-shell .h3 { font-family: var(--f-head); }
body.o61-shell { -webkit-font-smoothing: antialiased; }

/* iPhone: быстрое двойное касание по кнопке или шагу «+» не увеличивает страницу (Вадим, 11.11).
   Щипок двумя пальцами работает как раньше — масштаб в viewport не запрещаем. На самом html свойство
   действует на весь документ, а на интерактивных элементах и внутри прокручиваемых блоков (панели, лотки, модальные окна)
   его повторяем: внутри scroll-контейнера значение предка уже не наследуется. Нулевая специфичность — не перебивает pan-y у слайдеров. */
html { touch-action: manipulation; }
:where(body.o61-shell) :where(a, button, input, select, textarea, label, summary, [role="button"], [tabindex], .o61-stepper, .o61-btn) { touch-action: manipulation; }

/* ---------- общие компоненты o61 ---------- */
[class^="o61-"], [class*=" o61-"], [class^="o61-"]::before, [class^="o61-"]::after { box-sizing: border-box; }
.o61-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.o61-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
.o61-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.o61-num { font-variant-numeric: tabular-nums; }
.o61-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[class*="o61-"][hidden] { display: none !important; }
.o61-shell [class*="o61-"]:focus-visible { outline: 2px solid var(--blue-500) !important; outline-offset: 2px; } /* the theme kills button outlines with !important */

/* кнопки */
.o61-btn { --h: 48px; -webkit-appearance: none; appearance: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: var(--h); padding: 0 22px; border: 0; border-radius: 12px; font: 600 var(--t-16)/1 var(--f-ui); white-space: nowrap; text-decoration: none; cursor: pointer; transition: transform .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease); }
/* тема: html [type="button"] { -webkit-appearance: button } (0,1,1) — перебиваем (0,1,2), иначе Safari рисует системную кнопку */
html button.o61-btn, html input.o61-btn, html a.o61-btn { -webkit-appearance: none; appearance: none; }
.o61-btn:hover, .o61-btn:focus { text-decoration: none; }
.o61-btn:active { transform: translateY(1px) scale(.99); }
.o61-btn[disabled], .o61-btn.is-disabled { opacity: .45; pointer-events: none; }
.o61-btn .o61-ico { width: 18px; height: 18px; }
.o61-btn--gold { background: var(--g-gold); color: var(--navy-950); box-shadow: var(--sh-gold); overflow: hidden; font-weight: 700; }
.o61-btn--gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 62%); transform: translateX(-120%); transition: transform .6s var(--ease); pointer-events: none; }
.o61-btn--blue { background: var(--blue-600); color: #fff; box-shadow: 0 6px 14px -8px rgba(29,87,219,.8); }
.o61-btn--line { color: var(--navy-900); border: 1px solid var(--line-2); background: #fff; }
/* QA 12.11 (WebKit/iPhone). Safari на таче держит :hover на последнем тапе, а :focus — на нажатой кнопке, поэтому:
   1) у :hover/:focus/:active цвет и рамка — те же, что в покое (иначе общее a:hover{color:#7097EC} темы красит
      кнопки-ссылки в бледно-синий);
   2) эффекты наведения (синий, тень, блик) — только где есть мышь, (hover:hover) and (pointer:fine);
   3) с клавиатуры — :focus-visible, как наведение; на таче отклик даёт только :active (сдвиг .o61-btn:active). */
.o61-btn--gold:hover, .o61-btn--gold:focus, .o61-btn--gold:active { color: var(--navy-950); }
.o61-btn--blue:hover, .o61-btn--blue:focus, .o61-btn--blue:active { color: #fff; }
.o61-btn--line:hover, .o61-btn--line:focus, .o61-btn--line:active { color: var(--navy-900); border-color: var(--line-2); }
.o61-btn--gold:focus-visible { box-shadow: 0 14px 26px -12px rgba(6,18,41,.6), inset 0 1px 0 rgba(255,255,255,.6); }
.o61-btn--blue:focus-visible { background: var(--blue-500); color: #fff; }
.o61-btn--line:focus-visible { border-color: var(--blue-600); color: var(--blue-600); }
@media (hover: hover) and (pointer: fine) {
  .o61-btn--gold:hover { box-shadow: 0 14px 26px -12px rgba(6,18,41,.6), inset 0 1px 0 rgba(255,255,255,.6); }
  .o61-btn--gold:hover::after { transform: translateX(120%); }
  .o61-btn--blue:hover { background: var(--blue-500); color: #fff; }
  .o61-btn--line:hover { border-color: var(--blue-600); color: var(--blue-600); }
}
.o61-btn--sm { --h: 40px; padding: 0 16px; font-size: var(--t-14); border-radius: 10px; }
.o61-btn--lg { --h: 54px; padding: 0 26px; }
.o61-btn.is-loading { pointer-events: none; color: transparent !important; }
.o61-btn.is-loading::before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid; border-color: var(--navy-950) transparent var(--navy-950) transparent; animation: o61-spin .7s linear infinite; }
.o61-btn--blue.is-loading::before { border-color: #fff transparent #fff transparent; }
@keyframes o61-spin { to { transform: rotate(360deg); } }

/* опознавательный элемент: диоптрийная шкала (прогресс до минимального заказа) */
.o61-scale { position: relative; display: block; height: 8px; margin-top: 6px; }
.o61-scale__track { position: absolute; inset: 3px 0 auto; height: 2px; border-radius: 2px; background: rgba(255,255,255,.18); }
.o61-scale__fill { position: absolute; left: 0; top: 3px; height: 2px; border-radius: 2px; background: var(--gold-400); width: 0; transition: width .5s var(--ease); }
.o61-scale__ticks { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 1px, transparent 1px 10%); -webkit-mask: linear-gradient(#000 0 0) top / 100% 2px no-repeat, linear-gradient(#000 0 0) bottom / 100% 2px no-repeat; mask: linear-gradient(#000 0 0) top / 100% 2px no-repeat, linear-gradient(#000 0 0) bottom / 100% 2px no-repeat; }
.o61-scale__mark { position: absolute; top: -1px; width: 2px; height: 10px; background: var(--gold-400); border-radius: 1px; left: 0; transition: left .5s var(--ease); }
.is-ready .o61-scale__fill, .is-ready .o61-scale__mark { background: #3DD68C; }
.o61-scale--light .o61-scale__track { background: var(--line); }
.o61-scale--light .o61-scale__ticks { background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10%); }
.o61-scale--light .o61-scale__fill, .o61-scale--light .o61-scale__mark { background: var(--blue-600); }
.is-ready .o61-scale--light .o61-scale__fill, .is-ready .o61-scale--light .o61-scale__mark { background: var(--ok-600); }
