/* ==========================================================================
   Nébula — tokens
   ========================================================================== */
:root {
  --bg: #FAFBFD;
  --bg-soft: #F3F5F9;
  --ink: #1B2233;
  --text: #5E6679;
  --muted: #8A92A5;
  --blue: #3A6BE0;
  --blue-dark: #2B57C7;
  --blue-soft: #7FA6EE;
  --line: #E3E8F1;
  --white: #fff;

  --font: 'Manrope', system-ui, sans-serif;
  --wrap: 1320px;
  --gutter: clamp(18px, 4.4vw, 64px);
  --radius: 22px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow: 0 18px 50px -20px rgba(40, 70, 140, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
svg { fill: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin: 0 auto; }
.label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); font-weight: 500; margin-bottom: 14px; }
h2 { font-weight: 300; font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.12; color: var(--ink); letter-spacing: -.01em; }
.text { color: var(--text); max-width: 42ch; }

/* reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: .08s; } [data-delay="2"] { transition-delay: .16s; }
[data-delay="3"] { transition-delay: .24s; } [data-delay="4"] { transition-delay: .32s; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 13px 26px; border-radius: 100px; font-size: 13.5px; font-weight: 500; white-space: nowrap;
  overflow: hidden; isolation: isolate; transition: color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease), border-color .35s;
}
.btn .arr, .more svg { width: 16px; height: 16px; stroke: currentColor; transition: transform .35s var(--ease); }
.btn:hover .arr, .more:hover svg { transform: translateX(4px); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: translateY(101%); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transition: transform .5s var(--ease), border-radius .5s var(--ease); }
.btn:hover::before { transform: none; border-radius: 0; }

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 26px -10px rgba(58, 107, 224, .7); }
.btn-primary::before { background: var(--blue-dark); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(58, 107, 224, .75); }
.btn-outline { border: 1px solid #B8C7EC; color: var(--blue); background: rgba(255,255,255,.4); }
.btn-outline::before { background: var(--blue); }
.btn-outline:hover { color: #fff; border-color: var(--blue); }
.btn-lg { padding: 16px 30px; }
.btn-full { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .35s, box-shadow .35s, padding .35s; }
.header.scrolled { background: rgba(250, 251, 253, .85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header-in { width: min(1380px, 100% - var(--gutter) * 2); margin: 0 auto; display: flex; align-items: center; gap: 36px; padding: 22px 0; transition: padding .35s; }
.header.scrolled .header-in { padding: 12px 0; }

.logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.logo-star { width: 34px; height: 34px; }
.logo-word { font-weight: 300; font-size: 19px; letter-spacing: .32em; color: var(--ink); }
.logo-sub { font-size: 7.5px; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; margin-left: 4px; }
.logo-sm .logo-star { width: 26px; height: 26px; } .logo-sm .logo-word { font-size: 15px; }

.nav { display: flex; gap: 38px; margin: 0 auto; }
.nav a { position: relative; font-size: 13px; color: var(--text); padding: 8px 0; transition: color .3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.header-phone { display: flex; align-items: center; gap: 12px; }
.hp-ico { width: 20px; height: 20px; color: var(--ink); }
.hp-ico svg { width: 100%; height: 100%; }
.hp-txt b { display: block; font-weight: 500; font-size: 13.5px; color: var(--ink); line-height: 1.2; }
.hp-txt small { font-size: 11px; color: var(--muted); }

.burger { display: none; width: 42px; height: 42px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); position: relative; margin-left: auto; }
.burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease), top .35s var(--ease); }
.burger span:nth-child(1) { top: 16px; } .burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 20.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 20.5px; transform: rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; min-height: 100vh; max-height: 980px; padding-top: 110px; background: linear-gradient(180deg, #FDFEFF 0%, #F3F6FB 100%); overflow: hidden; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.g1 { width: 520px; height: 520px; right: 8%; top: 4%; background: rgba(160, 195, 255, .35); animation: drift 14s ease-in-out infinite alternate; }
.g2 { width: 380px; height: 380px; left: -6%; bottom: -10%; background: rgba(200, 220, 255, .45); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.08); } }

.hero-in { position: relative; width: min(1380px, 100% - var(--gutter) * 2); margin: 0 auto; min-height: calc(100vh - 110px); max-height: 870px; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(0, 1.25fr); align-items: center; }
.hero-text { position: relative; z-index: 3; padding-bottom: 40px; }
.kicker { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #667086; margin-bottom: 26px; max-width: 46ch; }
.hero h1 { font-weight: 300; font-size: clamp(2.5rem, 3.7vw, 3.55rem); line-height: 1.13; letter-spacing: -.015em; color: var(--ink); max-width: 11ch; margin-bottom: 28px; }
.hero h1 span { color: var(--blue-soft); }
.lede { max-width: 38ch; margin-bottom: 38px; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.play { display: flex; align-items: center; gap: 14px; font-size: 11.5px; line-height: 1.35; color: var(--text); }
.play-btn { width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; transition: transform .35s var(--ease), background .35s; position: relative; }
.play-btn svg { width: 15px; height: 15px; fill: var(--ink); margin-left: 2px; transition: fill .3s; }
.play-btn::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--blue-soft); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.play:hover .play-btn { transform: scale(1.08); background: var(--blue); }
.play:hover .play-btn svg { fill: #fff; }

.hero-visual { position: relative; align-self: end; justify-self: center; width: min(100%, 700px); z-index: 1; }
.hero-img {
  width: 100%; animation: float 7s ease-in-out infinite alternate; transition: transform .2s linear;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(to bottom, transparent 0, #000 12%, #000 100%);
  mask-composite: intersect;
}
@keyframes float { to { translate: 0 -14px; } }

.fi { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: #fff; box-shadow: 0 8px 24px -8px rgba(60, 90, 160, .25); display: grid; place-items: center; color: var(--ink); transition: transform .4s var(--ease), background .4s, color .4s; }
.fi svg { width: 24px; height: 24px; }
.fi-sm { width: 44px; height: 44px; background: #EEF3FC; box-shadow: none; color: #3A5A9A; }
.fi-sm svg { width: 22px; height: 22px; }

.hero-feats { position: absolute; right: 0; top: 16%; z-index: 3; display: grid; gap: 34px; }
.hero-feats li { display: flex; align-items: center; gap: 14px; font-size: 11.5px; line-height: 1.35; color: var(--text); }
.hero-feats li:hover .fi { transform: scale(1.1); background: var(--blue); color: #fff; }

.hero-stat { position: absolute; right: 0; bottom: 40px; z-index: 3; display: flex; gap: 14px; align-items: center; padding: 14px 20px 14px 14px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); }
.hero-stat b { display: block; font-weight: 500; font-size: 12px; color: var(--ink); }
.hero-stat small { display: block; font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.avatars { display: flex; }
.avatars img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 2px solid #fff; margin-left: -6px; background: var(--bg-soft); }
.avatars img:first-child { margin-left: 0; }

.hero-rail { position: absolute; left: -46px; bottom: 60px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.hero-rail span { writing-mode: vertical-rl; transform: rotate(180deg); }
.hero-rail i { width: 1px; height: 36px; background: var(--muted); position: relative; animation: rail 2s ease-in-out infinite; transform-origin: top; }
@keyframes rail { 0%,100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding: 100px 0 80px; background: var(--bg); }
.services-grid { display: grid; grid-template-columns: 300px 1fr; gap: 60px; align-items: center; }
.services-intro h2 { margin-bottom: 20px; }
.services-intro .text { margin-bottom: 34px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: linear-gradient(180deg, #F4F6FA, #F1F4F9); border-radius: var(--radius); padding: 18px 20px 24px; transition: transform .5s var(--ease), box-shadow .5s var(--ease), background .5s; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); background: #fff; }
.card-ico { height: 118px; display: grid; place-items: center; margin-bottom: 22px; }
.card-ico img { height: 100%; width: auto; mix-blend-mode: multiply; transition: transform .6s var(--ease); }
.card:hover .card-ico img { transform: scale(1.08) rotate(-3deg); }
.card h3 { font-weight: 500; font-size: 15px; color: var(--ink); margin-bottom: 12px; }
.card p { font-size: 12px; line-height: 1.65; color: var(--muted); margin-bottom: 18px; min-height: 60px; }
.more { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--blue); }

/* ==========================================================================
   Clinic
   ========================================================================== */
.clinic { position: relative; padding: 20px 0 80px; background: var(--bg); }
.blob { position: absolute; border-radius: 50%; pointer-events: none; }
.b1 { width: 320px; height: 320px; right: -120px; top: 40px; background: radial-gradient(circle at 40% 40%, #EEF3FD, #E7EEFB); }
.b2 { width: 130px; height: 80px; left: 36%; bottom: 20px; background: #E6EEFC; transform: rotate(-24deg); }
.clinic-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.clinic-media { margin-left: -2vw; }
.clinic-media img { width: 100%; mix-blend-mode: multiply; transition: transform 1.2s var(--ease); }
.clinic-media:hover img { transform: scale(1.02); }
.clinic-text { padding-right: var(--gutter); max-width: 560px; justify-self: start; margin-left: 4vw; }
.clinic-text h2 { margin-bottom: 22px; }
.clinic-text .text { margin-bottom: 34px; max-width: 46ch; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 36px; margin-bottom: 36px; }
.feats li { display: flex; align-items: center; gap: 14px; font-size: 11.5px; line-height: 1.4; color: var(--text); }
.feats li:hover .fi { transform: scale(1.1); background: var(--blue); color: #fff; }

/* ==========================================================================
   Doctors
   ========================================================================== */
.doctors { padding: 40px 0 80px; background: var(--bg); }
.doctors-grid { display: grid; grid-template-columns: 340px 1fr; gap: 60px; align-items: center; }
.doctors-intro h2 { margin-bottom: 20px; }
.doctors-intro .text { margin-bottom: 30px; }
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.doc { background: #fff; border-radius: var(--radius); padding: 6px 6px 12px; box-shadow: 0 10px 40px -22px rgba(40, 70, 140, .3); border: 1px solid #EEF1F7; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.doc:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.doc-photo { border-radius: 16px; overflow: hidden; aspect-ratio: 1.35 / 1; background: var(--bg-soft); }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform .8s var(--ease); }
.doc:hover .doc-photo img { transform: scale(1.06); }
.doc-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 12px 4px 10px; }
.doc-info h3 { font-weight: 500; font-size: 12.5px; color: var(--ink); line-height: 1.35; margin-bottom: 2px; }
.doc-info p { font-size: 11px; color: var(--muted); }
.round { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: #EEF3FC; color: var(--blue); display: grid; place-items: center; transition: background .3s, color .3s, transform .35s var(--ease); }
.round svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; }
.round:hover { background: var(--blue); color: #fff; transform: translateX(3px); }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-wrap { padding: 20px 0 70px; background: var(--bg); }
.cta { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr 1.2fr auto; gap: 40px; align-items: center; padding: 38px 56px; border-radius: 26px; background: linear-gradient(100deg, #EEF3FC 0%, #E3ECFB 55%, #DCE7FA 100%); }
.cta-swirl { position: absolute; right: 0; top: 0; width: 60%; height: 100%; opacity: .9; pointer-events: none; animation: swirl 12s ease-in-out infinite alternate; }
@keyframes swirl { to { transform: translateX(-30px) scaleY(1.08); } }
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.6rem, 2.3vw, 2.15rem); max-width: 14ch; }
.cta .label { font-size: 9px; }
.cta-m { display: flex; align-items: center; gap: 32px; }
.cta-m p { font-size: 12px; max-width: 28ch; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding: 30px 0 40px; border-top: 1px solid var(--line); background: var(--bg); }
.footer-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { font-size: 11.5px; color: var(--muted); max-width: 60ch; }

/* ==========================================================================
   Modal
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; visibility: hidden; opacity: 0; transition: opacity .35s, visibility .35s; }
.modal.open { visibility: visible; opacity: 1; }
.modal-back { position: absolute; inset: 0; background: rgba(20, 30, 60, .45); backdrop-filter: blur(6px); }
.modal-box { position: relative; width: min(460px, 100%); background: #fff; border-radius: 26px; padding: 40px 36px 34px; box-shadow: 0 40px 100px -30px rgba(20, 40, 100, .5); transform: translateY(30px) scale(.97); transition: transform .5s var(--ease); }
.modal.open .modal-box { transform: none; }
.modal-x { position: absolute; right: 18px; top: 14px; font-size: 28px; line-height: 1; color: var(--muted); width: 36px; height: 36px; border-radius: 50%; transition: background .3s; }
.modal-x:hover { background: var(--bg-soft); }
.modal-form h3, .modal-ok h3 { font-weight: 400; font-size: 26px; color: var(--ink); margin-bottom: 8px; }
.modal-form > p { font-size: 13px; margin-bottom: 26px; }
.field { position: relative; display: block; margin-bottom: 14px; }
.field input, .field select { width: 100%; padding: 22px 16px 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-size: 14.5px; color: var(--ink); outline: none; transition: border-color .3s, box-shadow .3s; appearance: none; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(58, 107, 224, .12); }
.field span { position: absolute; left: 17px; top: 16px; font-size: 14px; color: var(--muted); pointer-events: none; transition: transform .25s var(--ease), color .25s; transform-origin: left top; }
.field input:focus + span, .field input:not(:placeholder-shown) + span, .field-select span { transform: translateY(-10px) scale(.78); color: var(--blue); }
.field.invalid input { border-color: #E5546B; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 11.5px; color: var(--muted); margin: 6px 0 20px; }
.agree input { margin-top: 2px; accent-color: var(--blue); }
.form-msg { min-height: 1.4em; margin-top: 12px; font-size: 12.5px; color: #E5546B; text-align: center; }
.modal-ok { text-align: center; padding: 20px 0 10px; }
.ok-ico { width: 64px; height: 64px; border-radius: 50%; background: #EAF1FF; color: var(--blue); font-size: 30px; display: grid; place-items: center; margin: 0 auto 20px; animation: pop .6s var(--ease); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .nav { gap: 24px; }
  .header-in { gap: 22px; }
  .logo-sub { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; gap: 40px; }
  .doctors-grid { grid-template-columns: 1fr; gap: 40px; }
  .cta { grid-template-columns: 1fr; padding: 36px; gap: 24px; }
  .cta-m { flex-wrap: wrap; }
}

@media (max-width: 980px) {
  .header-phone:not(.cta-phone), .header-cta { display: none; }
  .burger { display: block; }
  .nav { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: 28px; margin: 0; background: rgba(250, 251, 253, .97); backdrop-filter: blur(16px); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
  .nav a { font-size: 22px; font-weight: 300; }
  .nav.open { opacity: 1; visibility: visible; }
  .header-in { position: relative; }

  .hero { max-height: none; }
  .hero-in { grid-template-columns: 1fr; max-height: none; min-height: 0; padding-bottom: 0; }
  .hero-text { padding-bottom: 20px; }
  .hero h1 { max-width: 14ch; }
  .hero-visual { margin-top: -30px; width: min(100%, 560px); }
  .hero-feats { position: static; grid-auto-flow: column; gap: 18px; margin: 0 0 24px; order: 3; overflow-x: auto; }
  .hero-feats li { flex-shrink: 0; }
  .hero-stat { position: absolute; right: 0; bottom: 20px; }
  .hero-rail { display: none; }

  .clinic-in { grid-template-columns: 1fr; }
  .clinic-media { margin: 0 -20px; }
  .clinic-text { margin: 0; padding: 0; }
  .b1 { display: none; }
  .docs { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .cards, .docs { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr; }
  .hero-actions { gap: 20px; }
  .cta { padding: 28px 22px; }
  .cta-m { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero-stat { padding: 10px 14px 10px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
