/* Д-р Дарко: public site styles. Light mode only.
   TODO(clinic): brand colors live in :root (medical red, taken from the clinic's logo). */

:root {
  color-scheme: light only;

  --bg: #fdfbfa;
  --surface: #ffffff;
  --tint: #fbf2f1;
  --ink: #10303a;
  --ink-2: #3f5660;
  --muted: #6c7f86;
  --line: #efe6e5;
  --primary: #c8202a;
  --primary-600: #a3161e;
  --primary-50: #fdeceb;
  --accent: #ee3a34;
  --accent-50: #fff1ec;
  --danger: #b4372f;
  --success: #1c8a5a;

  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-logo: 'Didact Gothic', 'Manrope', sans-serif;
  --font-script: 'Marck Script', cursive;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 48, 58, .06), 0 2px 8px rgba(16, 48, 58, .04);
  --shadow: 0 2px 6px rgba(16, 48, 58, .05), 0 18px 40px -12px rgba(16, 48, 58, .14);
  --shadow-lg: 0 30px 60px -20px rgba(200, 32, 42, .30);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  padding: 12px 22px; font-weight: 700; font-size: .98rem; text-decoration: none;
  transition: background .2s, color .2s, box-shadow .2s, transform .1s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px rgba(200, 32, 42, .6); }
.btn-primary:hover { background: var(--primary-600); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-logo); font-size: 1.4rem; font-weight: 400; letter-spacing: .01em; color: #111; }
.brand-text em { font-family: var(--font-script); font-style: normal; font-size: .98rem; color: var(--ink-2); margin-top: 1px; }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; position: relative; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s; border-radius: 2px; }
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: 6px 11px; font-size: .8rem; font-weight: 800; letter-spacing: .04em; color: var(--muted);
}
.lang-switch button[aria-pressed='true'] { background: var(--primary); color: #fff; }

.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; padding: 0 11px; flex-direction: column; justify-content: center; gap: 4px; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 88px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: auto -10% -40% 40%; height: 120%;
  background: radial-gradient(closest-side, var(--primary-50), transparent 70%);
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-copy h1 { margin-bottom: 20px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 34px; }
.hero-features { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-features li { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); font-size: .95rem; }
.hero-visual { position: relative; justify-self: center; width: min(440px, 100%); }
.portrait {
  margin: 0; border-radius: 220px 220px 28px 28px; overflow: hidden;
  background: var(--primary-50); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.float-card {
  position: absolute; left: -36px; bottom: 34px;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow);
  min-width: 220px;
}
.float-card small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.float-card strong { font-size: 1rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 18%, transparent); flex: none; animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--success) 6%, transparent); } }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: 44px; max-width: 720px; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .lead { margin-inline: auto; }
.section-head.center .eyebrow::before { display: none; }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.service img { margin-bottom: 18px; }
.service p { color: var(--ink-2); margin: 0; font-size: .97rem; }

/* ---------- booking ---------- */
.booking {
  max-width: 920px; margin: 0 auto;
  background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); border: 1px solid var(--line);
  position: relative;
}
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: #fdfafa; border-radius: 26px 26px 0 0; overflow: hidden; }
.step { display: flex; align-items: center; gap: 10px; padding: 18px 24px; color: var(--muted); font-size: .92rem; position: relative; }
.step span {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1.5px solid var(--line); font-weight: 800; font-size: .85rem; background: var(--surface);
}
.step b { font-weight: 700; }
.step.is-active { color: var(--ink); }
.step.is-active span { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.is-done span { background: var(--primary-50); border-color: var(--primary-50); color: var(--primary); }
.step.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--primary); }

.panel { border: 0; margin: 0; padding: 32px; min-width: 0; }
.panel-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; }
.label { display: block; font-weight: 700; margin-bottom: 8px; font-size: .95rem; }
.label small { font-weight: 500; color: var(--muted); }
.field { margin-top: 18px; }
input[type='text'], input[type='tel'], input[type='email'], input[type='date'], textarea, select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  padding: 13px 15px; font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
[aria-invalid='true'] { border-color: var(--danger) !important; }
.error { color: var(--danger); font-size: .88rem; font-weight: 600; margin: 6px 0 0; min-height: 0; }
.error:empty { display: none; }

/* searchable combobox */
.combobox { position: relative; }
.combobox input { padding-right: 46px; padding-left: 44px; background: var(--surface) url('/img/icons/search.svg') no-repeat 15px center / 18px; }
.combobox-toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer;
}
.combobox-toggle::before { content: ''; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
.combobox ul {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  list-style: none; margin: 0; padding: 6px; max-height: min(420px, 60vh); overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.combobox li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: .96rem; line-height: 1.35; }
.combobox li[aria-selected='true'] { background: var(--primary-50); color: var(--primary-600); font-weight: 600; }
.combobox li.is-active { background: var(--tint); }
.combobox li.empty { color: var(--muted); cursor: default; }
.combobox mark { background: var(--accent-50); color: inherit; border-radius: 3px; padding: 0 1px; }

/* calendar + times */
.datetime { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.calendar { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head strong { font-family: var(--font-serif); font-size: 1.1rem; text-transform: capitalize; }
.cal-nav { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.cal-nav:disabled { opacity: .35; cursor: not-allowed; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1; border: 0; background: transparent; border-radius: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-weight: 700; font-size: .95rem; position: relative;
}
.cal-day small { font-size: .62rem; font-weight: 600; color: var(--success); }
.cal-day:hover:not(:disabled) { background: var(--tint); }
.cal-day:disabled { color: #c3cdd0; cursor: default; }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--line); }
.cal-day[aria-pressed='true'] { background: var(--primary); color: #fff; }
.cal-day[aria-pressed='true'] small { color: #ffd6d4; }
.times .label { margin-bottom: 12px; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; padding: 2px; }
.time-grid .muted { grid-column: 1 / -1; }
.slot {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 0;
  font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s;
}
.slot:hover:not(:disabled) { border-color: var(--primary); }
.slot:disabled { color: #b9c4c7; background: #f6f8f7; text-decoration: line-through; cursor: not-allowed; }
.slot[aria-checked='true'] { background: var(--primary); border-color: var(--primary); color: #fff; }

/* details */
.summary {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  background: var(--tint); border-radius: var(--radius-sm); padding: 14px 18px; font-size: .95rem;
}
.summary span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.span-2 { grid-column: span 2; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented label { flex: 1 1 auto; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; text-align: center; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 12px; cursor: pointer; font-weight: 600; font-size: .92rem; white-space: nowrap;
}
.segmented input:checked + span { border-color: var(--primary); background: var(--primary-50); color: var(--primary-600); }
.segmented input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-50); }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-size: .93rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; accent-color: var(--primary); margin-top: 2px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.secure-note { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; font-size: .86rem; color: var(--muted); }

.success { text-align: center; padding: 56px 32px; }
.success:focus { outline: none; }
.success-icon svg circle { stroke: var(--success); stroke-width: 2; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .6s ease forwards; }
.success-icon svg path { stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s .5s ease forwards; }
.success-icon { display: grid; place-items: center; margin-bottom: 16px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.success-when { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.about-visual { position: relative; }
.about-visual img { border-radius: 28px; box-shadow: var(--shadow-lg); width: 100%; }
.quote {
  position: absolute; right: -24px; bottom: -28px; max-width: 280px; margin: 0;
  background: var(--surface); border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow);
  font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; line-height: 1.4; border-left: 4px solid var(--accent);
}
.role { color: var(--primary); font-weight: 700; margin-top: -6px; }
.about-copy p { color: var(--ink-2); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0 0; }
.kpis div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.kpis dt { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 600; color: var(--primary); line-height: 1; }
.kpis dd { margin: 6px 0 0; font-size: .85rem; color: var(--muted); font-weight: 600; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 18px; }
.gallery figure { margin: 0; position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-sm); background: var(--primary-50); }
.gallery .g-main { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 14px; bottom: 14px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem;
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.contact-cards { display: grid; gap: 14px; margin-top: 10px; }
.contact-card { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.contact-card img { margin-top: 3px; flex: none; }
.contact-card h3 { font-family: var(--font-sans); font-size: .95rem; font-weight: 800; margin-bottom: 6px; }
.contact-card p { margin: 0; color: var(--ink-2); }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 3px 22px; margin: 0; font-size: .93rem; }
.hours dt { color: var(--ink-2); }
.hours dd { margin: 0; font-weight: 700; }
.hours dd.closed { color: var(--muted); font-weight: 600; }
.hours .is-today { color: var(--primary); }
.emergency { margin-top: 18px; font-size: .9rem; color: var(--danger); font-weight: 600; }
.map { margin: 0; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); background: var(--tint); }
.map iframe { display: block; width: 100%; height: 440px; border: 0; }
.map figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface); font-size: .9rem; font-weight: 600; flex-wrap: wrap; }
.map figcaption a { font-weight: 700; text-decoration: none; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; background: var(--surface); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.brand-footer { gap: 12px; color: var(--muted); }
.footer-link { color: var(--muted); font-weight: 600; text-decoration: none; }
.footer-link:hover { color: var(--primary); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero-visual { order: -1; width: min(360px, 100%); }
  .float-card { left: 50%; translate: -50% 0; bottom: -22px; }
  .hero-copy { text-align: left; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .datetime { grid-template-columns: 1fr; }
  .quote { right: 12px; bottom: -24px; }
  .about-copy { margin-top: 24px; }
}
@media (max-width: 820px) {
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 16px 16px; display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: flex; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hide-sm { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .steps .step { padding: 14px 10px; justify-content: center; }
  .steps .step b { display: none; }
  .step.is-active b { display: inline; }
  .panel { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: none; }
  .gallery .g-main { grid-row: auto; }
  .kpis { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .kpis div { padding: 14px 10px; }
  .kpis dt { font-size: 1.4rem; }
  .brand-text em { display: none; }
  .header-inner { gap: 10px; }
  .segmented span { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
