/**
 * Banner-mode hero.
 *
 * Desktop: the campaign artwork fills the band edge to edge and carries its own
 * typography, so the HTML copy stays in the DOM (the first slide still owns the
 * page <h1>) but is never painted.
 *
 * Phones: a 2.95:1 poster shrinks to unreadable type, and cropping it always
 * loses part of the design. So each slide also has a dedicated vertical phone
 * poster ("image_m", 4:5) built from the same copy / product / palette as the
 * desktop artwork — same message, layout that fits the screen. The copy layer
 * stays hidden because the posters carry their own type.
 *
 * Loaded only on the front page and only when the Customizer is set to
 * "Full-bleed banner" (see okg_enqueue_assets()).
 */

/* ---------------------------------------------------------------- canvas -- */
.okg-hero2.is-banner {
  color: var(--deep, #101820);
  background: #ffffff;
}
.okg-hero2.is-banner::before,
.okg-hero2.is-banner .okg-hero2__glow {
  display: none;
}
.okg-hero2.is-banner .okg-hero2__stage {
  width: 100%;
  max-width: none;
  padding: 0;
}
.okg-hero2.is-banner .okg-hero2__slide {
  display: block;
  min-height: 0;
}

/* --------------------------------------------------------------- artwork -- */
.okg-hero2.is-banner .okg-hero2__art {
  display: block;
  padding: 0;
  aspect-ratio: 1920 / 650;
  max-height: 84vh;
  background: #e9efed;
  text-decoration: none;
  cursor: pointer;
}
.okg-hero2.is-banner .okg-hero2__art::after {
  display: none;
}
.okg-hero2.is-banner .okg-hero2__art picture {
  display: block;
  height: 100%;
}
.okg-hero2.is-banner .okg-hero2__art img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  /* Edge-to-edge artwork: the global img radius would clip the corners of the
     poster and of the phone crop. */
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  filter: none;
  opacity: 1;
  transform: none;
  transition: none;
  -webkit-user-drag: none;
}

/* ------------------------------------------------------------------ copy -- */
/* The artworks carry the message on every screen size (the phone posters have
   their own typography), so the HTML copy is screen-reader only everywhere.
   It still owns the page <h1> and keeps the heading text indexable. */
.okg-hero2.is-banner .okg-hero2__copy {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  visibility: hidden;
}

/* ---------------------------------------------------------------- arrows -- */
/* The stage now ends with the indicator row, so pull the arrows back onto the
   middle of the artwork itself. */
.okg-hero2.is-banner .okg-hero2__arrow {
  top: calc(50% - 21px);
  color: var(--deep, #101820);
  border-color: rgba(16, 24, 40, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.16);
}
.okg-hero2.is-banner .okg-hero2__arrow:hover {
  color: #ffffff;
  border-color: transparent;
  background: rgba(16, 24, 40, 0.82);
}
.okg-hero2.is-banner .okg-hero2__arrow:focus-visible {
  outline: 2px solid var(--deep, #101820);
  outline-offset: 3px;
}

/* ------------------------------------------------------------ progress --- */
/* The artwork carries its own CTA near the bottom edge, so the indicator sits
   in its own slim row underneath instead of floating on top of it. */
.okg-hero2.is-banner .okg-hero2__bars {
  position: static;
  z-index: auto;
  justify-content: center;
  margin: 0;
  padding: 11px 0 13px;
  background: #ffffff;
  transform: none;
}
.okg-hero2.is-banner .okg-hero2__bar {
  height: 12px;
}
.okg-hero2.is-banner .okg-hero2__bar i {
  height: 4px;
  background: rgba(16, 24, 40, 0.22);
}
.okg-hero2.is-banner .okg-hero2__bar:hover i {
  background: rgba(16, 24, 40, 0.4);
}
.okg-hero2.is-banner .okg-hero2__bar i::after {
  background: var(--deep, #101820);
}

/* ----------------------------------------------------------------- stats -- */
/* The stat strip sits inside the hero, so it has to stop being a dark glass
   panel once the band behind it is white. */
.okg-hero2.is-banner .okg-hero2__stats,
.okg-hero2.is-banner .okg-hero2__stats.okg-glass {
  border-top: 1px solid rgba(16, 24, 40, 0.07);
  background: var(--deep, #101820);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* --------------------------------------------------------------- phones --- */
@media (max-width: 820px) {
  /* DOM order is copy-then-art (the desktop grid puts them side by side), so
     the phone stack reverses it to get the picture on top. */
  .okg-hero2.is-banner .okg-hero2__slide {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  /* Phones use the dedicated vertical poster (Customizer "image_m", 4:5).
     The ratio comes from the template (--okg-hero-ar, read off the mobile
     attachment), falling back to 4 / 5. */
  .okg-hero2.is-banner .okg-hero2__art {
    order: -1;
    aspect-ratio: var(--okg-hero-ar, 4 / 5);
    max-height: none;
  }
  .okg-hero2.is-banner .okg-hero2__art img {
    object-position: center;
  }
  /* --okg-hero-accent is written per slide by the template (Customizer field),
     so each slide's button and eyebrow can follow its own artwork. */
  .okg-hero2.is-banner .okg-hero2__eyebrow {
    margin-bottom: 10px;
    color: var(--aqua-deep, #0b7d73);
    border-color: rgba(11, 125, 115, 0.28);
    background: rgba(16, 24, 40, 0.03);
  }
  .okg-hero2.is-banner .okg-hero2__arrow {
    display: none;
  }

  .okg-hero2.is-banner .okg-hero2__copy {
    max-width: none;
    padding: 20px 20px 2px;
    text-align: center;
  }
  .okg-hero2.is-banner .okg-hero2__title {
    margin: 0 0 8px;
    color: var(--deep, #101820);
    font-size: clamp(21px, 5vw, 27px);
    line-height: 1.24;
    letter-spacing: -0.01em;
  }
  /* The second headline line only exists to give the hidden H1 a natural
     reading on desktop; on phones it would just repeat the description. */
  .okg-hero2.is-banner .okg-hero2__accent {
    display: none;
  }
  .okg-hero2.is-banner .okg-hero2__desc {
    max-width: none;
    margin: 0 auto 16px;
    color: var(--muted, #5d6d76);
    font-size: 13.5px;
    line-height: 1.55;
  }
  .okg-hero2.is-banner .okg-hero2__actions {
    justify-content: center;
  }
  .okg-hero2.is-banner .okg-hero2__btn--primary {
    height: 44px;
    padding: 0 26px;
    color: var(--deep, #101820);
    background: var(--lime, #b8f34a);
    box-shadow: 0 8px 20px rgba(184, 243, 74, 0.35);
  }
  .okg-hero2.is-banner .okg-hero2__btn--primary:active {
    transform: translateY(1px);
  }
  .okg-hero2.is-banner .okg-hero2__btn--ghost {
    display: none;
  }
  .okg-hero2.is-banner .okg-hero2__bars {
    padding: 16px 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .okg-hero2.is-banner .okg-hero2__art img {
    transition: none;
  }
}
/* ------------------------------------------- short / wide artwork fallback --
 * 有些 slide 的手机图不是竖版海报（例如把横版产品图当成 image_m 用）。
 * 这类图在手机宽度下，图内自带的标题和按钮会缩到不可读。
 * 处理：该 slide 保留图片原始比例，同时把 HTML 文字层从「仅屏幕阅读器可见」
 * 恢复成正常排版 —— 标题、描述、按钮都可见可点。
 * 桌面端不受影响（只在 820px 以下生效）。
 */
@media (max-width: 820px) {
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__copy {
    /* 覆盖 sr-only：原规则用了 position: absolute !important，必须同级覆盖 */
    position: static !important;
    width: auto;
    height: auto;
    margin: 0;
    padding: 18px 20px 4px;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    border: 0;
    visibility: visible;
    text-align: center;
    max-width: none;
  }
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__copy > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  /* 第二行标题在这类 slide 上不会和图内文字重复 */
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__accent {
    display: block;
    margin-top: 2px;
  }
  /* 次要按钮之前被隐藏，这里恢复（引导到场景页） */
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__btn--ghost {
    display: inline-flex;
  }
  /* 文字层与图片之间留白 */
  .okg-hero2.is-banner .okg-hero2__slide--short-art {
    padding-bottom: 6px;
  }
}
/* ------------------------------------------------ BTN-FIT-360 (2026-11-18) --
 * 两个按钮并排需要 321px（含 12px 间距），而 360px 机型的容器只有 320px，
 * 375px 机型的第二个按钮文字更长时会撑到 339px。收紧内边距与间距后，
 * 360px 以上都能并排；320px 机型改为等宽堆叠，视觉上仍然整齐。
 */
@media (max-width: 560px) {
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__btn {
    padding: 0 14px;
    font-size: 13px;
    letter-spacing: 0;
    white-space: nowrap;
  }
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__btn--ghost {
    display: inline-flex;
  }
}
/* 极窄屏（320px 级）：并排放不下，改成等宽堆叠，避免一大一小 */
@media (max-width: 344px) {
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 0 6px;
  }
  .okg-hero2.is-banner .okg-hero2__slide--short-art .okg-hero2__btn {
    width: 100%;
    justify-content: center;
    padding: 0 10px;
    font-size: 12.5px;
  }
}
