:root {
  color-scheme: light;
  --page-bg: #fff;
  --text: #37352f;
  --heading: #252525;
  --muted: #787774;
  --separator: #a0a09b;
  --link-decoration: #aaa9a5;
  --link-hover: #0b75bf;
  --surface-hover: #f7f7f5;
  --language-hover: #f1f1ef;
  --border: #e3e3e0;
  --quote-border: #d3d3d0;
  --callout-gray: #f7f7f5;
  --callout-gray-nested: #ececea;
  --callout-blue: #e4f2fb;
  --callout-yellow: #fbf3db;
  --step-red: #ffe2dd;
  --step-yellow: #fdecc8;
  color: var(--text);
  background: var(--page-bg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #191919;
  --text: #d4d4d4;
  --heading: #e9e9e7;
  --muted: #a4a4a0;
  --separator: #747470;
  --link-decoration: #83837f;
  --link-hover: #80bdf2;
  --surface-hover: #292929;
  --language-hover: #303030;
  --border: #3d3d3d;
  --quote-border: #656565;
  --callout-gray: #2f2f2f;
  --callout-gray-nested: #383838;
  --callout-blue: #243c56;
  --callout-yellow: #514321;
  --step-red: #5c3330;
  --step-yellow: #5a491f;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration-color: var(--link-decoration); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

.topbar {
  height: 44px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--page-bg);
}
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.brand {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.socials { display: flex; align-items: center; gap: 6px; }
.socials a { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 5px; color: var(--heading); text-decoration: none; }
.socials a:hover { color: var(--text); background: var(--language-hover); }
.socials a:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 2px; }
.socials svg { display: block; width: 18px; height: 18px; fill: currentColor; }
.socials .social-cutout { fill: var(--page-bg); }
.language { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.language a { padding: 4px 6px; border-radius: 4px; text-decoration: none; }
.language a:hover { background: var(--language-hover); }
.language a[aria-current] { font-weight: 700; color: var(--text); }
.language span { color: var(--separator); }
.theme-toggle { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 5px; padding: 5px; color: var(--muted); background: transparent; cursor: pointer; }
.theme-toggle:hover { color: var(--text); background: var(--language-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--link-hover); outline-offset: 2px; }
.theme-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon--moon { display: none; }
:root[data-theme="dark"] .theme-icon--sun { display: none; }
:root[data-theme="dark"] .theme-icon--moon { display: block; }

.cover { width: 100%; height: 30vh; max-height: 280px; overflow: hidden; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.locale-en.home > .cover img { object-position: 50% 63.43%; }
.locale-ru.home > .cover img { object-position: 50% 27.15%; }
.locale-ru.page-consultation > .cover img { object-position: 50% 43.89%; }
.locale-ru.page-itinerary > .cover img { object-position: 50% 79.99%; }
.page-content { width: min(100% - 32px, 704px); margin: 0 auto 100px; }
.home .page-content { margin-top: -72px; }
.service-page .page-content { margin-top: -38px; }
.avatar { display: block; width: 124px; height: 124px; object-fit: cover; border-radius: 4px; }
.page-icon { display: block; width: 72px; height: 72px; object-fit: contain; }
.service-page .content h1 { margin-top: 24px; }
.back-home { display: inline-block; margin: 24px 0; color: var(--muted); font-size: 14px; text-decoration: none; }
.back-home:hover { color: var(--text); text-decoration: underline; }

.content h1, .page-content > h1 {
  margin: 20px 0 24px;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: var(--heading);
}
.locale-en.home > .page-content .content h1 { font-size: clamp(18px, 5.2vw, 38px); font-style: italic; font-weight: 400; letter-spacing: -.025em; white-space: nowrap; }
.content h2 { margin: 36px 0 12px; font-size: 24px; line-height: 1.3; font-weight: 600; }
.content h3 { margin: 30px 0 8px; font-size: 20px; line-height: 1.3; font-weight: 600; }
.content p { margin: 0 0 16px; }
.content strong { font-weight: 700; }
.content ul, .content ol { padding-left: 28px; margin: 8px 0 18px; }
.content li { padding-left: 2px; margin: 4px 0; }
.content li p { margin: 0; }
.content img:not(.avatar) { display: block; max-width: 100%; height: auto; margin: 0; }
.content p:has(> img:only-child) { margin: 28px 0; }
.content .step-title { padding: 1px 3px; border-radius: 3px; }
.step-title--red { background: var(--step-red); }
.step-title--yellow { background: var(--step-yellow); }

.callout {
  display: block;
  position: relative;
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 9px;
  background: var(--callout-gray);
  font-style: normal;
}
.callout--gray { background: var(--callout-gray); }
.callout--blue { background: var(--callout-blue); }
.callout--yellow { background: var(--callout-yellow); }
.callout.has-icon { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 8px; }
.callout.has-icon > .callout-icon { grid-column: 1; grid-row: 1; align-self: start; line-height: 1.5; }
.callout.has-icon > :not(.callout-icon) { grid-column: 2; }
.callout > :last-child { margin-bottom: 0; }
.callout h2:first-child, .callout h3:first-child { margin-top: 0; }
.callout .callout--gray { background: var(--callout-gray-nested); }

.content blockquote {
  margin: 18px 0;
  padding: 0 0 0 16px;
  border-left: 3px solid var(--quote-border);
  color: var(--text);
}
.content blockquote > :last-child { margin-bottom: 0; }
.review { font-style: italic; }
.reviews .review { margin: 0 0 32px; }
.review p:last-child { font-style: normal; color: var(--muted); }
.review-note { color: var(--muted); }

.services { margin: 28px 0; }
.services h2 { margin: 0 0 12px; font-size: 22px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.service-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  transition: background .15s ease;
}
.service-card:hover { color: inherit; background: var(--surface-hover); }
.service-card-image { display: block; height: 110px; overflow: hidden; background: var(--surface-hover); }
.content .service-card-image img { display: block; width: 100%; max-width: none; height: 100%; margin: 0; object-fit: cover; }
.service-card-label { display: flex; align-items: flex-start; gap: 8px; min-height: 56px; padding: 10px 12px 12px; }
.content img.service-card-icon { flex: none; width: 18px; height: 18px; margin: 1px 0 0; object-fit: contain; }
.service-card-title { font-size: 14px; line-height: 1.35; font-weight: 600; }

.service-dialog {
  width: min(1000px, calc(100vw - 48px));
  height: min(920px, calc(100dvh - 96px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--page-bg);
  box-shadow: 0 18px 60px rgb(0 0 0 / 25%);
  overflow: hidden;
}
.service-dialog[open] { display: flex; flex-direction: column; }
.service-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.dialog-toolbar { flex: none; display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 0 12px; background: var(--page-bg); }
.dialog-toolbar a, .dialog-toolbar button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font: inherit; font-size: 22px; text-decoration: none; cursor: pointer; }
.dialog-toolbar .dialog-expand svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dialog-toolbar a:hover, .dialog-toolbar button:hover { color: var(--text); background: var(--surface-hover); }
.dialog-toolbar a:focus-visible, .dialog-toolbar button:focus-visible { outline: 2px solid var(--link-hover); }
.dialog-body { flex: 1; min-height: 0; margin: 10px 8px 12px 0; overflow-y: auto; overscroll-behavior: contain; }
.dialog-body::-webkit-scrollbar-thumb { border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-radius: 999px; background-color: var(--muted); background-clip: padding-box; }
.service-dialog .cover { height: 30vh; max-height: 280px; }
.service-dialog.locale-ru.page-consultation .cover img { object-position: 50% 43.89%; }
.service-dialog.locale-ru.page-itinerary .cover img { object-position: 50% 79.99%; }
.service-dialog .page-content { margin-top: -38px; margin-bottom: 48px; }
.service-dialog .page-content .content h1 { margin-top: 24px; }

@media (max-width: 680px) {
  .topbar { padding: 0 16px; }
  .topbar-actions { gap: 12px; }
  .socials { gap: 4px; }
  .home .page-content { margin-top: -56px; }
  .avatar { width: 112px; height: 112px; }
  .service-page .page-content { margin-top: -34px; }
  .page-icon { width: 68px; height: 68px; }
  .content h1, .page-content > h1 { font-size: 32px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card-image { height: 145px; }
  .callout { padding: 16px; }
  .service-dialog { width: calc(100vw - 24px); height: calc(100dvh - 48px); border-radius: 8px; }
  .service-dialog .page-content { margin-top: -34px; }
}
