/* Главная Parker: короткая воронка для рекламы.
   Первый экран с оффером, цифры, «обычные проблемы зачёркнуты», заявка голосом или текстом и все способы связи,
   дальше доказательства для тех, кто листает: кейсы, Бен, вопросы. */

/* ---------- 1. Первый экран ---------- */
.hero { position: relative; min-height: max(680px, 100svh); overflow: hidden; overflow: clip; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -3; background: var(--bg); }
.hero-inner { position: relative; min-height: inherit; }
.hero-copy {
  position: relative; z-index: 2;
  padding: calc(var(--header-h) + clamp(48px, 15vh, 180px)) 0 clamp(72px, 12vh, 140px);
  max-width: min(860px, 62%);
}
.hero-copy .kicker { margin-bottom: 26px; display: block; }
.hero-title { font-size: clamp(46px, 5.9vw, 98px); }
.hero-title .ln { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero-title .ln > span { display: inline-block; }
.hero-copy .lead { margin-top: 28px; max-width: 36ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

.hero-photo {
  position: absolute; z-index: 1; top: 0; right: 0; bottom: 0;
  width: min(56vw, 900px);
  overflow: hidden; overflow: clip; pointer-events: none;
}
.hero-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 46% 28%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.06);
  will-change: transform;
  /* The left fade is a mask on the photo itself, transparent at the very edge: the scaled, composited image
     can leak one antialiased pixel past the clip, and on this photo that pixel is the white flip chart. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 5%, rgba(0, 0, 0, 0.3) 19%, #000 44%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 5%, rgba(0, 0, 0, 0.3) 19%, #000 44%);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 13, 17, 0.7) 0%, rgba(11, 13, 17, 0) 20%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 13, 17, 0.55) 18%, rgba(11, 13, 17, 0) 40%);
}
/* sits above the corner where the chat button lives */
.hero-sign {
  position: absolute; z-index: 3; right: var(--gutter); bottom: calc(clamp(24px, 5vh, 48px) + 64px);
  text-align: right; display: grid; gap: 4px; justify-items: end;
}
.hero-sign .sig { font-family: "Mr Dafoe", cursive; font-size: clamp(38px, 3.4vw, 54px); line-height: 1; color: var(--accent-2); transform: rotate(-4deg); margin-bottom: 4px; }
.hero-sign strong { font-weight: 500; font-size: 17px; }
.hero-sign span { font-size: 14px; color: var(--text-2); max-width: 30ch; }

/* load: the lines rise, the photo fades in */
.js .hero .hero-title .ln > span { transform: translateY(105%); transition: transform 1.2s var(--ease-out); }
.js .hero.is-on .hero-title .ln > span { transform: none; }
.js .hero.is-on .hero-title .ln:nth-child(2) > span { transition-delay: 0.08s; }
.js .hero .kicker, .js .hero .lead, .js .hero .hero-cta, .js .hero .hero-sign { opacity: 0; transform: translateY(12px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .hero.is-on .kicker { opacity: 1; transform: none; }
.js .hero.is-on .lead { opacity: 1; transform: none; transition-delay: 0.3s; }
.js .hero.is-on .hero-cta { opacity: 1; transform: none; transition-delay: 0.4s; }
.js .hero.is-on .hero-sign { opacity: 1; transform: none; transition-delay: 1s; }
.js .hero .hero-photo { opacity: 0; transform: scale(1.04); transform-origin: 60% 40%; transition: opacity 1.6s ease 0.15s, transform 2.6s var(--ease-out) 0.15s; }
.js .hero.is-on .hero-photo { opacity: 1; transform: none; }

/* ---------- 2. Бен: личное обращение, видео и фото (лицо, которое человек потом увидит на звонке) ---------- */
.hero + .ben { border-top: 1px solid var(--line); }
.ben-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-areas: "video title" "video letter" "video photos";
  grid-template-rows: auto auto 1fr;
  gap: 0 clamp(32px, 5vw, 88px);
}
.ben-title { grid-area: title; font-size: clamp(48px, 6vw, 96px); }
.ben-video {
  grid-area: video; position: relative; align-self: start; margin: 0;
  aspect-ratio: 9 / 16; border-radius: var(--r-l); overflow: hidden; overflow: clip;
  background: var(--surface) url("../assets/site/video/ben-intro.jpg") center / cover no-repeat; border: 1px solid var(--line);
}
.ben-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.ben-video video::cue { font: 500 17px/1.35 var(--f); color: #fff; background: rgba(11, 13, 17, 0.78); }
.bv-sound {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(11, 13, 17, 0.62); color: #fff;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 500 14px/1 var(--f); cursor: pointer; transition: background-color 0.2s ease, transform 160ms var(--ease-out);
}
.bv-sound:active { transform: scale(0.97); }
.bv-sound [data-icon] { width: 18px; height: 18px; }
.bv-sound .bv-off, .bv-sound[aria-pressed="true"] .bv-on { display: none; }
.bv-sound[aria-pressed="true"] .bv-off { display: inline-block; }
@media (hover: hover) and (pointer: fine) { .bv-sound:hover { background: rgba(11, 13, 17, 0.82); } }
.ben-letter { grid-area: letter; margin-top: 28px; display: grid; gap: 18px; max-width: 56ch; }
.ben-letter > p:not(.ben-sign) { font-size: clamp(19px, 1.55vw, 23px); line-height: 1.5; letter-spacing: -0.01em; text-wrap: pretty; }
.ben-sign { display: grid; gap: 2px; justify-items: start; margin-top: 4px; }
.ben-sign .sig { font-family: "Mr Dafoe", cursive; font-size: 48px; line-height: 1; color: var(--accent-2); transform: rotate(-4deg); transform-origin: 0 60%; margin-bottom: 6px; }
.ben-sign strong { font-weight: 500; font-size: 17px; }
.ben-sign span:last-child { font-size: 14px; color: var(--text-2); }
.ben-letter .direct-list { margin-top: 10px; align-items: center; }
.ben-photos { grid-area: photos; align-self: end; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 40px; }
.ben-photos img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; border-radius: var(--r-m); background: var(--surface); }

/* ---------- 4. Обычные проблемы, зачёркнутые ручкой ---------- */
.edit .h2 { margin-bottom: clamp(40px, 5vw, 72px); }
.edit-list { display: grid; }
.edit-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px clamp(24px, 4vw, 72px); align-items: baseline;
  padding: clamp(22px, 2.6vw, 34px) 0; border-top: 1px solid var(--line);
}
.edit-row:last-child { border-bottom: 1px solid var(--line); }
.edit-was { font-weight: 350; font-size: clamp(24px, 2.6vw, 40px); line-height: 1.15; letter-spacing: -0.03em; color: var(--text-3); }
.edit-was s { position: relative; text-decoration: none; }
/* the strike is a pen stroke drawn across the old way of working */
.edit-was s::after {
  content: ""; position: absolute; left: -0.08em; right: -0.08em; top: 54%; height: 0.075em; min-height: 2px;
  background: var(--accent); border-radius: 2px; transform: rotate(-1.2deg) scaleX(1); transform-origin: 0 50%;
}
.edit-now { display: flex; gap: 14px; align-items: baseline; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.4; color: var(--text); font-weight: 450; letter-spacing: -0.01em; }
.edit-now [data-icon] { flex: none; width: 20px; height: 20px; color: var(--accent); transform: translateY(3px); }
.js .edit-was s::after { transform: rotate(-1.2deg) scaleX(0); transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1); transition-delay: calc(var(--i) * 0.18s + 0.1s); }
.js .edit-now { opacity: 0; transform: translateX(-8px); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); transition-delay: calc(var(--i) * 0.18s + 0.5s); }
.js .edit-list.is-in .edit-was s::after { transform: rotate(-1.2deg) scaleX(1); }
.js .edit-list.is-in .edit-now { opacity: 1; transform: none; }

/* ---------- 3. Заявка ---------- */
.brief-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "head form" "steps form" "direct form" ". form";
  grid-template-rows: auto auto auto 1fr;
  gap: 0 clamp(32px, 5vw, 96px); align-items: start;
}
.brief-head { grid-area: head; display: grid; gap: 22px; }
.brief-card { grid-area: form; padding: clamp(24px, 3.2vw, 44px); }
.brief-steps { grid-area: steps; display: grid; gap: 18px; margin-top: 44px; }
.brief-direct { grid-area: direct; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }

.brief-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.brief-steps li:first-child .step-n { border-color: var(--accent); color: var(--accent); }
.brief-steps h3 { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; padding-top: 5px; }
.brief-steps p { font-size: 15px; color: var(--text-2); margin-top: 2px; }

.direct-title { font-size: 15px; font-weight: 500; color: var(--text-2); margin-bottom: 14px; }
.direct-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* the recorder: one big button, the state is in data-state */
.brief-fields { display: grid; gap: 22px; }
.brief-fields[hidden] { display: none; }
.rec {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px; border-radius: 20px; background: var(--bg-2); border: 1px solid var(--line);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.rec[data-state="recording"] { border-color: rgba(242, 181, 74, 0.5); }
.rec-btn {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.rec-btn:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .rec-btn:hover { background: var(--accent-2); } }
.rec-ico { position: absolute; width: 30px; height: 30px; display: none; }
.rec[data-state="idle"] .rec-ico--mic, .rec[data-state="asking"] .rec-ico--mic, .rec[data-state="denied"] .rec-ico--mic { display: block; }
.rec[data-state="recording"] .rec-ico--stop { display: block; width: 24px; height: 24px; }
.rec[data-state="done"] .rec-ico--play { display: block; width: 26px; height: 26px; transform: translateX(2px); }
.rec[data-state="playing"] .rec-ico--pause { display: block; width: 26px; height: 26px; }
.rec[data-state="done"] .rec-btn, .rec[data-state="playing"] .rec-btn { background: var(--text); color: var(--bg); }
/* recording: a ring breathes around the button, so it is obvious the mic is live */
.rec-btn::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.rec[data-state="recording"] .rec-btn::before { animation: rec-ring 1.4s var(--ease-out) infinite; }
@keyframes rec-ring { 0% { opacity: 0.8; transform: scale(0.92); } 100% { opacity: 0; transform: scale(1.22); } }
.rec-title { font-weight: 500; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.rec-hint { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.rec[data-state="denied"] .rec-hint { color: var(--err); }
.rec-meter { display: none; height: 28px; margin-top: 10px; gap: 3px; align-items: center; }
.rec-meter i { flex: 1; max-width: 6px; height: 100%; border-radius: 3px; background: var(--accent); transform: scaleY(0.08); transform-origin: 50% 50%; }
.rec[data-state="recording"] .rec-meter, .rec[data-state="done"] .rec-meter, .rec[data-state="playing"] .rec-meter { display: flex; }
.rec[data-state="done"] .rec-meter i, .rec[data-state="playing"] .rec-meter i { background: var(--line-2); }
.rec[data-state="playing"] .rec-meter i.is-past, .rec[data-state="done"] .rec-meter i.is-past { background: var(--text); }
.rec-del {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: none; color: var(--text-2); cursor: pointer; font-size: 14px;
}
.rec-del [data-icon] { width: 16px; height: 16px; }
.rec-del[hidden] { display: none; }
@media (hover: hover) { .rec-del:hover { color: var(--text); border-color: var(--text-2); } }

.brief-or { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-3); }
.brief-or::before, .brief-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.brief-or[hidden] { display: none; }
.brief-card textarea { min-height: 112px; }

.reply { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; }
.reply legend { font-size: 15px; font-weight: 500; padding: 0; margin-bottom: 12px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 42px; border-radius: 10px; font-size: 15px; color: var(--text-2); transition: background-color 0.2s ease, color 0.2s ease; }
.seg input:checked + span { background: var(--surface-3); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.form-alert { padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 122, 107, 0.4); background: rgba(255, 122, 107, 0.07); font-size: 15px; line-height: 1.5; }
.form-alert[hidden] { display: none; }
.form-alert a { color: var(--text); }
.brief-card [data-submit][aria-busy="true"] { opacity: 0.7; cursor: progress; }
.brief-card .form-success { justify-items: start; gap: 14px; padding: 12px 0; }
.success-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); padding: 14px; }
.brief-card .form-success .link { border: 0; background-color: transparent; cursor: pointer; padding: 0 0 3px; color: var(--text); font-size: 16px; }

/* ---------- 5. Кейсы ---------- */
.case-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.case { grid-column: span 6; display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; transition: border-color 0.3s ease, transform 0.3s var(--ease-out); }
.case--wide { grid-column: 1 / -1; flex-direction: row; }
.case--wide .case-viz { flex: 1.35; aspect-ratio: auto; min-height: 400px; }
.case--wide .case-body { flex: 1; padding: clamp(28px, 3.6vw, 56px); }
@media (hover: hover) and (pointer: fine) { .case:hover { border-color: var(--line-2); } }
.case:active { transform: scale(0.995); }
.case-viz { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(120% 100% at 50% 0%, #161b23, #0e1116 70%); border-bottom: 1px solid var(--line); }
.case--wide .case-viz { border-bottom: 0; border-right: 1px solid var(--line); }
.case-viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.case-body { display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 2.8vw, 40px); flex: 1; }
.case-client { font-size: 14px; color: var(--text-2); font-weight: 500; }
.case-title { font-weight: 400; font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.025em; line-height: 1.15; text-wrap: balance; }
.case-num { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.case-num strong { font-weight: 330; font-size: clamp(40px, 4vw, 60px); letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.case-num span { font-size: 15px; color: var(--text-2); }
.case-more { font-size: 15px; font-weight: 500; color: var(--text); }

/* ---------- 6. FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 96px); align-items: start; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .hero-copy { max-width: 64%; }
  .hero-photo { width: 50vw; }
  .hero-photo img { object-position: 52% 28%; }
}
@media (min-width: 901px) {
  .hero-title .ln { white-space: nowrap; }
}
@media (max-width: 900px) {
  .hero { min-height: 0; display: flex; flex-direction: column; }
  .hero-inner { order: 1; }
  .hero-photo { order: 2; }
  .hero-sign { order: 3; }
  .hero-copy { max-width: none; padding-bottom: 8px; padding-top: calc(var(--header-h) + 36px); }
  .hero-title .ln { white-space: normal; }
  .hero-photo { position: relative; top: auto; right: auto; bottom: auto; width: 100%; aspect-ratio: 4 / 5; max-height: 80svh; margin-top: 24px; }
  .hero-photo img {
    object-position: 44% 30%;
    /* on a phone the photo sits under the text: the top edge fades out on the photo itself, same reason as above */
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 4%, rgba(0, 0, 0, 0.4) 12%, #000 28%);
    mask-image: linear-gradient(180deg, transparent 0%, transparent 4%, rgba(0, 0, 0, 0.4) 12%, #000 28%);
  }
  .hero-photo::after { background: linear-gradient(0deg, var(--bg) 0%, rgba(11, 13, 17, 0.6) 16%, rgba(11, 13, 17, 0) 36%); }
  .hero-sign { position: relative; z-index: 2; right: auto; bottom: auto; margin: -92px var(--gutter) 0; padding-bottom: 40px; justify-items: start; text-align: left; }
  .edit-row { grid-template-columns: minmax(0, 1fr); }
  .ben-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "video" "letter" "photos"; grid-template-rows: none; }
  .ben-video { margin-top: 24px; width: 100%; max-width: 460px; max-height: 82svh; justify-self: center; }
  .ben-photos {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 44%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .ben-photos::-webkit-scrollbar { display: none; }
  .ben-photos li { scroll-snap-align: start; }
  .brief-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "form" "direct" "steps"; grid-template-rows: none; }
  .brief-card { margin-top: 32px; }
  .brief-direct { margin-top: 32px; }
  .brief-steps { margin-top: 36px; }
  .case, .case--wide { grid-column: 1 / -1; flex-direction: column; }
  .case--wide .case-viz { flex: none; min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--line); }
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .hero-cta { display: grid; grid-template-columns: 1fr; }
  .ben-photos { grid-auto-columns: 62%; }
  .ben-letter .direct-list .btn { flex: 1 1 100%; }
  .rec { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 16px; }
  .rec-btn { width: 64px; height: 64px; }
  .rec-del { grid-column: 1 / -1; justify-self: start; }
  .direct-list .ch { flex: 1 1 calc(50% - 4px); justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .js .hero .hero-title .ln > span, .js .hero .kicker, .js .hero .lead, .js .hero .hero-cta, .js .hero .hero-sign, .js .hero .hero-photo, .js .edit-now { opacity: 1; transform: none; }
  .js .edit-was s::after { transform: rotate(-1.2deg) scaleX(1); }
  .rec[data-state="recording"] .rec-btn::before { animation: none; opacity: 0.8; }
}
