/* ============================================================
   SVITLA DENTAL CLINIC — Design System
   Palette: Anthracite Slate / Warm Amber Glow / Satin Cream
   ============================================================ */
:root {
  --bg: #18181A;          /* Anthracite Slate */
  --card: #222226;        /* svitla-card */
  --gold: #E8B974;        /* Warm Amber Glow */
  --gold-soft: rgba(232, 185, 116, .14);
  --cream: #F4F0EA;       /* Satin Cream */
  --white: #FFFFFF;       /* Pure White */
  --border: #2A2A2E;      /* Muted Graphite */
  --muted: rgba(244, 240, 234, .62);

  --font-heading: 'Plus Jakarta Sans', 'Syne', system-ui, sans-serif;
  --font-body: 'Inter', 'SF Pro Display', system-ui, sans-serif;

  --shadow-glow: 0 0 25px -5px rgba(232, 185, 116, .3);
  --shadow-glow-strong: 0 0 40px -6px rgba(232, 185, 116, .55);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); margin: 0; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
@media (max-width: 640px) { .container { width: min(var(--container), 100% - 32px); } }

/* ---------- Typography helpers ---------- */
.h2 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; }
.h3 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
.lead { color: var(--muted); font-size: 17px; max-width: 640px; }
.eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 14px;
}
.glow-text {
  color: var(--gold);
  text-shadow: 0 0 22px rgba(232, 185, 116, .45), 0 0 48px rgba(232, 185, 116, .2);
}
.section { padding: clamp(70px, 9vw, 120px) 0; position: relative; }
.section--alt { background: linear-gradient(180deg, #19191B 0%, #1C1C1F 100%); border-block: 1px solid var(--border); }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.section__head .lead { margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
  white-space: nowrap;
}
.btn--sm { padding: 11px 20px; font-size: 14px; }
.btn--block { width: 100%; }
.btn--primary {
  background: linear-gradient(135deg, #F1CB8E 0%, var(--gold) 55%, #D9A45C 100%);
  color: #1A1408;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow-strong); }
.btn--ghost {
  border: 1px solid rgba(244, 240, 234, .22);
  color: var(--cream);
  background: rgba(255, 255, 255, .02);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); box-shadow: var(--shadow-glow); }

/* ---------- Glow card (LED facade imitation) ---------- */
.glow-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease);
  isolation: isolate;
}
.glow-card::before {
  content: "";
  position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 185, 116, .55), transparent 45%);
  opacity: 0; transition: opacity .45s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}
.glow-card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 185, 116, .08), transparent 50%);
  opacity: 0; transition: opacity .45s;
}
.glow-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.glow-card:hover::before, .glow-card:hover::after { opacity: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(24, 24, 26, .55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .4s, border-color .4s, box-shadow .4s;
}
.header.is-scrolled { background: rgba(24, 24, 26, .86); border-color: var(--border); box-shadow: 0 10px 30px -20px #000; }
.header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-family: var(--font-heading); font-weight: 700; font-size: 20px;
  letter-spacing: 4px; text-transform: uppercase; color: var(--white);
  text-shadow: 0 0 14px rgba(255, 255, 255, .55);
  animation: neon 3.6s ease-in-out infinite;
}
.logo__sub { font-size: 9px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
@keyframes neon {
  0%, 100% { text-shadow: 0 0 10px rgba(255,255,255,.45), 0 0 26px rgba(232,185,116,.15); }
  50% { text-shadow: 0 0 18px rgba(255,255,255,.85), 0 0 40px rgba(232,185,116,.35); }
}

.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a { font-size: 14.5px; font-weight: 500; color: var(--muted); position: relative; transition: color .3s; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
  box-shadow: 0 0 8px var(--gold);
}
.nav a:hover, .nav a.is-active { color: var(--white); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.header__cta { display: flex; align-items: center; gap: 18px; }
.header__phone { font-weight: 600; font-size: 15px; color: var(--cream); transition: color .3s; }
.header__phone:hover { color: var(--gold); }

.burger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; margin-left: auto; }
.burger span { width: 22px; height: 2px; background: var(--cream); transition: transform .35s var(--ease), opacity .3s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
  .nav { gap: 20px; }
  .header__phone { display: none; }
}
@media (max-width: 860px) {
  .header__inner { gap: 12px; }
  .burger { display: flex; }
  .header__cta { display: none; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(24, 24, 26, .96); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 22px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .4s var(--ease), opacity .3s;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 70px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-img { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: brightness(.55) saturate(.9); transform: scale(1.06); }
.hero__bg-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 70% 45%, rgba(232, 185, 116, .12), transparent 70%),
    linear-gradient(90deg, rgba(24, 24, 26, .96) 0%, rgba(24, 24, 26, .82) 45%, rgba(24, 24, 26, .35) 100%),
    linear-gradient(180deg, rgba(24, 24, 26, .5) 0%, transparent 30%, var(--bg) 100%);
}
.hero__rays {
  position: absolute; z-index: 1; inset: -20% -10%;
  background: repeating-conic-gradient(from 0deg at 72% 50%, rgba(232, 185, 116, .045) 0deg 2deg, transparent 2deg 9deg);
  opacity: .6; pointer-events: none;
  animation: rays 90s linear infinite;
  -webkit-mask: radial-gradient(circle at 72% 50%, #000 0%, transparent 55%);
          mask: radial-gradient(circle at 72% 50%, #000 0%, transparent 55%);
}
@keyframes rays { to { transform: rotate(360deg); } }

.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero__content { max-width: 620px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(232, 185, 116, .35); background: var(--gold-soft); color: var(--gold);
  box-shadow: var(--shadow-glow); margin-bottom: 26px;
}
.hero__title { font-size: clamp(38px, 6vw, 72px); font-weight: 800; letter-spacing: -.02em; color: var(--white); }
.hero__desc { margin-top: 22px; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 540px; }
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.quick-bar {
  margin-top: 42px; display: inline-flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 12px 18px; border-radius: 999px;
  background: rgba(34, 34, 38, .6); border: 1px solid var(--border); backdrop-filter: blur(10px);
}
.quick-bar__status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.quick-bar__dot { width: 9px; height: 9px; border-radius: 50%; background: #6b6b70; box-shadow: 0 0 0 0 transparent; }
.quick-bar.is-open .quick-bar__dot { background: #5BD08A; box-shadow: 0 0 12px #5BD08A; animation: pulse 2s infinite; }
.quick-bar.is-closed .quick-bar__dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.quick-bar__phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--gold); }
.quick-bar__phone:hover { text-decoration: underline; }

.hero__visual { position: relative; aspect-ratio: 1 / 1; max-height: 620px; width: 100%; }
.scene { position: absolute; inset: 0; border-radius: 30px; }
.scene canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.scene canvas:active { cursor: grabbing; }
.scene__loader { position: absolute; inset: 0; display: grid; place-items: center; }
.scene__loader span {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(232,185,116,.2); border-top-color: var(--gold);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scene.is-ready .scene__loader { display: none; }

/* Mobile tilt card fallback */
.tilt-card { display: none; perspective: 900px; width: 100%; max-width: 360px; margin: 0 auto; }
.tilt-card__inner {
  position: relative; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, rgba(34,34,38,.9), rgba(24,24,26,.95));
  border: 1px solid rgba(232,185,116,.25);
  box-shadow: var(--shadow-glow), inset 0 0 60px rgba(232,185,116,.06);
  transform-style: preserve-3d;
  transition: transform .15s ease-out;
  display: grid; place-items: center;
}
.tilt-card__shine {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 40%), rgba(255,255,255,.28), transparent 45%);
  mix-blend-mode: screen; pointer-events: none;
}
.tilt-card__label { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); }
.tilt-card__label small { font-size: 11px; opacity: .7; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border-radius: 14px; border: 1px solid rgba(244,240,234,.3);
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; border-radius: 2px;
  background: var(--gold); transform: translateX(-50%); animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 16px); } }

@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 30px; }
  .hero__visual { max-height: 420px; aspect-ratio: auto; height: 360px; }
  .hero__content { max-width: 100%; }
  .hero__rays { display: none; }
}
@media (max-width: 767px) {
  .scene { display: none; }
  .tilt-card { display: block; }
  .hero__visual { height: auto; }
  .hero__scroll { display: none; }
  .hero { padding-bottom: 50px; }
}

/* ============================================================
   CARDS GRID (Advantages)
   ============================================================ */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; scroll-margin-top: 90px; }
.card { padding: 30px 26px 26px; display: flex; flex-direction: column; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold); margin-bottom: 22px;
  box-shadow: inset 0 0 0 1px rgba(232,185,116,.25);
}
.card__icon svg { width: 26px; height: 26px; }
.card__tag { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.card__title { font-size: 20px; margin: 8px 0 12px; color: var(--white); }
.card__text { color: var(--muted); font-size: 14.5px; flex: 1; }
.card__link { margin-top: 22px; align-self: flex-start; color: var(--gold); font-weight: 600; font-size: 14px; transition: letter-spacing .3s; }
.card__link:hover { letter-spacing: .03em; }
@media (max-width: 1024px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards-grid { grid-template-columns: 1fr; } }

/* ============================================================
   BEFORE / AFTER COMPARE
   ============================================================ */
.compare-wrap { margin-top: clamp(50px, 7vw, 90px); }
.compare-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.compare-cases { display: flex; gap: 8px; }
.chip {
  padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  transition: all .3s;
}
.chip:hover { color: var(--cream); border-color: rgba(232,185,116,.4); }
.chip.is-active { color: #1A1408; background: var(--gold); border-color: var(--gold); box-shadow: var(--shadow-glow); }
.chip--sm { padding: 7px 14px; font-size: 13px; }

.compare {
  position: relative; width: 100%; aspect-ratio: 1126 / 667;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--card); user-select: none; box-shadow: 0 30px 60px -40px #000;
  --pos: 50%;
}
.compare__layer { position: absolute; inset: 0; }
.compare__layer--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transform: scale(1.24); transform-origin: 50% 50%; }
/* The case photos are vertical triptychs (before / during / after).
   Cropping via object-position shows one panel at a time. */
.compare__img--before { object-position: 50% 0%; }
.compare__img--after { object-position: 50% 100%; }
.compare.show-during .compare__img--after { object-position: 50% 50%; }
.compare__label {
  position: absolute; bottom: 16px; padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; background: rgba(24,24,26,.7); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12); color: var(--white);
}
.compare__label--before { left: 16px; }
.compare__label--after { right: 16px; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px;
  background: var(--white); transform: translateX(-50%); pointer-events: none;
  box-shadow: 0 0 14px rgba(255,255,255,.7);
}
.compare__handle-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); color: #18181A; box-shadow: 0 0 24px rgba(255,255,255,.6);
}
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.compare-stage { margin-top: 14px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.compare-note { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ============================================================
   TECHNOLOGIES
   ============================================================ */
.tech { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.photo-frame {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
  box-shadow: 0 40px 80px -50px #000;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.86) contrast(1.04) saturate(.92); transition: transform 1.2s var(--ease), filter .6s; }
.photo-frame:hover img { transform: scale(1.04); filter: brightness(.95) saturate(1); }
.photo-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(24,24,26,.85) 100%);
}
.photo-frame figcaption {
  position: absolute; left: 18px; bottom: 16px; z-index: 1; font-size: 13px; color: var(--cream);
  padding-left: 12px; border-left: 2px solid var(--gold);
}
.tech__media .photo-frame { aspect-ratio: 4 / 3.2; }
.tech__content .lead { margin-top: 16px; }
.tech-list { margin-top: 36px; display: grid; gap: 18px; }
.tech-item { display: flex; gap: 18px; padding: 18px 0; border-top: 1px solid var(--border); }
.tech-item__num { font-family: var(--font-heading); font-weight: 700; color: var(--gold); font-size: 14px; letter-spacing: .1em; padding-top: 4px; }
.tech-item h4 { font-size: 18px; color: var(--white); margin-bottom: 6px; }
.tech-item p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .tech { grid-template-columns: 1fr; } }

/* ============================================================
   PRICES
   ============================================================ */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.tab {
  padding: 12px 22px; border-radius: 999px; font-weight: 500; font-size: 14.5px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted); transition: all .3s;
}
.tab:hover { color: var(--cream); border-color: rgba(232,185,116,.4); }
.tab.is-active { background: var(--gold); color: #1A1408; border-color: var(--gold); box-shadow: var(--shadow-glow); }
.price-panel { display: none; animation: fadeUp .5s var(--ease); }
.price-panel.is-active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.price-panel__title { font-size: 20px; color: var(--white); margin-bottom: 18px; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price-card { padding: 26px 24px; text-align: left; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.price-card__name { font-family: var(--font-heading); font-weight: 700; font-size: 18px; color: var(--white); }
.price-card__desc { font-size: 14px; color: var(--muted); flex: 1; }
.price-card__price { font-family: var(--font-heading); font-size: 22px; font-weight: 700; color: var(--gold); margin-top: 8px; }
.price-card__cta { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.price-card:hover .price-card__cta { color: var(--gold); }
@media (max-width: 900px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .price-grid { grid-template-columns: 1fr; } }

/* ============================================================
   ROADMAP
   ============================================================ */
.roadmap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.roadmap::before {
  content: ""; position: absolute; top: 30px; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .5;
}
.roadmap__step { position: relative; }
.roadmap__marker {
  position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid rgba(232,185,116,.4); color: var(--gold);
  font-family: var(--font-heading); font-weight: 700; box-shadow: var(--shadow-glow);
  margin-bottom: 22px; transition: transform .4s var(--ease), box-shadow .4s;
}
.roadmap__step:hover .roadmap__marker { transform: scale(1.08); box-shadow: var(--shadow-glow-strong); background: var(--gold); color: #1A1408; }
.roadmap__body h3 { font-size: 19px; color: var(--white); margin-bottom: 10px; }
.roadmap__body p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) {
  .roadmap { grid-template-columns: 1fr; gap: 30px; padding-left: 8px; }
  .roadmap::before { top: 0; bottom: 0; left: 37px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, transparent, var(--gold), transparent); }
  .roadmap__step { display: flex; gap: 22px; align-items: flex-start; }
  .roadmap__marker { flex: 0 0 60px; margin: 0; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; grid-template-rows: minmax(320px, auto) minmax(260px, auto); gap: 20px; }
.about-grid .photo-frame { min-height: 260px; }
.about-grid__tall { grid-row: span 2; }
.about-grid__wide { grid-column: span 2; }
.about-card { padding: 30px 28px; display: flex; flex-direction: column; }
.about-card__quote { font-family: var(--font-heading); font-weight: 700; font-size: 20px; color: var(--gold); margin-bottom: 12px; }
.about-card__text { font-size: 14px; color: var(--muted); flex: 1; }
.about-stats { display: flex; gap: 18px; margin-top: 20px; }
.about-stats li { display: flex; flex-direction: column; }
.about-stats strong { font-family: var(--font-heading); font-size: 24px; color: var(--white); }
.about-stats span { font-size: 11px; color: var(--muted); }
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .about-grid__tall { grid-row: auto; aspect-ratio: 3/4; }
  .about-grid__wide { grid-column: span 2; aspect-ratio: 16/9; }
  .photo-frame:not(.about-grid__tall):not(.about-grid__wide) { aspect-ratio: 4/3; }
}
@media (max-width: 600px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid__wide { grid-column: auto; }
}

/* ============================================================
   CONTACTS
   ============================================================ */
.contacts-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 20px; align-items: stretch; }
.contacts-info { display: grid; gap: 16px; align-content: start; }
.info-block { padding: 22px 22px 24px; }
.info-block h4 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.info-block p { font-size: 14.5px; color: var(--cream); }
.info-block__big { font-family: var(--font-heading); font-weight: 700; font-size: 24px; color: var(--white); display: block; }
.info-block__big:hover { color: var(--gold); }
.info-block__socials { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; }
.info-block__socials a { color: var(--gold); border-bottom: 1px solid transparent; }
.info-block__socials a:hover { border-color: var(--gold); }
.info-block__hint { margin-top: 10px; font-size: 13px; color: var(--muted); }
.info-block .btn { margin-top: 14px; }
.schedule li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--border); font-size: 14.5px; }
.schedule li span:last-child { color: var(--gold); font-weight: 500; }

.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 420px; position: relative; background: var(--card); }
.map { width: 100%; height: 100%; min-height: 420px; border: 0; filter: grayscale(1) invert(.92) contrast(.9) brightness(.85) sepia(.25); }

.form { display: grid; gap: 14px; }
.contacts-form .form { padding: 26px 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); height: 100%; }
.contacts-form .h3 { font-size: 20px; margin-bottom: 4px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  background: rgba(24,24,26,.7); border: 1px solid var(--border); color: var(--cream);
  font: inherit; font-size: 16px; outline: none; transition: border-color .3s, box-shadow .3s; /* 16px: без зуму полів на iOS */
}
.field textarea { resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: var(--card); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: var(--shadow-glow); }
.field input.is-invalid { border-color: #e07070; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.checkbox input { accent-color: var(--gold); margin-top: 3px; }
.form__status { font-size: 14px; min-height: 1.4em; color: var(--gold); text-align: center; }
.form__status.is-error { color: #e07070; }
@media (max-width: 1024px) {
  .contacts-grid { grid-template-columns: 1fr 1fr; }
  .map-wrap { grid-column: span 2; order: 3; }
}
@media (max-width: 680px) {
  .contacts-grid { grid-template-columns: 1fr; }
  .map-wrap { grid-column: auto; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 60px 0 30px; background: #151517; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px; }
.footer__brand p { margin-top: 12px; font-size: 14px; color: var(--muted); }
.footer__brand .logo { margin-bottom: 8px; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col h5 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.footer__col a { font-size: 14.5px; color: var(--muted); transition: color .3s; }
.footer__col a:hover { color: var(--white); }
.footer__license { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__inner { grid-template-columns: 1fr; } }

/* ============================================================
   MODAL (Glassmorphism)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; visibility: hidden; opacity: 0; transition: opacity .35s, visibility 0s .35s; }
.modal.is-open { visibility: visible; opacity: 1; transition: opacity .35s; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.modal__dialog {
  position: relative; width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  padding: 36px 32px 30px; border-radius: 26px;
  background: rgba(34,34,38,.85); border: 1px solid rgba(232,185,116,.25);
  box-shadow: var(--shadow-glow-strong), 0 40px 80px -30px #000;
  transform: translateY(24px) scale(.97); transition: transform .45s var(--ease);
}
.modal.is-open .modal__dialog { transform: none; }
.modal__close { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--muted); transition: all .3s; }
.modal__close:hover { color: var(--white); background: rgba(255,255,255,.06); }
.modal__sub { font-size: 14px; color: var(--muted); margin: 8px 0 20px; }
body.modal-open { overflow: hidden; }

/* ---------- Floating call button (mobile) ---------- */
.fab {
  display: none; position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; place-items: center;
  background: var(--gold); color: #1A1408; box-shadow: var(--shadow-glow-strong);
  animation: fabPulse 2.6s infinite;
}
@keyframes fabPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(232,185,116,.5); } 70% { box-shadow: 0 0 0 16px rgba(232,185,116,0); } }
@media (max-width: 860px) { .fab { display: grid; } }

/* ============================================================
   BRACES CARE — step-by-step guide with animated visualisation
   ============================================================ */
.care { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.care__content .lead { margin-top: 18px; }

/* Steps (accordion) */
.care-steps { margin-top: 34px; display: grid; gap: 10px; }
.care-step {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card);
  transition: border-color .35s, box-shadow .35s;
}
.care-step.is-active { border-color: rgba(232,185,116,.45); box-shadow: var(--shadow-glow); }
.care-step__btn {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 15px 18px; text-align: left;
}
.care-step__num {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: .06em;
  color: var(--gold); border: 1px solid rgba(232,185,116,.35); background: var(--gold-soft);
  transition: background .35s, color .35s, box-shadow .35s;
}
.care-step.is-active .care-step__num { background: var(--gold); color: #1A1408; box-shadow: var(--shadow-glow); }
.care-step__title { font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--cream); transition: color .3s; }
.care-step.is-active .care-step__title { color: var(--white); }
.care-step__time { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.care-step__time .ico { width: 14px; height: 14px; }
.care-step__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.care-step__body > p { overflow: hidden; padding: 0 18px 0 66px; color: var(--muted); font-size: 14.5px; }
.care-step.is-active .care-step__body { grid-template-rows: 1fr; }
.care-step.is-active .care-step__body > p { padding-bottom: 18px; }
/* Progress line of the active step (--p is driven by the GSAP timeline in js/care.js) */
.care-step__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.care-step__bar::after {
  content: ""; position: absolute; inset: 0; background: var(--gold); box-shadow: 0 0 8px var(--gold);
  transform: scaleX(0); transform-origin: left; will-change: transform;
}
.care-step.is-active .care-step__bar::after { transform: scaleX(var(--p, 0)); }
.care.is-paused .care-step__bar::after { opacity: .35; }

.care-note {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 22px;
  padding: 14px 16px; border-radius: var(--radius-sm); border: 1px dashed rgba(232,185,116,.35);
  color: var(--muted); font-size: 14px;
}
.care-note .ico { margin-top: 3px; }

/* Visualisation frame */
.care-viz {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #2A2A2F 0%, var(--card) 60%); border: 1px solid var(--border);
  box-shadow: 0 30px 60px -40px #000, var(--shadow-glow);
}
.care-viz__scene { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #141416; }
.care-illu, .care-clip { position: absolute; inset: 0; }
.care-illu svg { width: 100%; height: 100%; display: block; }
/* Відеокліп кроку: два <video> для плавної зміни, зверху — підказки */
.care-clip { opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.care-clip.is-on { opacity: 1; }
.care-clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; background: #141416; }
.care-clip video.is-on { opacity: 1; }
.care-hints, .care-hints-html { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.care-hint-zone {
  fill: rgba(232,185,116,.10); stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(232,185,116,.7)); opacity: 0; transition: opacity .4s;
}
.care-hint-zone.is-on { opacity: 1; animation: careZone 1.6s ease-in-out infinite; }
@keyframes careZone { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .35; } }
.care-hint-path {
  fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 10 8; filter: drop-shadow(0 0 6px rgba(232,185,116,.7)); opacity: 0; transition: opacity .4s;
}
.care-hint-path.is-on { opacity: 1; animation: careDash 1s linear infinite; }
@keyframes careDash { to { stroke-dashoffset: -18; } }
.care-hint-arrow {
  position: absolute; width: 0; height: 0; opacity: 0; transition: opacity .4s;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 14px solid var(--gold);
  filter: drop-shadow(0 0 6px rgba(232,185,116,.7));
}
.care-hint-arrow.is-on { opacity: 1; }
.care-hint-angle {
  position: absolute; transform: translate(-12%, -78%); opacity: 0; transition: opacity .4s, transform .4s var(--ease);
  filter: drop-shadow(0 0 8px rgba(232,185,116,.6));
}
.care-hint-angle.is-on { opacity: 1; }
.care-hint-angle svg { width: clamp(52px, 12%, 84px); height: auto; overflow: visible; }
.care-hint-angle line { stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; }
.care-hint-angle__arc { fill: none; stroke: var(--cream); stroke-width: 1.6; stroke-dasharray: 3 3; }
.care-hint-angle text { fill: var(--cream); font: 700 12px var(--font-heading); }
.care-hint-chip {
  position: absolute; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--cream);
  background: rgba(24,24,26,.72); border: 1px solid rgba(232,185,116,.45); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease); white-space: nowrap;
}
.care-hint-chip.is-on { opacity: 1; transform: none; }
@media (max-width: 560px) { .care-hint-chip { font-size: 12px; padding: 5px 10px; } }
.care-viz__bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px;
  border-top: 1px solid var(--border); background: rgba(24,24,26,.55); backdrop-filter: blur(8px);
}
.care-viz__counter { font-family: var(--font-heading); font-weight: 700; font-size: 13px; color: var(--gold); letter-spacing: .08em; white-space: nowrap; }
.care-viz__label { flex: 1; font-size: 14px; color: var(--cream); }
.care-viz__toggle {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid var(--border); color: var(--cream); transition: border-color .3s, color .3s, box-shadow .3s;
}
.care-viz__toggle:hover { border-color: rgba(232,185,116,.5); color: var(--gold); box-shadow: var(--shadow-glow); }
.care-viz__toggle svg { width: 18px; height: 18px; }
.care-viz__ico-play, .care.is-user-paused .care-viz__ico-pause { display: none; }
.care.is-user-paused .care-viz__ico-play { display: block; }

@media (max-width: 900px) {
  .care { grid-template-columns: 1fr; }
  .care__media { order: -1; }
  .care-steps { margin-top: 28px; }
}
@media (max-width: 560px) {
  .care-step__btn { grid-template-columns: auto 1fr; padding: 14px 16px; }
  .care-step__time { grid-column: 2; justify-self: start; margin-top: -8px; }
  .care-step__body > p { padding-left: 16px; }
  .care-viz__label { font-size: 13px; }
}

/* ---------- Scroll reveal (GSAP fallback = visible) ---------- */
.reveal { opacity: 0; transform: translateY(28px); }
.no-gsap .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

/* ---------- Image placeholder (until photos are added) ---------- */
img.is-missing { background: repeating-linear-gradient(45deg, #222226 0 12px, #1d1d20 12px 24px); min-height: 120px; }

/* ============================================================
   ICONS (SVG sprite instead of emoji)
   ============================================================ */
.ico { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; color: var(--gold); }
.ico--h2 { width: .9em; height: .9em; vertical-align: -0.08em; filter: drop-shadow(0 0 10px rgba(232,185,116,.6)); }
.badge .ico { width: 15px; height: 15px; }
.footer__slogan { display: flex; align-items: center; gap: 8px; }
.info-block__hint--icon { display: flex; align-items: center; gap: 8px; }
.info-block__hint--icon .ico { width: 18px; height: 18px; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; background: #6b6b70; }
.status-dot.is-open { background: #5BD08A; box-shadow: 0 0 10px #5BD08A; }
.status-dot.is-closed { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.form__status .ico { color: inherit; }

.info-block__address { font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--white); }

/* ============================================================
   SVG LOGO (mark + full sign)
   ============================================================ */
.logo__mark {
  width: 46px; height: 46px; color: var(--white); flex: none;
  animation: markGlow 3.6s ease-in-out infinite;
}
@keyframes markGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(255,255,255,.45)) drop-shadow(0 0 14px rgba(232,185,116,.2)); }
  50% { filter: drop-shadow(0 0 9px rgba(255,255,255,.85)) drop-shadow(0 0 22px rgba(232,185,116,.45)); }
}
.modal__banner { margin: -36px -32px 20px; height: 150px; overflow: hidden; border-radius: 26px 26px 0 0; position: relative; }
.modal__banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.modal__banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(34,34,38,.95) 100%); }
.about-card__mark { width: 64px; height: 64px; color: var(--white); margin-bottom: 18px; filter: drop-shadow(0 0 10px rgba(255,255,255,.5)); }

/* Hero emblem: the glowing sign next to the 3D jaw */
.hero__emblem {
  position: absolute; top: -4%; right: -2%; z-index: 3;
  width: clamp(150px, 15vw, 210px); aspect-ratio: 1;
  color: var(--white); pointer-events: none;
}
.hero__emblem-svg {
  width: 100%; height: 100%; display: block;
  animation: signGlow 4.2s ease-in-out infinite;
}
@keyframes signGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(255,255,255,.6)) drop-shadow(0 0 18px rgba(255,255,255,.28)) drop-shadow(0 0 44px rgba(232,185,116,.28)); }
  50% { filter: drop-shadow(0 0 8px rgba(255,255,255,.95)) drop-shadow(0 0 28px rgba(255,255,255,.45)) drop-shadow(0 0 60px rgba(232,185,116,.5)); }
}
@media (max-width: 960px) { .hero__emblem { top: 0; right: 0; width: 140px; } }
@media (max-width: 767px) { .hero__emblem { display: none; } }

/* Mobile tilt card: sign logo */
.tilt-card__logo { width: 62%; aspect-ratio: 1; color: var(--white); transform: translateZ(40px); filter: drop-shadow(0 0 8px rgba(255,255,255,.7)) drop-shadow(0 0 28px rgba(232,185,116,.4)); }

/* Contacts: sign photo inside the booking block */
.info-block--photo { padding-top: 0; overflow: hidden; }
.info-block__photo {
  width: calc(100% + 44px); max-width: none; margin: 0 -22px 18px; height: 150px; object-fit: cover; object-position: center 45%;
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent 100%); mask: linear-gradient(180deg, #000 55%, transparent 100%);
}

/* ============================================================
   QUIZ — підбір лікування (index.html #quiz, js/quiz.js)
   ============================================================ */
.quiz {
  position: relative; max-width: 960px; margin-inline: auto;
  padding: clamp(22px, 3.5vw, 40px);
  background: var(--card); border: 1px solid var(--border); border-radius: 28px;
  box-shadow: 0 40px 80px -50px #000;
  overflow: hidden;
}
.quiz::before { content: ""; position: absolute; inset: -40% -20% auto; height: 60%; background: radial-gradient(closest-side, rgba(232,185,116,.12), transparent); pointer-events: none; }
.quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 36px; margin-bottom: 12px; }
.quiz__back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 10px 6px 4px; border-radius: 999px; transition: color .3s; }
.quiz__back:hover { color: var(--gold); }
.quiz__back[hidden] { display: none; }
.quiz__progress-text { margin-left: auto; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.quiz__bar { height: 4px; border-radius: 999px; background: rgba(244,240,234,.08); overflow: hidden; }
.quiz__bar-fill { display: block; height: 100%; width: 25%; border-radius: inherit; background: linear-gradient(90deg, #D9A45C, #F1CB8E); box-shadow: 0 0 14px rgba(232,185,116,.6); transition: width .5s var(--ease); }
.quiz__stage { position: relative; margin-top: 30px; min-height: 380px; }
.quiz__step { width: 100%; }
.quiz__head { margin-bottom: 26px; }
.quiz__num { display: inline-block; font-family: var(--font-heading); font-weight: 700; font-size: 13px; letter-spacing: .2em; color: var(--gold); margin-bottom: 8px; }
.quiz__title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; color: var(--white); }
.quiz__subtitle { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* переходи кроків: slideInRight / fadeOutLeft, 350ms cubic-bezier(.4,0,.2,1) */
.quiz__step.is-leaving-left, .quiz__step.is-leaving-right { position: absolute; inset: 0 0 auto; pointer-events: none; }
.quiz__step.is-leaving-left  { animation: fadeOutLeft  .35s cubic-bezier(.4,0,.2,1) forwards; }
.quiz__step.is-leaving-right { animation: fadeOutRight .35s cubic-bezier(.4,0,.2,1) forwards; }
.quiz__step.is-entering-right { animation: slideInRight .35s cubic-bezier(.4,0,.2,1) both; }
.quiz__step.is-entering-left  { animation: slideInLeft  .35s cubic-bezier(.4,0,.2,1) both; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes slideInLeft  { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@keyframes fadeOutLeft  { to { opacity: 0; transform: translateX(-48px); } }
@keyframes fadeOutRight { to { opacity: 0; transform: translateX(48px); } }

/* картки варіантів */
.quiz__options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.quiz-card {
  position: relative; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center;
  padding: 20px 22px; min-height: 96px; border-radius: var(--radius); cursor: pointer; overflow: hidden;
  background: rgba(24,24,26,.6); border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s var(--ease), background .3s;
  -webkit-tap-highlight-color: transparent;
}
.quiz-card input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.quiz-card__icon { grid-row: span 2; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--gold-soft); color: var(--gold); transition: background .3s, color .3s, transform .4s var(--ease); }
.quiz-card__icon svg { width: 26px; height: 26px; }
.quiz-card__label { font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: var(--white); line-height: 1.3; }
.quiz-card__desc { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.quiz-card__check { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1A1408; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .35s cubic-bezier(.34,1.56,.64,1); }
.quiz-card__check svg { width: 15px; height: 15px; }
.quiz-card:hover { transform: translateY(-4px); border-color: rgba(232,185,116,.55); box-shadow: var(--shadow-glow); }
.quiz-card:hover .quiz-card__icon { transform: scale(1.06); }
.quiz-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.quiz-card.is-checked { border-color: var(--gold); background: rgba(232,185,116,.08); box-shadow: var(--shadow-glow-strong); }
.quiz-card.is-checked .quiz-card__icon { background: var(--gold); color: #1A1408; }
.quiz-card.is-checked .quiz-card__check { opacity: 1; transform: scale(1); }
.quiz-card__ripple { position: absolute; border-radius: 50%; background: rgba(232,185,116,.28); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* фінал: результат + форма */
.quiz__final { display: grid; grid-template-columns: 1.05fr .95fr; gap: 26px; align-items: start; }
.quiz-result { padding: 26px 26px 22px; }
.quiz-result .eyebrow { margin-bottom: 8px; }
.quiz-result__title { display: block; font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--white); }
.quiz-result__price { display: inline-block; margin-top: 8px; padding: 6px 14px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-weight: 600; font-size: 14px; }
.quiz-result__text { margin-top: 14px; font-size: 14.5px; color: var(--cream); }
.quiz-result__note { margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.quiz-result__note .ico { flex: none; margin-top: 3px; color: var(--gold); }
.quiz-result__answers { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--border); display: grid; gap: 8px; }
.quiz-result__answers li { display: flex; justify-content: space-between; gap: 14px; font-size: 13px; }
.quiz-result__answers span { color: var(--muted); }
.quiz-result__answers b { color: var(--cream); text-align: right; font-weight: 600; }
.quiz-result__blur { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.quiz-form { padding: 4px 0; }
.quiz-form__messenger { border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz-msg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quiz-msg label { position: relative; cursor: pointer; }
.quiz-msg input { position: absolute; opacity: 0; width: 0; height: 0; }
.quiz-msg span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(24,24,26,.7); font-size: 13.5px; font-weight: 600; color: var(--muted); transition: all .3s; }
.quiz-msg svg { width: 17px; height: 17px; }
.quiz-msg input:checked + span { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); box-shadow: var(--shadow-glow); }
.quiz-msg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.quiz-form .btn { white-space: normal; text-align: center; line-height: 1.25; }

/* дякуємо + конфеті */
.quiz__step--thanks { position: relative; min-height: 380px; display: grid; place-items: center; }
.quiz__confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.quiz-thanks { position: relative; text-align: center; max-width: 520px; padding: 20px 0; }
.quiz-thanks__mark { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 20px; border-radius: 50%; background: var(--gold); color: #1A1408; box-shadow: var(--shadow-glow-strong); animation: popIn .6s cubic-bezier(.34,1.56,.64,1) both; }
.quiz-thanks__mark svg { width: 34px; height: 34px; }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } }
.quiz-thanks .quiz__subtitle { margin-top: 12px; }
.quiz-thanks__summary { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 22px; padding: 14px 24px; border-radius: var(--radius); background: rgba(24,24,26,.6); border: 1px solid var(--border); }
.quiz-thanks__summary b { color: var(--white); font-family: var(--font-heading); }
.quiz-thanks__summary span { color: var(--gold); font-size: 14px; font-weight: 600; }
.quiz-thanks__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

@media (max-width: 860px) { .quiz__final { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .quiz { border-radius: 22px; }
  .quiz__options { grid-template-columns: 1fr; gap: 10px; }
  .quiz-card { padding: 16px 18px; min-height: 84px; grid-template-columns: 46px 1fr; column-gap: 14px; }
  .quiz-card__icon { width: 46px; height: 46px; }
  .quiz-card__label { font-size: 15px; padding-right: 26px; }
  .quiz__stage { min-height: 0; }
  .quiz-msg span { font-size: 12.5px; padding: 10px 6px; }
  .quiz-msg svg { display: none; }
}

/* ============================================================
   BLOG — картки, список, стаття (blog/, js/blog.js, js/posts.js)
   ============================================================ */
.section__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
@media (max-width: 640px) { .section__head--row { flex-direction: column; align-items: flex-start; } }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; animation: cardIn .5s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } }
.post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #1d1d20; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: brightness(.85) saturate(.9); transition: transform 1s var(--ease), filter .5s; }
.post-card:hover .post-card__media img { transform: scale(1.06); filter: brightness(.95) saturate(1); }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; gap: 10px; }
.post-card__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.post-card__tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.post-card__title { font-family: var(--font-heading); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--white); }
.post-card__excerpt { font-size: 14px; color: var(--muted); flex: 1; }
.post-card__foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--border); }
.blog-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 40px 0; }
@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .posts-grid { grid-template-columns: 1fr; } }

/* сторінка списку */
.page-blog .header { background: rgba(24,24,26,.86); border-color: var(--border); }
.blog-head { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 70px)); }
.blog-head .section__head { margin-bottom: 30px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--gold); }
.blog-hero { display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden; color: inherit; }
.blog-hero__media { position: relative; display: block; min-height: 340px; overflow: hidden; }
.blog-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.8) saturate(.9); transition: transform 1.2s var(--ease), filter .6s; }
.blog-hero:hover .blog-hero__media img { transform: scale(1.05); filter: brightness(.92) saturate(1); }
.blog-hero__body { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3.5vw, 44px); justify-content: center; }
.blog-hero__badge { align-self: flex-start; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #1A1408; background: var(--gold); padding: 6px 12px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-glow); }
.blog-hero__title { font-family: var(--font-heading); font-weight: 800; font-size: clamp(24px, 2.8vw, 34px); line-height: 1.2; color: var(--white); letter-spacing: -.01em; }
.blog-hero__excerpt { font-size: 15px; color: var(--muted); }
.blog-list__title { margin-bottom: 20px; }
@media (max-width: 860px) { .blog-hero { grid-template-columns: 1fr; } .blog-hero__media { min-height: 220px; aspect-ratio: 16 / 9; } }

/* автор */
.author { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.author img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(232,185,116,.5); }
.author span { display: flex; flex-direction: column; line-height: 1.25; }
.author b { font-size: 14.5px; color: var(--white); }
.author small { font-size: 12.5px; color: var(--muted); }
.author--sm img { width: 38px; height: 38px; }
.author:hover b { color: var(--gold); }

/* стаття */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 210; background: transparent; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 100%; background: var(--gold); box-shadow: 0 0 10px rgba(232,185,116,.7); transform: scaleX(0); transform-origin: left; will-change: transform; }
.article__hero { position: relative; padding-top: calc(var(--header-h) + clamp(36px, 5vw, 64px)); }
.article__hero-inner { max-width: 820px; }
.article__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.article__title { font-size: clamp(30px, 4.4vw, 52px); font-weight: 800; letter-spacing: -.02em; color: var(--white); line-height: 1.12; }
.article__lead { margin-top: 20px; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); }
.article__hero .author { margin-top: 26px; }
.article__cover { margin: clamp(30px, 4vw, 50px) auto 0; width: min(var(--container), 100% - 40px); aspect-ratio: 21 / 9; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.article__cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: brightness(.85) saturate(.92); }
@media (max-width: 640px) { .article__cover { width: min(var(--container), 100% - 32px); aspect-ratio: 16 / 10; } }

.article__layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(30px, 5vw, 70px); padding: clamp(40px, 5vw, 70px) 0 clamp(60px, 7vw, 100px); align-items: start; }
.article__aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; }
.toc { padding: 20px 20px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.toc-toggle { display: block; width: 100%; text-align: left; font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); cursor: default; }
.toc-toggle span { display: none; }
.toc__body { margin-top: 12px; max-height: calc(100vh - var(--header-h) - 260px); overflow: auto; scrollbar-width: thin; }
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc__item a { display: block; padding: 7px 10px 7px 14px; border-left: 2px solid transparent; font-size: 14px; color: var(--muted); line-height: 1.35; border-radius: 0 8px 8px 0; transition: color .25s, border-color .25s, background .25s; }
.toc__item--h3 a { padding-left: 26px; font-size: 13px; }
.toc__item a:hover { color: var(--cream); }
.toc__item a.is-active { color: var(--gold); border-left-color: var(--gold); background: var(--gold-soft); }
.aside-cta { padding: 22px 20px; text-align: center; }
.aside-cta__mark { width: 40px; height: 40px; color: var(--white); margin: 0 auto 12px; filter: drop-shadow(0 0 8px rgba(255,255,255,.4)); }
.aside-cta p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.aside-cta p b { color: var(--white); }
.aside-cta .btn { white-space: normal; }

.article__body { max-width: 760px; font-size: 17px; line-height: 1.75; }
.article__body > * + * { margin-top: 1.1em; }
.article__body h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; color: var(--white); margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 20px); letter-spacing: -.01em; }
.article__body h3 { font-size: clamp(19px, 1.8vw, 22px); font-weight: 700; color: var(--cream); margin-top: 1.6em; scroll-margin-top: calc(var(--header-h) + 20px); }
.article__body h2 + h3 { margin-top: 1em; }
.article__body p { color: rgba(244,240,234,.86); }
.article__body ul, .article__body ol { padding-left: 22px; display: grid; gap: 10px; color: rgba(244,240,234,.86); }
.article__body li::marker { color: var(--gold); }
.article__body a { color: var(--gold); border-bottom: 1px solid rgba(232,185,116,.35); transition: border-color .3s; }
.article__body a:hover { border-color: var(--gold); }
.article__body strong { color: var(--white); font-weight: 600; }
.article__body .note { padding: 16px 20px; border-radius: var(--radius-sm); background: var(--gold-soft); border-left: 3px solid var(--gold); font-size: 15px; color: var(--cream); }
.article__body blockquote { margin: 2em 0; padding: 26px 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--gold); }
.article__body blockquote p { font-size: 18px; font-style: italic; color: var(--cream); }
.article__body blockquote footer { margin-top: 12px; font-size: 14px; color: var(--gold); font-style: normal; }
.article__facts { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.article__facts li { display: grid; gap: 4px; padding: 16px 16px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--border); }
.article__facts strong { font-family: var(--font-heading); font-size: 17px; color: var(--gold); line-height: 1.2; }
.article__facts span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.cmp-table th, .cmp-table td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.cmp-table thead th { background: rgba(232,185,116,.1); color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.cmp-table tbody th { color: var(--white); font-weight: 600; background: rgba(255,255,255,.02); width: 26%; }
.cmp-table td { color: rgba(244,240,234,.86); }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }

/* FAQ: grid-template-rows анімація без смикання */
.faq { margin-top: 3em; }
.faq__item { border-top: 1px solid var(--border); }
.faq__item:last-of-type { border-bottom: 1px solid var(--border); }
.faq__q-wrap { margin: 0 !important; font-size: inherit; }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 20px 0; text-align: left; font-family: var(--font-heading); font-weight: 700; font-size: 17px; color: var(--white); transition: color .3s; }
.faq__q:hover { color: var(--gold); }
.faq__icon { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); transition: transform .4s var(--ease), border-color .3s, background .3s; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; background: currentColor; transform: translate(-50%, -50%); transition: transform .4s var(--ease); }
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq__a > div { overflow: hidden; }
.faq__a p { padding-bottom: 20px; font-size: 15.5px; color: var(--muted); margin: 0; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__item.is-open .faq__icon { background: var(--gold); border-color: var(--gold); color: #1A1408; }
.faq__item.is-open .faq__icon::after { transform: translate(-50%, -50%) rotate(0); }

.author-card { display: grid; grid-template-columns: 96px 1fr; gap: 22px; padding: 26px; margin-top: 3em; align-items: start; }
.author-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(232,185,116,.5); }
.author-card .eyebrow { margin-bottom: 4px; }
.author-card__name { display: block; font-family: var(--font-heading); font-size: 20px; color: var(--white); }
.author-card__role { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.author-card p { font-size: 14.5px; margin: 0 0 12px; }
.author-card .card__link { margin-top: 0; border: 0; }

/* sticky CTA */
.sticky-cta { position: fixed; left: 50%; bottom: 18px; z-index: 95; transform: translate(-50%, 140%); transition: transform .5s var(--ease); width: min(560px, 100% - 32px); }
.sticky-cta.is-visible { transform: translate(-50%, 0); }
.sticky-cta__inner { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 16px; border-radius: 999px; background: rgba(34,34,38,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(232,185,116,.3); box-shadow: var(--shadow-glow), 0 30px 60px -30px #000; }
.sticky-cta__mark { width: 34px; height: 34px; flex: none; color: var(--white); }
.sticky-cta p { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.sticky-cta p b { font-size: 14px; color: var(--white); }
.sticky-cta p span { font-size: 12px; color: var(--muted); }
.sticky-cta__close { flex: none; width: 28px; height: 28px; border-radius: 50%; color: var(--muted); font-size: 20px; line-height: 1; transition: all .3s; }
.sticky-cta__close:hover { color: var(--white); background: rgba(255,255,255,.06); }
@media (max-width: 860px) {
  .page-blog .fab { display: none; }
  .sticky-cta { bottom: 12px; }
  .sticky-cta p span { display: none; }
}

@media (max-width: 1024px) {
  .article__layout { grid-template-columns: 1fr; gap: 26px; }
  .article__aside { position: static; }
  .aside-cta { display: none; }
  .toc-toggle { cursor: pointer; display: flex; justify-content: space-between; }
  .toc-toggle span { display: inline; transition: transform .3s; }
  .toc.is-open .toc-toggle span { transform: rotate(180deg); }
  .toc__body { display: grid; grid-template-rows: 0fr; margin-top: 0; max-height: none; overflow: hidden; transition: grid-template-rows .4s var(--ease), margin-top .3s; }
  .toc__body > * { overflow: hidden; }
  .toc.is-open .toc__body { grid-template-rows: 1fr; margin-top: 12px; }
  .article__facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .article__body { font-size: 16px; }
  .author-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
