/* Stage v20: tighten hero, dual-end cards, and VIP journey overflow. */

@media (min-width: 1100px) {
  body .hero {
    min-height: min(820px, calc(100vh - 4px)) !important;
    padding-top: clamp(44px, 4vh, 64px) !important;
    padding-bottom: 20px !important;
  }

  body .hero .hero-content {
    align-items: center !important;
    min-height: 0 !important;
    transform: translateY(-92px) !important;
  }

  body .hero .hero-copy {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body .hero .hero-product-stage {
    min-height: clamp(560px, 51vw, 700px) !important;
    transform: translateY(30px) !important;
  }

  body .hero .hero-console-window,
  body .hero .hero-window {
    transform: translate(-8px, -8px) scale(.9) !important;
    transform-origin: 56% 48% !important;
    filter: drop-shadow(0 20px 30px rgba(42, 34, 24, .10)) !important;
  }

  body .hero .hero-phone-main {
    transform: translate(-235px, 136px) scale(1.07) !important;
    z-index: 8 !important;
    filter: drop-shadow(0 14px 22px rgba(28, 22, 16, .12)) !important;
  }

  body .hero .hero-phone-alt {
    transform: translate(8px, 128px) scale(1.02) !important;
    z-index: 7 !important;
    filter: drop-shadow(0 14px 22px rgba(28, 22, 16, .12)) !important;
  }

  body .hero .hero-stat-card {
    transform: translate(-132px, 118px) !important;
    z-index: 9 !important;
    box-shadow: 0 16px 26px rgba(22, 17, 12, .16) !important;
  }

  body .hero .hero-mascot,
  body .hero .hero-ip {
    transform: translate(40px, 92px) scale(.94) !important;
    z-index: 10 !important;
    filter: drop-shadow(0 14px 20px rgba(22, 17, 12, .10)) !important;
  }
}

@media (max-width: 1099px) {
  body .hero {
    min-height: auto !important;
    padding-top: 92px !important;
  }

  body .hero .hero-content,
  body .hero .hero-product-stage,
  body .hero .hero-window,
  body .hero .hero-console-window,
  body .hero .hero-phone-main,
  body .hero .hero-phone-alt,
  body .hero .hero-stat-card,
  body .hero .hero-mascot,
  body .hero .hero-ip {
    transform: none !important;
  }
}

/* Dual-end coordination: equal endpoint cards and softer engine. */
@media (min-width: 1100px) {
  body #coordination .sync-system-map {
    grid-template-columns: minmax(0, 1fr) clamp(108px, 8.2vw, 150px) minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: clamp(22px, 2.7vw, 42px) !important;
  }

  body #coordination .sync-endpoint {
    height: 100% !important;
    min-height: clamp(560px, 42vw, 650px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body #coordination .sync-endpoint > h3 {
    white-space: nowrap !important;
    font-size: clamp(24px, 1.8vw, 34px) !important;
    line-height: 1.12 !important;
  }

  body #coordination .sync-endpoint > figure {
    flex: 1 1 auto !important;
    min-height: clamp(340px, 26vw, 430px) !important;
    display: grid !important;
    place-items: center !important;
    overflow: visible !important;
  }

  body #coordination .sync-endpoint > figure img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  body #coordination .sync-endpoint .sync-tags {
    margin-top: auto !important;
  }
}

body #coordination .engine-core-card {
  align-self: center !important;
  width: clamp(108px, 8.2vw, 150px) !important;
  min-height: clamp(250px, 22vw, 330px) !important;
  padding: 28px 12px !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 91, 26, .14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 246, 238, .74)) !important;
  color: #1f1712 !important;
  border: 1px solid rgba(255, 91, 26, .16) !important;
  box-shadow: 0 22px 54px rgba(54, 39, 24, .12) !important;
  overflow: visible !important;
}

body #coordination .engine-core-card h3,
body #coordination .engine-core-card strong {
  color: #1f1712 !important;
}

body #coordination .engine-core-card ul,
body #coordination .engine-core-card ol,
body #coordination .engine-core-card .engine-actions,
body #coordination .engine-core-card .engine-pills,
body #coordination .engine-core-card .engine-steps {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 12px 0 0 !important;
  gap: 6px !important;
}

body #coordination .engine-core-card li,
body #coordination .engine-core-card button,
body #coordination .engine-core-card [class*="pill"],
body #coordination .engine-core-card [class*="step"],
body #coordination .engine-core-card [class*="action"] {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 2px 0 !important;
  min-height: 0 !important;
  color: rgba(31, 23, 18, .72) !important;
}

/* VIP journey: keep title clear, phones centered, bottom steps unclipped. */
@media (min-width: 1100px) {
  body #driver .vip-journey-featured {
    display: grid !important;
    grid-template-columns: minmax(300px, .42fr) minmax(660px, 1.58fr) !important;
    column-gap: clamp(38px, 4.2vw, 78px) !important;
    row-gap: clamp(24px, 3vw, 44px) !important;
    align-items: start !important;
    overflow: visible !important;
    padding: clamp(46px, 4vw, 68px) clamp(42px, 4.8vw, 86px) clamp(56px, 5vw, 86px) !important;
  }

  body #driver .vip-journey-featured .journey-copy {
    grid-column: 1 !important;
    grid-row: 1 !important;
    max-width: 520px !important;
    z-index: 3 !important;
  }

  body #driver .vip-journey-featured .journey-copy h2,
  body #driver .vip-journey-featured .journey-copy h3 {
    font-size: clamp(34px, 2.6vw, 46px) !important;
    line-height: 1.14 !important;
    letter-spacing: 0 !important;
    margin: 0 0 18px !important;
  }

  body #driver .vip-journey-featured .journey-progress-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
    max-width: 460px !important;
    width: 100% !important;
  }

  body #driver .vip-journey-featured .phone-strip.four {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: end !important;
    justify-items: center !important;
    gap: clamp(18px, 2vw, 32px) !important;
    margin: 0 !important;
    padding-top: 6px !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body #driver .vip-journey-featured .phone-strip.four figure {
    width: 100% !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  body #driver .vip-journey-featured .phone-strip.four img {
    width: 100% !important;
    max-width: 232px !important;
    height: auto !important;
    object-fit: contain !important;
  }

  body #driver .vip-journey-featured .journey-flow {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: clamp(40px, 4vw, 68px) !important;
    width: 100% !important;
    margin: clamp(28px, 3vw, 46px) 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    align-items: center !important;
  }

  body #driver .vip-journey-featured .journey-flow > i,
  body #driver .vip-journey-featured .journey-flow .flow-arrow,
  body #driver .vip-journey-featured .journey-flow .journey-arrow {
    display: none !important;
  }

  body #driver .vip-journey-featured .journey-flow > span {
    position: relative !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 66px !important;
    padding: 12px clamp(12px, 1.3vw, 20px) !important;
    border-radius: 999px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.18 !important;
    font-size: clamp(13px, .9vw, 15px) !important;
    text-align: center !important;
  }

  body #driver .vip-journey-featured .journey-flow > span:not(:last-of-type)::after {
    content: "->";
    position: absolute;
    top: 50%;
    right: calc(-1 * clamp(24px, 2.6vw, 44px));
    transform: translate(50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff0e9;
    color: #ff5b1a;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(255, 91, 26, .12);
  }
}

@media (max-width: 1099px) {
  body #driver .vip-journey-featured {
    display: block !important;
    padding: 36px 20px !important;
  }

  body #driver .vip-journey-featured .phone-strip.four {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin-top: 28px !important;
  }

  body #driver .vip-journey-featured .journey-flow {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 24px !important;
  }
}
