/* =========================================================
   OptiStyle — стилі вітрини
   Mobile First: базові стилі для телефону, далі @media (min-width)
   Кольори й розміри — у змінних :root, міняйте тут.
   ========================================================= */

:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-2: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e3e3e8;
  --accent: #0071e3;
  --accent-hover: #0062c4;
  --accent-soft: #e8f1fd;
  --success: #1f8a3b;
  --success-soft: #e7f5ea;
  --danger: #d70015;
  --warning-soft: #fff6db;

  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .04), 0 18px 40px rgba(0, 0, 0, .10);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .22);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --header-h: 60px;
  --gutter: 16px;
  --container: 1200px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 200; background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 0; border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 16px; line-height: 1; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease), color .2s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; background: color-mix(in srgb, var(--btn-bg) 92%, #000); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary { --btn-bg: var(--accent); --btn-fg: #fff; }
.btn--primary:hover { background: var(--accent-hover); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn--dark { --btn-bg: var(--text); --btn-fg: #fff; }
.btn--dark:hover { background: #000; }
.btn--ghost { --btn-bg: transparent; color: var(--accent); padding-inline: 12px; }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--outline { --btn-bg: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--outline:hover { background: var(--surface); }
.btn--sm { min-height: 40px; padding: 10px 16px; font-size: 15px; }
.btn--block { width: 100%; }
.btn.is-added { --btn-bg: var(--success); background: var(--success); }
.btn .btn__icon { width: 18px; height: 18px; flex: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text);
  transition: background-color .2s, transform .15s var(--ease);
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin-right: auto; }
.logo:hover { text-decoration: none; }
.logo b { font-weight: 700; }
.logo__mark { width: 34px; height: 18px; color: var(--accent); }
.header__actions { display: flex; align-items: center; gap: 2px; }

.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill); background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  transform: scale(0); transition: transform .3s var(--ease-spring);
}
.cart-count.has-items { transform: scale(1); }
.cart-count.is-bump { animation: bump .45s var(--ease-spring); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
.cart-btn.is-shake svg { animation: shake .5s var(--ease); }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-5deg); } }

/* Mobile nav */
.nav {
  position: fixed; inset: var(--header-h) 0 auto 0;
  display: flex; flex-direction: column;
  padding: 8px var(--gutter) 20px;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .06);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
}
.nav.is-open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.nav a { padding: 14px 4px; color: var(--text); font-size: 18px; font-weight: 500; border-bottom: 1px solid var(--line); }
.nav a:last-child { border-bottom: 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

.burger span, .burger span::before, .burger span::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; position: relative;
  transition: transform .3s var(--ease), background-color .2s;
}
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--surface); }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 6vw, 44px); }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.eyebrow { display: inline-block; margin-bottom: 12px; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .02em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 56px; background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%); }
.hero__grid { display: grid; gap: 28px; align-items: center; }
.hero__title { font-size: clamp(38px, 10vw, 72px); font-weight: 700; letter-spacing: -.035em; margin-bottom: 16px; }
.hero__title span { background: linear-gradient(90deg, #0071e3, #6e3cf5 60%, #c13cf5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__text { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 540px; margin-bottom: 26px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.hero__trust li { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-pill); background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; }
.hero__trust svg { width: 16px; height: 16px; color: var(--success); }

.hero__art { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.hero__art::before {
  content: ""; position: absolute; inset: 8% 6%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 113, 227, .20), rgba(110, 60, 245, .08) 60%, transparent 100%);
  filter: blur(8px); animation: glow 6s ease-in-out infinite;
}
.hero__art .glasses { position: relative; width: 92%; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .18)); animation: float 6s ease-in-out infinite; }
.hero__rays { position: absolute; inset: 0; pointer-events: none; }
.hero__rays span {
  position: absolute; left: -10%; height: 2px; width: 55%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 113, 227, .7));
  animation: ray 3.2s linear infinite; opacity: 0;
}
.hero__rays span:nth-child(1) { top: 38%; }
.hero__rays span:nth-child(2) { top: 50%; animation-delay: 1.1s; }
.hero__rays span:nth-child(3) { top: 62%; animation-delay: 2.1s; }
.hero__chip {
  position: absolute; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow); font-size: 13px; font-weight: 600; line-height: 1.2;
}
.hero__chip small { display: block; color: var(--muted); font-weight: 500; }
.hero__chip i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-style: normal; font-size: 15px; }
.hero__chip--a { left: 0; bottom: 10%; }
.hero__chip--a i { background: var(--accent-soft); color: var(--accent); }
.hero__chip--b { right: 0; top: 8%; }
.hero__chip--b i { background: var(--warning-soft); color: #a86b00; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes glow { 0%, 100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes ray { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 55% { opacity: 0; } 100% { transform: translateX(60%); opacity: 0; } }

/* ---------- Catalog ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  min-height: 40px; padding: 8px 18px; border: 0; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font-weight: 500; font-size: 15px;
  transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.chip:hover { background: #e9e9ee; }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__media { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--surface); overflow: hidden; }
.card__media .glasses { width: 78%; transition: transform .5s var(--ease); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media .glasses, .card:hover .card__media img { transform: scale(1.06) rotate(-2deg); }
.badge { position: absolute; top: 14px; left: 14px; padding: 5px 10px; border-radius: var(--radius-pill); background: var(--text); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.badge--sale { background: var(--danger); }
.badge--new { background: var(--accent); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.card__cat { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.card__title { font-size: 20px; margin-bottom: 8px; }
.card__desc { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; list-style: none; }
.card__tags li { padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface); font-size: 12px; font-weight: 500; color: #3a3a3c; }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.price__now { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.price__old { color: var(--muted); font-size: 15px; }
.catalog-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Benefits ---------- */
.benefits { display: grid; gap: 14px; grid-template-columns: 1fr; }
.benefit { padding: 26px 22px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.benefit__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.benefit__icon svg { width: 26px; height: 26px; }
.benefit h3 { font-size: 19px; margin-bottom: 6px; }
.benefit p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 2px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .3s var(--ease), background-color .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--accent-soft); }
.faq__answer { padding: 0 2px 20px; color: #3a3a3c; animation: faqIn .35s var(--ease); }
.faq__answer p:last-child { margin-bottom: 0; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- CTA band ---------- */
.cta-band { display: grid; gap: 18px; align-items: center; padding: 32px 24px; border-radius: 28px; background: var(--text); color: #fff; text-align: center; }
.cta-band h2 { font-size: clamp(24px, 5vw, 34px); margin-bottom: 6px; }
.cta-band p { color: #a1a1a6; margin: 0; }
.cta-band .btn--primary { justify-self: center; }

/* ---------- Footer ---------- */
.footer { padding: 52px 0 28px; background: var(--surface); color: var(--muted); font-size: 14px; }
.footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer__brand { grid-column: 1 / -1; }
.footer__brand .logo { margin-bottom: 12px; }
.footer__brand p { max-width: 340px; }
.footer h3 { margin-bottom: 12px; color: var(--text); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.footer ul { padding: 0; margin: 0; list-style: none; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer__legal { grid-column: 1 / -1; }
.footer__legal address { font-style: normal; line-height: 1.8; }
.footer__bottom { display: flex; flex-direction: column; gap: 10px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.pay-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-badges span { padding: 4px 10px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 600; color: #3a3a3c; }

/* ---------- Drawer (cart) ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .38);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s;
}
.drawer-overlay.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column;
  background: #fff; box-shadow: var(--shadow-lg);
  transform: translateX(100%); visibility: hidden;
  transition: transform .45s var(--ease), visibility 0s linear .45s;
}
.drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer__head { flex: none; display: flex; align-items: center; gap: 6px; height: 64px; padding: 0 10px 0 20px; border-bottom: 1px solid var(--line); }
.drawer__head.has-back { padding-left: 8px; }
.drawer__title { flex: 1; margin: 0; font-size: 19px; }
.drawer__title small { color: var(--muted); font-weight: 500; font-size: 15px; }
.drawer__view { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px; }
.drawer__foot { flex: none; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.summary-row--total { margin: 6px 0 14px; font-size: 18px; font-weight: 700; }
.summary-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }

.cart-list { padding: 0; margin: 0; list-style: none; }
.cart-item {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  animation: itemIn .35s var(--ease);
}
.cart-item.is-removing { animation: itemOut .3s var(--ease) forwards; }
@keyframes itemIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes itemOut { to { opacity: 0; transform: translateX(30px); } }
.cart-item__thumb { width: 76px; height: 64px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); overflow: hidden; }
.cart-item__thumb .glasses { width: 88%; }
.cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__name { margin: 0 0 2px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.cart-item__price { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.cart-item__sum { align-self: start; font-weight: 700; font-size: 15px; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border-radius: var(--radius-pill); background: var(--surface); }
.qty button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; line-height: 1; transition: background-color .2s, transform .15s; }
.qty button:hover { background: #e6e6eb; }
.qty button:active { transform: scale(.88); }
.qty output { min-width: 26px; text-align: center; font-weight: 600; font-size: 14px; }
.cart-item__remove { margin-left: 6px; padding: 4px 6px; border: 0; background: none; color: var(--muted); font-size: 13px; border-radius: 6px; }
.cart-item__remove:hover { color: var(--danger); }

.cart-empty { display: grid; justify-items: center; gap: 10px; padding: 56px 12px; text-align: center; }
.cart-empty__icon { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--surface); color: var(--muted); margin-bottom: 6px; }
.cart-empty__icon svg { width: 36px; height: 36px; }
.cart-empty h3 { margin: 0; font-size: 20px; }
.cart-empty p { margin: 0 0 8px; color: var(--muted); }

.success { display: grid; justify-items: center; gap: 8px; padding: 48px 8px; text-align: center; }
.success__check { width: 88px; height: 88px; margin-bottom: 10px; }
.success__check circle { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw .6s var(--ease) forwards; }
.success__check path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .4s .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success h3 { margin: 0; font-size: 24px; }
.success p { color: var(--muted); margin: 0 0 6px; max-width: 320px; }
.order-id { display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--surface); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; color: var(--text); margin-bottom: 12px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
.form-section-title { margin: 12px 0 2px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field label, .field__label { font-size: 14px; font-weight: 600; }
.field .req { color: var(--danger); }
.input, .textarea, .select {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  font-size: 16px; /* 16px — щоб iOS не зумив поле */
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; padding-right: 40px; }
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #a1a1a6; }
.input:hover, .textarea:hover, .select:hover { border-color: #c7c7cc; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.field.is-invalid .input, .field.is-invalid .textarea, .field.is-invalid .select { border-color: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 10%, transparent); }
.field.is-invalid { animation: fieldShake .35s var(--ease); }
@keyframes fieldShake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.field__error { margin: 0; color: var(--danger); font-size: 13px; min-height: 0; }
.field__hint { margin: 0; color: var(--muted); font-size: 13px; }

.radio-cards { display: grid; gap: 8px; }
.radio-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .2s, background-color .2s; }
.radio-card:hover { border-color: #c7c7cc; }
.radio-card input { margin: 3px 0 0; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.radio-card strong { display: block; font-size: 15px; }
.radio-card span { display: block; color: var(--muted); font-size: 13px; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #3a3a3c; cursor: pointer; }
.check input { margin: 2px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.form-alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.form-alert--error { background: #fdecee; color: #9b0010; }
.form-alert--success { background: var(--success-soft); color: #145c28; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 120;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: var(--radius-pill); background: rgba(29, 29, 31, .94); color: #fff;
  font-size: 15px; font-weight: 500; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .45s var(--ease-spring), opacity .3s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 18px; height: 18px; color: #30d158; flex: none; }

/* ---------- Inner pages: legal / contacts ---------- */
.page-hero { padding: 40px 0 28px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(30px, 7vw, 48px); margin-bottom: 8px; }
.page-hero p { color: var(--muted); margin: 0; max-width: 680px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; list-style: none; font-size: 14px; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.breadcrumbs a { color: var(--muted); }

.legal-layout { display: grid; gap: 32px; padding: 40px 0 72px; }
.toc { padding: 20px; border-radius: var(--radius); background: var(--surface); font-size: 14px; }
.toc h2 { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text); }
.legal { max-width: 760px; font-size: 16px; color: #2c2c2e; }
.legal h2 { margin: 40px 0 14px; font-size: 22px; color: var(--text); }
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin: 24px 0 10px; font-size: 17px; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal .meta { display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.legal .note { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--accent-soft); color: #0b3d7a; font-size: 15px; }
.legal .note--warn { background: var(--warning-soft); color: #6b4a00; }
.legal .template { padding: 18px; border-radius: var(--radius-sm); border: 1.5px dashed #c7c7cc; background: var(--surface-2); font-size: 15px; }
.legal .template p { margin-bottom: .6em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 480px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--surface); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.requisites { padding: 20px; border-radius: var(--radius); background: var(--surface); }
.requisites dl { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0; }
.requisites dt { color: var(--muted); font-size: 14px; margin-top: 8px; }
.requisites dd { margin: 0; font-weight: 500; }

.contact-cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 40px; }
.contact-card { display: flex; gap: 14px; padding: 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.contact-card__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card h2 { margin: 0 0 2px; font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.contact-card p { margin: 0; font-weight: 600; word-break: break-word; }
.contact-card a { color: var(--text); }
.contacts-grid { display: grid; gap: 28px; padding-bottom: 72px; }
.panel { padding: 24px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel h2 { font-size: 22px; }
.schedule { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.schedule td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.schedule td:last-child { text-align: right; font-weight: 600; }
.schedule tr.is-today td { color: var(--accent); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-pill.is-open { background: var(--success-soft); color: #145c28; }
.status-pill.is-open::before { background: #30d158; box-shadow: 0 0 0 4px rgba(48, 209, 88, .2); }
.map-placeholder { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 12px, #efeff3 12px, #efeff3 24px); color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Breakpoints (mobile first)
   ========================================================= */
@media (min-width: 560px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .requisites dl { grid-template-columns: 200px 1fr; }
  .requisites dt { margin-top: 0; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__legal { grid-column: auto; }
  .footer__bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 900px) {
  :root { --header-h: 64px; }
  .burger { display: none; }
  .nav {
    position: static; flex-direction: row; gap: 4px; padding: 0; margin-right: 8px;
    background: none; border: 0; box-shadow: none; transform: none; opacity: 1; visibility: visible;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .nav a { padding: 8px 12px; font-size: 14px; border: 0; border-radius: var(--radius-pill); color: #3a3a3c; transition: background-color .2s, color .2s; }
  .nav a:hover { background: var(--surface); color: var(--text); }
  .logo { margin-right: 0; }
  .header__inner { justify-content: space-between; }

  .section { padding: 96px 0; }
  .hero { padding: 72px 0 96px; }
  .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 40px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .benefits { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .cta-band { grid-template-columns: 1fr auto; text-align: left; padding: 44px 48px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.6fr; }
  .footer__brand { grid-column: auto; }

  .legal-layout { grid-template-columns: 260px 1fr; gap: 56px; padding-top: 56px; }
  .toc { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; }
  .contact-cards { grid-template-columns: repeat(4, 1fr); }
  .contacts-grid { grid-template-columns: 1fr 1.25fr; align-items: start; }
  .panel { padding: 32px; }
}

@media (hover: none) {
  .card:hover { transform: none; }
  .card:hover .card__media .glasses, .card:hover .card__media img { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .header, .footer, .drawer, .drawer-overlay, .toast, .toc { display: none !important; }
  .legal-layout { display: block; padding: 0; }
}
