/* Homepage hero in the Milo sticker language (ink outlines, cream paper, hard shadows).
   Layered over hero-premium.css and site-refinement.css; the markup, ids and copy stay
   as they are because homepage-phrases.js and the funnel QA rely on them. */

html body.site-ui.homepage .hero-premium.hero-premium {
  --mh-ink: #172033;
  --mh-cream: #fff8ec;
  --mh-gold: #fbbf24;
  --mh-coral: #f26b5b;
  --mh-blue: #2563eb;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(46rem 30rem at 82% 30%, rgba(251, 191, 36, 0.2), transparent 60%),
    radial-gradient(40rem 28rem at 8% 100%, rgba(127, 176, 255, 0.28), transparent 60%),
    linear-gradient(180deg, #1a4fd6 0%, #1f55dc 100%) !important;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* dotted paper grid */
html body.site-ui.homepage .hero-premium.hero-premium-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.3px, transparent 1.5px) !important;
  background-size: 24px 24px !important;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 25%, transparent 75%);
}

html body.site-ui.homepage .hero-premium.hero-premium-inner {
  position: relative !important;
  z-index: 1 !important;
  max-width: 76rem !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-badge {
  display: inline-block !important;
  margin-bottom: 1rem !important;
  padding: 0.3rem 0.75rem 0.32rem !important;
  border: 2px solid var(--mh-ink) !important;
  border-radius: 999px !important;
  background: var(--mh-gold) !important;
  box-shadow: 2px 2px 0 var(--mh-ink) !important;
  color: var(--mh-ink) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  transform: rotate(-2deg) !important;
}

html body.site-ui.homepage .hero-premium.hero-premium h1 {
  max-width: 15ch !important;
  margin-bottom: 1.1rem !important;
  font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.2rem) !important;
  line-height: 0.98 !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  text-shadow: 0 2px 0 rgba(23, 32, 51, 0.5), 0 12px 40px rgba(6, 12, 36, 0.35) !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-lead {
  max-width: 34rem !important;
  color: rgba(255, 255, 255, 0.94) !important;
}

/* buttons */
html body.site-ui.homepage .hero-premium.hero-premium .hero-plan-cta .hero-plan-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border: 2.5px solid var(--mh-ink) !important;
  border-radius: 999px !important;
  background: var(--mh-cream) !important;
  box-shadow: 4px 5px 0 var(--mh-ink) !important;
  color: var(--mh-ink) !important;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-plan-cta .hero-plan-cta__btn.mb-btn-primary {
  background: var(--mh-gold) !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-plan-cta .hero-plan-cta__btn:hover {
  transform: translate(-1px, -2px) !important;
  box-shadow: 5px 7px 0 var(--mh-ink) !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-plan-cta .hero-plan-cta__btn:active {
  transform: translate(3px, 4px) !important;
  box-shadow: 1px 1px 0 var(--mh-ink) !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-plan-cta .hero-plan-cta__btn:focus-visible {
  outline: 3px solid #fff !important;
  outline-offset: 4px !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-plan-cta__note {
  flex-basis: 100% !important;
  margin-top: 0.35rem !important;
  font-size: 0.82rem !important;
  color: rgba(255, 255, 255, 0.86) !important;
}

/* feature links become sticker chips */
html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-features li { margin: 0 !important; }

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-feature-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  padding: 0.42rem 0.8rem 0.42rem 0.6rem !important;
  border: 2px solid var(--mh-ink) !important;
  border-radius: 999px !important;
  background: rgba(255, 248, 236, 0.96) !important;
  box-shadow: 2px 3px 0 var(--mh-ink) !important;
  color: var(--mh-ink) !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-feature-link:hover {
  transform: translate(-1px, -1px) !important;
  box-shadow: 3px 4px 0 var(--mh-ink) !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-feature-link svg { color: var(--mh-blue) !important; }

/* ---------- right side: product preview + Milo ---------- */

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 26rem;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-photo-fallback { display: none !important; }

.milo-hero-card {
  position: relative;
  z-index: 1;
  width: min(100%, 23rem);
  padding: 1.15rem 1.2rem 1.25rem;
  border: 3px solid #172033;
  border-radius: 22px;
  background: #fff8ec;
  box-shadow: 9px 11px 0 #172033;
  color: #172033;
  transform: rotate(-2deg);
  animation: mh-float 6s ease-in-out infinite;
}

.milo-hero-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.milo-hero-card__title { font-size: 1.05rem; font-weight: 800; }

.milo-hero-card__tag {
  padding: 0.1rem 0.5rem;
  border: 2px solid #172033;
  border-radius: 999px;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.milo-hero-card__bar {
  display: flex;
  gap: 4px;
  height: 2.6rem;
}

.milo-hero-card__seg {
  display: grid;
  place-items: center;
  border: 2.5px solid #172033;
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  transform-origin: left center;
  animation: mh-grow 0.9s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.milo-hero-card__seg--mor { flex: 19; background: #f26b5b; animation-delay: 0.25s; }
.milo-hero-card__seg--far { flex: 29; background: #2563eb; animation-delay: 0.45s; }

.milo-hero-card__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a556b;
}

.milo-hero-card__result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 2.5px solid #172033;
  border-radius: 14px;
  background: #e9fbe9;
  box-shadow: 4px 5px 0 #172033;
  animation: mh-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s both;
}

.milo-hero-card__result span { font-size: 0.82rem; font-weight: 700; color: #4a556b; }
.milo-hero-card__result b { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.milo-hero-card__checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.milo-hero-card__checks span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem 0.2rem 0.3rem;
  border: 2px solid #172033;
  border-radius: 999px;
  background: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  animation: mh-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.milo-hero-card__checks span:nth-child(1) { animation-delay: 1.15s; }
.milo-hero-card__checks span:nth-child(2) { animation-delay: 1.3s; }

.milo-hero-card__checks span::before {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid #172033;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat,
    #22c55e;
}

/* Milo stands in front of the card's lower-left corner; the flying one stays top-right */
html body.site-ui.homepage .hero-premium.hero-premium .hero-parent-figure {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  pointer-events: none;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-parent-image {
  position: absolute !important;
  left: max(-1.5rem, calc(50% - 24.5rem)) !important;
  bottom: -2.5rem !important;
  width: clamp(8rem, 11vw, 10rem) !important;
  height: auto !important;
  max-width: none !important;
  filter: drop-shadow(0 12px 14px rgba(6, 12, 36, 0.35)) !important;
  animation: mh-bob 3.4s ease-in-out infinite;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-milo-float {
  position: absolute !important;
  top: 0.5rem !important;
  right: max(0rem, calc(50% - 15rem)) !important;
  left: auto !important;
  width: clamp(4.5rem, 7vw, 6.5rem) !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-milo-float__img {
  width: 100% !important;
  height: auto !important;
}

@keyframes mh-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes mh-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes mh-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes mh-pop { from { opacity: 0; transform: scale(0.6) rotate(-4deg); } to { opacity: 1; transform: none; } }

@media (max-width: 959px) {
  html body.site-ui.homepage .hero-premium.hero-premium h1 { max-width: 16ch !important; font-size: clamp(2.05rem, 1.2rem + 4.2vw, 2.9rem) !important; }
  html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-panel { min-height: 0 !important; padding: 0.5rem 0 1.5rem !important; }
  .milo-hero-card { width: min(100%, 22rem); transform: rotate(-1.5deg); }
  html body.site-ui.homepage .hero-premium.hero-premium .hero-parent-image {
    left: auto !important;
    right: -0.5rem !important;
    bottom: -0.25rem !important;
    width: 6.5rem !important;
  }
  html body.site-ui.homepage .hero-premium.hero-premium .hero-milo-float { display: none !important; }
}

@media (max-width: 520px) {
  html body.site-ui.homepage .hero-premium.hero-premium .hero-plan-cta .hero-plan-cta__btn { flex: 1 1 100% !important; }
  .milo-hero-card { padding: 0.95rem 1rem 1.05rem; box-shadow: 6px 7px 0 #172033; }
  .milo-hero-card__result b { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .milo-hero-card,
  .milo-hero-card *,
  html body.site-ui.homepage .hero-premium.hero-premium .hero-parent-image {
    animation: none !important;
  }
}

/* Mobile: the old theme lifts the panel out of the flow on top of the text; keep it below. */
@media (max-width: 959px) {
  html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-panel {
    position: relative !important;
    inset: auto !important;
    order: 2 !important;
    width: 100% !important;
    transform: none !important;
  }
}

/* chips: the old theme paints every hero span white and stretches list items */
html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-features {
  flex-direction: row !important;
  align-items: flex-start !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-features li {
  width: auto !important;
  flex: 0 0 auto !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-feature-link {
  width: auto !important;
  min-height: 0 !important;
  height: auto !important;
  line-height: 1.2 !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-feature-link span {
  color: #172033 !important;
  text-decoration: none !important;
}

/* the panel hugs the card so Milo can stand on its lower-left corner */
html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-panel {
  min-height: 0 !important;
  padding: 3.5rem 0 2.5rem !important;
  align-self: center !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-parent-image {
  bottom: 0.25rem !important;
}

html body.site-ui.homepage .hero-premium.hero-premium .hero-milo-float {
  top: -0.5rem !important;
}

@media (max-width: 959px) {
  html body.site-ui.homepage .hero-premium.hero-premium .hero-premium-panel { padding: 1.5rem 0 1rem !important; }
  html body.site-ui.homepage .hero-premium.hero-premium .hero-parent-image { bottom: -0.5rem !important; }
}

/* ---------- "Hvor er I lige nu?" stage chooser under the hero ---------- */
html body.site-ui.homepage .stage-chooser {
  position: relative;
  padding: 0 max(1rem, calc((100% - 72rem) / 2)) clamp(2.5rem, 5vw, 3.5rem);
  background: #1f55dc;
  font-family: "DM Sans", system-ui, sans-serif;
}

html body.site-ui.homepage .stage-chooser .stage-chooser__title {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 0 rgba(23, 32, 51, 0.45);
}

html body.site-ui.homepage .stage-chooser__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

html body.site-ui.homepage .stage-chooser .stage-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon kicker" "icon title" "icon text";
  column-gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.1rem 1.1rem;
  border: 2.5px solid #172033;
  border-radius: 18px;
  background: #fff8ec;
  box-shadow: 5px 6px 0 #172033;
  color: #172033;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

html body.site-ui.homepage .stage-chooser .stage-card:hover {
  transform: translate(-2px, -3px);
  box-shadow: 7px 9px 0 #172033;
}

html body.site-ui.homepage .stage-chooser .stage-card:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 3px;
}

html body.site-ui.homepage .stage-card__icon {
  grid-area: icon;
  width: 2.6rem;
  height: 2.6rem;
  border: 2.5px solid #172033;
  border-radius: 12px;
  background-position: center;
  background-size: 62%;
  background-repeat: no-repeat;
}

html body.site-ui.homepage .stage-card__icon--barsel { background-color: #ffe4e6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172033' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3' fill='%23f26b5b'/%3E%3Cpath d='M3 10h18M8 15h3'/%3E%3C/svg%3E"); }
html body.site-ui.homepage .stage-card__icon--search { background-color: #dbeafe; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172033' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6' fill='%237fb0ff'/%3E%3Cpath d='M15 15l5 5'/%3E%3C/svg%3E"); }
html body.site-ui.homepage .stage-card__icon--start { background-color: #fef3c7; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23172033' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 8h12l-1 12H7z' fill='%23fbbf24'/%3E%3Cpath d='M9 8a3 3 0 0 1 6 0'/%3E%3C/svg%3E"); }

html body.site-ui.homepage .stage-card__kicker {
  grid-area: kicker;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4a556b;
}

html body.site-ui.homepage .stage-card__title {
  grid-area: title;
  margin: 0.1rem 0 0.2rem;
  font-size: 1.08rem;
  font-weight: 800;
}

html body.site-ui.homepage .stage-card__title::after { content: " \2192"; color: #2563eb; }

html body.site-ui.homepage .stage-card__text {
  grid-area: text;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #4a556b;
}

@media (max-width: 859px) {
  html body.site-ui.homepage .stage-chooser__grid { grid-template-columns: 1fr; gap: 0.7rem; }
  html body.site-ui.homepage .stage-chooser .stage-card { padding: 0.8rem 0.9rem; box-shadow: 4px 5px 0 #172033; }
  html body.site-ui.homepage .stage-card__text { display: none; }
  html body.site-ui.homepage .stage-card__icon { width: 2.3rem; height: 2.3rem; }
  html body.site-ui.homepage .stage-chooser .stage-card { grid-template-areas: "icon kicker" "icon title"; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html body.site-ui.homepage .stage-chooser .stage-card { transition: none; }
}
