/* Hero desktop v4 step7 — local overlay only. Geometry matches step6 except
 * tablet 601–1024 CTA buttons sit in one equal-width row.
 * Cast groups stay in the DOM with their own bubble; display:contents keeps
 * the artboard pin-% coordinates. */

.hero-cast {
  display: contents;
}

#hero .hero-world__set picture,
#hero .hero-v3-couple picture,
#hero .hero-v3-phone-frame picture,
.p2__scene picture {
  display: contents;
}

@media (min-width: 1280px) and (width < 1366px) {
  .hero-pin {
    --hero-bleed-y: 0;
    --hero-bleed-x: 0;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    top: 0;
    justify-content: flex-start;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    clip-path: none !important;
    z-index: 3;
    background: var(--color-accent);
  }

  .hero-pin.is-cover-active {
    z-index: 1;
  }

  .hero-stack {
    background: var(--color-accent);
  }

  .hero-pin .hero,
  .hero-pin .hero-world,
  .hero-pin .hero-world__stage {
    position: relative !important;
    flex: none;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    background: var(--color-accent);
  }

  .hero-pin .hero-artboard,
  #hero .hero-artboard {
    position: relative !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    margin-left: 0 !important;
    transform: none !important;
    transform-origin: top left !important;
    will-change: auto;
    pointer-events: none;
    overflow: visible !important;
  }

  #hero .hero-world__set,
  #hero.hero .hero-world__set,
  .hero-pin .hero-world__set {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .hero-pin #hero .hero-artboard .hero__content,
  #hero.hero .hero-artboard .hero__content,
  #hero .hero-artboard .hero__content,
  #hero .hero__content {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;
    z-index: 80;
    --cast-couple: clamp(168px, 16.5vw, 228px);
    --cast-phone: clamp(190px, 19vw, 268px);
    --cast-gap: 168px;
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto;
    flex-direction: unset !important;
    flex-wrap: unset !important;
    align-items: stretch !important;
    align-content: start;
    column-gap: 48px;
    row-gap: 0;
    width: min(1200px, calc(100% - 48px)) !important;
    max-width: 1200px !important;
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 28px 32px 36px !important;
    box-sizing: border-box;
    overflow: visible;
    pointer-events: auto;
    transform: none !important;
    color: #ffffff;
  }

  #hero .hero__title,
  #hero .hero__subtitle,
  #hero .hero__lead,
  #hero .hero__bullets,
  #hero .hero__actions,
  #hero .micro {
    position: static !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;
    height: auto !important;
    max-height: none !important;
    transform: none !important;
  }

  #hero .hero-artboard .hero__content .hero__title,
  #hero .hero__title {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 0 12px !important;
    padding: 0;
    color: #ffffff !important;
    font-family: var(--font-display, "Geologica", sans-serif);
    font-size: clamp(40px, calc(12px + 2.8vw), 48px) !important;
    font-weight: 300;
    line-height: 1.12 !important;
    letter-spacing: var(--tracking-display, -0.03em);
    text-align: left;
    white-space: normal !important;
    text-wrap: unset;
  }

  #hero .hero__title-line,
  .hero-artboard .hero__content .hero__title-line {
    display: block;
    white-space: nowrap;
    color: #ffffff !important;
  }

  #hero .hero-v3-couple,
  #hero .hero-v3-phone-scene {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #hero .hero-v3-couple,
  #hero .hero-v3-phone-scene {
    grid-column: 2;
    grid-row: 1 / -1;
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    align-self: start;
    justify-self: start;
    overflow: visible !important;
    pointer-events: none;
    margin: 8px 0 0;
  }

  #hero .hero-v3-couple {
    width: var(--cast-couple);
    max-width: none;
    height: auto;
    aspect-ratio: 1258 / 1791;
    z-index: 1;
    overflow: hidden !important;
  }

  #hero .hero-v3-couple img {
    position: absolute !important;
    left: 0;
    top: 0;
    display: block;
    width: calc(2048 / 1258 * 100%);
    max-width: none;
    height: auto;
    transform: translate(-17.773%, -5.908%) !important;
    object-fit: fill;
    object-position: left top;
  }

  #hero .hero-artboard .hero__content .hero__subtitle,
  #hero .hero__subtitle {
    grid-column: 1;
    grid-row: 2;
    display: block;
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 12px !important;
    color: #0b0c10;
    font-family: var(--font-body, "Commissioner", sans-serif);
    font-size: 16px !important;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    contain: inline-size;
  }

  #hero .hero-artboard .hero__content .hero__lead,
  #hero .hero-artboard .hero__content .hero__bullets,
  #hero ul.hero__lead,
  #hero ul.hero__bullets {
    grid-column: 1;
    grid-row: 3;
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 12px !important;
    padding-inline-start: 1.15em;
    list-style: disc;
    list-style-position: outside;
    font-size: 16px !important;
    line-height: 1.4;
    color: #ffffff;
    white-space: normal;
    contain: inline-size;
  }

  #hero ul.hero__lead li,
  #hero ul.hero__bullets li,
  .hero-artboard .hero__content ul.hero__lead li,
  .hero-artboard .hero__content ul.hero__bullets li {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin-block: 0.15em;
    color: #ffffff !important;
    font-family: var(--font-body, "Commissioner", sans-serif);
    font-size: 16px !important;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal !important;
  }

  #hero ul.hero__lead li::marker,
  #hero ul.hero__bullets li::marker {
    color: #ffffff;
  }

  #hero .hero-artboard .hero__content .hero__actions,
  #hero .hero__actions {
    grid-column: 1;
    grid-row: 4;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center !important;
    align-self: start !important;
    gap: var(--space-2, 8px);
    width: auto !important;
    max-width: 100% !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 81;
    pointer-events: auto;
  }

  #hero .hero__actions .btn,
  #hero .hero__actions a.btn,
  .hero-artboard .hero__content .hero__actions .btn {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    min-height: 48px !important;
    height: auto !important;
    padding-block: 12px;
    padding-inline: 20px;
    font-size: 16px !important;
    white-space: nowrap;
    box-sizing: border-box;
    pointer-events: auto;
  }

  #hero .hero-artboard .hero__content .micro,
  #hero .hero__content .micro,
  #hero .micro {
    display: block !important;
    grid-column: 1;
    grid-row: 5;
    width: 100% !important;
    max-width: none !important;
    margin: 22px 0 0 !important;
    color: rgb(255 255 255 / 0.85);
    font-size: 13px !important;
    line-height: 1.35;
    contain: inline-size;
  }

  #hero .hero-v3-phone-scene {
    width: var(--cast-phone);
    min-width: 0;
    max-width: none;
    height: auto;
    /* Waist crop sits on the orange floor: cancel the 36px content padding. */
    align-self: end;
    margin-top: 0;
    margin-bottom: -36px;
    margin-inline-start: calc(var(--cast-couple) + var(--cast-gap));
    z-index: 2;
  }

  #hero .hero-v3-phone-group {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    pointer-events: none;
  }

  #hero .hero-v3-bubble {
    position: absolute;
    /* Up-left of the head, right of the couple. Dots step down-right to the phone. */
    left: calc(15.5% - 200px);
    top: calc(14% - 110.5px);
    z-index: 3;
    width: clamp(206px, 20vw, 236px);
    max-width: none;
    transform: none;
    container-type: inline-size;
    container-name: hero-v3-bubble;
  }

  #hero .hero-v3-bubble__cloud {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 3px 8px rgb(11 12 16 / 0.1));
  }

  #hero .hero-v3-bubble__text {
    position: absolute;
    left: 12%;
    right: 11%;
    top: 16%;
    bottom: 20%;
    display: grid;
    place-items: center;
    align-content: center;
    margin: 0;
    overflow: visible;
    color: #0b0c10;
    font-family: var(--font-body, "Commissioner", sans-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  #hero .hero-v3-bubble__dots {
    position: absolute;
    left: 85.7%;
    top: 69%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    pointer-events: none;
  }

  #hero .hero-v3-bubble__dot {
    display: block;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgb(11 12 16 / 0.1);
  }

  #hero .hero-v3-bubble__dot--lg {
    width: 10px;
    height: 10px;
    margin-left: 0;
  }

  #hero .hero-v3-bubble__dot--md {
    width: 7px;
    height: 7px;
    margin-left: 11px;
  }

  #hero .hero-v3-bubble__dot--sm {
    width: 5px;
    height: 5px;
    margin-left: 21px;
  }

  #hero .hero-v3-phone-frame {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 1;
    width: 100%;
    height: auto;
    pointer-events: none;
  }

  #hero .hero-v3-phone-frame img {
    position: relative !important;
    left: auto;
    top: auto;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    transform: none !important;
    object-fit: fill;
    object-position: center bottom;
  }
}

/* Guard: this band's HTML cast must not show on the wide desktop artboard. */
@media (min-width: 1366px) {
  #hero .hero-v3-couple,
  #hero .hero-v3-phone-scene {
    display: none !important;
  }
}

@media (min-width: 1366px) {
  /* Full collage must not widen the page: the 1521 artboard is scaled, and
     a layer past its right edge was the horizontal scroll. */
  .hero-stack,
  .hero-pin {
    max-width: 100%;
    overflow: clip;
  }

  /* Phone file is already cropped to the waist, so the image bottom is the belt. */
  .hero-pin #hero .hero-layer[data-slot="cartoon-a-fg-phone"],
  .hero-pin #hero .hero-world__set [data-slot="cartoon-a-fg-phone"] {
    left: var(--fg-phone-left, calc(1188 / 1521 * 100%)) !important;
    top: auto !important;
    right: auto !important;
    bottom: var(--fg-phone-bottom, 0px) !important;
    z-index: 40;
    width: var(--fg-phone-width, calc(300 / 1521 * 100%)) !important;
    height: var(--fg-phone-height, calc(312 / 666 * 100%)) !important;
    --layer-width: calc(300 / 1521 * 100%);
    object-fit: contain !important;
    object-position: center bottom !important;
    transform: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Bubble-seo stays with the phone man (data-speaker on the node). */
  .hero-pin #hero #bubble-seo,
  .hero-pin #hero [data-slot="bubble-seo"],
  .hero-pin #hero .hero-bubble--seo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
    z-index: 46;
    left: calc(1098 / 1521 * 100%) !important;
    top: calc(313 / 666 * 100%) !important;
    width: calc(180 / 1521 * 100%) !important;
    min-width: 0;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .hero-pin #hero #bubble-seo .hero-bubble__text,
  .hero-pin #hero .hero-bubble--seo .hero-bubble__text {
    font-size: 9.2px !important;
    font-weight: 600;
    line-height: 1.16;
  }

  /* Dots-seo: trail in the orange gap left of the phone hand, under the cloud.
     1256/1270/1282 sat on the face and the hand. */
  .hero-pin #hero .hero-dots--seo,
  .hero-pin #hero [data-slot="dots-seo"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
    z-index: 47 !important;
  }

  .hero-pin #hero .hero-dots--seo .hero-dots__dot--lg {
    left: calc(1254 / 1521 * 100%) !important;
    top: calc(401 / 666 * 100%) !important;
    width: calc(10 / 1521 * 100%) !important;
  }

  .hero-pin #hero .hero-dots--seo .hero-dots__dot--md {
    left: calc(1265 / 1521 * 100%) !important;
    top: calc(413 / 666 * 100%) !important;
    width: calc(7.5 / 1521 * 100%) !important;
  }

  .hero-pin #hero .hero-dots--seo .hero-dots__dot--sm {
    left: calc(1275.5 / 1521 * 100%) !important;
    top: calc(424.5 / 666 * 100%) !important;
    width: calc(5 / 1521 * 100%) !important;
  }
}

/* White bullet copy + visible markers at every width.
 * ≤1024: visible disc is li::before (list-style none, ::marker emptied).
 * ≥1025: visible disc is li::marker. Do not add a second disc or change geometry. */
#hero ul.hero__lead,
#hero ul.hero__bullets,
#hero .hero-artboard .hero__content .hero__lead,
#hero .hero-artboard .hero__content .hero__bullets {
  color: #ffffff;
}

#hero ul.hero__lead li,
#hero ul.hero__bullets li,
.hero-artboard .hero__content ul.hero__lead li,
.hero-artboard .hero__content ul.hero__bullets li {
  color: #ffffff !important;
}

#hero ul.hero__lead li::marker,
#hero ul.hero__bullets li::marker,
.hero-artboard .hero__content ul.hero__lead li::marker,
.hero-artboard .hero__content ul.hero__bullets li::marker {
  color: #ffffff;
}

#hero ul.hero__lead li::before,
#hero ul.hero__bullets li::before,
.hero-artboard .hero__content ul.hero__lead li::before,
.hero-artboard .hero__content ul.hero__bullets li::before {
  background: #ffffff;
  background-color: #ffffff;
}

@media (min-width: 601px) and (max-width: 1024px) and (min-width: 99999px) {
  #hero .hero__actions,
  #hero .hero-artboard .hero__content .hero__actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: stretch !important;
    gap: 8px;
    width: 100% !important;
    max-width: 100% !important;
  }

  #hero .hero__actions .btn,
  #hero .hero__actions a.btn,
  .hero-artboard .hero__content .hero__actions .btn {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0;
    flex: 1 1 0;
    white-space: nowrap;
    box-sizing: border-box;
  }
}

/* Scooter PNG has empty rows under the wheels; nudge them onto the orange floor
   without pushing the phone man through the pin clip. */
@media (min-width: 1366px) {
  .hero-pin .hero-world__set .hero-layer[data-slot="cartoon-a-far-scooter"] {
    transform: translateY(calc(53.5px + max(0px, var(--reading-hero-height, 0px) - 666px * var(--hero-scale, 1)))) !important;
  }

  /* floor-extra is viewport px. Inside the scaled artboard a raw translate
     is shrunk, so divide by the scale (100vw / 1521px) and keep a length. */
  .hero-pin #hero .hero-layer[data-slot="cartoon-a-fg-phone"],
  .hero-pin #hero #bubble-seo,
  .hero-pin #hero .hero-bubble--seo,
  .hero-pin #hero .hero-dots--seo {
    transform: translateY(max(0px, calc(var(--reading-hero-height, 0px) / var(--hero-scale, 1) - 666px))) !important;
  }
}

