/* ==========================================================================
   home.css — главная: поиск направлений, карусель, «как это работает»
   ========================================================================== */
.hero--search .hero-grid{ align-items: center; }
@media (min-width: 960px){ .hero--search .hero-grid{ grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--sp-6); } }
.hero-copy h1{ margin-bottom: var(--sp-2); font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem); }
.hero-copy h1 em{ font-style: normal; color: var(--accent); }
.hero-sub{ max-width: 52ch; }

/* поиск */
.hero-search{
  position: relative; display: flex; align-items: center; gap: .5rem;
  margin: var(--sp-3) 0 var(--sp-2); padding: .45rem .45rem .45rem 1.1rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-full);
  box-shadow: 0 20px 60px -30px rgba(45,255,122,.35);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.hero-search:focus-within{ border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-dim), 0 20px 60px -30px rgba(45,255,122,.35); }
.hero-search > svg{ color: var(--muted); flex: 0 0 auto; }
.hero-search input{
  flex: 1 1 0; width: 1px; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text);
  font-size: 1.05rem; padding: .7rem 0; position: relative; z-index: 2;
}
.hero-search input::placeholder{ color: transparent; }
.hero-search input::-webkit-search-cancel-button{ -webkit-appearance: none; }
.hero-search .btn{ flex: 0 0 auto; padding: .85em 1.4em; white-space: nowrap; }
.hero-search .btn .short{ display: none; }
@media (max-width: 520px){
  .hero-search{ padding-left: .9rem; }
  .hero-search .btn{ padding: .8em 1em; }
  .hero-search .btn .full{ display: none; }
  .hero-search .btn .short{ display: inline; }
  .hero-typing, .hero-search input{ font-size: 1rem; }
}
/* «печатающийся» плейсхолдер */
.hero-typing{
  position: absolute; left: calc(1.1rem + 20px + .5rem); top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 1.05rem; pointer-events: none; white-space: nowrap; z-index: 1;
}
.hero-typing::after{ content: ""; display: inline-block; width: 2px; height: 1.1em; background: var(--accent); margin-left: 2px; vertical-align: -3px; animation: caret 1s steps(1) infinite; }
@keyframes caret{ 50%{ opacity: 0; } }
.hero-search.has-value .hero-typing, .hero-search:focus-within .hero-typing{ display: none; }
.hero-search:focus-within input::placeholder{ color: var(--muted-dim); }
/* подсказки */
.hero-suggest{
  position: absolute; left: 0; right: 0; top: calc(100% + .5rem); z-index: 50;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); overflow: hidden; max-height: 340px; overflow-y: auto;
}
.hero-suggest a{ display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; color: var(--text); transition: background var(--dur-fast); }
.hero-suggest a:hover, .hero-suggest a.is-active{ background: var(--card-hover); }
.hero-suggest a .fi{ width: 28px; height: 21px; border-radius: 4px; object-fit: cover; }
.hero-suggest a span{ flex: 1; }
.hero-suggest a small{ color: var(--muted); font-size: .85rem; }
.hero-suggest a b{ color: var(--accent); font-weight: 600; font-size: .9rem; }
.hero-suggest .empty{ padding: .9rem 1rem; color: var(--muted); font-size: .9rem; }

/* карусель направлений */
.hero-visual{ display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.hero-visual{ position: relative; }
.dest-stack{ position: absolute; inset: 0 auto auto 50%; width: min(420px, 100%); transform: translateX(-50%); pointer-events: none; }
.dest-stack span{ position: absolute; left: 0; right: 0; top: 0; height: 120px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); opacity: .55 }
.dest-stack span:nth-child(1){ transform: translateY(-10px) scale(.95); }
.dest-stack span:nth-child(2){ transform: translateY(-20px) scale(.9); opacity: .3 }
.dest-card{
  position: relative; display: block; width: min(420px, 100%); background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; color: var(--text); text-decoration: none; box-shadow: var(--shadow, 0 30px 80px -40px rgba(0,0,0,.6));
  transition: transform var(--dur-med) var(--ease), border-color var(--dur-fast);
}
.dest-card:hover{ transform: translateY(-4px); border-color: var(--accent-line); }
.dc-head{ display: flex; align-items: center; gap: .9rem; padding: 1.2rem 1.3rem 1.1rem; }
.dc-head .fi{ width: 56px; height: 42px; border-radius: 9px; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--border); transition: opacity var(--dur-med); }
.dc-title{ flex: 1; min-width: 0; }
.dc-title b{ display: block; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-title span{ display: block; color: var(--muted); font-size: .88rem; margin-top: .1rem; }
.dc-code{ font-family: var(--font-mono); font-size: .78rem; font-weight: 600; color: var(--muted-dim); background: var(--well); border-radius: 8px; padding: .3rem .55rem; }
.dc-perf{ position: relative; height: 0; border-top: 1px dashed var(--border); margin: 0 1.3rem; }
.dc-perf::before, .dc-perf::after{ content: ""; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); }
.dc-perf::before{ left: calc(-1.3rem - 10px); } .dc-perf::after{ right: calc(-1.3rem - 10px); }
.dc-body{ display: grid; grid-template-columns: 1.35fr 1fr .9fr; gap: .6rem; padding: 1.1rem 1.3rem; }
.dc-cell small{ display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: .25rem; }
.dc-cell b{ display: block; font-size: .95rem; font-weight: 700; line-height: 1.25; }
.dc-cell:last-child b{ color: var(--accent); }
.dc-foot{ display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 1.3rem; background: var(--well); font-size: .82rem; color: var(--muted); }
.dc-status{ display: inline-flex; align-items: center; gap: .5rem; }
.dc-status i{ width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.dc-qr{ width: 22px; height: 22px; fill: var(--muted); flex: none; }
.dest-card.is-switching .dc-head, .dest-card.is-switching .dc-body{ opacity: 0; transition: opacity .18s; }
.dc-head, .dc-body{ transition: opacity .25s; }
@media (max-width: 480px){ .dc-body{ grid-template-columns: 1.3fr 1fr .8fr; gap: .5rem; padding: .9rem 1.1rem; } .dc-cell b{ font-size: .86rem; } .dc-head{ padding: 1rem 1.1rem .9rem; } .dc-foot{ padding: .75rem 1.1rem; font-size: .78rem; } }
.dest-dots{ display: flex; gap: .45rem; }
.dest-dots button{ width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: all var(--dur-fast) var(--ease); }
.dest-dots button.is-active{ width: 26px; border-radius: 6px; background: var(--accent); }

/* как это работает */
.section-head.center{ text-align: center; }
.section-head.center .eyebrow{ justify-content: center; }
.section-head.center .section-sub{ margin-inline: auto; }
.how-grid{ display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 860px){ .how-grid{ grid-template-columns: repeat(3, 1fr); } }
.how-card{
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-3) 0; text-align: center; overflow: hidden; display: flex; flex-direction: column;
}
.how-num{ font-family: var(--font-mono); color: var(--accent); font-size: .85rem; font-weight: 600; }
.how-card h3{ font-size: 1.15rem; font-weight: 700; margin: .6rem 0 .5rem; }
.how-card p{ color: var(--muted); font-size: .92rem; line-height: 1.55; max-width: 32ch; margin: 0 auto var(--sp-3); }
.phone{
  width: 220px; margin: auto auto 0; background: #0b0e12; border: 7px solid #1c242e; border-bottom: 0;
  border-radius: 34px 34px 0 0; padding: 1.1rem .9rem 0; position: relative; height: 210px; overflow: hidden;
}
.phone::before{ content: ""; position: absolute; top: .5rem; left: 50%; transform: translateX(-50%); width: 70px; height: 20px; border-radius: 12px; background: #1c242e; }
.phone-screen{ margin-top: 1.4rem; font-size: .72rem; color: var(--muted); text-align: left; }
.phone-screen--center{ text-align: center; display: flex; flex-direction: column; align-items: center; gap: .55rem; }
.ps-search{ display: flex; align-items: center; gap: .4rem; background: #141a22; border: 1px solid var(--border-soft); border-radius: 999px; padding: .45rem .7rem; margin-bottom: .55rem; color: var(--muted-dim); }
.ps-dot{ width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted-dim); }
.ps-row{ display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: 10px; margin-bottom: .3rem; color: var(--text); }
.ps-row .fi{ width: 20px; height: 15px; border-radius: 3px; object-fit: cover; }
.ps-row b{ margin-left: auto; font-weight: 600; color: var(--muted); }
.ps-row.is-active{ background: var(--accent-btn); color: var(--on-accent); }
.ps-row.is-active b{ color: var(--on-accent); }
.ps-chips{ display: flex; gap: .35rem; margin-top: .45rem; }
.ps-chips span{ white-space: nowrap; padding: .3rem .55rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.ps-chips span.is-on{ background: var(--ink-inverse); color: var(--ink-inverse-text); border-color: var(--text); font-weight: 600; }
.ps-title{ color: var(--text); font-weight: 700; font-size: .85rem; }
.ps-qr{ width: 96px; height: 96px; border-radius: 10px; padding: 5px; background: #fff; }
.ps-btn{ background: var(--accent-btn); color: var(--on-accent); font-weight: 700; padding: .5rem .8rem; border-radius: 10px; font-size: .72rem; }
.ps-note{ color: var(--muted-dim); line-height: 1.5; }
.ps-bars{ display: flex; align-items: flex-end; gap: 3px; height: 34px; margin-top: .4rem; }
.ps-bars i{ width: 6px; background: var(--accent); border-radius: 2px; animation: bars 1.6s ease-in-out infinite; }
.ps-bars i:nth-child(1){ height: 30%; animation-delay: 0s; } .ps-bars i:nth-child(2){ height: 48%; animation-delay: .1s; }
.ps-bars i:nth-child(3){ height: 65%; animation-delay: .2s; } .ps-bars i:nth-child(4){ height: 82%; animation-delay: .3s; } .ps-bars i:nth-child(5){ height: 100%; animation-delay: .4s; }
@keyframes bars{ 0%,100%{ opacity: .45 } 50%{ opacity: 1 } }
@media (prefers-reduced-motion: reduce){ .ps-bars i, .hero-typing::after{ animation: none; } }

/* герой: три обещания + проверка телефона */
.trust-row--3{ display: grid; grid-template-columns: 1fr; gap: .5rem .9rem; }
@media (min-width: 560px){ .trust-row--3{ grid-template-columns: 1fr 1fr; } }
.hero-check{ display: inline-flex; align-items: center; gap: .5rem; margin-top: var(--sp-2); font-size: .9rem; font-weight: 600; color: var(--text); text-decoration: none; padding: .55rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-1); }
.hero-check svg{ color: var(--accent); } .hero-check:hover{ border-color: var(--muted); }
