/* =========================================================================
   W02. Разработка лендинга: сборка по блокам, утечки заявок, порядок блоков.
   ========================================================================= */

/* ---------- первый экран: лендинг собирается по блокам ---------- */
.asm { position: relative; display: grid; gap: 18px; }
.asm-ad { position: relative; z-index: 4; justify-self: end; display: grid; gap: 2px; max-width: 330px; margin: 0 56px -22px 0; padding: 12px 16px 13px; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 26px 50px -24px rgba(0, 0, 0, 0.75); transform: rotate(-1.6deg); }
.asm-ad small { color: var(--ink-soft); font-size: 0.7rem; }
.asm-ad b { color: var(--flow-ink); font-size: 0.98rem; font-weight: 600; line-height: 1.25; }
.asm-ad > span { color: var(--ink-soft); font-size: 0.78rem; line-height: 1.35; }
.asm-hl { background-image: linear-gradient(rgba(255, 176, 32, 0.6), rgba(255, 176, 32, 0.6)); background-repeat: no-repeat; background-position: 0 92%; background-size: 100% 36%; transition: background-size 0.7s var(--ease-out); }
.asm.is-armed:not(.is-match) .asm-hl { background-size: 0% 36%; }

.asm-devices { margin-right: 34px; }
.asm-browser { background: #f4f6fa; }
.asm-page { display: grid; gap: 9px; padding: 14px; }
.asm-b { position: relative; border-radius: 10px; border: 1.5px solid transparent; transition: border-color 0.4s, background-color 0.4s; }
.asm-lbl { position: absolute; inset: 0; display: grid; place-items: center; color: #5f6b88; font-size: 0.72rem; font-weight: 600; opacity: 0; transition: opacity 0.3s; }
.asm-fill { transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.asm.is-armed .asm-b:not(.is-built) { border-style: dashed; border-color: #c3cadb; background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(195, 202, 219, 0.28) 9px 10px); }
.asm.is-armed .asm-b:not(.is-built) .asm-lbl { opacity: 1; }
.asm.is-armed .asm-b:not(.is-built) .asm-fill { opacity: 0; transform: translateY(8px); }

.asm-b--hero { min-height: 104px; }
.asm-b--hero .asm-fill { display: grid; gap: 6px; align-content: start; justify-items: start; min-height: 104px; padding: 13px 14px; border-radius: 10px; background: linear-gradient(135deg, #0b1324, #1f3266); color: #fff; }
.asm-b--hero b { font-size: 0.92rem; font-weight: 650; line-height: 1.2; max-width: 22ch; }
.asm-b--hero .ln { display: block; width: 72%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.28); }
.asm-b--hero .ln.short { width: 48%; }
.asm-b--hero em { margin-top: 4px; padding: 5px 12px; border-radius: 999px; background: var(--signal); color: var(--ink); font-style: normal; font-size: 0.7rem; font-weight: 700; }
.asm-b--proof { min-height: 52px; }
.asm-b--proof .asm-fill { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.asm-b--proof i { height: 52px; border-radius: 8px; background: linear-gradient(#e6ebf3 1px, transparent 1px) 0 0 / 11px 11px, linear-gradient(90deg, #e6ebf3 1px, transparent 1px) 0 0 / 11px 11px, #cfd8e8; }
.asm-b--proof i:nth-child(2) { background-color: #b9c8e6; }
.asm-b--proof i:nth-child(3) { background-color: #d9cfbf; }
.asm-b--steps { min-height: 40px; }
.asm-b--steps .asm-fill { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 10px; background: #fff; border: 1px solid #e3e8f1; }
.asm-b--steps i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #e9edf4; color: #4a5470; font-style: normal; font-size: 0.66rem; font-weight: 700; }
.asm-b--steps strong { margin-left: auto; font-size: 0.74rem; color: var(--ink); }
.asm-b--form { min-height: 66px; }
.asm-b--form .asm-fill { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; align-items: center; padding: 10px; border-radius: 10px; background: #fff; border: 1px solid #e3e8f1; }
.asm-b--form span { height: 24px; border-radius: 7px; background: #f0f3f8; border: 1px solid #e3e8f1; }
.asm-b--form em { padding: 5px 12px; border-radius: 999px; background: var(--signal); color: var(--ink); font-style: normal; font-size: 0.7rem; font-weight: 700; }
.asm-b--form small { grid-column: 1 / -1; color: #4a5470; font-size: 0.66rem; }
.asm-b--form small::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; border: 1.5px solid #4a5470; vertical-align: -1px; }

.asm-phone .asm-pscreen { gap: 6px; padding: 10px 7px 12px; }
.asm-pscreen .asm-b--hero, .asm-pscreen .asm-b--hero .asm-fill { min-height: 70px; }
.asm-pscreen .asm-b--hero .asm-fill { padding: 9px 8px; gap: 5px; }
.asm-pscreen .asm-b--hero b { font-size: 0.62rem; }
.asm-pscreen .asm-b--hero em { padding: 3px 8px; font-size: 0.56rem; }
.asm-pscreen .asm-b--proof, .asm-pscreen .asm-b--proof i { min-height: 34px; height: 34px; }
.asm-pscreen .asm-b--proof .asm-fill { grid-template-columns: 1fr 1fr; gap: 5px; }
.asm-pscreen .asm-b--form { min-height: 48px; }
.asm-pscreen .asm-b--form .asm-fill { grid-template-columns: 1fr; gap: 5px; padding: 6px; }
.asm-pscreen .asm-b--form span { height: 16px; }
.asm-pscreen .asm-b--form em { justify-self: stretch; text-align: center; padding: 3px 6px; font-size: 0.56rem; }

.asm-stamp { position: absolute; z-index: 3; left: 50%; top: 46%; padding: 8px 16px; border-radius: 12px; border: 3px solid var(--ok); background: rgba(255, 255, 255, 0.95); color: #1d7d59; font-weight: 800; font-size: 0.95rem; white-space: nowrap; box-shadow: 0 18px 40px -18px rgba(11, 19, 36, 0.6); transform: translate(-50%, -50%) rotate(-8deg); transition: opacity 0.35s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.asm.is-armed:not(.is-ready) .asm-stamp { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1.7); }
.asm-lead { position: absolute; z-index: 5; left: -14px; bottom: 16%; display: grid; gap: 1px; padding: 10px 14px; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 44px -20px rgba(0, 0, 0, 0.7); font-size: 0.74rem; transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.asm-lead b { font-size: 0.8rem; }
.asm-lead span { color: var(--flow-ink); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; }
.asm.is-armed:not(.is-lead) .asm-lead { opacity: 0; transform: translateY(14px) scale(0.94); }

.asm-checks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.asm-checks li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(47, 191, 138, 0.12); border: 1px solid rgba(47, 191, 138, 0.45); color: #eef2fb; font-size: 0.8rem; line-height: 1.3; transition: background-color 0.35s, border-color 0.35s, color 0.35s; }
.asm-checks li::before { content: ""; flex: none; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg) translateY(-2px); transition: border-color 0.3s; }
.asm.is-armed .asm-checks li:not(.is-on) { background: rgba(255, 255, 255, 0.03); border-color: var(--night-line); color: var(--fog-dim); }
.asm.is-armed .asm-checks li:not(.is-on)::before { border-color: var(--night-line); }

/* ---------- где теряются заявки ---------- */
.leaks { position: relative; }
.leaks-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin-bottom: 18px; }
.leaks-stage { position: relative; height: clamp(190px, 22vw, 250px); }
.leaks-stage .scene { position: absolute; inset: 0; }
.leaks-end { position: absolute; top: 4px; z-index: 1; color: var(--fog); font-size: 0.85rem; font-weight: 600; }
.leaks-end--a { left: 0; }
.leaks-end--b { right: 0; color: var(--signal); }
.leaks-list { list-style: none; counter-reset: lk; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 6px; }
.leaks-list li { counter-increment: lk; display: grid; gap: 6px; align-content: start; padding: 18px 18px 20px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.leaks-list b { display: flex; align-items: center; gap: 10px; font-weight: 650; line-height: 1.3; }
.leaks-list b::before { content: counter(lk); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--leak); border: 2px solid var(--leak); transition: color 0.3s, border-color 0.3s; }
.leaks-list .bad, .leaks-list .fix { color: var(--fg-soft); font-size: 0.95rem; line-height: 1.5; }
.leaks-list .fix::before { content: "Как исправляю: "; color: #7fe0bb; font-weight: 600; }
.leaks.is-js .leaks-list .fix::before { content: none; }
.leaks.is-js[data-mode="0"] .leaks-list .fix { display: none; }
.leaks.is-js[data-mode="1"] .leaks-list .bad { display: none; }
.leaks.is-js[data-mode="1"] .leaks-list b::before { color: var(--ok); border-color: var(--ok); }
.leaks.is-js[data-mode="1"] .leaks-list li { border-color: rgba(47, 191, 138, 0.35); }

/* ---------- порядок блоков ---------- */
.anatomy { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.anatomy-mock { position: sticky; top: calc(var(--header-h) + 40px); }
.am-page { position: relative; display: grid; gap: 8px; max-width: 340px; margin-inline: auto; padding: 36px 14px 14px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 40px 70px -46px rgba(18, 26, 43, 0.45); }
.am-page::before { content: ""; position: absolute; left: 16px; top: 15px; width: 34px; height: 7px; border-radius: 4px; background: var(--surface-2); box-shadow: 44px 0 0 var(--surface-2), 88px 0 0 var(--surface-2); }
.am-page [data-a] { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: var(--h); padding: 0 14px; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--bg); color: var(--fg-dim); font-style: normal; font-size: 0.88rem; font-weight: 600; transition: color 0.35s, background-color 0.35s, border-color 0.35s; }
.am-page [data-a] b { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 0.76rem; transition: background-color 0.35s, color 0.35s; }
.am-page [data-a].is-on { border-style: solid; border-color: transparent; background: rgba(255, 176, 32, 0.12); color: var(--fg); }
.am-page [data-a].is-on b { background: var(--signal); color: var(--ink); }
.am-cursor { position: absolute; z-index: 2; left: 10px; right: 10px; top: 0; height: 0; border-radius: 14px; border: 2px solid var(--signal); box-shadow: 0 0 0 6px rgba(255, 176, 32, 0.14); pointer-events: none; opacity: 0; }
.anatomy-list { list-style: none; display: grid; }
.anatomy-list li { display: grid; grid-template-columns: 1fr; gap: 16px; min-height: 150px; padding: 26px 0; border-top: 1px solid var(--line); transition: opacity 0.35s; }
.anatomy-list li:last-child { border-bottom: 1px solid var(--line); }
.anatomy-list h3 { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 8px; }
.anatomy-list p { margin: 0; color: var(--fg-soft); }
.anatomy-list .q { margin-bottom: 6px; color: var(--flow-ink); font-weight: 600; }
.anatomy-list .q::before { content: "«"; }
.anatomy-list .q::after { content: "»"; }
.anatomy.is-armed .anatomy-list li:not(.is-on) { opacity: 0.42; }
.am-thumb { display: none; }

@media (max-width: 1080px) {
  .anatomy { grid-template-columns: 1fr; }
  .anatomy-mock { display: none; }
  .anatomy-list li { grid-template-columns: 54px 1fr; min-height: 0; }
  .anatomy.is-armed .anatomy-list li:not(.is-on) { opacity: 1; }
  .am-thumb { display: grid; gap: 3px; align-content: start; width: 44px; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
  .am-thumb i { height: 6px; border-radius: 2px; background: var(--surface-2); }
  .am-thumb i:first-child { height: 12px; }
  .anatomy-list li:nth-child(1) .am-thumb i:nth-child(1),
  .anatomy-list li:nth-child(2) .am-thumb i:nth-child(2),
  .anatomy-list li:nth-child(3) .am-thumb i:nth-child(3),
  .anatomy-list li:nth-child(4) .am-thumb i:nth-child(4),
  .anatomy-list li:nth-child(5) .am-thumb i:nth-child(5),
  .anatomy-list li:nth-child(6) .am-thumb i:nth-child(6) { background: var(--signal); }
  .leaks-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .asm-ad { margin-right: 26px; max-width: 86%; }
  .asm-devices { margin-right: 22px; }
  .asm-page { gap: 7px; padding: 12px; }
  .asm-b--hero, .asm-b--hero .asm-fill { min-height: 92px; }
  .asm-b--form .asm-fill { grid-template-columns: 1fr auto; }
  .asm-b--form span:nth-child(2) { display: none; }
  .asm-stamp { font-size: 0.8rem; padding: 6px 12px; }
  .asm-lead { left: -6px; bottom: 10%; }
  .asm-checks li { font-size: 0.74rem; padding: 5px 10px 5px 9px; }
  .leaks-list { grid-template-columns: 1fr; }
  .leaks-end { font-size: 0.78rem; }
}
