/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 48px;
  background: #fff;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  z-index: 0;
}

.hero-blob-1 {
  width: 620px;
  height: 520px;
  left: -180px;
  top: -80px;
  background: radial-gradient(ellipse at 40% 40%, rgba(0, 7, 172, 0.14), transparent 70%);
}

.hero-blob-2 {
  width: 560px;
  height: 480px;
  right: -160px;
  top: 40px;
  background: radial-gradient(ellipse at 60% 40%, rgba(61, 75, 255, 0.12), transparent 72%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.85fr);
  gap: clamp(42px, 6vw, 68px);
  align-items: center;
}

.hero-badge {
  margin-bottom: 22px;
}

.hero-h1 {
  font-size: clamp(2.4rem, 3.6vw, 3.25rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-h1 .accent {
  color: var(--brand);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 30px;
}

/* Phone test widget */
.phone-test {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 500px;
}

.phone-test-row {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 500px;
  min-height: 52px;
  padding: 6px;
  border: 1px solid rgba(0, 7, 172, 0.13);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(3, 2, 36, 0.06);
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: stretch;
  padding: 0 14px 0 10px;
  border-right: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  flex-shrink: 0;
}

.phone-input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
}

.phone-input:focus {
  border-color: transparent;
}

.phone-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 24px;
  align-self: stretch;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.phone-submit:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 20px rgba(0, 7, 172, 0.3);
}

.phone-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.phone-feedback {
  display: none;
  font-size: 0.82rem;
  color: var(--brand);
  font-weight: 500;
  max-width: 420px;
}

.phone-feedback.is-visible {
  display: block;
}

.phone-feedback.is-error {
  color: #c0272d;
}

.phone-hint {
  font-size: 0.76rem;
  color: var(--faint);
}

/* Trust row */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-stack {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.avatar-stack img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(3, 2, 36, 0.12);
  margin-left: -10px;
}

.avatar-stack img:first-child {
  margin-left: 0;
}

.hero-trust-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hero-trust-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.hero-trust-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Media / video panel */
.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
  z-index: 1;
}

.hero-video-card {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 0.82;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 26px 56px -24px rgba(0, 7, 172, 0.42);
  background: var(--ink);
}

.hero-video-rail {
  display: flex;
  width: 600%;
  height: 100%;
  animation: hero-video-rotate 30s infinite;
}

.hero-video-rail video {
  width: calc(100% / 6);
  height: 100%;
  flex: 0 0 calc(100% / 6);
  object-fit: cover;
}

.hero-video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes hero-video-rotate {
  0%, 13% { transform: translateX(0); }
  16.66%, 29.66% { transform: translateX(-16.666%); }
  33.33%, 46.33% { transform: translateX(-33.333%); }
  50%, 63% { transform: translateX(-50%); }
  66.66%, 79.66% { transform: translateX(-66.666%); }
  83.33%, 96.33% { transform: translateX(-83.333%); }
  100% { transform: translateX(0); }
}

.hero-video-glow {
  position: absolute;
  inset: -18px;
  border-radius: 30px;
  background: radial-gradient(closest-side, rgba(0, 7, 172, 0.28), transparent 100%);
  z-index: -1;
  filter: blur(6px);
}

.hero-video-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(3, 2, 36, 0.85), transparent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-video-caption .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero-video-caption span {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
}

.hero-float-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  animation: float-bob 4s ease-in-out infinite alternate;
}

.hero-float-icon.f1 {
  top: 6%;
  right: -5%;
  width: 48px;
  height: 48px;
  background: var(--brand);
  box-shadow: 0 8px 24px rgba(0, 7, 172, 0.4);
}

.hero-float-icon.f1 svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}

.hero-float-icon.f2 {
  bottom: 10%;
  left: -5%;
  width: 46px;
  height: 46px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 1.3rem;
  animation-delay: 1.4s;
}

@keyframes float-bob {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-copy {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-sub {
    max-width: 100%;
  }
  .phone-test-row,
  .phone-feedback {
    max-width: 500px;
    width: 100%;
  }
  .hero-video-card {
    width: min(330px, 80vw);
  }
}

@media (max-width: 520px) {
  .phone-test-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0;
    padding: 6px;
  }
  .phone-prefix {
    min-height: 40px;
  }
  .phone-input {
    min-height: 40px;
    padding: 0 12px;
  }
  .phone-submit {
    grid-column: 1 / -1;
    min-height: 42px;
    padding: 0 18px;
    margin-top: 6px;
  }
}
