/* Страница продукта HippoCRM (/hippocrm/). Подключается после main.css: шапка, меню-шторка, кнопки,
   вопросы и подвал оттуда, здесь только свои блоки. Классы с приставкой p-. */

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* снимки под тему сайта: в светлой теме светлые, в тёмной тёмные (скрытые картинки с loading=lazy не качаются) */
.th-dark { display: none !important; }
:root[data-theme="dark"] .th-light { display: none !important; }
:root[data-theme="dark"] .th-dark { display: block !important; }

/* ── первый экран ── */
.p-hero { padding: clamp(32px, 5vw, 72px) 0 clamp(48px, 6vw, 96px); }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(32px, 4vw, 64px); align-items: center; }
.p-eyebrow { display: inline-block; color: var(--accent-text); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 500; }
.p-hero h1 { font: 800 clamp(2.1rem, 4.4vw, 3.4rem)/1.06 var(--font-display); letter-spacing: -.035em; margin: 16px 0 20px; }
.p-hero h1 em { font-style: normal; color: var(--accent); }
.p-lead { font-size: 1.125rem; line-height: 1.55; max-width: 42ch; margin: 0 0 24px; }
.p-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 24px; }
.p-price b { font: 800 clamp(1.6rem, 2.8vw, 2.1rem)/1.1 var(--font-display); letter-spacing: -.03em; white-space: nowrap; }
.p-price span { color: var(--muted); }
.p-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.p-cta .btn svg.ic { width: 18px; height: 18px; }
.p-hint { margin: 12px 0 0; color: var(--muted); font-size: .875rem; }

/* окно браузера и телефон со снимками */
.p-browser { border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--sh-3); overflow: hidden; }
.p-browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.p-browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.p-browser-bar i:first-child { background: var(--accent); }
.p-browser-bar span { margin-left: 8px; font: 500 .75rem var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-browser img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: var(--sunken); }
.p-phone { border-radius: 32px; padding: 6px; background: #15181C; box-shadow: var(--sh-2), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.p-phone img { display: block; width: 100%; height: auto; border-radius: 26px; background: var(--sunken); }
[data-theme="dark"] .p-phone { background: #2A2C31; }
[data-theme="dark"] .p-browser { box-shadow: var(--sh-1); }

.p-hero-shot { position: relative; padding: 0 clamp(48px, 9%, 88px) 40px 0; }
.p-hero-phone { position: absolute; right: 0; bottom: 0; width: 30%; max-width: 200px; }

/* ── разделы ── */
.p-sec { padding: clamp(56px, 7vw, 96px) 0; }
.p-hero + .p-sec { padding-top: 0; }
.p-sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 32px; }
.p-sec-head p { margin: 0; color: var(--muted); max-width: 46ch; justify-self: end; }

/* что умеет */
.p-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; border-top: 1.5px solid var(--ink); }
.p-feats li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; align-content: start; padding: 24px 0; border-bottom: 1px solid var(--line); }
.p-ic { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.p-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.p-feats h3 { font: 600 1.0625rem/1.3 var(--font-body); padding-top: 2px; }
.p-feats p { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
[data-theme="dark"] .p-feats { border-top-color: var(--line-strong); }

/* как выглядит */
.p-sub { margin: 0 0 16px; font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.p-desk { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-bottom: 56px; }
.p-screens figure { margin: 0; min-width: 0; }
.p-screens figcaption { margin-top: 12px; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.p-phones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.p-phones figure { max-width: 260px; }
.p-phones figcaption { display: grid; gap: 2px; text-align: center; font-size: .875rem; }
.p-phones figcaption b { color: var(--ink); font-weight: 600; font-size: .9375rem; }

/* для кого */
.p-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.p-case { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 24px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--surface); transition: border-color .25s; }
.p-case:hover { border-color: var(--ink); }
.p-case img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.p-case h3 { font: 700 1.15rem/1.25 var(--font-display); letter-spacing: -.01em; padding: 0 8px; }
.p-case p { margin: 0; padding: 0 8px; color: var(--muted); font-size: .9375rem; line-height: 1.5; flex: 1; }
.p-go { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin: 4px 8px 0; min-height: 44px; color: var(--accent-text); font-weight: 600; text-decoration: none; }
.p-go:hover { text-decoration: underline; text-underline-offset: 3px; }
.p-go svg.ic { transition: transform .3s var(--ease); }
.p-go:hover svg.ic { transform: translate(2px, -2px); }
[data-theme="dark"] .p-case { border-color: var(--line-strong); }
[data-theme="dark"] .p-case:hover { border-color: rgba(255, 106, 53, .55); }

/* сравнение */
.p-cmp { width: 100%; border-collapse: collapse; }
.p-cmp th, .p-cmp td { text-align: left; vertical-align: top; padding: 18px 24px 18px 0; border-bottom: 1px solid var(--line); }
.p-cmp thead th { padding-top: 0; padding-bottom: 12px; font: 500 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1.5px solid var(--ink); }
.p-cmp thead th.us { color: var(--accent-text); }
.p-cmp tbody th { width: 22%; font-weight: 600; }
.p-cmp td { width: 39%; color: var(--muted); }
.p-cmp td.us { color: var(--ink); font-weight: 500; }
.p-cmp .us { padding-left: 20px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
[data-theme="dark"] .p-cmp thead th { border-bottom-color: var(--line-strong); }
.p-note { margin: 24px 0 0; color: var(--muted); }
.p-note a { color: var(--accent-text); font-weight: 600; text-underline-offset: 3px; }

/* вопросы: раскладка из main.css (.faq-grid, details), своя иллюстрация и ссылка */
.p-ask { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 1.5rem; text-decoration: none; transform: rotate(-3deg); transform-origin: left; min-height: 44px; }
.p-ask:hover { text-decoration: underline; text-underline-offset: 4px; }
.p-faq-art { display: block; width: min(100%, 240px); height: auto; margin-top: 24px; filter: drop-shadow(0 20px 28px rgba(90, 55, 25, .18)); }
[data-theme="dark"] .p-faq-art, [data-theme="dark"] .p-price-art { filter: drop-shadow(0 24px 40px rgba(238, 83, 32, .22)); }
.p-crm .faq details p a { color: var(--accent-text); font-weight: 600; }

/* цена */
.p-price-box { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 32px; align-items: end; border: 1.5px solid var(--ink); border-radius: 28px; background: var(--surface); padding: clamp(24px, 4vw, 48px); padding-bottom: 0; overflow: hidden; }
.p-price-main { padding-bottom: clamp(24px, 4vw, 48px); }
.p-price-box h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin: 12px 0 12px; }
.p-price-box h2 .num { white-space: nowrap; }
.p-price-box h2 .per { font: 500 1rem var(--font-mono); color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.p-price-lead { margin: 0 0 20px; color: var(--muted); max-width: 46ch; }
.p-incl { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.p-incl li { display: flex; gap: 10px; align-items: baseline; }
.p-incl svg.ic { flex: none; color: var(--ok); stroke-width: 2.4; transform: translateY(.12em); }
.p-price-art { display: block; width: 100%; max-width: 300px; height: auto; justify-self: center; margin-bottom: -6px; filter: drop-shadow(0 20px 28px rgba(90, 55, 25, .18)); }
[data-theme="dark"] .p-price-box { border-color: var(--line-strong); box-shadow: var(--sh-3); background: radial-gradient(90% 70% at 100% 0%, rgba(238, 83, 32, .14), transparent 60%), var(--surface); }

/* подвал: ссылка на демо в колонке «Написать боту» */
.p-crm footer .foot-app svg.ic { width: 1em; height: 1em; }

/* ── планшет и узкий компьютер ── */
@media (max-width: 960px) {
  .p-hero-grid, .p-sec-head { grid-template-columns: 1fr; }
  .p-sec-head { gap: 12px; }
  .p-sec-head p { justify-self: start; }
  .p-hero-text { max-width: 640px; }
  .p-hero-shot { max-width: 720px; }
  .p-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-phones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .p-cases { grid-template-columns: 1fr; }
  .p-case { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: 16px; padding: 16px; }
  .p-case img { grid-row: 1 / span 3; margin: 0; height: 100%; }
  .p-case h3, .p-case p { padding: 0; }
  .p-go { margin: 0; }
  .p-faq-art { display: none; }
}

/* ── телефон ── */
@media (max-width: 760px) {
  .p-hero { padding: 24px 0 48px; }
  .p-hero h1 { font-size: clamp(1.9rem, 8.6vw, 2.4rem); margin: 12px 0 16px; }
  .p-lead { font-size: 1rem; line-height: 1.5; margin-bottom: 20px; }
  .p-price { margin-bottom: 20px; }
  .p-cta { display: grid; gap: 10px; }
  .p-cta .btn { justify-content: center; }
  .p-hint { text-align: center; }
  .p-hero-shot { padding: 0 24% 24px 0; }
  .p-hero-phone { width: 34%; border-radius: 22px; padding: 4px; }
  .p-hero-phone img { border-radius: 18px; }
  .p-browser { border-radius: 12px; }
  .p-browser-bar { padding: 7px 10px; gap: 5px; }
  .p-browser-bar i { width: 7px; height: 7px; }
  .p-browser-bar span { font-size: .6875rem; }

  .p-sec { padding: 56px 0; }
  .p-sec-head { margin-bottom: 24px; }
  .p-sec-head p { font-size: .9375rem; }

  .p-feats { grid-template-columns: 1fr; }
  .p-feats li { padding: 16px 0; }

  .p-desk { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
  /* телефоны листаются вбок, как карточки примеров на главной */
  .p-phones { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 4px 16px 12px; scrollbar-width: none; }
  .p-phones::-webkit-scrollbar { display: none; }
  .p-phones figure { flex: 0 0 56%; max-width: 240px; scroll-snap-align: start; }

  .p-case { grid-template-columns: 1fr; grid-template-rows: none; gap: 10px; padding: 12px 12px 16px; }
  .p-case img { grid-row: auto; height: auto; aspect-ratio: 16 / 9; margin-bottom: 4px; }
  .p-case h3, .p-case p { padding: 0 4px; }
  .p-go { margin: 0 4px; }

  /* сравнение: каждая строка становится карточкой из двух пунктов с подписями */
  .p-cmp, .p-cmp tbody, .p-cmp tr, .p-cmp th, .p-cmp td { display: block; width: auto; }
  .p-cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .p-cmp tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .p-cmp tbody tr:first-child { border-top: 1.5px solid var(--ink); }
  .p-cmp th, .p-cmp td { padding: 0; border: 0; }
  .p-cmp tbody th { margin-bottom: 8px; font-size: 1.0625rem; }
  .p-cmp td { font-size: .9375rem; line-height: 1.45; }
  .p-cmp td + td { margin-top: 8px; }
  .p-cmp td::before { content: attr(data-l); display: block; margin-bottom: 2px; font: 500 .6875rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
  .p-cmp td.us::before { color: var(--accent-text); }
  .p-cmp .us { padding: 10px 12px; border-radius: 12px; }
  [data-theme="dark"] .p-cmp tbody tr:first-child { border-top-color: var(--line-strong); }

  .p-ask { font-size: 1.3rem; }

  .p-price-box { grid-template-columns: 1fr; border-radius: 20px; padding: 24px 20px 0; gap: 0; }
  .p-price-box h2 { font-size: clamp(1.6rem, 7.6vw, 2rem); }
  .p-price-box h2 .per { display: block; margin-top: 6px; }
  .p-price-main { padding-bottom: 8px; }
  .p-price-art { width: 150px; justify-self: end; margin: -8px 0 -4px; }

  /* нижняя панель (стили .m-bar из main.css) не закрывает подвал */
  .p-crm footer { padding-bottom: 104px; }
}
@media (max-width: 380px) {
  .p-phones figure { flex-basis: 62%; }
}
@media (prefers-reduced-motion: reduce) {
  .p-go svg.ic, .p-case { transition: none; }
}
