/* «Просто» — стиль petkevich.kz с 28.09.2026.
   Принцип Ильи: всё гениальное просто — инновационность, удобство, простота,
   стиль. Отсюда: белый лист, чёрный текст, много воздуха, тонкие линии и один
   сигнальный оранжевый (как у Braun — «меньше, но лучше»). Заголовки —
   антиква Source Serif 4, текст — Manrope; шрифты свои, /site/templates/fonts/.
   Фон — тонкая сетка, которая проявляется только вокруг курсора (чистый CSS,
   позицию задаёт pk-simple.js). Слой идёт ПОСЛЕ импортированных Astro-стилей и
   меняет в первую очередь их переменные; разметку и SEO не трогает. */

:root,
:root[data-theme=light] {
  --paper: #ffffff;
  --paper-deep: #f5f5f3;
  --ink: #111111;
  --ink-soft: #3d3d3d;
  --ink-muted: #767676;
  --line: #e6e6e3;
  --accent: #ff5a1f;
  --accent-ink: #e0480f;
  --on-accent: #ffffff;
  --grid: rgba(17, 17, 17, .14);
  --display: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --body: Manrope, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme=dark] {
  --paper: #0f0f0f;
  --paper-deep: #181818;
  --ink: #f2f2f0;
  --ink-soft: #c7c7c4;
  --ink-muted: #8c8c88;
  --line: #262626;
  --accent: #ff6a33;
  --accent-ink: #ff7d4d;
  --on-accent: #0f0f0f;
  --grid: rgba(242, 242, 240, .12);
  color-scheme: dark;
}

html { background: var(--paper); }
body {
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }

/* Сетка-фонарик: видна только вокруг курсора */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: 0 var(--pk-gy, 0);
  -webkit-mask-image: radial-gradient(320px circle at var(--pk-mx, 72%) var(--pk-my, 30%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
  mask-image: radial-gradient(320px circle at var(--pk-mx, 72%) var(--pk-my, 30%), #000 0%, rgba(0,0,0,.35) 45%, transparent 75%);
}
.site-shell { position: relative; z-index: 1; }

/* Тонкая линия прогресса чтения */
.pk-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--pk-p, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ——— Ширина: во весь экран с полями ——— */
.site-shell .page-frame,
.site-shell .article {
  width: calc(100% - 2 * var(--gut));
  max-width: none;
}
.site-shell .article-body,
.site-shell .article > .lead,
.site-shell .article > h1 { max-width: 760px; }

/* ——— Шапка ——— */
.site-shell .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  margin: 0;
  padding: 22px var(--gut);
  background: color-mix(in srgb, var(--paper) 0%, transparent);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, padding .3s, border-color .3s;
}
.pk-scrolled .site-shell .site-header {
  padding-top: 14px;
  padding-bottom: 14px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.site-shell .wordmark,
.site-shell .home-link {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  border: 0;
}
.site-shell .desktop-nav {
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.site-shell .desktop-nav a { position: relative; transition: color .2s; }
.site-shell .desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .3s var(--ease);
}
.site-shell .desktop-nav a:hover { color: var(--ink); }
.site-shell .desktop-nav a:hover::after { transform: scaleX(1); }
.site-shell .desktop-nav a:last-child {
  margin-left: 4px;
  padding: 9px 18px;
  margin-top: -9px;
  margin-bottom: -9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  transition: background-color .2s;
}
.site-shell .desktop-nav a:last-child::after { content: none; }
.site-shell .desktop-nav a:last-child:hover { background: var(--accent); color: var(--on-accent); }
.site-shell .theme-toggle { color: var(--ink-soft); }
.site-shell .theme-toggle:hover { background: var(--paper-deep); color: var(--ink); }

/* ——— Типографика ——— */
.site-shell h1,
.site-shell h2,
.site-shell h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.02em;
}
.site-shell h1 em,
.site-shell .hero-name-line em { color: var(--accent); font-style: normal; }
.site-shell .eyebrow,
.site-shell .hero-kicker,
.site-shell .overview-label,
.site-shell .footer-articles__label,
.site-shell .row-index,
.site-shell .article-meta,
.site-shell .article-row time,
.site-shell .article-row .category {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-muted);
}
.site-shell .section-heading h2,
.site-shell .contact-panel h2,
.site-shell .location-panel h2,
.site-shell .business-panel h2,
.site-shell .how-i-work h2,
.site-shell .project-card h2,
.site-shell .letter-card h2 {
  font-size: clamp(36px, 4.4vw, 72px);
  line-height: 1.02;
}
.site-shell .page-intro { padding: clamp(80px, 14vh, 160px) 0 clamp(48px, 8vh, 96px); }
.site-shell .page-intro h1,
.site-shell .article h1 {
  max-width: 16ch;
  font-size: clamp(52px, 8vw, 132px);
  line-height: .98;
}
.site-shell .page-intro h1 span,
.site-shell .article h1 span { font-style: italic; }
.site-shell .page-intro p { max-width: 44ch; font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-soft); }

/* ——— Первый экран ——— */
.site-shell .hero {
  position: relative;
  min-height: calc(100svh - 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 9vh, 110px) 0 clamp(56px, 10vh, 120px);
}
.site-shell .hero-kicker { margin-bottom: clamp(20px, 3vh, 32px); }
.site-shell .hero h1.hero-title {
  max-width: none;
  margin: 0 0 clamp(32px, 5vh, 56px);
  font-size: clamp(64px, 10vw, 200px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.035em;
  will-change: transform;
}
.site-shell .hero-name-text,
.site-shell .hero h1 .hero-name-text > span:not(.hero-name-line),
.site-shell .hero h1 .hero-name-text > span:not(.hero-name-line) span { display: block; font-style: normal; }
.site-shell .hero h1 .hero-name-line,
.site-shell .hero h1 .hero-name-line span { font-style: italic; }
.site-shell .hero-name-line { display: block; white-space: nowrap; }
.site-shell .hero-avatar {
  width: clamp(60px, 7.5vw, 128px);
  height: clamp(60px, 7.5vw, 128px);
  align-self: flex-start;
  margin-top: .12em;
  border: 1px solid var(--line);
}
.site-shell .hero-role:empty { display: none; }
.site-shell .hero-details { display: block; max-width: min(100%, 52ch); }
.site-shell .hero-copy,
.site-shell .hero-specialization {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(18px, 1.5vw, 24px);
  font-weight: 400;
  line-height: 1.5;
}
.site-shell .hero-specialization { color: var(--ink-muted); }
.site-shell .hero-copy::after { content: " "; }
.site-shell .b2b-note-trigger {
  width: 1.1em; height: 1.1em;
  margin: 0 .05em 0 .2em;
  border-color: var(--ink-muted);
  color: var(--ink-muted);
  font-size: .62em;
  vertical-align: .35em;
}
.site-shell .b2b-note-trigger:hover { border-color: var(--accent); color: var(--accent); }
.site-shell .hero > .text-link,
.site-shell .contact-panel > .text-link,
.site-shell .article-cta .text-link {
  align-self: flex-start;
  margin-top: clamp(32px, 5vh, 52px);
  padding: 16px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  transition: background-color .25s, transform .25s var(--ease);
}
.site-shell .hero > .text-link:hover,
.site-shell .contact-panel > .text-link:hover,
.site-shell .article-cta .text-link:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-2px); }

/* ——— Текстовые ссылки ——— */
.site-shell .text-link { border-color: var(--ink); gap: 8px; }
.site-shell .text-link:hover { color: var(--accent-ink); border-color: var(--accent-ink); }

/* ——— Плитки «Примеры / Письма» ——— */
.site-shell .selected-links {
  margin-bottom: clamp(96px, 16vh, 180px);
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 0;
}
.site-shell .selected-link {
  min-height: clamp(200px, 30vh, 320px);
  padding: clamp(24px, 3vw, 44px) clamp(0px, 1vw, 12px);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 60px);
  line-height: 1.05;
  background: transparent;
  transition: color .3s;
}
.site-shell .selected-link + .selected-link { border-color: var(--line); padding-left: clamp(24px, 3vw, 44px); }
.site-shell .selected-link:hover { background: transparent; color: var(--ink); }
.site-shell .selected-link > span:first-child { transition: transform .45s var(--ease); }
.site-shell .selected-link:hover > span:first-child { transform: translateX(10px); }
.site-shell .selected-link__arrow {
  width: 56px; height: 56px;
  border-color: var(--line);
  font-family: var(--body);
  transition: background-color .3s, border-color .3s, color .3s, transform .3s var(--ease);
}
.site-shell .selected-link:hover .selected-link__arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  transform: rotate(45deg);
}

/* ——— Списки и карточки ——— */
.site-shell .rule-list,
.site-shell .project-list,
.site-shell .letter-list,
.site-shell .article-list,
.site-shell .service-row,
.site-shell .work-row,
.site-shell .letter-row,
.site-shell .article-row,
.site-shell .project-card,
.site-shell .letter-card { border-color: var(--line); }
.site-shell .article-row h2,
.site-shell .service-row h3,
.site-shell .work-row h3,
.site-shell .letter-row h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(20px, 1.7vw, 26px);
}
.site-shell .project-card,
.site-shell .letter-card { grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: clamp(24px, 4vw, 72px); }
.site-shell .project-image,
.site-shell .letter-image { border-radius: 4px; background: var(--paper-deep); }
.site-shell .project-card:hover .project-image img { transform: scale(1.03); }
.site-shell .row-arrow { color: var(--ink-muted); }
.site-shell .work-row:hover .row-arrow,
.site-shell .letter-row:hover .row-arrow { color: var(--accent); }

/* ——— FAQ ——— */
.site-shell .how-i-work { padding-bottom: clamp(96px, 16vh, 180px); }
.site-shell .how-i-work__faq details { border-color: var(--line); }
.site-shell .how-i-work__faq summary {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 32px);
}
.site-shell .how-i-work__faq summary::after { color: var(--ink); }
.site-shell .how-i-work__faq details[open] summary::after { color: var(--accent); }
.site-shell .how-i-work__faq p { color: var(--ink-soft); font-size: clamp(16px, 1.25vw, 18px); max-width: 60ch; }

/* ——— Карта и контакт ——— */
.site-shell .location-panel { padding-bottom: clamp(96px, 16vh, 180px); }
.site-shell .location-map {
  border: 1px solid var(--line);
  border-radius: 4px;
  filter: grayscale(1);
  transition: filter .5s;
}
:root[data-theme=dark] .site-shell .location-map { filter: grayscale(1) invert(.9); }
.site-shell .location-map:hover { filter: none; }
.site-shell .contact-panel { padding: clamp(64px, 11vh, 130px) 0 0; border-top: 1px solid var(--line); }
.site-shell .contact-panel h2 { max-width: 14ch; font-size: clamp(46px, 8vw, 140px); line-height: .98; }

/* ——— Статьи ——— */
.site-shell .article-body { font-size: 18px; line-height: 1.7; }
.site-shell .article-body h2 { font-family: var(--display); font-weight: 400; }
.site-shell .article-body > p a,
.site-shell .article :where(p, li) a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.site-shell .article-body code { background: var(--paper-deep); color: var(--ink); }
.site-shell .article-note,
.site-shell .blog-note,
.site-shell .article-compare section,
.site-shell .article-author { border-color: var(--line); border-radius: 4px; background: var(--paper-deep); }
.site-shell .article-note { border-left: 2px solid var(--accent); }

/* ——— Подвал ——— */
.site-shell .site-footer { margin-top: clamp(96px, 16vh, 180px); border-color: var(--line); }
.site-shell .footer-email {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 64px);
  transition: color .2s;
}
.site-shell .footer-email:hover { color: var(--accent-ink); }
.site-shell .footer-links a:hover,
.site-shell .footer-articles a:hover { color: var(--accent-ink); }

/* ——— Мобильное меню и диалог ——— */
.site-shell .mobile-nav > nav { background: var(--paper); border-color: var(--line); }
.site-shell .mobile-nav > nav a { font-size: 17px; }
.site-shell .b2b-note-dialog { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }

/* ——— Появление при скролле ——— */
.pk-js [data-pk-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--pk-i, 0) * 80ms);
}
.pk-js [data-pk-reveal].pk-in { opacity: 1; transform: none; }
.pk-js .pk-split-line { display: block; overflow: hidden; padding-bottom: .08em; }
.pk-js .pk-split-line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--pk-i, 0) * 110ms + 120ms);
}
.pk-js .pk-ready .pk-split-line > span { transform: none; }

@media (max-width: 720px) {
  .site-shell .site-header { padding: 16px var(--gut); }
  .site-shell .hero { min-height: auto; padding-top: 48px; }
  .site-shell .hero h1.hero-title { flex-direction: column; align-items: flex-start; font-size: clamp(50px, 16vw, 96px); gap: 18px; }
  .site-shell .hero-avatar { width: 56px; height: 56px; }
  .site-shell .selected-links { grid-template-columns: 1fr; }
  .site-shell .selected-link { min-height: 150px; }
  .site-shell .selected-link + .selected-link { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .site-shell .project-card,
  .site-shell .letter-card { grid-template-columns: 1fr; }
  body::before { display: none; }
}

@media (hover: none) { body::before { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .pk-js [data-pk-reveal],
  .pk-js .pk-split-line > span { opacity: 1; transform: none; transition: none; }
}
