/*
 * HappyHrs Experience — marketing component + interaction layer
 * ------------------------------------------------------------
 * Every value here resolves to a Core Framework token (--primary, --space-*,
 * --radius-*, --shadow-*, --text-*) or an existing Bricks global variable.
 * No new hexes. Layout, spacing and colour utilities stay in Core Framework
 * classes on the elements themselves; this file owns component choreography.
 */

/* ---------------------------------------------------------------- reveal - */

@media (prefers-reduced-motion: no-preference) {
  .hh-reveal {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity .6s cubic-bezier(.32, .72, 0, 1),
                transform .6s cubic-bezier(.32, .72, 0, 1);
    transition-delay: var(--hh-delay, 0ms);
    will-change: opacity, transform;
  }
  .hh-reveal--left  { transform: translate3d(-22px, 0, 0); }
  .hh-reveal--right { transform: translate3d(22px, 0, 0); }
  .hh-reveal--zoom  { transform: scale(.94); }
  .hh-reveal.is-in  { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ announce -- */

.hh-announce {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  min-height: 44px;
  padding: var(--space-3xs) 52px;
  background: linear-gradient(100deg, var(--primary-d-1) 0%, var(--primary) 42%, var(--secondary) 100%);
  color: var(--white);
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: -.01em;
  text-align: center;
  overflow: hidden;
}
.hh-announce[hidden] { display: none; }

.hh-announce::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, var(--light-20) 50%, transparent 80%);
  transform: translateX(-100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .hh-announce::after { animation: hh-sheen 7s ease-in-out 2s infinite; }
}
@keyframes hh-sheen {
  0%, 65%   { transform: translateX(-100%); }
  85%, 100% { transform: translateX(100%); }
}

.hh-announce__quip {
  display: inline-block;
  transition: opacity .35s ease, transform .35s ease;
}
.hh-announce__quip.is-swapping {
  opacity: 0;
  transform: translateY(-6px);
}

.hh-announce__link {
  color: var(--white);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: var(--light-50);
  white-space: nowrap;
  transition: text-decoration-color .2s ease;
}
.hh-announce__link:hover { text-decoration-color: var(--white); }

.hh-announce__close {
  position: absolute;
  inset-block: 0;
  inset-inline-end: var(--space-2xs);
  display: grid;
  place-items: center;
  width: 44px;
  border: 0;
  background: none;
  color: var(--light-70);
  font-size: var(--text-m);
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease;
}
.hh-announce__close:hover { color: var(--white); }

/* --------------------------------------------------------------- badge -- */

.hh-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  align-self: flex-start;
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-l-4);
  color: var(--primary-dark);
  font-size: var(--text-s);
  font-weight: 700;
  letter-spacing: -.01em;
  border: 1px solid var(--primary-20);
}
.hh-eyebrow-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--primary);
  flex: none;
}
/* Named hh-dot-pulse, not hh-pulse: the About page's .hh-shape--pulse already
   owns that keyframe name. */
@media (prefers-reduced-motion: no-preference) {
  .hh-eyebrow-pill__dot { animation: hh-dot-pulse 2.4s ease-in-out infinite; }
}
@keyframes hh-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-40); }
  60%      { box-shadow: 0 0 0 7px var(--primary-5); }
}

/* ------------------------------------------------------------ pricebox -- */

.hh-pricebox {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  align-self: flex-start;
  width: fit-content;
  max-width: min(100%, 48rem);
  padding: var(--space-2xs) var(--space-s) var(--space-2xs) var(--space-2xs);
  border: 2px solid var(--primary-30);
  border-radius: var(--radius-l);
  background:
    radial-gradient(120% 160% at 0% 0%, var(--primary-10) 0%, transparent 60%),
    var(--white);
  box-shadow: var(--shadow-xs);
}
.hh-pricebox__amount {
  display: grid;
  place-items: center;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-m);
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-d-1) 100%);
  color: var(--white);
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hh-pricebox__body  { display: grid; gap: 2px; text-align: left; }
.hh-pricebox__label {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary-dark);
}
.hh-pricebox__note {
  font-size: var(--text-s);
  color: var(--text-body);
  line-height: 1.35;
}

/* --------------------------------------------------------------- trust -- */

.hh-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-s);
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: var(--text-s);
  color: var(--text-body);
}
.hh-trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hh-trust li::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: var(--radius-full);
  background: var(--primary-20);
  box-shadow: inset 0 0 0 2px var(--primary-40);
}

/* -------------------------------------------------------- floating card - */

/* Overlay: drop this inside any positioned product mock. */
.hh-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hh-floater {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-m);
  background: var(--white);
  box-shadow: 0 1px 2px var(--dark-5), 0 18px 40px -18px var(--dark-30);
  font-size: var(--text-s);
  font-weight: 700;
  color: var(--text-title);
  white-space: nowrap;
  transition: transform .35s cubic-bezier(.32, .72, 0, 1), box-shadow .35s ease;
}
.hh-floater__dot {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--white);
}
.hh-floater__dot--clinical    { background: var(--primary); }
.hh-floater__dot--supervision { background: var(--secondary); }
.hh-floater__sub {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-body);
}

.hh-floater--a { inset-block-start: 8%; inset-inline-start: -4%; transform: rotate(-2deg); }
.hh-floater--b { inset-block-end: 8%;   inset-inline-end: -3%;   transform: rotate(2deg); }
:where(.hh-combo, .hh-mac, .hh-floaters__host):hover .hh-floater {
  transform: rotate(0deg) translateY(-4px);
}

@media (max-width: 767px) {
  .hh-floater--a  { inset-inline-start: 0; }
  .hh-floater--b  { inset-inline-end: 0; }
  .hh-floater__sub { display: none; }
}

/* ---------------------------------------------------------------- band -- */

.hh-band {
  background: linear-gradient(100deg, var(--primary) 0%, var(--primary-d-1) 55%, var(--secondary-d-1) 100%);
  color: var(--white);
  overflow: hidden;
}
.hh-band__item  { display: grid; gap: 4px; }
.hh-band__num {
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.hh-band__label {
  font-size: var(--text-s);
  font-weight: 500;
  color: var(--light-80);
}

/* ------------------------------------------------------------------ vs -- */

.hh-vs__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.hh-vs__wrap { width: 100%; }

.hh-vs {
  width: 100%;
  max-width: 90rem;
  margin-inline: auto;
  min-width: 48rem;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--dark-5), var(--shadow-m);
  font-size: var(--text-m);
}
.hh-vs th,
.hh-vs td {
  padding: var(--space-2xs) var(--space-xs);
  text-align: left;
  border-bottom: 1px solid var(--dark-5);
}
.hh-vs tbody tr:last-child th,
.hh-vs tbody tr:last-child td { border-bottom: 0; }

.hh-vs thead th {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-body);
  background: var(--bg-body);
  padding-block: var(--space-xs);
}
.hh-vs tbody th {
  font-weight: 600;
  color: var(--text-title);
}
.hh-vs td { text-align: center; width: 8.5em; }

.hh-vs__col--win {
  background: var(--primary-5);
  box-shadow: inset 2px 0 0 var(--primary-20), inset -2px 0 0 var(--primary-20);
  color: var(--primary-dark);
  font-weight: 700;
}
.hh-vs thead .hh-vs__col--win {
  background: var(--primary-10);
  color: var(--primary-dark);
}
.hh-vs tbody tr { transition: background-color .18s ease; }
.hh-vs tbody tr:hover { background: var(--dark-5); }

.hh-vs__mark { font-size: var(--text-l); line-height: 1; }
.hh-vs__mark--yes { color: var(--primary); }
.hh-vs__mark--no  { color: var(--dark-30); }

.hh-joke-btn { margin-top: var(--space-2xs); }

.hh-vs__punchline {
  display: block;
  margin-top: var(--space-2xs);
  font-size: var(--text-s);
  font-style: italic;
  color: var(--text-body);
}

/* --------------------------------------------------------------- steps -- */

.hh-step { position: relative; }
.hh-step__num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-m);
  font-size: var(--text-l);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.03em;
  box-shadow: 0 10px 22px -12px var(--dark-50);
}
.hh-step--1 .hh-step__num { background: linear-gradient(155deg, var(--primary-l-1),   var(--primary-d-1)); }
.hh-step--2 .hh-step__num { background: linear-gradient(155deg, var(--secondary-l-1), var(--secondary-d-1)); }
.hh-step--3 .hh-step__num { background: linear-gradient(155deg, var(--tertiary-l-1),  var(--tertiary-d-1)); }

/* ---------------------------------------------------------------- plan -- */

.hh-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-m);
  border-radius: var(--radius-l);
  background: var(--white);
  box-shadow: 0 0 0 1px var(--dark-5), 0 1px 2px var(--dark-5), 0 24px 48px -32px var(--dark-40);
  transition: transform .3s cubic-bezier(.32, .72, 0, 1), box-shadow .3s ease;
}
@media (hover: hover) {
  .hh-plan:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 0 1px var(--dark-10), 0 1px 2px var(--dark-5), 0 34px 60px -30px var(--dark-40);
  }
}
.hh-plan--featured { box-shadow: 0 0 0 2px var(--primary-40), 0 26px 54px -28px var(--primary-50); }

.hh-plan__ribbon {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(100deg, var(--primary), var(--primary-d-1));
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 18px -8px var(--primary-70);
}

.hh-plan__role {
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hh-plan--intern       .hh-plan__role { color: var(--primary-dark); }
.hh-plan--supervisor   .hh-plan__role { color: var(--secondary-dark); }
.hh-plan--organization .hh-plan__role { color: var(--tertiary-dark); }

.hh-plan__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: var(--text-3xl);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--text-title);
  font-variant-numeric: tabular-nums;
}
.hh-plan__cadence {
  font-size: var(--text-s);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-body);
}
.hh-plan__note {
  font-size: var(--text-s);
  color: var(--text-body);
  line-height: 1.45;
}
.hh-plan__list {
  display: grid;
  gap: var(--space-3xs);
  margin: var(--space-2xs) 0 0;
  padding: var(--space-2xs) 0 0;
  border-top: 1px solid var(--dark-5);
  list-style: none;
  font-size: var(--text-s);
  color: var(--text-body);
}
.hh-plan__list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--space-3xs);
  align-items: start;
  line-height: 1.45;
}
.hh-plan__list li::before {
  content: "\2713";
  font-weight: 900;
  line-height: 1.45;
}
.hh-plan--intern       .hh-plan__list li::before { color: var(--primary); }
.hh-plan--supervisor   .hh-plan__list li::before { color: var(--secondary); }
.hh-plan--organization .hh-plan__list li::before { color: var(--tertiary); }

.hh-plan__spacer { flex: 1 1 auto; min-height: var(--space-2xs); }

.hh-plan__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px var(--space-s);
  border-radius: var(--radius-s);
  font-size: var(--text-m);
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--white);
  transition: filter .15s ease, transform .15s ease;
}
.hh-plan__cta:hover  { filter: brightness(1.07); }
.hh-plan__cta:active { opacity: .7; }
.hh-plan--intern       .hh-plan__cta { background: linear-gradient(100deg, var(--primary),   var(--primary-d-1)); }
.hh-plan--supervisor   .hh-plan__cta { background: linear-gradient(100deg, var(--secondary), var(--secondary-d-1)); }
.hh-plan--organization .hh-plan__cta { background: linear-gradient(100deg, var(--tertiary),  var(--tertiary-d-1)); }

/* ----------------------------------------------------------- sustainer -- */

.hh-sustainer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-m);
  border-radius: var(--radius-l);
  background: linear-gradient(100deg, var(--primary-d-1) 0%, var(--secondary) 100%);
  color: var(--white);
  overflow: hidden;
}
.hh-sustainer__tile {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--radius-m);
  background: var(--light-20);
  backdrop-filter: blur(10px);
  font-size: var(--text-xl);
}
.hh-sustainer__body  { flex: 1 1 18em; display: grid; gap: 4px; }
.hh-sustainer__title { font-size: var(--text-l); font-weight: 800; letter-spacing: -.02em; }
.hh-sustainer__text  { font-size: var(--text-s); color: var(--light-80); line-height: 1.45; }

/* ---------------------------------------------------------------- tilt -- */

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hh-tilt {
    transform: perspective(900px)
               rotateX(var(--hh-rx, 0deg))
               rotateY(var(--hh-ry, 0deg))
               translateZ(0);
    transition: transform .25s cubic-bezier(.32, .72, 0, 1);
  }
  .hh-tilt.is-tilting { transition: transform .08s linear; }
}

/* ------------------------------------------------------------ spotlight - */

.hh-spotlight { position: relative; isolation: isolate; }
.hh-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--hh-mx, 50%) var(--hh-my, 50%), var(--primary-10), transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .hh-spotlight:hover::before { opacity: 1; }
}

/* --------------------------------------------------------- header stuck - */

.hh-header,
header.brx-header {
  transition: box-shadow .25s ease, backdrop-filter .25s ease, background-color .25s ease;
}
body.hh-header-stuck .hh-header,
body.hh-header-stuck header.brx-header {
  box-shadow: 0 1px 0 var(--dark-5), 0 10px 30px -22px var(--dark-50);
  backdrop-filter: saturate(1.6) blur(12px);
}

/* ------------------------------------------------------------- confetti - */

.hh-confetti {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
}
.hh-confetti i {
  position: absolute;
  inset-block-start: -12px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: hh-fall var(--hh-dur, 2.6s) cubic-bezier(.25, .6, .4, 1) var(--hh-delay, 0ms) forwards;
}
@keyframes hh-fall {
  0%   { opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { opacity: 0; transform: translate3d(var(--hh-dx, 0px), 104vh, 0) rotate(var(--hh-spin, 540deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .hh-confetti { display: none; }
}

/* --------------------------------------------------------------- toast -- */

.hh-toast {
  position: fixed;
  inset-block-end: max(var(--space-m), env(safe-area-inset-bottom));
  inset-inline-start: 50%;
  z-index: 10001;
  max-width: min(92vw, 40rem);
  padding: 12px var(--space-s);
  border-radius: var(--radius-m);
  background: var(--dark-90);
  color: var(--white);
  font-size: var(--text-s);
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-l);
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s cubic-bezier(.32, .72, 0, 1);
}
.hh-toast.is-in { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------- spreadsheet mode (a joke) - */
/*
 * Deliberately, temporarily off-brand. Toggled for a few seconds by the
 * "Try spreadsheet mode" control in the comparison section, then removed.
 * This is the one place the design system is broken on purpose.
 */
html.hh-spreadsheet-mode body {
  font-family: "Times New Roman", Times, serif !important;
  background:
    repeating-linear-gradient(0deg,  var(--dark-10) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--dark-10) 0 1px, transparent 1px 92px),
    var(--light) !important;
  filter: saturate(.15);
}
html.hh-spreadsheet-mode body * {
  border-radius: 0 !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
}
html.hh-spreadsheet-mode img,
html.hh-spreadsheet-mode video { filter: grayscale(1) contrast(.9); }

.hh-joke-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px var(--space-s);
  border: 1.5px dashed var(--dark-20);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--text-body);
  font-size: var(--text-s);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.hh-joke-btn:hover {
  border-color: var(--primary-50);
  color: var(--primary-dark);
  background: var(--primary-5);
}

/* ---------------------------------------------------------------- a11y -- */

/* The design system asks for 44px minimum targets on touch. These three are
   inline links that are otherwise text-height. */
@media (hover: none) {
  .hh-announce__link,
  .hh-footer-nav-fixed a,
  .border-tabs__menu-item {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

:where(.hh-plan__cta, .hh-joke-btn, .hh-announce__close, .hh-announce__link):focus-visible {
  outline: 2px solid var(--primary-d-2);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .hh-announce::after,
  .hh-eyebrow-pill__dot { animation: none !important; }
  :where(.hh-combo, .hh-mac, .hh-floaters__host):hover .hh-floater { transform: none; }
}
