/* Сайт услуг. Цвета, шрифты и скругления — только из tokens.css (общий файл трёх шаблонов). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
}

.muted {
  color: var(--muted);
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
}

.narrow {
  max-width: 820px;
}

.measure {
  max-width: 820px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.btn:hover {
  border-color: var(--ink-2);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* Шапка */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 246, 247, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}

.header-call {
  min-height: 40px;
  padding: 8px 16px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 12px 11px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  padding-bottom: 20px;
}

.mobile-nav a:not(.btn) {
  padding: 10px 0;
  color: var(--ink);
  font-size: 19px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-nav .btn {
  margin-top: 16px;
}

/* Первый экран */
.hero {
  padding: 88px 0 56px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.page-hero h1 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.lead {
  margin: 20px 0 0;
  max-width: 680px;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-1);
  font-size: 15px;
}

.page-hero {
  padding: 56px 0 8px;
}

.crumb {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.crumb:hover {
  color: var(--ink);
}

/* Секции и карточки */
.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-title {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.cards,
.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card,
.work {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}

.card:hover,
.work:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.card-title,
.work-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.card-text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.card-price {
  margin-top: auto;
  padding-top: 12px;
  color: var(--accent);
  font-weight: 600;
}

.work {
  padding: 12px 12px 20px;
}

.work img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  margin-bottom: 8px;
}

.work .work-title,
.work .card-text {
  padding: 0 8px;
}

/* Страница услуги */
.service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: end;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.price-card p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.price-card span {
  font-size: 14px;
}

.price-card strong {
  font-size: 22px;
}

.tags {
  margin: 20px 0 0;
  color: var(--muted);
}

/* Текст заметки */
.content {
  font-size: 18px;
}

.content > :first-child {
  margin-top: 0;
}

.content h2 {
  margin: 48px 0 16px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.content h3 {
  margin: 32px 0 10px;
  font-size: 22px;
  line-height: 1.3;
}

.content p,
.content ul,
.content ol {
  margin: 0 0 16px;
}

.content li {
  margin: 6px 0;
}

.content img {
  display: block;
  border-radius: var(--radius);
  margin: 24px 0;
}

.content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}

.content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 16px;
}

.content th,
.content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.content th {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.content tbody tr {
  background: var(--surface);
}

.content td:last-child {
  white-space: nowrap;
  font-weight: 600;
}

.content blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--ink-1);
}

.content code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Выноски Obsidian: > [!quote] — отзыв, > [!faq]- — вопрос, который раскрывается */
.callout {
  margin: 16px 0;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.callout-title {
  font-weight: 600;
}

.callout-body {
  margin-top: 8px;
  color: var(--ink-1);
}

.callout-body > :last-child {
  margin-bottom: 0;
}

/* Отзыв: имя — подписью сверху, текст крупнее */
.callout-quote .callout-title {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.callout-quote .callout-body {
  font-size: 18px;
}

details.callout summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

details.callout summary::-webkit-details-marker {
  display: none;
}

details.callout summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
}

details.callout[open] summary::after {
  content: "−";
}

/* Призыв связаться */
.cta {
  padding: 40px 0 72px;
}

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--panel-ink);
}

.cta h2 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.15;
}

.cta p {
  margin: 0;
  color: var(--panel-muted);
}

.cta a {
  color: var(--panel-ink);
}

.contacts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contacts li {
  padding: 4px 0;
}

.cta .contacts {
  font-size: 19px;
}

.cta .contacts .muted {
  color: var(--panel-muted);
}

/* Подвал */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}

.footer-name {
  margin: 0 0 8px;
  font-weight: 700;
}

.footer-brand p:last-child {
  margin: 0;
  max-width: 360px;
}

.footer-label {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-footer a {
  color: var(--ink-1);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* 404 */
.notfound {
  padding-top: 72px;
  padding-bottom: 96px;
}

.notfound .lead {
  margin: 12px 0 28px;
}

.notfound .btn {
  margin-top: 0;
}

.notfound .section-title {
  font-size: 40px;
}

/* Узкие экраны */
@media (max-width: 960px) {
  .nav,
  .header-call {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .service-hero,
  .cta-inner,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --shell-pad: 16px;
  }

  body {
    font-size: 16px;
  }

  .hero {
    padding: 48px 0 32px;
  }

  .page-hero {
    padding: 36px 0 0;
  }

  .lead {
    font-size: 18px;
  }

  .section {
    padding: 28px 0;
  }

  .section-title,
  .content h2 {
    font-size: 26px;
  }

  .content {
    font-size: 17px;
  }

  .cta-inner {
    padding: 28px 20px;
  }

  .cta h2 {
    font-size: 26px;
  }
}

/* Карточка контактов на странице с show_contacts: true */
.contact-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 20px;
}
