/* hero.css */

.hero {
  position: relative;
  padding: 160px 0 60px;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--white);
}
.hero-dots {
  position: absolute !important;
  inset: 0;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 64px;
  align-items: center;
  /* .container даёт margin:0 auto — внутри .hero (flex-column) авто-поля
     по горизонтали отключают растягивание, и блок берёт max-content ширину
     контента и вылезает за экран. width:100% задаёт явную ширину. */
  width: 100%;
  min-width: 0;
}
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero { padding-top: 120px; }
}

/* Колонки сетки должны уметь сжиматься ниже min-content своего
   содержимого (форма с input распирала колонку и вылезала за экран). */
.hero-text, .hero-visual { min-width: 0; }

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: var(--white);
  border: 1.5px solid var(--ink-950);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-950);
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero-badge .dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--lime);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.hero-badge .dot::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-950);
  animation: pulseDot 2s var(--ease-in-out) infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.6); opacity: 0.5; }
}

/* Heading */
.hero-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(52px, 7.2vw, 108px);
  font-stretch: var(--type-stretch-display);
  letter-spacing: -0.055em;
  line-height: 0.9;
  color: var(--ink-950);
  margin: 0 0 32px 0;
  text-wrap: balance;
}
.hero-h1 .tape {
  display: inline-block;
  transform: rotate(-1.2deg);
}

.hero-sub {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-600);
  margin: 0 0 40px 0;
  max-width: 540px;
}

/* Form */
.hero-form {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 540px;
}
.hero-input {
  flex: 1;
  min-width: 0; /* иначе flex-элемент не сжимается ниже ширины input */
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1.5px solid var(--ink-300);
  border-radius: var(--r-4);
  padding: 0 18px;
  transition: border-color var(--dur-2), box-shadow var(--dur-2);
  color: var(--ink-500);
}
.hero-input:focus-within {
  border-color: var(--ink-950);
  box-shadow: 0 0 0 4px var(--lime);
}
.hero-input input {
  flex: 1;
  min-width: 0; /* иначе input держит свою «родную» ширину ~20 символов */
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 16px 0;
  color: var(--ink-950);
  background: transparent;
}
.hero-input input::placeholder { color: var(--ink-400); }

/* На узких экранах форму складываем вертикально — input и кнопка
   занимают всю ширину, кнопка не выходит за край. */
@media (max-width: 560px) {
  .hero-form { flex-direction: column; align-items: stretch; }
  .hero-form .btn { width: 100%; justify-content: center; }
}

/* Trust row */
.hero-trust { display: flex; align-items: center; gap: 14px; }
.trust-avas { display: flex; }
.trust-avas span {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--white);
  margin-right: -10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--white);
}
.hero-trust > span:last-child {
  font-size: 13px;
  color: var(--ink-600);
  margin-left: 18px;
}

/* Side panel */
.hero-visual { position: relative; z-index: 2; }

.dash {
  background: var(--white);
  border: var(--edge-border-w) solid var(--edge-border-color);
  border-radius: var(--edge-radius);
  overflow: hidden;
  box-shadow: var(--edge-shadow);
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out);
}
.dash:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--edge-shadow-hover);
}
.dash-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1.5px solid var(--ink-950);
  background: var(--ink-50);
}
.dash-dots { display: flex; gap: 6px; }
.dash-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-300);
  border: 1px solid var(--ink-400);
}
.dash-url {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-700);
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: 0.02em;
}
.dash-body { padding: 22px 24px; }
.dash-query {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-500);
  margin-bottom: 6px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.dash-query-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  font-stretch: 92%;
  color: var(--ink-950);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  line-height: 1.25;
}
.dash-answer { display: flex; gap: 12px; align-items: flex-start; }
.dash-ava {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--ink-950);
  color: var(--lime);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.04em;
}
.dash-text { font-size: 14px; line-height: 1.55; color: var(--ink-800); }
.dash-brand {
  font-weight: 600;
  color: var(--ink-950);
  background: var(--lime);
  padding: 1px 5px;
  border-radius: 4px;
}
.dash-cite {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--ink-950);
  color: var(--lime);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.dash-typing {
  display: inline-flex; gap: 3px;
  margin-left: 6px; vertical-align: middle;
}
.dash-typing span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-950);
  opacity: 0.5;
  animation: typing 1.2s ease-in-out infinite;
}
.dash-typing span:nth-child(2) { animation-delay: 0.15s; }
.dash-typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes typing {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.dash-sources {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--ink-300);
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-500);
  align-items: center;
}
.dash-sources span:first-child { letter-spacing: 0.08em; text-transform: uppercase; }
.dash-sources a {
  color: var(--ink-800);
  border-bottom: 1px dashed var(--ink-400);
}
.dash-sources a:hover { color: var(--ink-950); border-bottom-color: var(--ink-950); }
