/* Второй шанс, V2: общие компоненты. Состояния и правила применения показаны в brand.html. */

/* Логотип: знак и название в две строки */
.logo { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.logo img { width: 80px; height: 73px; flex-shrink: 0; }
.logo-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.125rem; line-height: 0.98; letter-spacing: -0.005em; }


/* Кнопки. На мыши заливка «заезжает» слева, под пальцем кнопка чуть сжимается. */
.button { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 24px; border: 0; border-radius: var(--radius-control); background: var(--orange); color: var(--ink); font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: color var(--motion-base) var(--ease-out), transform var(--motion-press) var(--ease-out); }
.button::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleX(0); transform-origin: left center; transition: transform var(--motion-base) var(--ease-out); }
.button svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--motion-base) var(--ease-out); }
.button:active { transform: scale(var(--press)); }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.button[disabled]:active { transform: none; }
.button--secondary { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.button--small { min-height: 44px; padding: 10px 18px; font-size: 0.9375rem; }
.button--wide { width: 100%; }

.on-dark { background: var(--ink); color: var(--on-dark); }
.on-dark .button::before { background: var(--paper); }
.on-dark .button--secondary { color: var(--on-dark); box-shadow: inset 0 0 0 1.5px var(--on-dark); }

/* Ссылки */
.link { color: var(--link); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: text-decoration-thickness var(--motion-fast) var(--ease-out); }
.on-dark .link { color: var(--orange); }
.grow-line { text-decoration: none; background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat; padding-bottom: 2px; transition: background-size var(--motion-base) var(--ease-out); }
.grow-line:focus-visible { background-size: 100% 1.5px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font-weight: 500; cursor: pointer; }
.text-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--motion-base) var(--ease-out); }
.text-button span { background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat; transition: background-size var(--motion-base) var(--ease-out); }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .logo { flex-shrink: 0; }
.site-header .logo img { display: block; width: 56px; height: 51px; object-fit: contain; }
.site-header-inner { display: flex; align-items: center; justify-content: flex-start; gap: 28px; min-height: 68px; }
.site-nav { display: flex; flex-shrink: 0; align-items: center; gap: 24px; font-size: var(--text-sm); }
.site-nav a { color: var(--ink); }
.header-actions { display: flex; flex-shrink: 0; align-items: center; gap: 20px; margin-left: auto; }
.header-phone { font-weight: 600; white-space: nowrap; }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-control); box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mobile-menu nav { position: absolute; right: 0; top: calc(100% + 10px); display: grid; gap: 4px; min-width: 260px; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: 0 24px 40px -28px var(--shadow-ink); }
.mobile-menu nav a { display: block; padding: 12px; border-radius: var(--radius-control); text-decoration: none; font-weight: 500; }
@media (max-width: 64rem) {
  .site-nav, .header-phone, .header-actions .button { display: none; }
  .mobile-menu { display: block; }
}

/* Карточки процедур: спокойные, без реакции на курсор (сами они не кликаются) */
.card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 32px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-card); }
.card::before { content: ""; position: absolute; left: 32px; top: -1px; width: 56px; height: 4px; border-radius: 0 0 4px 4px; background: var(--orange); }
.card h3 { font-size: var(--text-xl); }
.card p { color: var(--muted); }
.card ul { display: grid; gap: 10px; list-style: none; }
.card li { position: relative; padding-left: 26px; }
.card li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 3px; background: var(--orange); }
.card .link { margin-top: auto; }

/* Тезисы: короткая оранжевая полоска над линией */
.thesis { position: relative; padding-top: 24px; }
.thesis::before, .thesis::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; }
.thesis::before { width: 100%; background: var(--line); }
.thesis::after { width: 48px; background: var(--orange); }
.thesis h3 { margin-bottom: 8px; }
.thesis p { color: var(--muted); }

/* Варианты ответа: на мыши рамка темнеет, выбранный вариант подсвечен */
.choice { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--paper); cursor: pointer; transition: border-color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--orange-tint); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.choice input { appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin: 0; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); cursor: pointer; transition: background-color var(--motion-fast) var(--ease-out); }
.choice input:focus-visible { outline: none; }
.choice input[type="radio"] { border-radius: 50%; }
.choice input:checked { background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23131615' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.choice input[type="radio"]:checked { background: var(--orange); box-shadow: inset 0 0 0 4px var(--paper); }
.choice[aria-invalid="true"], .choice:has(input[aria-invalid="true"]) { border-color: var(--error); }

/* Крупный телефон: подчёркивание растягивается */
.phone-xl { display: inline-block; font-family: var(--font-heading); font-weight: 600; font-size: clamp(2rem, 3.4vw + 1rem, 3.5rem); line-height: 1.1; white-space: nowrap; }

/* Обязательное предупреждение */
.ad-warning { padding-block: 24px var(--section); }
.ad-warning-box { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(24px, 4vw, 48px); border: 2px solid var(--ink); border-radius: var(--radius-card); background: var(--paper); }
.ad-warning-box p { max-width: 34ch; font-family: var(--font-heading); font-size: clamp(1.375rem, 1.8vw + 0.9rem, 2.25rem); font-weight: 600; line-height: 1.3; }

/* Подвал */
.site-footer { padding-block: 56px 40px; border-top: 1px solid var(--line); background: var(--paper-2); font-size: var(--text-sm); color: var(--muted); }
.site-footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: 40px; }
.site-footer .logo { color: var(--ink); }
.site-footer p + p { margin-top: 12px; }
.footer-title { margin-bottom: 10px; color: var(--ink); font-weight: 600; }
.footer-links { display: grid; gap: 8px; list-style: none; }
.footer-links a { color: var(--ink); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 52rem) { .site-footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Наведение только там, где есть мышь: на телефоне эффекты не «залипают» после касания */
@media (hover: hover) and (pointer: fine) {
  .button:hover { color: var(--paper); }
  .button:hover::before { transform: scaleX(1); }
  .on-dark .button:hover { color: var(--ink); }
  .button[disabled]:hover { color: var(--ink); }
  .button[disabled]:hover::before { transform: scaleX(0); }
  .link:hover { text-decoration-thickness: 2px; }
  .grow-line:hover { background-size: 100% 1.5px; }
  .text-button:hover svg { transform: translateX(-3px); }
  .text-button:hover span { background-size: 100% 1.5px; }
  .mobile-menu nav a:hover { background: var(--paper-2); }
  .choice:hover { border-color: var(--ink); }
}
