/* Apex Web buyer-page UI foundation.
 * Additive accessibility, hero hierarchy and responsive safeguards.
 * Keep page-specific visual systems intact; this file only normalizes the
 * shared interaction and first-viewport contract. */

.apex-ui-page .skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2147483647;
  padding: 11px 16px;
  border: 2px solid #e9c976;
  border-radius: 8px;
  background: #070710;
  color: #fff;
  font: 700 0.9rem/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.16s ease;
}

.apex-ui-page .skip-link:focus {
  transform: translateY(0);
}

.apex-ui-page main {
  display: block;
}

.apex-ui-page :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #e9c976 !important;
  outline-offset: 3px !important;
}

.apex-ui-page [id] {
  scroll-margin-top: 88px;
}

/* First viewport: short outcome-led headline, one primary and one secondary action. */
.apex-ui-page .hero {
  min-height: auto !important;
  padding-top: clamp(96px, 8vw, 120px) !important;
  padding-bottom: clamp(52px, 7vw, 78px) !important;
}

.apex-ui-page .hero-content {
  width: min(100%, 1040px);
  margin-inline: auto;
}

.apex-ui-page .hero-content .hero-label { order: 1; }
.apex-ui-page .hero-content h1 { order: 2; }
.apex-ui-page .hero-content .hero-sub { order: 3; }
.apex-ui-page .hero-content .hero-ctas { order: 4; }
.apex-ui-page .hero-content .hero-proof,
.apex-ui-page .hero-content .apex-hero-proof { order: 5 !important; }

/* Critical hero copy must paint without waiting for animation JavaScript. */
.apex-ui-page .hero :where(h1, .h1-inner, .eyebrow, .hero-label, .hero-sub, .hero-lead, .hero-stats, .hero-ctas, .hero-proof, .apex-hero-proof, .hp-row, .hp-foot, .hp-founder) {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.apex-ui-page .hero h1,
.apex-ui-page .hero-content h1 {
  max-width: 920px !important;
  margin-inline: auto;
  font-size: clamp(2.8rem, 6vw, 5.75rem) !important;
  line-height: 0.98 !important;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.apex-ui-page .hero-sub,
.apex-ui-page .hero-lead {
  max-width: 660px !important;
  margin-inline: auto !important;
  text-wrap: pretty;
}

.apex-ui-page .hero-ctas {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px !important;
  max-width: 760px;
  margin: 26px auto 0 !important;
}

.apex-ui-page .hero-stats {
  gap: clamp(22px, 5vw, 52px) !important;
  margin: 28px 0 26px !important;
}

.apex-ui-page .hero-ctas .apex-primary-cta,
.apex-ui-page .hero-ctas .apex-secondary-cta {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 14px 26px !important;
  border: 1px solid !important;
  border-radius: 4px;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  animation: none !important;
}

.apex-ui-page .hero-ctas .apex-primary-cta {
  border-color: #c9a84c !important;
  background: #c9a84c !important;
  background-image: none !important;
  color: #04040a !important;
  box-shadow: 0 14px 34px rgba(201, 168, 76, 0.2);
}

.apex-ui-page .hero-ctas .apex-primary-cta:hover {
  border-color: #e9c976 !important;
  background: #e9c976 !important;
  color: #04040a !important;
  transform: translateY(-2px);
}

.apex-ui-page .hero-ctas .apex-secondary-cta {
  border-color: rgba(255, 255, 255, 0.34) !important;
  background: rgba(4, 4, 10, 0.3) !important;
  background-image: none !important;
  color: #e8e8f0 !important;
  box-shadow: none !important;
}

.apex-ui-page .hero-ctas .apex-secondary-cta:hover {
  border-color: #c9a84c !important;
  color: #e9c976 !important;
  transform: translateY(-2px);
}

/* Truthful homepage proof: illustrative output plus the named implementer. */
.apex-ui-page .apex-hero-proof {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 12px;
  width: min(100%, 780px);
  margin: 28px auto 0;
  text-align: left;
}

.apex-ui-page .apex-proof-output,
.apex-ui-page .apex-founder-proof {
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(201, 168, 76, 0.08), rgba(99, 102, 241, 0.04)), #090914;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.apex-ui-page .apex-proof-output {
  padding: 18px 20px;
}

.apex-ui-page .apex-proof-kicker {
  display: block;
  margin-bottom: 7px;
  color: #e9c976;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.apex-ui-page .apex-proof-output > strong {
  display: block;
  color: #fff;
  font-size: 1rem;
}

.apex-ui-page .apex-proof-output dl {
  display: grid;
  gap: 7px;
  margin: 14px 0 10px;
}

.apex-ui-page .apex-proof-output dl > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
}

.apex-ui-page .apex-proof-output dt {
  color: #9090c0;
  font-size: 0.76rem;
}

.apex-ui-page .apex-proof-output dd {
  margin: 0;
  color: #e8e8f0;
  font-size: 0.8rem;
}

.apex-ui-page .apex-proof-note {
  margin: 0;
  color: #a8a8cb;
  font-size: 0.72rem;
  line-height: 1.5;
}

.apex-ui-page .apex-founder-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.apex-ui-page .apex-founder-proof img {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}

.apex-ui-page .apex-founder-proof strong,
.apex-ui-page .apex-founder-proof span {
  display: block;
}

.apex-ui-page .apex-founder-proof strong {
  color: #fff;
  font-size: 0.9rem;
}

.apex-ui-page .apex-founder-proof span {
  margin-top: 4px;
  color: #a8a8cb;
  font-size: 0.76rem;
  line-height: 1.45;
}

.apex-ui-page .hero-proof .hp-founder {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #a8a8cb;
  font-size: 0.74rem;
  line-height: 1.45;
}

.apex-ui-page .hero-proof .hp-founder img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}

.apex-ui-page .hero-proof .hp-founder strong {
  display: block;
  color: #fff;
  font-size: 0.8rem;
}

/* One global assistant control on the selected buyer pages. The package advisor
 * route remains available in navigation and inline CTAs. */
.apex-ui-page #apex-advisor-fab {
  display: none !important;
}

/* Avoid a third floating control competing with the assistant on small screens. */
@media (max-width: 720px) {
  .apex-ui-page .back-top {
    display: none !important;
  }
}

/* Existing muted tokens pass AA; nested opacity was the contrast regression. */
.apex-ui-page .integ-logo-text {
  opacity: 1 !important;
}

.apex-ui-page .integ-logo-img {
  opacity: 0.82 !important;
}

.apex-ui-page .pk-feats li.off {
  color: #9090c0 !important;
  opacity: 1 !important;
  text-decoration: line-through;
}

/* Registry-backed offer hierarchy. Old price, savings and benefit are hydrated
 * from the same versioned catalog as checkout and chatbot pricing. */
.apex-ui-page .apex-registry-offer {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 12px;
  background: rgba(201, 168, 76, 0.055);
  font-variant-numeric: tabular-nums;
}

.apex-ui-page .apex-offer-topline {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.apex-ui-page .apex-offer-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid #c9a84c;
  border-radius: 999px;
  background: #c9a84c;
  color: #080811;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
}

.apex-ui-page .apex-offer-saving {
  color: #e9c976;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.apex-ui-page .apex-price-old-caption,
.apex-ui-page .apex-price-caption {
  color: #a8a8cb;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.apex-ui-page .apex-registry-offer .apex-price-old {
  display: block;
  width: fit-content;
  margin: 0;
  color: #a8a8cb;
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 1;
  text-decoration-color: #d9b85f;
  text-decoration-thickness: 2px;
}

.apex-ui-page .apex-registry-offer .new {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: #fff;
}

.apex-ui-page .apex-registry-offer [data-apex-price-value] {
  font-size: clamp(2rem, 4vw, 2.55rem);
  line-height: 0.95;
}

.apex-ui-page .apex-registry-offer [data-apex-price-suffix] {
  margin: 0;
  color: #e9c976;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
}

.apex-ui-page .apex-offer-bonus {
  margin-top: 5px;
  padding: 11px 12px;
  border-left: 3px solid #c9a84c;
  background: rgba(201, 168, 76, 0.09);
  color: #f4e3af;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
}

.apex-ui-page .apex-registry-offer [hidden] {
  display: none !important;
}

.apex-ui-page figcaption span[style*="opacity"] {
  color: #a8a8cb !important;
  opacity: 1 !important;
}

.apex-ui-page .step-n {
  opacity: 0.72 !important;
}

/* Form prompts remain visually identical while every control/group has a
 * programmatic name. Chip choices are real keyboard-focusable buttons. */
.apex-ui-page .fig .fig-label {
  color: var(--sub, #a8a8cb);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.apex-ui-page .chip-group .chip[type="button"] {
  appearance: none;
  background: transparent;
  border-radius: 0;
  font-family: inherit;
  line-height: inherit;
  text-align: left;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

/* The long desktop navigation must switch before its labels clip at 1280px. */
@media (max-width: 1320px) {
  .apex-ui-page #nav .nl {
    display: none !important;
  }

  .apex-ui-page #nav .mob-btn {
    display: block !important;
  }

  .apex-ui-page #nav {
    padding: 14px 22px !important;
  }

  .apex-ui-page .mob-menu {
    min-height: 100dvh;
    max-height: 100dvh;
    justify-content: flex-start !important;
    gap: 18px !important;
    padding: max(92px, calc(env(safe-area-inset-top) + 76px)) 24px max(44px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .apex-ui-page .mob-menu a {
    font-size: clamp(1.2rem, 4.8vw, 1.65rem) !important;
    line-height: 1.15;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .apex-ui-page .hero {
    padding: 88px 18px 44px !important;
  }

  .apex-ui-page .hero h1,
  .apex-ui-page .hero-content h1 {
    font-size: clamp(2.2rem, 10vw, 3rem) !important;
    line-height: 1 !important;
  }

  .apex-ui-page .hero-label,
  .apex-ui-page .eyebrow {
    max-width: 330px;
    margin-inline: auto;
    line-height: 1.45;
  }

  .apex-ui-page .hero-sub,
  .apex-ui-page .hero-lead {
    max-width: 350px !important;
    font-size: 0.94rem !important;
    line-height: 1.62 !important;
  }

  .apex-ui-page .hero-ctas {
    flex-direction: column;
    width: min(100%, 350px);
    margin-top: 22px !important;
  }

  .apex-ui-page .hero-ctas .apex-primary-cta,
  .apex-ui-page .hero-ctas .apex-secondary-cta {
    width: 100%;
  }

  .apex-ui-page .hero-stats {
    gap: 22px !important;
    margin: 22px 0 18px !important;
  }

  .apex-ui-page .apex-hero-proof {
    grid-template-columns: 1fr;
    width: min(100%, 350px);
    margin-top: 22px;
  }

  .apex-ui-page .apex-proof-output dl > div {
    grid-template-columns: 76px 1fr;
  }

  .apex-ui-page .apex-registry-offer {
    padding: 16px;
  }

  .apex-ui-page .apex-offer-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .apex-ui-page .apex-offer-saving {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apex-ui-page *,
  .apex-ui-page *::before,
  .apex-ui-page *::after {
    scroll-behavior: auto !important;
  }

  .apex-ui-page .apex-primary-cta,
  .apex-ui-page .apex-secondary-cta {
    transition: none !important;
  }
}
