/* ============ Theme tokens (по дизайн-спеку) ============ */
:root {
  --background: hsl(260, 87%, 3%);
  --foreground: hsl(40, 6%, 95%);
  --hero-sub: hsl(40, 6%, 82%);
  --grad-headline: linear-gradient(to left, #6366f1, #a855f7, #fcd34d);
  --font-body: "Geist Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "General Sans", var(--font-body);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; }

/* ============ Liquid glass (из спека, дословно) ============ */
.liquid-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
  padding: 8px 16px;
  transition: background 0.25s ease, transform 0.15s ease;
}
.btn-glass::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit; padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.15) 20%,
    rgba(255,255,255,0) 40%, rgba(255,255,255,0) 60%,
    rgba(255,255,255,0.15) 80%, rgba(255,255,255,0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.06); }
.btn-glass:active { transform: scale(0.98); }
/* CTA теперь может быть ссылкой <a>, а не только <button> */
a.btn-glass { display: inline-block; color: inherit; text-decoration: none; text-align: center; }

/* ============ Hero wrapper + видео ============ */
.hero-wrapper { position: relative; overflow: hidden; }

.hero-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 20% 110%, rgba(99, 102, 241, 0.28), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% -5%, rgba(168, 85, 247, 0.22), transparent 60%),
    radial-gradient(ellipse 45% 35% at 65% 90%, rgba(252, 211, 77, 0.10), transparent 65%),
    var(--background);
  animation: fallback-drift 24s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes fallback-drift {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.12) translateY(-2%); }
}

#bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; /* JS управляет fade-in/out через rAF */
}

.hero-z {
  position: relative; z-index: 10;
  min-height: 100svh;
  display: flex; flex-direction: column;
}

/* ============ Navbar ============ */
.navbar {
  width: 100%;
  padding: 20px 32px; /* py-5 px-8 */
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.nav-logo img { height: 32px; display: block; }
.nav-center { display: flex; align-items: center; gap: 8px; }
.nav-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px;
  color: color-mix(in srgb, var(--foreground) 90%, transparent);
  transition: color 0.2s ease;
  font-size: 15px;
}
.nav-item:hover { color: var(--foreground); }
.chev { opacity: 0.7; }
.nav-cta { font-size: 15px; }

.nav-divider {
  margin-top: 3px;
  height: 1px;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--foreground) 20%, transparent), transparent);
}

/* ============ Hero content ============ */
.hero-main {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: visible; /* чтобы blur-шейп не резался */
  padding: 48px 24px;
}

.blur-shape {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(984px, 96vw); height: 527px;
  opacity: 0.9;
  background: #030712; /* gray-950 */
  filter: blur(82px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 1200px;
}

.hero-badge {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--foreground) 55%, transparent);
  margin-bottom: 22px;
}

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 11vw, 200px);
  line-height: 1.02;
  letter-spacing: -0.024em;
  color: var(--foreground);
}
.headline .grad {
  background-image: var(--grad-headline);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--hero-sub);
  font-size: 18px;
  line-height: 32px;
  max-width: 28rem;
  margin: 9px auto 0;
  opacity: 0.8;
}

.btn-cta {
  padding: 24px 29px; /* px-[29px] py-[24px] */
  margin-top: 25px;
  font-size: 16px;
  font-weight: 500;
}

/* ============ Marquee ============ */
.marquee-section { padding-bottom: 40px; }
.marquee-inner {
  max-width: 1024px;
  margin: 0 auto;
  display: flex; align-items: center;
  gap: 48px;
  padding: 0 24px;
}
.marquee-label {
  flex-shrink: 0;
  color: color-mix(in srgb, var(--foreground) 50%, transparent);
  font-size: 14px;
  line-height: 1.5;
}
.marquee-viewport {
  flex: 1; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; align-items: center; gap: 64px;
  width: max-content;
  animation: marquee 20s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0%); }
  to   { transform: translateX(-50%); }
}
.marquee-item { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.m-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}
.m-name { font-size: 16px; font-weight: 600; color: var(--foreground); }

/* ============ Sections ============ */
.section {
  max-width: 1024px;
  margin: 0 auto;
  padding: 96px 24px;
  text-align: center;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--hero-sub);
  opacity: 0.75;
  max-width: 34rem;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Benefits */
.benefits-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}
.benefit-card { border-radius: 20px; padding: 28px; }
.benefit-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
}
.benefit-card h3 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  margin-bottom: 10px;
}
.benefit-card p { color: var(--hero-sub); opacity: 0.85; line-height: 1.6; font-size: 15px; }

/* Touch video (человек + ИИ) */
.touch-section {
  padding: 32px 24px 0;
  text-align: center;
}
.touch-wrap {
  width: min(420px, 88vw);
  aspect-ratio: 856 / 1072;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.18), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}
.touch-wrap video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12); /* кроп прячет вотермарку генератора в углу */
  opacity: 0;             /* JS ведёт fade-цикл */
}
.touch-caption {
  margin-top: 18px;
  color: color-mix(in srgb, var(--foreground) 50%, transparent);
  font-size: 14px;
}

/* Chat mock */
.chat-card {
  border-radius: 24px;
  padding: 32px;
  max-width: 480px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
}
.chat-msg.them {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border-bottom-left-radius: 4px;
}
.chat-msg.me {
  align-self: flex-end;
  background: rgba(99, 102, 241, 0.28);
  border-bottom-right-radius: 4px;
}

/* Waitlist form */
.waitlist-form {
  border-radius: 24px;
  padding: 36px;
  max-width: 480px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 18px;
  text-align: left;
}
.waitlist-form label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 14px;
  color: var(--hero-sub);
}
.waitlist-form input[type="text"],
.waitlist-form select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--foreground);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}
.waitlist-form input:focus, .waitlist-form select:focus { border-color: #a855f7; }
.waitlist-form select option { background: #0b0817; color: var(--foreground); }
.opt { opacity: 0.55; } .req { color: #fcd34d; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.consent { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-size: 13px; line-height: 1.5; }
.consent input { margin-top: 3px; accent-color: #a855f7; }
.consent a { color: #c4b5fd; }
.waitlist-form .btn-cta { margin-top: 6px; padding: 18px 29px; align-self: stretch; }
.form-status { font-size: 14px; min-height: 1.2em; text-align: center; }
.form-status.ok { color: #86efac; }
.form-status.err { color: #fda4af; }

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 48px 24px 56px;
}
.footer-inner { max-width: 720px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.footer-honest { color: var(--hero-sub); opacity: 0.85; line-height: 1.6; font-size: 15px; }
.footer-crisis { color: color-mix(in srgb, var(--foreground) 55%, transparent); font-size: 13px; line-height: 1.6; }
.footer-crisis a { color: #c4b5fd; }
.footer-links { color: color-mix(in srgb, var(--foreground) 40%, transparent); font-size: 13px; }

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .nav-center { display: none; }
  .benefits-grid { grid-template-columns: 1fr; }
  .marquee-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .marquee-viewport { width: 100%; }
  .hero-sub { font-size: 16px; line-height: 27px; }
  .btn-cta { padding: 18px 24px; }
  .blur-shape { height: 380px; }
}
