/* ===== Hero — main page top section (Figma) ===== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 180px;
  padding: 72px 100px;
  text-align: center;
  overflow-x: clip; /* keep the phone row from causing horizontal scroll */
}

/* Headline + actions group */
.hero-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px; /* title → actions */
}

.hero-title {
  --hero-title-pad: 24px; /* ← horizontal padding (DESKTOP) — tweak me */
  max-width: 100%;
  padding: 0 var(--hero-title-pad);
  font-size: clamp(40px, 8vw, 140px);
  font-weight: var(--font-weight-black);
  color: var(--color-label-primary);
}
.hero-title .hl { color: var(--color-accent-blue); }

/* ===== Actions row ===== */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

/* Primary "Join Beta" pill */
.hero-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 64px;
  min-width: 200px;
  padding: 0 24px;
  border-radius: 32px;
  background: var(--color-black);
  color: var(--color-white);
  text-decoration: none;
  font-weight: var(--font-weight-black);
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.hero-join i { font-size: 26px; }
.hero-join:hover { opacity: 0.9; }
.hero-join:active { transform: scale(0.97); }

/* Secondary "Scan QR code" link */
.hero-qr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: var(--font-weight-black);
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--color-black);
  transition: opacity 0.15s ease;
}
.hero-qr i { font-size: 21px; }
.hero-qr:hover { opacity: 0.65; }

/* ===== Coloured showcase frame around the phones ===== */
.hero-showcase {
  width: min(1316px, calc(100%));
  margin: 0 auto;
  background: var(--color-green-50);
  border-radius: 48px;
  padding: 0 40px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
}
/* phones poke out above the frame's top edge */
.hero-showcase .hero-phones { margin-top: clamp(-110px, -7vw, -60px); }
.hero-showcase__caption {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 80px);
  padding: 0 40px;
  font-weight: var(--font-weight-extrabold);
  color: var(--color-green-800);
  line-height: var(--line-height-m);
  text-align: center;
  max-width: auto;
}

/* ===== Phone mockups (reuse the iPhone bezel, three sizes) ===== */
.hero-phones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.6vw, 40px);
  width: 100%;
}
.hero-phone {
  position: relative;
  aspect-ratio: 900 / 1840;
  flex-shrink: 0;
  container-type: inline-size;
}
.hero-phone--side { height: clamp(320px, 40vw, 630px); }
.hero-phone--center { height: clamp(340px, 44vw, 682px); z-index: 3; } /* ~10% larger, matches Figma */

/* ===== Squeeze → open animation ===== */
/* Default = squeezed: the two side phones fan in behind the centre one. */
.hero-phone--side {
  z-index: 1;
  transition: transform 0.9s cubic-bezier(0.34, 1.32, 0.5, 1);
  will-change: transform;
}
.hero-phone--left  { transform: translate(98%, 1%) rotate(-9deg) scale(0.9); }
.hero-phone--right { transform: translate(-98%, 1%) rotate(9deg) scale(0.9); }
/* Opened (added by hero.js once the row scrolls into view): spread apart. */
.hero-phones.is-open .hero-phone--left,
.hero-phones.is-open .hero-phone--right { transform: none; }
.hero-phones.is-open .hero-phone--right { transition-delay: 0.06s; } /* subtle stagger */

@media (prefers-reduced-motion: reduce) {
  .hero-phone--side { transition: none; }
}

.hero-phone__window {
  position: absolute;
  left: 5.44%;
  right: 5.44%;
  top: 2.55%;
  bottom: 2.55%;
  overflow: hidden;
  border-radius: 8cqw;
  background: var(--color-bg-secondary);
}
.hero-phone__window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-phone__bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* ===== Final CTA banner (Figma 7516-359) — reuses .hero-actions buttons ===== */
.cta-banner {
  width: min(1216px, calc(100% - 48px));
  margin: 0 auto 110px;
  background: var(--color-blue-100);
  border-radius: 48px;
  padding: 64px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}
.cta-banner__title {
  font-size: clamp(32px, 4.4vw, 64px);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-label-primary);
  line-height: 1.2;
  max-width: 820px;
}

/* ===== QR code overlay ===== */
.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.qr-overlay[hidden] { display: none; }
.qr-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 9, 10, 0.55);
  backdrop-filter: blur(4px);
  animation: qr-fade 0.2s ease;
}
.qr-modal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: min(88vw, 360px);
  padding: 28px;
  background: var(--color-white);
  border-radius: 32px;
  animation: qr-pop 0.28s cubic-bezier(0.34, 1.4, 0.5, 1);
}
.qr-modal__img {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 16px;
}
.qr-modal__caption {
  margin: 0;
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--color-label-primary);
  text-align: center;
}
.qr-modal__close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--color-black);
  background: var(--color-accent-coral);
  box-shadow: 0.12em 0.12em var(--color-black);
  color: var(--color-black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.qr-modal__close i { font-size: 26px; font-weight: 900; }
.qr-modal__close:hover { transform: translate(-0.04em, -0.04em); box-shadow: 0.18em 0.18em var(--color-black); }
.qr-modal__close:active { transform: translate(0.04em, 0.04em); box-shadow: 0.06em 0.06em var(--color-black); }

body.qr-open { overflow: hidden; }

@keyframes qr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qr-pop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { gap: 56px; padding: 32px 16px 32px; }
  .hero-group { gap: 28px; }
  .hero-title { --hero-title-pad: 0px; } /* ← horizontal padding (MOBILE) — tweak me */
  .hero-showcase { width: 100%; padding: 0 16px 24px; border-radius: 32px; gap: 32px; }
  .hero-showcase .hero-phones { margin-top: -28px; }
  .hero-phones { gap: 10px; }
  /* ↓↓↓ MOBILE HERO PHONE SIZE — tweak these two (raise the vw / max to grow) ↓↓↓ */
  .hero-phone--side { height: clamp(150px, 80vw, 320px); }
  .hero-phone--center { height: clamp(168px, 88vw, 352px); }

  /* On mobile the phones only open PARTIALLY — the side phones stay behind the
     centre one and just peek out below it. Tweak these 4 knobs for position: */
  .hero-phones {
    --peek-x: 60%;      /* horizontal overlap: higher = more hidden behind centre, lower = more to the sides */
    --peek-y: 6%;      /* how far they drop below the centre phone: higher = peek out more */
    --peek-rotate: 9deg;/* fan tilt of the side phones */
    --peek-scale: 0.92; /* size of the side phones */
  }
  .hero-phones.is-open .hero-phone--left {
    transform: translate(var(--peek-x), var(--peek-y)) rotate(calc(-1 * var(--peek-rotate))) scale(var(--peek-scale));
  }
  .hero-phones.is-open .hero-phone--right {
    transform: translate(calc(-1 * var(--peek-x)), var(--peek-y)) rotate(var(--peek-rotate)) scale(var(--peek-scale));
  }

  .cta-banner { padding: 32px 24px; border-radius: 36px; margin-bottom: 32px; }
  /* stack the CTAs vertically on mobile */
  .hero-actions { flex-direction: column; gap: 20px; }
  /* smaller CTAs on mobile */
  .hero-join { height: 52px; min-width: 0; padding: 0 24px; font-size: 18px; gap: 8px; }
  .hero-join i { font-size: 20px; }
  .hero-qr { font-size: 16px; }
  .hero-qr i { font-size: 16px; }
}
