/* ===============================================================
   K-Well — Direct Billing page (Extended Health + ICBC combined)
   Rides on icbc.css for the shared atoms (hero stage, cards,
   icbc-rc staggered reveals, progress bar). This file adds only
   the EHB-specific sections.
   =============================================================== */

/* ---------------------------------------------------------------
   EHB hero — interactive benefits card (pointer tilt + tap stamp)
   --------------------------------------------------------------- */
.icbc-hero--mid .icbc-hero__scroll { display: none; }

.ehb-stage { --nx: 0; --ny: 0; --gx: 50%; --gy: 42%; }
.ehb-stage__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  perspective: 1100px;
  transform-style: preserve-3d;
}

/* idle float so the card never feels dead */
.ehb-card-wrap { transform-style: preserve-3d; position: relative; z-index: 2; }
@media (prefers-reduced-motion: no-preference) {
  .ehb-card-wrap { animation: ehb-float 5.2s ease-in-out infinite; }
}
@keyframes ehb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.ehb-card {
  position: relative;
  width: min(440px, 78vw);
  aspect-ratio: 1.586;
  border-radius: 22px;
  background:
    radial-gradient(120% 160% at 18% 8%, #faf7f1 0%, var(--kw-paper) 52%, #e7e1d4 100%);
  box-shadow:
    0 34px 70px rgba(0, 0, 0, .5),
    0 2px 0 rgba(255, 255, 255, .55) inset,
    0 -14px 34px rgba(13, 11, 8, .08) inset;
  cursor: pointer;
  overflow: hidden;
  transform: rotateY(calc(var(--nx) * 16deg)) rotateX(calc(var(--ny) * -13deg));
  transition: transform .3s cubic-bezier(.16, .84, .34, 1);
  will-change: transform;
  padding: clamp(18px, 4.6vw, 30px) clamp(20px, 5vw, 32px);
  display: flex;
  flex-direction: column;
}
@media (prefers-reduced-motion: reduce) { .ehb-card { transform: none; } }

/* moving glare follows the pointer */
.ehb-card__glare {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, 0) 52%);
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
.ehb-stage.is-live .ehb-card__glare { opacity: 1; }

/* big brush watermark */
.ehb-card__han {
  position: absolute;
  right: 8px; bottom: -26px;
  font-family: var(--kw-font-brush);
  font-size: clamp(120px, 15vw, 170px);
  line-height: 1;
  color: var(--kw-blue);
  opacity: .36;
  pointer-events: none;
  user-select: none;
}

.ehb-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--kw-font-ui);
  font-size: clamp(10px, 1.2vw, 12px);
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--kw-stone);
}
.ehb-card__top img { width: clamp(22px, 3vw, 30px); height: auto; }

.ehb-card__chip {
  width: clamp(38px, 5.4vw, 48px);
  height: clamp(28px, 4vw, 36px);
  border: 2px solid var(--kw-blue);
  border-radius: 7px;
  margin-top: clamp(16px, 3vw, 26px);
  position: relative;
  opacity: .85;
}
.ehb-card__chip::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(var(--kw-blue), var(--kw-blue)) 50% 0 / 2px 100% no-repeat,
    linear-gradient(var(--kw-blue), var(--kw-blue)) 0 50% / 100% 2px no-repeat;
  opacity: .7;
}
.ehb-card__num {
  position: relative;
  font-family: var(--kw-font-display);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: .08em;
  color: var(--kw-ink);
  margin-top: clamp(12px, 2.4vw, 20px);
}
.ehb-card__num-dots,
.ehb-card__num-tel {
  display: block;
  transition: opacity .35s ease, transform .35s cubic-bezier(.16, .84, .34, 1);
}
.ehb-card__num-tel {
  position: absolute;
  top: 0; left: 0;
  color: var(--kw-blue);
  opacity: 0;
  transform: translateY(10px);
  white-space: nowrap;
}
.ehb-card-wrap.is-hover .ehb-card__num-dots { opacity: 0; transform: translateY(-10px); }
.ehb-card-wrap.is-hover .ehb-card__num-tel { opacity: 1; transform: none; }

/* bubbled Book Now — pops off the card's lower-right corner on hover */
.ehb-card__book {
  position: absolute;
  right: -16px;
  bottom: -20px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--kw-blue);
  color: var(--kw-paper);
  font-family: var(--kw-font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(14, 79, 142, .45), 0 0 0 5px rgba(243, 239, 231, .08);
  opacity: 0;
  transform: scale(.35) translateY(14px);
  transform-origin: 80% 100%;
  pointer-events: none;
  transition: opacity .3s ease, transform .42s cubic-bezier(.26, 1.3, .38, 1);
}
.ehb-card-wrap.is-hover .ehb-card__book {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.ehb-card__book:hover { background: var(--kw-blue-deep); }
.ehb-card__book:focus-visible { outline: 2px solid var(--kw-paper); outline-offset: 3px; opacity: 1; transform: none; pointer-events: auto; }
.ehb-card__foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--kw-font-ui);
  font-size: clamp(9px, 1.1vw, 11px);
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--kw-wash);
}

/* tap-to-stamp seal */
.ehb-card__stamp {
  position: absolute;
  top: 50%; left: 62%;
  width: clamp(96px, 13vw, 122px);
  aspect-ratio: 1;
  border: 3px solid var(--kw-blue);
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--kw-blue);
  background: rgba(214, 225, 238, .25);
  transform: translate(-50%, -50%) rotate(-12deg) scale(2.4);
  opacity: 0;
  pointer-events: none;
}
.ehb-card__stamp b {
  font-family: var(--kw-font-brush);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1;
}
.ehb-card__stamp span {
  font-family: var(--kw-font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.ehb-card.is-stamped .ehb-card__stamp {
  animation: ehb-stamp .55s cubic-bezier(.16, .84, .34, 1) forwards,
             ehb-stamp-out .5s ease 1.8s forwards;
}
@keyframes ehb-stamp {
  0%   { opacity: 0; transform: translate(-50%, -50%) rotate(-2deg) scale(2.4); }
  62%  { opacity: 1; transform: translate(-50%, -50%) rotate(-13deg) scale(.94); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
}
@keyframes ehb-stamp-out {
  to { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .ehb-card.is-stamped .ehb-card__stamp { animation: none; opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
}

/* floating service tags — drift opposite the pointer for depth */
.ehb-tag {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: baseline;
  padding: 9px 16px;
  border: 1px solid rgba(243, 239, 231, .22);
  border-radius: 999px;
  background: rgba(20, 17, 13, .55);
  backdrop-filter: blur(3px);
  font-family: var(--kw-font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: rgba(243, 239, 231, .85);
  white-space: nowrap;
  transform: translate3d(calc(var(--nx) * -22px), calc(var(--ny) * -16px), 0);
  transition: transform .45s cubic-bezier(.16, .84, .34, 1);
  pointer-events: none;
}
.ehb-tag em {
  font-style: normal;
  font-weight: 500;
  font-size: .82em;
  letter-spacing: .05em;
  opacity: .55;
  margin-left: 7px;
}
.ehb-tag--1 { top: 7%; left: 2%; }
.ehb-tag--2 { top: 30%; right: -2%; transform: translate3d(calc(var(--nx) * -34px), calc(var(--ny) * -24px), 0); }
.ehb-tag--3 { bottom: 9%; left: 9%; transform: translate3d(calc(var(--nx) * -30px), calc(var(--ny) * -20px), 0); }

/* the further a service is from typical coverage, the deeper it sits:
   smaller, dimmer, blurrier, weaker parallax, and behind the card */
.ehb-tag--far { z-index: 1; background: rgba(20, 17, 13, .72); border-color: rgba(243, 239, 231, .13); }
.ehb-tag--far1 {
  top: -2%; right: 22%;
  font-size: 11.5px; padding: 8px 14px;
  color: rgba(243, 239, 231, .62);
  filter: blur(.4px);
  transform: translate3d(calc(var(--nx) * -11px), calc(var(--ny) * -8px), 0) scale(.93);
}
.ehb-tag--far2 {
  bottom: 27%; right: 6%;
  font-size: 10.5px; padding: 7px 13px;
  color: rgba(243, 239, 231, .48);
  filter: blur(.9px);
  transform: translate3d(calc(var(--nx) * -6px), calc(var(--ny) * -4px), 0) scale(.86);
}
.ehb-tag--far3 {
  top: 46%; left: -5%;
  font-size: 10px; padding: 6px 12px;
  color: rgba(243, 239, 231, .38);
  filter: blur(1.3px);
  transform: translate3d(calc(var(--nx) * -3px), calc(var(--ny) * -2px), 0) scale(.8);
}

.ehb-stage__hint {
  position: absolute;
  bottom: -7%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--kw-font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(243, 239, 231, .45);
  margin: 0;
  transition: opacity .8s ease;
  white-space: nowrap;
}
.ehb-stage.is-live .ehb-stage__hint { opacity: 0; }
@media (max-width: 1040px) {
  .ehb-stage__hint { display: none; }
  .ehb-tag--2 { right: 2%; }
  .ehb-tag--far1 { right: 12%; }
  .ehb-tag--far3 { left: 0; }
  .ehb-card__book { right: 4px; bottom: -16px; }
}

/* ---------------------------------------------------------------
   COVERAGE band (mirrors .icbc-billing rhythm)
   --------------------------------------------------------------- */
.ehb-billing { padding: 120px 0; background: var(--kw-paper-cream); }
.ehb-bill__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 820px) { .ehb-bill__grid { grid-template-columns: 1fr; } }
.ehb-billing__note {
  font-family: var(--kw-font-serif);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--kw-stone);
  margin: 36px 0 0;
  text-wrap: pretty;
}
.ehb-billing__note b { color: var(--kw-charcoal); }

/* ---------------------------------------------------------------
   INSURERS — alphabetized chips with staggered pop
   --------------------------------------------------------------- */
.ehb-insurers { background: var(--kw-paper); padding: 130px 0 110px; }
.ehb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 56px;
}
.db-chip {
  font-family: var(--kw-font-ui);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: .015em;
  color: var(--kw-charcoal);
  background: var(--kw-paper-cream);
  border: 1px solid var(--kw-bone);
  border-radius: 999px;
  padding: 11px 18px;
  white-space: nowrap;
  transition: border-color .25s ease, color .25s ease, transform .25s ease;
}
.db-chip:hover { border-color: var(--kw-blue); color: var(--kw-blue); transform: translateY(-2px); }

/* staggered chip entrance — armed by icbc.js, fired by .reveal.in */
body.icbc-armed .ehb-chips .db-chip { opacity: 0; transform: translateY(16px) scale(.96); }
body.icbc-armed .reveal.in .ehb-chips .db-chip {
  transition: opacity .55s var(--kw-ease), transform .55s var(--kw-ease);
  transition-delay: calc(min(var(--i, 0) * 26ms, 950ms));
  opacity: 1;
  transform: none;
}
body.icbc-armed .reveal.in .ehb-chips .db-chip:hover { transform: translateY(-2px); transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  body.icbc-armed .ehb-chips .db-chip { opacity: 1; transform: none; }
}

.ehb-insurers__foot {
  font-family: var(--kw-font-serif);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--kw-stone);
  margin: 44px 0 0;
  max-width: 660px;
  text-wrap: pretty;
}
.ehb-insurers__foot a { color: var(--kw-blue); text-decoration: none; border-bottom: 1px solid var(--kw-blue-soft); }
.ehb-insurers__foot a:hover { border-bottom-color: var(--kw-blue); }

/* ---------------------------------------------------------------
   RESET NOTE — December 31 callout
   --------------------------------------------------------------- */
.db-reset { background: var(--kw-paper); padding: 0 0 130px; }
.db-reset__card {
  display: flex;
  align-items: center;
  gap: 34px;
  border: 1px solid var(--kw-bone);
  border-radius: 18px;
  background: var(--kw-paper-cream);
  padding: 38px 44px;
}
.db-reset__date {
  flex: none;
  text-align: center;
  border-right: 1px solid var(--kw-bone);
  padding-right: 34px;
}
.db-reset__date b {
  display: block;
  font-family: var(--kw-font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--kw-blue);
}
.db-reset__date span {
  display: block;
  font-family: var(--kw-font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--kw-stone);
  margin-top: 10px;
}
.db-reset__h {
  font-family: var(--kw-font-display);
  font-weight: 400;
  font-size: 22px;
  color: var(--kw-ink);
  margin: 0 0 8px;
}
.db-reset__p {
  font-family: var(--kw-font-serif);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--kw-stone);
  margin: 0;
  text-wrap: pretty;
}
.db-reset__p b { color: var(--kw-charcoal); }
@media (max-width: 640px) {
  .db-reset__card { flex-direction: column; align-items: flex-start; gap: 22px; padding: 30px 26px; }
  .db-reset__date { border-right: 0; border-bottom: 1px solid var(--kw-bone); padding: 0 0 18px; text-align: left; }
}
