/* Demo kliniky – jeden serif (Newsreader) na nadpisy, jeden grotesk (Hanken Grotesk) na text. */
:root {
  --paper: #f5f2ed;
  --surface: #fbf9f5;
  --tint: #ebe5dc;
  --ink: #1d211f;
  --ink-2: #3c403d;
  --muted: #5d615c;
  --line: #d6cfc4;
  --line-soft: #e4ded4;
  --accent: #8a4f36;
  --accent-soft: #f0e3d9;
  --ok: #3d6a4e;
  --error: #a3302a;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Typografická škála ~1.33 */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.625rem;
  --fs-xl: clamp(2rem, 3.4vw, 2.75rem);
  --fs-hero: clamp(2.6rem, 6vw, 4.75rem);

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-base)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); line-height: 1.3; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
.anchor-alias { position: relative; top: -24px; display: block; height: 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

.kicker { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.04em; color: var(--accent); margin-bottom: 14px; }

/* Tlačidlá a odkazy */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: var(--fs-base); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #333a36; }
.btn-primary:disabled { background: #6f7470; cursor: progress; }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0;
  background: none; border: 0; color: var(--ink); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--line); text-underline-offset: 6px;
}
.link-arrow::after { content: "→"; transition: transform .15s ease; }
.link-arrow:hover { text-decoration-color: var(--accent); }
.link-arrow:hover::after { transform: translateX(3px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Demo lišta a hlavička */
.demo-bar { margin: 0; padding: 9px var(--gutter); background: var(--ink); color: #e9e4dc; font-size: var(--fs-sm); text-align: center; }

.site-header { border-bottom: 1px solid var(--line-soft); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.wordmark { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; letter-spacing: -0.01em; margin: 0; }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); font-size: 0.95rem; }
.main-nav a:hover { color: var(--ink); text-decoration: underline; }
.header-cta { min-height: 44px; padding: 0 18px; }
.menu-toggle { display: none; }

/* Hero */
.hero { padding: clamp(48px, 7vw, 96px) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: var(--fs-hero); line-height: 1.04; letter-spacing: -0.02em; max-width: 15ch; }
.hero h1 em { display: block; font-style: italic; color: var(--accent); }
.hero-lead { margin-top: 28px; font-size: var(--fs-md); line-height: 1.55; color: var(--ink-2); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.hero-photo { margin: 0; }
.photo-slot, .map-slot {
  display: grid; place-items: center; text-align: center; padding: 24px;
  background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(29,33,31,.035) 14px 15px), var(--tint);
  border: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm);
}
.photo-slot { aspect-ratio: 5 / 6; max-height: 560px; width: 100%; }
.photo-slot:not(.has-photo) { overflow: hidden; position: relative; border: 0; background: radial-gradient(ellipse at 68% 27%, color-mix(in srgb, var(--accent) 58%, white) 0 12%, transparent 43%), radial-gradient(ellipse at 28% 76%, color-mix(in srgb, var(--accent) 30%, var(--paper)) 0 18%, transparent 48%), linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent) 17%, var(--paper))); }
.photo-slot:not(.has-photo)::after { content: ""; position: absolute; width: 62%; aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 48% 52% 60% 40%; transform: rotate(-28deg); }
.photo-slot.has-photo { background-position: center; background-size: cover; }
.hero-photo figcaption { margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); }

.info-rail { display: grid; grid-template-columns: repeat(3, 1fr); margin: clamp(48px, 6vw, 80px) 0 0; border-top: 1px solid var(--ink); }
.info-rail > div { padding: 20px 24px 28px 0; }
.info-rail > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
dt { font-size: var(--fs-sm); color: var(--muted); }
dd { margin: 4px 0 0; overflow-wrap: anywhere; }

/* Sekcie */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-tint { background: var(--tint); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-aside h2 { margin-bottom: 18px; }
.split-aside > p { color: var(--ink-2); max-width: 34ch; }
.split-aside .link-arrow { margin-top: 16px; }
.placeholder-note { margin-top: 16px; font-size: var(--fs-sm); color: var(--muted) !important; }

/* Ošetrenia */
.treatment-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.treatment {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px 20px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.treatment-no { font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.treatment h3 { font-size: var(--fs-lg); }
.treatment-body p { margin-top: 6px; color: var(--muted); }
.treatment-price { font-family: var(--serif); font-size: var(--fs-md); white-space: nowrap; text-align: right; }
.treatment .link-arrow { grid-column: 2 / -1; justify-self: start; margin-top: 4px; font-size: 0.95rem; min-height: 40px; }

/* Prvá návšteva */
.narrow-title { max-width: 16ch; margin-bottom: 48px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 0; border-top: 1px solid var(--ink); }
.steps li { padding: 28px 32px 8px 0; }
.steps li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.step-no { display: block; font-family: var(--serif); font-size: 2.75rem; line-height: 1; color: var(--accent); margin-bottom: 18px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--ink-2); max-width: 30ch; }

/* Objednávanie */
.booking-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.booking-intro h2 { margin-bottom: 18px; }
.booking-intro > p { color: var(--ink-2); max-width: 34ch; }
.notice { display: grid; gap: 4px; margin-top: 28px; padding: 16px 18px; background: var(--accent-soft); border-left: 3px solid var(--accent); font-size: var(--fs-sm); color: var(--ink-2); }
.notice strong { color: var(--ink); font-size: var(--fs-base); }
.notice[hidden] { display: none; }

.booking-card { background: var(--surface); border: 1px solid var(--line); padding: clamp(20px, 3.4vw, 40px); }
.booking-step { border: 0; margin: 0; padding: 0 0 32px; min-width: 0; }
.booking-step + .booking-step { padding-top: 28px; border-top: 1px solid var(--line-soft); }
.booking-step > :not(legend) { clear: both; }
legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; padding: 0; margin-bottom: 16px; font-family: var(--serif); font-size: var(--fs-md); }
.legend-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 50%; font: 600 var(--fs-sm)/1 var(--sans); }

select, input:not([type="checkbox"]), textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; background: #fff; color: var(--ink);
  border: 1px solid #b9b1a5; border-radius: var(--radius); font-size: var(--fs-base);
}
textarea { resize: vertical; min-height: 96px; }
select:hover, input:not([type="checkbox"]):hover, textarea:hover { border-color: var(--ink-2); }
[aria-invalid="true"] { border-color: var(--error) !important; box-shadow: 0 0 0 1px var(--error); }
.field-error { margin-top: 8px; color: var(--error); font-size: var(--fs-sm); font-weight: 500; }
.field-error[hidden] { display: none; }
.field-hint { margin-top: 6px; color: var(--muted); font-size: var(--fs-sm); }

.calendar { max-width: 420px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.calendar-month { font-weight: 600; text-transform: capitalize; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-weekdays span { text-align: center; font-size: var(--fs-sm); color: var(--muted); padding: 4px 0; }
.day {
  position: relative; aspect-ratio: 1; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; font-variant-numeric: tabular-nums; color: var(--ink);
}
.day.has-slots { border-color: var(--line); background: #fff; }
.day.has-slots::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.day.has-slots:hover { border-color: var(--ink); }
.day:disabled { color: #857f76; cursor: default; }
.day.is-today { font-weight: 700; }
.day[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.day[aria-pressed="true"]::after { background: #fff; }
.day-blank { aspect-ratio: 1; }

.slots { margin-top: 20px; }
.slots-title { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.slot:hover { border-color: var(--ink); }
.slot[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.slots-empty { padding: 18px; border: 1px dashed var(--line); color: var(--muted); font-size: var(--fs-sm); text-align: center; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-weight: 500; font-size: 0.95rem; }
.field-wide { grid-column: 1 / -1; }
.optional { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: var(--fs-sm); }
.consent { display: flex; align-items: flex-start; gap: 12px; margin-top: 20px; font-size: 0.95rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }

.booking-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.booking-summary { color: var(--muted); font-size: var(--fs-sm); }
.form-status { margin-top: 16px; padding: 12px 14px; background: #f7e4e1; color: var(--error); font-size: var(--fs-sm); font-weight: 500; }
.form-status[hidden] { display: none; }

.booking-done { outline: none; }
.booking-done h3 { font-size: var(--fs-xl); margin-bottom: 20px; }
.booking-done > p { color: var(--ink-2); margin-top: 12px; max-width: 48ch; }
.done-summary { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 20px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.done-summary dd { margin: 0; }
.done-demo { font-size: var(--fs-sm); color: var(--muted) !important; }
.booking-done .btn { margin-top: 24px; }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: stretch; }
.contact-grid h2 { margin-bottom: 32px; }
.contact-list { margin: 0; border-top: 1px solid var(--ink); }
.contact-list > div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dd { margin: 0; }
.map-slot { min-height: 320px; background-color: #e2dbd0; }

/* FAQ */
.faq-list { border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 64px; padding: 16px 0;
  font-family: var(--serif); font-size: var(--fs-md); cursor: pointer; list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font: 400 1.5rem/1 var(--sans); color: var(--accent); transition: transform .2s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 22px; color: var(--ink-2); max-width: 60ch; }

/* Pätička */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 120px; font-size: var(--fs-sm); color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 24px; align-items: start; }
.site-footer .wordmark { color: var(--ink); font-size: 1.25rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.site-header .wordmark { display: inline-flex; align-items: center; min-height: 44px; }

/* Chat */
.chat-launcher {
  position: fixed; z-index: 40; right: 20px; bottom: 20px; display: grid; gap: 1px; text-align: left;
  min-height: 56px; padding: 10px 18px 10px 16px; border: 0; border-radius: var(--radius);
  background: var(--ink); color: #fff; box-shadow: 0 6px 24px rgba(29, 33, 31, .22);
}
.chat-launcher:hover { background: #333a36; }
.chat-launcher-title { font-weight: 600; }
.chat-launcher-sub { font-size: var(--fs-sm); color: #d9d3ca; }
.chat-launcher[hidden] { display: none; }

.chat-panel {
  position: fixed; z-index: 41; right: 20px; bottom: 20px; display: flex; flex-direction: column;
  width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 40px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(29, 33, 31, .22);
}
.chat-panel[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .chat-panel:not([hidden]) { animation: panel-in .18s ease-out; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
.chat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 20px; background: var(--ink); color: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.chat-head h2 { font-size: var(--fs-md); }
.chat-head p { font-size: var(--fs-sm); color: #d9d3ca; margin-top: 2px; }
.icon-btn-light { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; flex: none; }
.icon-btn-light:hover { border-color: #fff; }

.chat-messages { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.message { max-width: 86%; padding: 10px 14px; border-radius: 10px; font-size: 0.95rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line-soft); border-bottom-left-radius: 2px; }
.message.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 2px; }
.message-tag { display: block; margin-bottom: 4px; font-size: 0.8125rem; font-weight: 600; color: var(--accent); }
.message.lead { align-self: stretch; max-width: none; background: var(--accent-soft); border: 0; border-left: 3px solid var(--accent); border-radius: 2px; font-size: var(--fs-sm); }
.message.lead a { font-weight: 600; }
.typing { display: inline-flex; gap: 4px; align-items: center; min-height: 42px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .4; }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: dot 1s infinite ease-in-out; }
  .typing i:nth-child(2) { animation-delay: .15s; }
  .typing i:nth-child(3) { animation-delay: .3s; }
}
@keyframes dot { 30% { opacity: 1; transform: translateY(-3px); } }

.chat-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 16px 8px; padding: 10px 12px; background: #f7e4e1; color: var(--error); font-size: var(--fs-sm); border-radius: 2px; }
.chat-status[hidden] { display: none; }
.chat-status button { flex: none; min-height: 36px; padding: 0 12px; border: 1px solid currentColor; border-radius: var(--radius); background: transparent; color: inherit; font-weight: 600; font-size: var(--fs-sm); }

.chat-chips { display: flex; gap: 6px; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none; }
.chat-chips button { flex: none; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: var(--fs-sm); color: var(--ink-2); }
.chat-chips button:hover { border-color: var(--ink); color: var(--ink); }
.chat-form { display: flex; gap: 8px; padding: 12px 12px 8px 16px; border-top: 1px solid var(--line-soft); }
.chat-form input { min-height: 44px; border-color: var(--line); }
.chat-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: var(--ink); color: #fff; }
.chat-send:disabled { background: #8d918d; cursor: progress; }
.chat-footnote { padding: 0 16px 12px; font-size: 0.8125rem; color: var(--muted); }

/* Tablet */
@media (max-width: 960px) {
  .main-nav { gap: 18px; }
  .hero-grid, .split, .booking-layout, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { max-width: 520px; }
  .photo-slot { aspect-ratio: 16 / 10; }
  .split-aside > p, .booking-intro > p { max-width: 60ch; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Mobil */
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0 12px; min-height: 64px; }
  .wordmark { font-size: 1.3rem; margin-right: auto; }
  .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 600; }
  .header-cta { display: none; }
  .main-nav { display: none; width: 100%; flex-direction: column; gap: 0; margin: 0 0 12px; border-top: 1px solid var(--line-soft); }
  .main-nav.is-open { display: flex; }
  .main-nav a { min-height: 48px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-base); }
  .hero h1 { max-width: none; }
  .info-rail { grid-template-columns: 1fr; }
  .info-rail > div, .info-rail > div + div { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; }
  .step-no { grid-row: span 2; font-size: 2rem; margin: 0; }
  .treatment { grid-template-columns: 32px minmax(0, 1fr); }
  .treatment-price { grid-column: 2; text-align: left; }
  .treatment .link-arrow { grid-column: 2; }
  .fields { grid-template-columns: 1fr; }
  .booking-submit-row .btn { width: 100%; }
  .contact-list > div { grid-template-columns: 1fr; gap: 2px; }
  .map-slot { min-height: 220px; }
  .footer-inner { grid-template-columns: 1fr; }
  .chat-launcher { right: 16px; bottom: 16px; min-height: 52px; }
  .chat-launcher-sub { display: none; }
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .chat-head { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
