/* Hero — source: sections/Hero.tsx */

#top {
  /* 3-stop gradient: Elementor's background control only exposes 2 stops. */
  background: linear-gradient(155deg, #eaf3ff 0%, #ffffff 45%, #f6f9ff 100%);
  padding-top: min(clamp(84px, 11vw, 128px), 10svh);
  padding-bottom: min(clamp(36px, 6vw, 72px), 5svh);
  min-height: 100svh;
}

/*
 * Real CSS grid, not Elementor's flex row. The visual column's children are
 * both position:absolute and so contribute no height; it only gets its height
 * from the grid's default align-items:stretch matching the text column. As a
 * centred flex row it collapses and the phone blows out of the viewport.
 */
#top .lt-hero-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
}

/* Blobs (keyframes live in tokens.css — shared with Solution and FinalCta).
   The blob widget's wrapper is position:relative like every Elementor widget,
   so without this the blobs anchor to a zero-height wrapper mid-section rather
   than to #top: blob 1's top:-80px landed at +378px and blob 2's bottom:-60px
   at 533px in a 900px section. */
#top > .elementor-widget-html,
#top > .elementor-widget-html > .elementor-widget-container {
  position: static;
}

#top .lt-hero-blob-1 {
  top: -80px;
  inset-inline-end: -60px;
  width: 480px;
  height: 380px;
  background: rgba(41, 128, 242, 0.07);
  border-radius: 72% 28% 58% 42% / 42% 62% 38% 58%;
  animation: lt-blob 18s var(--ease) infinite;
}

#top .lt-hero-blob-2 {
  bottom: -60px;
  inset-inline-start: 5%;
  width: 360px;
  height: 280px;
  background: rgba(242, 155, 136, 0.08);
  border-radius: 72% 28% 58% 42% / 42% 62% 38% 58%;
  animation: lt-blob 22s var(--ease) infinite reverse;
}

/*
 * Typography must target the INNER .elementor-heading-title, not the widget
 * wrapper that _css_classes lands on. hello-elementor's reset matches `h1`
 * directly (font-size:2.5rem) and Elementor's frontend.css matches
 * .elementor-heading-title directly (line-height:1) — a direct match always
 * beats an inherited value, whatever the wrapper's specificity. Styling the
 * wrapper alone silently rendered this h1 at 40px instead of 62px.
 * Margins stay on the wrapper: margins don't inherit, so they're unaffected.
 */

/* Eyebrow — deliberately NOT the .lt-eyebrow pill; Hero's is plain coral text. */
#top .lt-hero-eyebrow { margin-bottom: 20px; }

#top .lt-hero-eyebrow .elementor-heading-title {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 800;
  color: #e05a38;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

#top .lt-hero-h1 { margin: 0; }

#top .lt-hero-h1 .elementor-heading-title {
  font-size: var(--t-display);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--page-fg-strong);
}

#top .lt-hero-sub p {
  font-size: var(--t-lead);
  line-height: 1.65;
  color: var(--page-fg-muted);
  max-width: 480px;
  margin: 18px 0 36px;
}

/* CTAs */
#top .lt-btn-red .elementor-button {
  background: var(--brand-red);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 28px -4px rgba(242, 5, 5, 0.38);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

#top .lt-btn-red .elementor-button:hover {
  background: #c20202; /* unified with Nav, which used #c90303 in the source */
  transform: translateY(-2px);
}

#top .lt-hero-secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: gap var(--dur) var(--ease);
}

#top .lt-hero-secondary-cta:hover { gap: 8px; }

/* Stat badges */
#top .lt-hero-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: 36px;
}

#top .lt-hero-stat {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(41, 128, 242, 0.14);
  border-radius: var(--r-md);
  padding: 9px 14px;
  box-shadow: 0 2px 12px rgba(41, 128, 242, 0.07);
}

#top .lt-hero-stat-v { font-size: 18px; font-weight: 900; color: var(--brand-primary); line-height: 1.2; }
#top .lt-hero-stat-l { font-size: 11px; color: var(--page-fg-subtle); }

/* Both columns must yield their width to the grid track. Elementor writes
   width:50% per column, which inside a 1fr 1fr grid resolves to 50% OF THE
   CELL — i.e. 25% of the row — and crushes the headline. */
#top .lt-hero-text,
#top .lt-hero-visual {
  width: auto !important;
  max-width: none !important;
}

/* Visual column — height comes from the grid stretch, not from its children. */
#top .lt-hero-visual {
  position: relative;
  min-height: 520px;
}

/* Elementor wraps images in .elementor-widget-container; the absolute
   positioning has to reach the wrapper or the img never fills the column. */
#top .lt-hero-photo,
#top .lt-hero-photo .elementor-widget-container {
  height: 100%;
}

#top .lt-hero-photo {
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  bottom: 0;
  width: 88%;
}

#top .lt-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 33% center;
  border-radius: var(--r-2xl);
  box-shadow: 0 24px 64px -12px rgba(41, 128, 242, 0.18), 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Subtle wash over the photo's lower edge, blending into the section gradient.
   Hangs off the widget itself — e_optimized_markup means there is no
   .elementor-widget-container to attach to. */
#top .lt-hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--r-2xl);
  background: linear-gradient(to bottom, transparent 60%, rgba(234, 243, 255, 0.25) 100%);
  pointer-events: none;
}

/* Deliberately bleeds outside the grid column. */
#top .lt-hero-phone {
  position: absolute;
  bottom: 0;
  inset-inline-start: -72px;
  width: 84%;
  z-index: 2;
}

#top .lt-hero-phone img {
  width: 100%;
  height: auto;
  filter: drop-shadow(rgba(41, 128, 242, 0.28) 0px 28px 48px);
}

/* Floating badges.
   Elementor gives every widget wrapper position:relative, which would make it
   the badges' containing block — and since it has no height, top:6% and top:22%
   both collapse to the same point. Force the wrapper static so the percentages
   resolve against .lt-hero-visual as the source intends. */
#top .lt-hero-visual > .elementor-widget-html,
#top .lt-hero-visual > .elementor-widget-html > .elementor-widget-container {
  position: static;
}

#top .lt-hero-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: var(--r-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-card);
}

#top .lt-badge-1 { top: 6%; inset-inline-start: 4%; animation: lt-float-badge 3.5s ease-in-out infinite; }
#top .lt-badge-2 { top: 22%; inset-inline-start: 2%; animation: lt-float-badge 4s ease-in-out 1.5s infinite reverse; }

#top .lt-hero-badge-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: 0 0 30px;
}

#top .lt-hero-badge-ico-blue { background: rgba(41, 128, 242, 0.10); }
#top .lt-hero-badge-ico-coral { background: rgba(242, 155, 136, 0.14); }

#top .lt-hero-badge-txt { display: flex; flex-direction: column; line-height: 1.2; }
#top .lt-hero-badge-txt b { font-size: 15px; font-weight: 900; color: var(--page-fg-strong); }
#top .lt-hero-badge-txt i { font-size: 11px; font-style: normal; color: var(--page-fg-subtle); }

/* Hero is locked to exactly one viewport above 821px — StatsBar sits below the fold. */
@media (min-width: 821px) {
  #top {
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden;
  }
}

@media (max-width: 820px) {
  #top {
    padding-top: 88px;
    padding-bottom: 0;
    max-height: none;
    min-height: auto;
  }
  /* Single column. This is a CSS grid, so flex-direction would be a no-op. */
  #top .lt-hero-grid { grid-template-columns: 1fr !important; }
  #top .lt-hero-visual { min-height: 380px; }
  #top .lt-hero-photo,
  #top .lt-hero-secondary-cta { display: none !important; }
  #top .lt-hero-sub p { max-width: none; }
  #top .lt-hero-stats { justify-content: center; flex-wrap: wrap; }

  /* Phone re-anchors to the physical centre, flush against StatsBar. */
  #top .lt-hero-phone {
    left: 50%;
    inset-inline-start: auto;
    right: auto;
    transform: translateX(-50%);
    width: 80%;
    max-width: 280px;
    bottom: 0;
  }

  /* Source deliberately breaks out of logical props here to pin badges
     to the physical top-left regardless of RTL. */
  #top .lt-badge-1 { top: 10px; left: 10px; inset-inline-start: auto; right: auto; }
  #top .lt-badge-2 { top: 74px; left: 10px; inset-inline-start: auto; right: auto; }
}
