/* ============================================================
   diusworks · дизайн-обновление 2026-07-16
   Оверлей поверх main-*.css (бандл не трогаем):
   1) hover-скролл превью кейсов  2) метрики кейсов
   3) гарантия-«расписка»          4) мобильная таблица сравнения
   5) бургер-меню                  6) компактный hero на невысоких экранах
   7) контраст тёмной формы        8) боли как сообщения
   9) рукописный штрих в hero     10) инпут аудита
   ============================================================ */

/* ---------- 1. Кейсы: превью прокручивается при наведении ---------- */
.case-shot--tall {
  transition: object-position 7s cubic-bezier(.33, .02, .18, 1);
  will-change: object-position;
}
.card-lift:hover .case-shot--tall,
.card-lift.is-peek .case-shot--tall {
  object-position: 50% 100%;
}
@media (hover: none) {
  .card-lift .mockup-browser { cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) {
  .case-shot--tall { transition: none; }
}

/* ---------- 2. Строка метрик под описанием кейса ---------- */
.case-metrics {
  margin-top: .85rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--color-ink, #1c1a17);
  font-variant-numeric: lining-nums tabular-nums;
}
.case-metrics span { display: inline-flex; align-items: center; gap: .5em; }
.case-metrics span::before {
  content: '';
  width: 5px; height: 5px;
  transform: rotate(45deg);
  background: var(--color-bronze, #b89a6e);
  flex: none;
}

/* ---------- 3. Гарантия-«расписка» ---------- */
.g-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) {
  .g-grid { grid-template-columns: auto 1fr; gap: 3rem; align-items: center; }
}
.g-zero-wrap {
  position: relative;
  justify-self: center;
  padding: 1.4rem 1.9rem;
  line-height: 1;
}
.g-zero {
  font-family: var(--font-display, Georgia, serif);
  font-weight: 600;
  font-size: clamp(4.2rem, 3rem + 5vw, 6.5rem);
  letter-spacing: -.02em;
  color: var(--color-ink, #1c1a17);
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.g-ellipse {
  position: absolute;
  inset: -4% -6%;
  width: 112%; height: 108%;
  overflow: visible;
  pointer-events: none;
}
.g-ellipse path {
  fill: none;
  stroke: var(--color-accent, #d24e2a);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: .8;
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
}
.guarantee-frame.is-visible .g-ellipse path {
  transition: stroke-dashoffset 1.1s ease-out .45s;
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: reduce) {
  .g-ellipse path { stroke-dashoffset: 0; transition: none; }
}
.g-sign {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--color-gold-line, #d9c7a8);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem 1.4rem;
}
.g-sign-name {
  font-family: var(--font-display, Georgia, serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-ink, #1c1a17);
}
.g-stamp {
  display: inline-block;
  padding: .32em .85em;
  border: 2px solid var(--color-accent, #d24e2a);
  border-radius: .55em;
  color: var(--color-accent-deep, #b5401c);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: rotate(-5deg);
  opacity: .85;
  box-shadow: inset 0 0 0 1.5px rgba(210, 78, 42, .25);
}

/* ---------- 4. Таблица сравнения на мобильном ---------- */
@media (max-width: 767px) {
  .compare-table thead th:first-child,
  .compare-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--color-cream, #faf8f5);
    box-shadow: 10px 0 14px -10px rgba(28, 26, 23, .18);
  }
  .table-swipe-hint { display: inline-flex; }
}
.table-swipe-hint {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-top: .8rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-soft, #5a534a);
}
.table-swipe-hint::before {
  content: '⟵';
  color: var(--color-accent, #d24e2a);
  font-weight: 700;
}

/* ---------- 5. Бургер-меню (мобайл) ---------- */
.menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin-left: -4px;
  border-radius: .7rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.menu-btn span {
  display: block;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--color-ink, #1c1a17);
  transition: transform .25s ease, opacity .2s ease;
}
.menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 768px) { .menu-btn { display: none; } }

.mobile-menu {
  position: absolute;
  left: 0; right: 0; top: 100%;
  z-index: 39;
  background: var(--color-cream, #faf8f5);
  border-bottom: 1px solid var(--color-line, #eae2d7);
  box-shadow: 0 18px 34px -12px rgba(28, 26, 23, .16);
  padding: .6rem 1rem 1rem;
  display: grid;
  gap: .1rem;
}
.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 .75rem;
  border-radius: .6rem;
  font-weight: 600;
  color: var(--color-ink, #1c1a17);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:active { background: var(--color-cream-deep, #f2ede6); }
.mobile-menu .mm-phone {
  margin-top: .35rem;
  border-top: 1px solid var(--color-line, #eae2d7);
  color: var(--color-accent-deep, #b5401c);
}
@media (min-width: 768px) { .mobile-menu { display: none; } }

/* ---------- 6. Компактный hero: CTA до сгиба на обычных экранах ---------- */
@media (min-width: 768px) and (max-height: 1000px) {
  #hero { padding-top: 2rem; }
  .hero-h1 { font-size: clamp(2.3rem, 1.3rem + 2.9vw, 3rem); margin-top: 1rem; }
  #hero p[data-load].mt-6 { margin-top: 1rem; }
  #hero p[data-load].mt-4 { margin-top: .7rem; }
  #hero div[data-load].mt-8 { margin-top: 1.25rem; }
  #hero div[data-load].mt-9 { margin-top: 1.4rem; padding-top: 1.3rem; }
}

/* ---------- 7. Тёмная форма: светлые поля ---------- */
.section-dark #lead-form input[type="text"]:not([name="company"]),
.section-dark #lead-form input[type="tel"] {
  background: rgba(250, 248, 245, .97);
  color: var(--color-ink, #1c1a17);
  --tw-ring-color: transparent;
  border: 1px solid rgba(250, 248, 245, .4);
}
.section-dark #lead-form input[type="text"]:not([name="company"])::placeholder,
.section-dark #lead-form input[type="tel"]::placeholder {
  color: #8a8177;
}
.section-dark #lead-form input[type="text"]:not([name="company"]):focus,
.section-dark #lead-form input[type="tel"]:focus {
  outline: 2px solid var(--color-accent, #d24e2a);
  outline-offset: 1px;
}

/* ---------- 8. «Знакомо?» — боли как входящие сообщения ---------- */
.pain-quote {
  border-left: 0;
  padding: 1.05rem 1.25rem 1.2rem;
  background: var(--color-card, #fffdfb);
  border: 1px solid var(--color-line, #eae2d7);
  border-radius: 1.1rem;
  border-bottom-left-radius: .3rem;
  box-shadow: 0 12px 26px -18px rgba(28, 26, 23, .35);
  position: relative;
}
.pain-quote::after {
  content: '';
  position: absolute;
  left: -1px;
  bottom: -9px;
  width: 16px; height: 10px;
  background: var(--color-card, #fffdfb);
  border-left: 1px solid var(--color-line, #eae2d7);
  border-bottom: 1px solid var(--color-line, #eae2d7);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.pain-quote figcaption { display: inline-flex; align-items: center; gap: .55em; }
.pain-quote figcaption::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent, #d24e2a);
  opacity: .75;
  flex: none;
}

/* ---------- 9. Рукописный штрих под «до оплаты» в hero ---------- */
.hand-underline { position: relative; white-space: nowrap; }
.hand-underline .hu-svg {
  position: absolute;
  left: -1.5%;
  bottom: -.14em;
  width: 103%;
  height: .32em;
  overflow: visible;
  pointer-events: none;
}
.hand-underline path {
  fill: none;
  stroke: var(--color-accent, #d24e2a);
  stroke-width: 3.4;
  stroke-linecap: round;
  opacity: .85;
  stroke-dasharray: 205;
  stroke-dashoffset: 205;
  animation: hu-draw .65s ease-out 1.15s forwards;
}
@keyframes hu-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hand-underline path { animation: none; stroke-dashoffset: 0; }
}

/* ---------- 10. Аудит: поле для адреса сайта ---------- */
.audit-form {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: stretch;
}
.audit-input {
  flex: 1 1 250px;
  min-height: 52px;
  border-radius: .9rem;
  border: 1px solid rgba(28, 26, 23, .14);
  background: #fff;
  padding: 0 1.05rem;
  font-size: 16px;
  color: var(--color-ink, #1c1a17);
}
.audit-input::placeholder { color: #a09786; }
.audit-input:focus {
  outline: 2px solid var(--color-accent, #d24e2a);
  outline-offset: 1px;
  border-color: transparent;
}
