/* ===== Алхимия маркетинга — кастомные стили ===== */

:root {
  --bg-deep: #08122b;
  --bg: #0d1a3c;
  --bg-soft: #142552;
  --bg-card: #16264f;
  --line: rgba(212, 164, 55, 0.18);
  --line-soft: rgba(245, 240, 230, 0.08);
  --gold: #d4a437;
  --gold-light: #e8c66a;
  --gold-deep: #a37d1f;
  --purple: #6b4d9c;
  --text: #f5f0e6;
  --text-muted: rgba(245, 240, 230, 0.66);
  --text-faint: rgba(245, 240, 230, 0.42);
  --green: #5dd29a;
  --red: #e87878;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  font-feature-settings: "ss01", "cv11";
  letter-spacing: -0.005em;
}

.font-display {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* ===== Фоновые слои ===== */
.bg-grain {
  position: relative;
  isolation: isolate;
}
.bg-grain::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(212,164,55,0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  pointer-events: none;
  opacity: 0.5;
  z-index: -1;
}

.aurora {
  position: absolute;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 0;
}

/* ===== Радиальная сеть из лого ===== */
.alchemy-mark {
  width: 100%;
  height: 100%;
}

/* ===== Карточки ===== */
.card {
  background: linear-gradient(180deg, rgba(20,37,82,0.55) 0%, rgba(13,26,60,0.55) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  transition: border-color .3s ease, transform .3s ease;
  backdrop-filter: blur(6px);
}
.card:hover {
  border-color: var(--line);
}
.card-gold {
  border-color: var(--line);
}

/* ===== Кнопки ===== */
.btn-primary {
  background: linear-gradient(180deg, #e8c66a 0%, #d4a437 55%, #a37d1f 100%);
  color: #0a1428;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 999px;
  padding: 14px 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(232, 198, 106, 0.35);
  box-shadow: 0 8px 24px -8px rgba(212,164,55,0.45), inset 0 1px 0 rgba(255,255,255,0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(212,164,55,0.55), inset 0 1px 0 rgba(255,255,255,0.5);
}

.btn-ghost {
  background: rgba(245, 240, 230, 0.04);
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 13px 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all .2s ease;
}
.btn-ghost:hover {
  background: rgba(245, 240, 230, 0.07);
  border-color: var(--line);
}

/* ===== Контактные пилюли ===== */
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: rgba(245,240,230,0.04);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s ease;
}
.contact-pill:hover {
  background: rgba(212,164,55,0.08);
  border-color: var(--line);
}
.icon-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  overflow: hidden;
}
.icon-circle svg {
  display: block;
  width: 55%;
  height: 55%;
}
.contact-pill .icon-circle svg { width: 16px; height: 16px; }
.icon-tg { background: linear-gradient(180deg, #4eb3e9, #2a8bc7); }
.icon-max { background: linear-gradient(180deg, #ffd84d, #f0b800); color: #1a1a1a; }

/* ===== Stat (большие цифры) ===== */
.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: var(--gold-light);
  letter-spacing: -0.02em;
}
.stat-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  font-family: 'JetBrains Mono', monospace;
}

/* ===== Section labels ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
}

/* ===== Hairline divider ===== */
.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent);
}

/* ===== Service tile ===== */
.service-tile {
  position: relative;
  padding: 36px 32px 32px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(20,37,82,0.4), rgba(13,26,60,0.4));
  overflow: hidden;
  transition: all .35s cubic-bezier(.2,.7,.3,1);
}
.service-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(212,164,55,0.12), transparent 50%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.service-tile:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}
.service-tile:hover::after { opacity: 1; }

.service-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 0.2em;
}

/* ===== Process step ===== */
.step-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 88px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  letter-spacing: -0.04em;
}

/* ===== Inputs ===== */
.input {
  width: 100%;
  background: rgba(8, 18, 43, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 15px 18px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s ease, background .2s ease;
}
.input::placeholder { color: var(--text-faint); }
.input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(8, 18, 43, 0.85);
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(245,240,230,0.03);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s ease;
}
.radio-pill input { display: none; }
.radio-pill:has(input:checked) {
  border-color: var(--gold);
  background: rgba(212,164,55,0.1);
  color: var(--gold-light);
}

/* ===== Animated underline ===== */
.under-gold {
  background-image: linear-gradient(90deg, var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  padding-bottom: 2px;
}

/* ===== Marquee ===== */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ===== Glow ring ===== */
.glow-ring {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent, var(--gold), transparent 30%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.card:hover .glow-ring { opacity: 0.6; }

/* ===== Chart bars (mini) ===== */
.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
}
.spark span {
  flex: 1;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
  border-radius: 2px;
  opacity: 0.9;
}

/* ===== Proof screenshots ===== */
.proof-shot {
  position: relative;
  display: block;
  width: 100%;
  background: #f5f6f8;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
}
.proof-shot:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}
.proof-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.proof-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #ebeef2;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #6b7280;
}
.proof-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.proof-dot-red    { background: #ec6a5e; }
.proof-dot-yellow { background: #f5be4f; }
.proof-dot-green  { background: #62c554; }
.proof-url {
  margin-left: 14px;
  padding: 3px 10px;
  background: rgba(255,255,255,0.85);
  border-radius: 999px;
  font-size: 11px;
  color: #6b7280;
  letter-spacing: 0;
}
.proof-zoom-hint {
  margin-left: auto;
  font-size: 10px;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.proof-caption {
  margin-top: 12px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.proof-stat {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 18, 43, 0.5);
  border-radius: 12px;
}

@media (max-width: 640px) {
  .proof-zoom-hint { display: none; }
  .proof-url { margin-left: 6px; }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 18, 43, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s ease;
}
.lightbox.open {
  display: flex;
  opacity: 1;
}
.lightbox-inner {
  max-width: 1400px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.lightbox-caption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.lightbox-close:hover {
  background: rgba(212,164,55,0.18);
  border-color: var(--line);
  color: var(--gold-light);
}
body.lightbox-open { overflow: hidden; }

/* ===== Clinic photo figures (context band) ===== */
.clinic-photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #142552, #0d1a3c 60%, #08122b);
  border: 1px solid var(--line-soft);
  isolation: isolate;
}
.clinic-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15) saturate(0.9) brightness(0.78) contrast(1.05);
  transition: transform .8s cubic-bezier(.2,.7,.3,1), filter .4s ease;
  z-index: 0;
}
.clinic-photo:hover img {
  transform: scale(1.04);
  filter: grayscale(0) saturate(1) brightness(0.88) contrast(1.05);
}
.clinic-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,18,43,0.05) 0%, rgba(8,18,43,0.45) 55%, rgba(8,18,43,0.95) 100%);
  z-index: 1;
  pointer-events: none;
}
.clinic-photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 22px 22px;
  z-index: 2;
  color: var(--text);
}
.clinic-photo-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(212,164,55,0.04) 0 2px, transparent 2px 14px),
    radial-gradient(circle at 30% 30%, rgba(212,164,55,0.10), transparent 60%),
    linear-gradient(180deg, #142552, #0d1a3c);
  z-index: 0;
}
.clinic-photo-fallback::before {
  background: linear-gradient(180deg, transparent 50%, rgba(8,18,43,0.7) 100%);
}

/* ===== Section heading ===== */
.h-section {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}
.h-section em {
  font-style: italic;
  color: var(--gold-light);
  font-weight: 400;
}

/* ===== Logo mark inline ===== */
.mark-flask {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ===== Footer ===== */
footer a:hover { color: var(--gold-light); }

/* ===== Mobile menu ===== */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg-deep);
  z-index: 100;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.mobile-menu.open { transform: none; }

/* ===== Loading dots ===== */
@keyframes dot {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}
.dot-load span {
  display: inline-block; width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin: 0 2px;
  animation: dot 1.2s infinite ease-in-out;
}
.dot-load span:nth-child(2) { animation-delay: .2s; }
.dot-load span:nth-child(3) { animation-delay: .4s; }

/* ===== Result card ===== */
.result-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.result-row:first-child { border-top: none; }
.result-row .label { color: var(--text-muted); font-size: 14px; }
.result-row .value { color: var(--gold-light); font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 600; }

/* ===== Number ticker numeric tabular ===== */
.tabular { font-variant-numeric: tabular-nums; }

/* ===== Subtle shimmer on gold text ===== */
.shimmer-gold {
  background: linear-gradient(90deg, #d4a437 0%, #f5e4a8 50%, #d4a437 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Floating nav glassmorph ===== */
.nav-glass {
  background: rgba(8, 18, 43, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}

/* ===== Focus visible ===== */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Responsive helpers ===== */
@media (max-width: 768px) {
  .step-num { font-size: 64px; }
  .service-tile { padding: 28px 22px 24px; }
}
