/* =========================================================
   hero.css — Hero section with 2-column layout + 3-phone fan
   ========================================================= */

/* ---------- Hero Wrapper ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--space-12));
  padding-bottom: var(--space-20);
  overflow: hidden;
  background: linear-gradient(160deg, #EFF6FF 0%, #FFFFFF 55%, #F8FAFF 100%);
}

/* Decorative background blobs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,.12) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.hero::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,.10) 0%, transparent 70%);
  bottom: 0;
  right: -80px;
}

/* ---------- Two-column grid ---------- */
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  width: min(1200px, 100% - var(--space-8));
  margin-inline: auto;
}

/* ---------- Left: Text Content ---------- */
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-width: 0; /* prevent text from overflowing grid cell */
}

.hero__badge {
  margin-bottom: var(--space-5);
  animation: fadeUp 0.6s var(--ease-out) both;
}

.hero__badge-icon {
  height: 1.2em;
  width: auto;
  vertical-align: middle;
  object-fit: contain;
  display: inline;
}

.hero__headline {
  margin-bottom: var(--space-5);
  animation: fadeUp 0.6s var(--ease-out) 0.1s both;
  letter-spacing: -0.03em;
}

.hero__headline em {
  font-style: italic;
  color: var(--blue);
}

.hero__subhead {
  max-width: 48ch;
  margin-bottom: var(--space-4);
  font-size: 1.125rem;
  animation: fadeUp 0.6s var(--ease-out) 0.2s both;
}

.hero__expand {
  max-width: 48ch;
  margin-bottom: var(--space-3);
  animation: fadeUp 0.3s var(--ease-out) both;
}

.hero__expand p {
  font-size: 1.0625rem;
}

.hero__read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: var(--space-8);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  animation: fadeUp 0.6s var(--ease-out) 0.25s both;
  transition: opacity var(--duration-fast);
}

.hero__read-more:hover {
  opacity: 0.7;
}

.hero__read-more-arrow {
  display: inline-block;
  transition: transform var(--duration-normal) var(--ease-out);
}

.hero__read-more[aria-expanded="true"] .hero__read-more-arrow {
  transform: rotate(180deg);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  animation: fadeUp 0.6s var(--ease-out) 0.3s both;
}

.hero__note {
  margin-top: var(--space-3);
  font-size: 0.8125rem;
  color: var(--slate-400);
  animation: fadeUp 0.6s var(--ease-out) 0.4s both;
}

/* ---------- Right: Phone Fan ---------- */
.hero__phones {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 540px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeUp 0.8s var(--ease-out) 0.35s both;
}

/* Shared phone styles */
.hero__phone {
  position: absolute;
  bottom: 0;
  border-radius: 36px;
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  transition: transform var(--duration-slow) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out);
}

.hero__phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 36px;
}

/* Center phone */
.hero__phone--center {
  width: 240px;
  height: 500px;
  bottom: 0;
  z-index: 3;
  animation: float 5s ease-in-out infinite;
  transform-origin: bottom center;
}

/* Left phone */
.hero__phone--left {
  width: 180px;
  height: 380px;
  left: 10px;
  top: 60px;
  bottom: auto;
  z-index: 2;
  transform: rotate(-6deg);
  transform-origin: bottom center;
  opacity: 0.65;
}

/* Right phone */
.hero__phone--right {
  width: 180px;
  height: 380px;
  right: 10px;
  top: 60px;
  bottom: auto;
  z-index: 2;
  transform: rotate(6deg);
  transform-origin: bottom center;
  opacity: 0.65;
}

/* Hover: widen the fan */
.hero__phones:hover .hero__phone--left {
  transform: rotate(-10deg) translateX(-10px);
  opacity: 0.85;
}

.hero__phones:hover .hero__phone--right {
  transform: rotate(10deg) translateX(10px);
  opacity: 0.85;
}

.hero__phones:hover .hero__phone--center {
  transform: translateY(-12px) scale(1.03);
}

/* ---------- Responsive ---------- */

/* Tablet: 768px – 900px */
@media (max-width: 900px) {
  .hero {
    padding-top: calc(var(--nav-height) + var(--space-10));
    padding-bottom: var(--space-16);
    padding-inline: var(--space-5);
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    width: 100%;
  }

  /* phones on top, text below */
  .hero__phones { order: -1; }

  .hero__content {
    align-items: center;
    text-align: center;
  }

  .hero__subhead,
  .hero__expand {
    margin-inline: auto;
  }

  .hero__actions {
    align-items: center;
  }

  .hero__phones {
    height: 460px;
    max-width: 100%;
    margin-inline: auto;
  }

  .hero__phone--center {
    width: 200px;
    height: 420px;
  }

  .hero__phone--left,
  .hero__phone--right {
    width: 150px;
    height: 320px;
    top: 60px;
  }
}

/* Mobile: below 768px */
@media (max-width: 768px) {
  .hero__phones {
    height: 400px;
  }

  .hero__phone--center {
    width: 170px;
    height: 360px;
  }

  .hero__phone--left {
    width: 130px;
    height: 270px;
    left: 10px;
    top: 70px;
  }

  .hero__phone--right {
    width: 130px;
    height: 270px;
    right: 10px;
    top: 70px;
  }
}

/* ---------- Phone Carousel ---------- */
.phones-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 520px;
  overflow: visible;
}

.phone-slot {
  position: absolute;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
  transform-origin: bottom center;
}

.phone-slot.slot-center {
  transform: translateX(0) translateY(0) rotate(0deg) scale(1);
  opacity: 1;
  z-index: 3;
  width: 220px;
}

.phone-slot.slot-left {
  transform: translateX(-145px) translateY(30px) rotate(-8deg) scale(0.78);
  opacity: 0.65;
  z-index: 2;
  width: 220px;
}

.phone-slot.slot-right {
  transform: translateX(145px) translateY(30px) rotate(8deg) scale(0.78);
  opacity: 0.65;
  z-index: 2;
  width: 220px;
}

.phone-screenshot-wrapper {
  overflow: hidden;
  border-radius: 36px;
  border: 8px solid #111111;
  box-shadow: var(--shadow-phone);
}

.phone-screenshot-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.3s, width 0.3s;
  cursor: pointer;
}

.dot.active {
  background: #3B82F6;
  width: 24px;
  border-radius: 4px;
}

/* Small mobile: below 480px */
@media (max-width: 480px) {
  .hero {
    padding-bottom: var(--space-10);
    padding-inline: var(--space-4);
  }

  .hero__headline {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .hero__phones {
    height: 350px;
  }

  .hero__phone--center {
    width: 150px;
    height: 310px;
  }

  .hero__phone--left {
    width: 110px;
    height: 230px;
    left: 5px;
    top: 70px;
  }

  .hero__phone--right {
    width: 110px;
    height: 230px;
    right: 5px;
    top: 70px;
  }
}

@media (max-width: 640px) {
  .phones-carousel {
    height: 380px;
  }

  .phone-slot.slot-center {
    width: 160px;
  }

  .phone-slot.slot-left {
    transform: translateX(-105px) translateY(25px) rotate(-8deg) scale(0.75);
    width: 160px;
  }

  .phone-slot.slot-right {
    transform: translateX(105px) translateY(25px) rotate(8deg) scale(0.75);
    width: 160px;
  }
}
