/* Homepage interaction refinement (29 Oct). Loaded last; changes only hover, press and focus feedback:
   one easing and three tempos, no layout movement, no shadows on cards, hover effects only on devices that hover,
   quick press feedback on touch, visible keyboard focus, and nothing that moves under reduced motion.
   Does not touch the hero, portal, centre push-in, reveal or scroll animations (their own transitions stay in charge). */

:root {
  --hv-ease: cubic-bezier(.22, 1, .36, 1);
  --hv-fast: .3s;   /* colour, opacity, fills */
  --hv-mid: .45s;   /* arrows, icons */
  --hv-slow: 1.1s;  /* image scale */
}
a, button, summary, label { -webkit-tap-highlight-color: transparent; }

/* ---------- 1. one tempo for fills and colours (was a mix of .2s ease, .25s ease, .3s ease and .45s) ---------- */
.mobile-nav-toggle, .mnav-close, .mnav-cta, .reg-close, .demo-close, .ad-close, .ad-register, .cg-close, .cg-arrow,
.wl-btn, .mh-btn, .wl-cat, .mon-cta, .nk-cta, .addons-cta, .mh-cta, .ft-cta, .ft .ft-cta, .ft-cbtn, .fc .fc-cta,
.as-card-button, .as-sum, .enq-chip span, .faq-ic, .plan-cta {
  transition: background-color var(--hv-fast) var(--hv-ease), color var(--hv-fast) var(--hv-ease), border-color var(--hv-fast) var(--hv-ease),
    box-shadow var(--hv-fast) var(--hv-ease), opacity var(--hv-fast) ease, transform .2s var(--hv-ease);
}
.mh-btn:disabled, .wl-btn:disabled, .cg-arrow:disabled { transition: opacity var(--hv-fast) ease; }
.ft-nav a, .ft .ft-nav a, .ft-lbtn, .faq-link, .plan-link, .ed-related, .faq-q, .mnav-links a span:first-child {
  transition: color var(--hv-fast) var(--hv-ease), opacity var(--hv-fast) ease, text-decoration-color var(--hv-fast) ease;
}

/* Buttons keep their fill tempo and gain a soft press release (the entrance animations of menu links are left alone). */
.btn, .hdr-cta, .reg-submit { transition: background-color .45s var(--hv-ease), color .45s var(--hv-ease), box-shadow .45s var(--hv-ease), transform .2s var(--hv-ease); }

/* ---------- 2. arrows and icons glide the same short distance ---------- */
.as-card-arrow, .wl-more .pki, .plan-cta .pki, .plan-link .pki, .ad-more .pki, .ct-label .pki, .mnav-links a .pki, .ed-related span, .ed-grid b, .mnav-cta .pki {
  transition: transform var(--hv-mid) var(--hv-ease), opacity var(--hv-fast) ease; display: inline-block;
}

/* ---------- 3. images: a slower, softer scale; no drop shadow on cards ---------- */
.wl-fig img { transition: transform var(--hv-slow) var(--hv-ease); }
.wl-fig { transition: outline-color var(--hv-fast) ease; }
.as-thumb { transition: transform .9s var(--hv-ease); }

/* ---------- 4. the services list: no more padding jump; the title and arrow glide instead ---------- */
.ed-grid a { transition: border-color var(--hv-fast) var(--hv-ease); }
.ed-grid a > div { transition: transform var(--hv-mid) var(--hv-ease); }
.ed-grid a > span { transition: color var(--hv-fast) ease; }

@media (hover: hover) and (pointer: fine) {
  /* Directory */
  .ed-grid a:hover { padding-left: 0; border-top-color: rgba(14, 14, 15, .4); }
  .ed-grid a:hover > div { transform: translateX(6px); }
  .ed-grid a:hover > span { color: #0e0e0f; }
  .ed-grid a:hover b { transform: translate(3px, -3px); }
  .ed-related:hover span { transform: translate(3px, -3px); }
  .ed-related { text-decoration: none; }
  .ed-related:hover { opacity: .72; }

  /* Wellness row: image eases in, no shadow; the Details arrow follows */
  .wl-item:hover .wl-fig { box-shadow: none; }
  .wl-item:hover .wl-fig img { transform: scale(1.03); }
  .wl-cat:not([aria-pressed="true"]):hover { background: rgba(14, 14, 15, .09); }

  /* Assessment cards: gentle surface, thumbnail scale a touch smaller */
  .as-card:hover .as-thumb { transform: scale(1.03); }
  .as-card-button:hover .as-card-arrow { transform: translateX(3px); opacity: 1; }

  /* Round arrow buttons and closes: tint only, no ring jump */
  .wl-btn:hover:not(:disabled), .mh-btn:hover:not(:disabled) { background: rgba(14, 14, 15, .06); box-shadow: inset 0 0 0 1px rgba(14, 14, 15, .32); }
  .mobile-nav-toggle:hover { background: rgba(233, 228, 218, .16); }
  .masthead.is-light .mobile-nav-toggle:hover { background: rgba(255, 255, 255, .55); }
  .mnav-close:hover { background: rgba(233, 228, 218, .16); }
  .reg-close:hover, .demo-close:hover { background: rgba(233, 228, 218, .14); }

  /* Mobile/tablet full-screen menu (desktop pointer on a narrow window) */
  .mnav-links a:hover .pki { transform: translateX(4px); opacity: 1; }
  .mnav-links a:hover span:first-child { opacity: .8; }
  .mnav-cta:hover .pki { transform: translateX(3px); }

  /* Text links: colour and a soft underline instead of an abrupt one */
  .faq-link, .plan-link, .ft .ft-nav a { text-decoration-line: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
  .faq-link { text-decoration-color: rgba(39, 39, 44, .35); }
  .faq-link:hover, .plan-link:hover, .ft .ft-nav a:hover { text-decoration-color: currentColor; }
  .faq-q:hover { color: #0e0e0f; }
  .ad-more:hover .pki, .plan-link:hover .pki, .plan-cta:hover .pki { transform: translateX(3px); }

  /* My Health cards: photo eases, phone lifts a little less */
  .mh-card:hover .mh-phone { transform: translateY(calc(-50% - 4px)); }

  /* Centre gallery thumbs */
  .cg-thumb:hover { opacity: .85; }
}

/* ---------- 5. touch: instant, gentle press feedback (no sticky hover) ---------- */
@media (hover: none) {
  .btn:active, .hdr-cta:active, .mon-cta:active, .nk-cta:active, .addons-cta:active, .mh-cta:active, .ft-cta:active, .fc .fc-cta:active,
  .plan-cta:active, .reg-submit:active, .mnav-cta:active, .ad-register:active, .hero-ctas .btn-light:active, .reg-done .btn:active { transform: scale(.98); }
  .wl-btn:active, .mh-btn:active, .cg-arrow:active, .mobile-nav-toggle:active, .mnav-close:active, .reg-close:active, .ad-close:active, .cg-close:active { transform: scale(.94); }
  .as-card-button:active { background: rgba(255, 255, 255, .5); }
  .wl-item:has(.wl-open:active) .wl-fig img { transform: scale(.985); transition-duration: .2s; }
  .wl-cat:active, .enq-chip:active span { transform: scale(.97); }
  .mnav-links a:active span:first-child, .ft-nav a:active, .faq-q:active, .ed-grid a:active > div { opacity: .6; }
  .ed-related:active, .plan-link:active, .faq-link:active, .ad-more:active { opacity: .6; }
  /* iOS keeps :hover after a tap: undo the hover-only changes so a tapped button does not stay "lit". */
  .hdr-cta:hover, .hero-ctas .btn-light:hover, .reg-submit:hover, .mon-cta:hover, .nk-cta:hover, .ft-cta:hover, .fc .fc-cta:hover, .plan-cta-gold:hover { background: var(--gold); }
  .masthead.is-light .hdr-cta:hover, .plan-cta-void:hover, .addons-cta:hover, .mh-cta:hover, .ad-register:hover, .ft .ft-cta:hover { background: var(--void); }
  .wl-btn:hover:not(:disabled), .mh-btn:hover:not(:disabled) { background: transparent; box-shadow: inset 0 0 0 1px rgba(14, 14, 15, .22); }
  .ed-grid a:hover { padding-left: 0; }
}

/* ---------- 6. keyboard focus: one clear ring, offset from the element ---------- */
.ed-grid a:focus-visible { outline: 2px solid #0e0e0f; outline-offset: 6px; border-radius: 8px; }
.ed-related:focus-visible, .plan-link:focus-visible, .ad-more:focus-visible, .faq-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 6px; }
.mobile-nav-toggle:focus-visible, .mnav-close:focus-visible, .mnav-cta:focus-visible, .mnav-links a:focus-visible { outline: 2px solid var(--star, #e9e4da); outline-offset: 3px; border-radius: 10px; }
.masthead.is-light .mobile-nav-toggle:focus-visible { outline-color: #0e0e0f; }
.wl-cat:focus-visible, .wl-btn:focus-visible, .mh-btn:focus-visible { outline: 2px solid #0e0e0f; outline-offset: 3px; }
.mon-cta:focus-visible, .nk-cta:focus-visible, .ft-cta:focus-visible, .fc .fc-cta:focus-visible, .plan-cta-gold:focus-visible, .cg-arrow:focus-visible, .cg-close:focus-visible, .cg-thumb:focus-visible, .reg-close:focus-visible { outline: 2px solid var(--star, #e9e4da); outline-offset: 3px; }
.mh-cta:focus-visible, .addons-cta:focus-visible, .plan-cta-void:focus-visible, .ft .ft-cta:focus-visible, .as-card-button:focus-visible { outline: 2px solid #0e0e0f; outline-offset: 3px; }
.enq-chip input:focus-visible + span { outline: 2px solid var(--star, #e9e4da); outline-offset: 2px; }
.faq-q:focus-visible { outline: 2px solid #0e0e0f; outline-offset: 2px; border-radius: 8px; }

/* ---------- 7. reduced motion: colour changes stay, movement goes ---------- */
@media (prefers-reduced-motion: reduce) {
  .as-card-arrow, .wl-more .pki, .plan-cta .pki, .plan-link .pki, .ad-more .pki, .mnav-links a .pki, .ed-related span, .ed-grid b, .ed-grid a > div, .wl-fig img, .as-thumb, .mnav-cta .pki { transition: none; transform: none !important; }
  .btn:active, .hdr-cta:active, .wl-btn:active, .mh-btn:active, .wl-cat:active, .plan-cta:active, .mon-cta:active, .nk-cta:active, .ft-cta:active { transform: none; }
}

/* ===================== Button system (29 Oct) =====================
   Large: 52 px tall, 15 px Inter 400, 26 px side padding, 12 px corners, 10 px icon gap, icon 18 px after the label.
   Small (header): 44 px, 14 px, 18 px padding, 10 px corners. Full-width buttons in drawers and the menu: label left,
   arrow right. Full-width buttons in cards: label and arrow centred. Text links: 15 px Inter 500 with a 44 px tap area.
   Icon-only controls keep their own families: carousel arrows (48 px, rounded square), closes (44 px round tint). */
.hero-ctas .btn, .mon-cta, .nk-cta, .mh-cta, .addons-cta, .ft-cta, .ft .ft-cta, .fc .fc-cta, .plan-cta, .reg-submit, .reg-done .btn {
  min-height: 52px; height: auto; padding: 0 26px; border-radius: 12px; gap: 10px; font: 400 15px/1.2 var(--f-text); letter-spacing: -0.005em; white-space: nowrap; }
.plan-cta { padding: 0 20px; }
.plan-cta .pki, .addons-cta .pki, .mnav-cta .pki, .ad-register .pki { font-size: 18px; }
.ad-register, .mnav-cta { min-height: 52px; padding: 0 20px; border-radius: 12px; font: 500 15px/1.3 var(--f-text); }
.hdr-cta { height: 44px; padding: 0 18px; border-radius: 10px; font: 400 14px/1 var(--f-text); }

/* Disabled: quiet, never hovered */
.btn:disabled, .plan-cta:disabled, .reg-submit:disabled, .ad-register:disabled, .mon-cta:disabled, .nk-cta:disabled, .mh-cta:disabled, .addons-cta:disabled, .ft-cta:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* Text links beside or under a button: same type, centred on the button, 44 px tap area without moving the line */
.ed-related { position: relative; margin: 0; font: 500 15px/1.4 var(--f-text); gap: 8px; }
.ed-related::after { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.ed-related .pki { font-size: 17px; }
.ed-plan-link { margin: 24px auto 32px; display: flex; width: max-content; }
.plan-link { font: 500 14px/1.5 var(--f-text); }
.mon-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.mon-foot .mon-cta { margin-top: 0; }
.mh-foot { flex-wrap: wrap; }
.mh-foot .mh-note { flex: 1 1 260px; }
.mh-foot .mh-cta { margin-left: auto; }
.nk-plan .ed-related { grid-column: 1 / -1; justify-self: start; margin-top: 20px; }
@media (min-width: 760px) and (max-width: 1099px) { .nk-plan .ed-related { justify-self: end; } }
@media (hover: hover) and (pointer: fine) { .ed-related:hover span { transform: translateX(3px); } .ed-grid a:hover b { transform: translateX(3px); } }
.ed-grid b { font-size: 20px; padding-top: 4px; color: rgba(14, 14, 15, .55); }

/* Icon-only closes: one family (44 px round, soft tint, no border) */
.ad-close { border: 0; background: rgba(14, 14, 15, .06); }
.reg-close { background: rgba(233, 228, 218, .1); }
@media (hover: hover) and (pointer: fine) { .ad-close:hover { background: rgba(14, 14, 15, .1); } .reg-close:hover { background: rgba(233, 228, 218, .18); } }

@media (max-width: 759px) {
  .mon-foot { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 28px; }
  .mon-foot .ed-related, .mh-foot .ed-related { align-self: flex-start; }
  .mh-foot .mh-cta { margin-left: 0; }
  .nk-plan .ed-related { margin-top: 18px; }
  .hero-ctas .btn, .mon-cta, .nk-cta, .mh-cta, .addons-cta, .ft-cta, .fc .fc-cta { min-height: 50px; }
}
