/* The Hero — all selectors scoped under .the-hero to avoid theme conflicts */

.the-hero {
  background: transparent;
  min-height: 620px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: clip;
  font-family: 'Source Sans 3', sans-serif;
}

/* ── Two-column grid ────────────────────────────────────────── */
.the-hero .the-hero-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  width: 1145px;
  max-width: 100%;
  align-items: start;
  position: relative;
  z-index: 1;
  padding-top: 30px;
}

/* ── Bubbles area ────────────────────────────────────────────── */
.the-hero .the-hero-bubbles-area {
  position: relative;
  width: 440px;
  height: 620px;
}

/* ── Person bubbles ──────────────────────────────────────────── */
.the-hero .the-hero-bubble {
  position: absolute;
}

.the-hero .the-hero-bubble svg {
  display: block;
  width: 100%;
  height: auto;
}

.the-hero .the-hero-bubble-1 { width: 172px; top:  20px; left: 202px; z-index: 2; }
.the-hero .the-hero-bubble-2 { width: 230px; top: 140px; left:   5px; z-index: 2; }
.the-hero .the-hero-bubble-3 { width: 215px; top: 290px; left: 199px; z-index: 2; }

/* ── Decorative icons ────────────────────────────────────────── */
.the-hero .the-hero-deco {
  position: absolute;
  pointer-events: none;
}

.the-hero .the-hero-deco-pages  { width:  58px; top:  10px; left:    5px; z-index: 3; }
.the-hero .the-hero-deco-person { width:  50px; top: 210px; left:  360px; z-index: 3; }
.the-hero .the-hero-deco-laptop { width:  78px; top: 360px; left:   46px; z-index: 3; }

.the-hero .the-hero-deco-factory {
  width: 108px;
  top: 18px;
  right: 5px;
  z-index: 0;
}

.the-hero .the-hero-deco-flask {
  width: 58px;
  top: 340px;
  right: 12px;
  z-index: 0;
}

.the-hero .the-hero-deco img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 110px;
  max-height: 110px;
  object-fit: contain;
}

/* ── Hero content ────────────────────────────────────────────── */
.the-hero .the-hero-content {
  padding: 0 40px 0 20px;
  margin-top: 100px;
  position: relative;
  z-index: 4;
}

/* Typography defaults — overridden by inline <style> from hero-output.php
   when values have been saved in wp-admin.
   clamp() gives fluid scaling between mobile and desktop. */
.the-hero .the-hero-content h1 {
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -1.5px;
  color: #111;
  margin-bottom: 26px;
}

.the-hero .the-hero-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: #1a1a1a;
  max-width: 560px;
  margin-bottom: 14px;
}

.the-hero .the-hero-body:last-child {
  margin-bottom: 0;
}

/* Mobile wrappers hidden on desktop */
.the-hero .the-hero-mobile-top,
.the-hero .the-hero-mobile-bottom {
  display: none;
}

/* ── Responsive ──────────────────────────────────────────────── */

/* Medium screens (≤ 1024px) — fluid two-column, no scale() hack */
@media (max-width: 1024px) {
  .the-hero {
    min-height: auto;
  }

  .the-hero .the-hero-grid {
    grid-template-columns: 38vw 1fr;
    width: 100%;
    padding: 40px 32px;
    align-items: start;
  }

  /* bubbles-area shrinks with viewport — no transform: scale() */
  .the-hero .the-hero-bubbles-area {
    width: 38vw;
    height: 54vw;
  }

  /* Bubbles scale proportionally with bubbles-area (38vw base = 440px at 1158px) */
  .the-hero .the-hero-bubble-1 {
    width: 14.8vw;
    top: 3.2vw;
    left: 17.4vw;
  }
  .the-hero .the-hero-bubble-2 {
    width: 19.8vw;
    top: 12.1vw;
    left: 0.4vw;
  }
  .the-hero .the-hero-bubble-3 {
    width: 18.5vw;
    top: 25vw;
    left: 17.2vw;
  }

  /* Deco icons scale with vw */
  .the-hero .the-hero-deco-pages  { width: 5vw;  top: 0.9vw; left: 0.4vw; }
  .the-hero .the-hero-deco-person { width: 4.3vw; top: 18.1vw; left: 31vw; }
  .the-hero .the-hero-deco-laptop { width: 6.7vw; top: 31vw;  left: 4vw; }

  .the-hero .the-hero-deco-factory { display: none; }
  .the-hero .the-hero-deco-flask   { display: none; }

  .the-hero .the-hero-content {
    margin-top: 6vw;
  }
}

/* Small screens / mobile (≤ 640px) — Figma-based layout */
@media (max-width: 640px) {
  .the-hero {
    min-height: auto;
  }

  /* Single-column flex */
  .the-hero .the-hero-grid {
    display: flex;
    flex-direction: column;
    padding: 20px 20px 40px;
    width: 100%;
  }

  /* Desktop bubbles-area and its standalone deco wrappers hidden */
  .the-hero .the-hero-bubbles-area,
  .the-hero .the-hero-grid > .the-hero-deco-factory,
  .the-hero .the-hero-grid > .the-hero-deco-flask {
    display: none;
  }

  /* Mobile wrappers shown */
  .the-hero .the-hero-mobile-top,
  .the-hero .the-hero-mobile-bottom {
    display: block;
    position: relative;
    width: 100%;
  }

  /* ── Mobile top ───────────────────────────────────────────── */
  /* Height = bubbel 1 (38vw) + top offset (8vw) + overhang (~8vw) = ~54vw */
  .the-hero .the-hero-mobile-top {
    height: 54vw;
    margin-bottom: 24px;
  }

  .the-hero .the-hero-mobile-top .the-hero-bubble {
    position: absolute;
  }

  /* Bubbel 1 — stor, vänster */
  .the-hero .the-hero-mobile-top .the-hero-bubble-1 {
    width: 38vw;
    top: 8vw;
    left: 0;
  }

  /* Bubbel 2 — mellan, höger */
  .the-hero .the-hero-mobile-top .the-hero-bubble-2 {
    width: 28vw;
    top: 24vw;
    right: 0;
    left: auto;
  }

  .the-hero .the-hero-mobile-top .the-hero-deco {
    position: absolute;
    pointer-events: none;
  }

  /* Förstoringsglas-ikon — övre mitten */
  .the-hero .the-hero-mobile-top .the-hero-deco-pages {
    display: block;
    width: 11vw;
    top: 0;
    left: 51%;
  }

  /* Factory döljs i mobile-top */
  .the-hero .the-hero-mobile-top .the-hero-deco-factory {
    display: none;
  }

  /* ── Hero content ─────────────────────────────────────────── */
  .the-hero .the-hero-content {
    padding: 0;
    margin-top: 0;
    width: 100%;
  }

  .the-hero .the-hero-content h1 {
    font-size: clamp(36px, 11vw, 60px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 16px;
  }

  /* ── Mobile bottom ────────────────────────────────────────── */
  /* Height = bubbel 3 (28vw) + top offset (5vw) + ikon nedtill (~11vw) = ~48vw */
  .the-hero .the-hero-mobile-bottom {
    height: 48vw;
    margin-top: 24px;
  }

  .the-hero .the-hero-mobile-bottom .the-hero-bubble {
    position: absolute;
  }

  /* Bubbel 3 — vänster */
  .the-hero .the-hero-mobile-bottom .the-hero-bubble-3 {
    width: 28vw;
    top: 5vw;
    left: 0;
    right: auto;
  }

  .the-hero .the-hero-mobile-bottom .the-hero-deco {
    position: absolute;
    pointer-events: none;
  }

  /* Factory-ikon — mitten */
  .the-hero .the-hero-mobile-bottom .the-hero-deco-flask {
    display: block;
    width: 11vw;
    top: 6vw;
    left: 52%;
  }

  /* Globe-ikon — nedre höger */
  .the-hero .the-hero-mobile-bottom .the-hero-deco-person {
    display: block;
    width: 11vw;
    bottom: 0;
    right: 0;
    top: auto;
    left: auto;
  }
}
