/* ===========================================================
   Hero (landing pages)
   =========================================================== */

.hero {
  position: relative;
  isolation: isolate;
  padding-top: calc(var(--nav-h) + clamp(64px, 9vw, 120px));
  padding-bottom: clamp(80px, 12vw, 160px);
  overflow: hidden;
  background: var(--color-bg);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-hero);
  pointer-events: none;
  z-index: 0;
}

/* Subtle animated grid backdrop */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--color-border-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-border-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 10%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  /* Text column wider than visual: the English headline needs more room
     to fit "Get paid, pay bills," on a single line. The phone is fixed at
     320px so the visual column always has enough space for it + the
     floating notification cards. */
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

/* Left text column */
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  font-size: var(--fs-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-surface) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs);
}
.hero__badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad-primary);
  border-radius: var(--radius-pill);
}

.hero__title {
  font-family: var(--font-display);
  /* Slightly tighter clamp than the global --fs-5xl so the longer English
     headline ("Get paid, pay bills,") fits on a single line with the
     widened text column. ES gets the same treatment to keep both visually
     consistent. The change vs the original (78px max) is ~15%. */
  font-size: clamp(44px, 5.4vw, 66px);
  font-weight: var(--weight-bold);
  line-height: 0.98;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  max-width: 720px;
  text-wrap: balance;
}
.hero__title .accent {
  background: var(--grad-primary);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.hero__title .accent-green {
  background: var(--grad-accent);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__desc {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
  max-width: 540px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-3);
  color: var(--color-text-soft);
  font-size: var(--fs-xs);
}
.hero__meta-item { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta-item svg { width: 14px; height: 14px; color: var(--color-accent); }

/* Right visual column */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 620px;
}

/* Single iPhone mockup centered in the visual column.
   Floating UI badges are positioned around it. */
.hero-stack {
  position: relative;
  width: 320px;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-stack__phone {
  position: relative;
  width: 320px;
  aspect-ratio: 0.486 / 1;             /* iPhone proportions ~ 9:19.5 */
  border-radius: 50px;
  background: linear-gradient(160deg, #1A1A22 0%, #0A0A0F 100%);
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 80px 140px -30px rgba(79, 70, 229, 0.55),
    var(--shadow-xl);
  transform: rotate(-2deg);
  transition: transform 800ms var(--ease-out);
}
/* Real simulator screenshots already include the Dynamic Island.
   We do NOT add a fake one — that would render two stacked. */
.hero-stack__phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 40px;
  display: block;
  background: #F2F2F7;
}

/* Floating UI badges around the phones */
.hero-float {
  position: absolute;
  z-index: 3;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-sm);
  animation: hero-float 6s ease-in-out infinite;
  will-change: transform;
  white-space: nowrap;
}
/* Float halfway off the phone's silhouette so the screenshot stays readable
   without the badge getting clipped by the column's width. */
.hero-float--top {
  top: 8%;
  right: auto;
  left: calc(100% - 96px);
  animation-delay: -2s;
}
.hero-float--bottom {
  bottom: 12%;
  left: auto;
  right: calc(100% - 96px);
  animation-delay: -4s;
}
.hero-float__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  flex-shrink: 0;
}
.hero-float--alert .hero-float__icon { background: var(--color-violet-soft); color: var(--color-violet); }
.hero-float__icon svg { width: 20px; height: 20px; }
.hero-float__txt { display: flex; flex-direction: column; line-height: 1.3; }
.hero-float__label { font-size: 10px; color: var(--color-text-soft); text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--weight-medium); }
.hero-float__val { font-weight: var(--weight-bold); color: var(--color-text); font-size: var(--fs-md); }
.hero-float__val--accent { color: var(--color-accent-dark); }
[data-theme="dark"] .hero-float__val--accent,
:root:not([data-theme="light"]) .hero-float__val--accent { color: var(--color-accent); }
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* Trust strip below hero */
.hero-trust {
  margin-top: clamp(48px, 8vw, 96px);
  text-align: center;
}
.hero-trust__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: var(--space-5);
}

/* Responsive hero */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: clamp(40px, 8vw, 64px); }
  .hero__text { align-items: center; text-align: center; }
  .hero__title, .hero__desc { max-width: 720px; }
  .hero__visual { min-height: 560px; }
  .hero-stack__phone { width: 300px; }
}
@media (max-width: 640px) {
  .hero__visual { min-height: 520px; }
  .hero-stack { width: 240px; }
  .hero-stack__phone { width: 240px; padding: 9px; border-radius: 40px; }
  .hero-stack__phone img { border-radius: 32px; }
  .hero-float { padding: 9px 12px; font-size: var(--fs-xs); }
  .hero-float--top    { top: 5%;    left: calc(100% - 110px); right: auto; }
  .hero-float--bottom { bottom: 7%; right: calc(100% - 110px); left: auto; }
  .hero-float__icon { width: 28px; height: 28px; }
  .hero-float__val { font-size: var(--fs-sm); }
}
