/* ============================================================
   Hearthstone Mortgages — shared UI components
   Production CSS port of the design-system React components
   (Badge, Card, Input, ServiceCard, AdviserCard, ReviewCard,
   FaqAccordion, CtaBand, TrustStrip). Button lives in extras.css.
   Values match _ds_bundle.js exactly.
   ============================================================ */

/* ------------------------ Section heading ---------------------- */
.hm-sh { text-align: center; margin-bottom: 3rem; }
.hm-sh--left { text-align: left; }
.hm-sh__title { font-family: var(--font-heading); font-weight: 900; text-transform: uppercase; letter-spacing: -0.025em; font-size: var(--hm-h2); color: var(--hm-ink); margin: 0; line-height: 1; }
.hm-sh--light .hm-sh__title { color: #fff; }
.hm-sh__bar { display: block; height: 4px; width: 0; margin: 1.1rem auto 0; background: var(--hm-gold-500); border-radius: var(--radius-pill); transition: width var(--dur-slow) var(--ease-out); }
.hm-sh--left .hm-sh__bar { margin-inline: 0; }
.hm-sh--light .hm-sh__bar { background: var(--hm-gold-500); }
.hm-sh.is-revealed .hm-sh__bar { width: 64px; }
@media (prefers-reduced-motion: reduce) { .hm-sh__bar { width: 64px; transition: none; } }

/* ---------------------------- Badge ---------------------------- */
.hm-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-heading); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; border-radius: var(--radius-pill); line-height: 1;
  padding: 0.38rem 0.85rem; font-size: 0.72rem; border: none;
}
.hm-badge svg { display: inline-flex; }
.hm-badge--sm { padding: 0.25rem 0.65rem; font-size: 0.65rem; gap: 0.28rem; }
.hm-badge--lg { padding: 0.5rem 1.1rem; font-size: 0.82rem; gap: 0.4rem; }
.hm-badge--blue        { background: var(--hm-blue-600); color: #fff; }
.hm-badge--gold        { background: var(--hm-gold-500); color: var(--hm-ink); }
.hm-badge--navy        { background: var(--hm-blue-950); color: var(--hm-gold-500); }
.hm-badge--warm        { background: var(--hm-cream-100); color: var(--hm-ink); border: 1.5px solid var(--hm-cream-200); }
.hm-badge--success     { background: var(--hm-success); color: #fff; }
.hm-badge--warning     { background: var(--hm-warning); color: #fff; }
.hm-badge--outline     { background: transparent; color: var(--hm-blue-600); border: 2px solid var(--hm-blue-600); }
.hm-badge--outline-gold{ background: transparent; color: var(--hm-gold-600); border: 2px solid var(--hm-gold-500); }

/* ---------------------------- Card ----------------------------- */
.hm-card {
  border-radius: var(--radius-xl); padding: 2rem;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.hm-card--pad-sm { padding: 1rem; }
.hm-card--pad-md { padding: 1.5rem; }
.hm-card--pad-lg { padding: 2rem; }
.hm-card--pad-xl { padding: 2.5rem; }
.hm-card--elevated { background: var(--hm-white); border: none; box-shadow: var(--shadow-md); }
.hm-card--outline  { background: var(--hm-white); border: 1.5px solid var(--hm-cream-200); box-shadow: var(--shadow-sm); }
.hm-card--warm     { background: var(--hm-cream); border: 1.5px solid var(--hm-cream-200); box-shadow: none; }
.hm-card--tint     { background: var(--hm-blue-50); border: 1.5px solid var(--hm-blue-100); box-shadow: none; }
.hm-card--blue     { background: var(--hm-blue-950); border: none; box-shadow: var(--shadow-md); color: var(--hm-blue-100); }
.hm-card--gold     { background: var(--hm-gold-500); border: none; box-shadow: var(--shadow-gold); color: var(--hm-ink); }
.hm-card--accent-gold { border-top: 5px solid var(--hm-gold-500); }
.hm-card--accent-blue { border-top: 5px solid var(--hm-blue-600); }
.hm-card--hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .hm-card--hover:hover { transform: none; } }

/* ---------------------------- Input ---------------------------- */
.hm-field { display: flex; flex-direction: column; gap: 0.4rem; }
.hm-field__label { font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; color: var(--hm-slate-800); }
.hm-field__req { color: var(--hm-error); }
.hm-field__control,
.hm-field input, .hm-field textarea, .hm-field select {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--hm-ink);
  background: var(--hm-white); border: 1.5px solid var(--hm-slate-300);
  border-radius: var(--radius-md); padding: 0.7rem 0.85rem; line-height: 1.5;
  box-sizing: border-box; transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.hm-field input:focus, .hm-field textarea:focus, .hm-field select:focus {
  outline: none; border-color: var(--hm-blue-600); box-shadow: 0 0 0 3px var(--hm-blue-100);
}
.hm-field textarea { resize: vertical; }
.hm-field[data-error] input, .hm-field[data-error] textarea { border-color: var(--hm-error); }
.hm-field__hint { font-size: 0.78rem; color: var(--hm-slate-600); }
.hm-field__error { font-size: 0.78rem; color: var(--hm-error); font-weight: 600; }
/* Prefix-chip wrapper (calculator inputs: £ % yr) */
.hm-field__wrap { position: relative; display: flex; align-items: stretch; }
.hm-field__prefix {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem;
  padding: 0 0.85rem; font-family: var(--font-heading); font-weight: 800; font-size: 0.9rem;
  color: var(--hm-slate-600); background: var(--hm-blue-50);
  border: 1.5px solid var(--hm-slate-300); border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.hm-field__wrap input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ------------------------- ServiceCard ------------------------- */
.hm-service-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--hm-white); border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-md); height: 100%; box-sizing: border-box;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.hm-service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); }
.hm-service-card__band { padding: 1.5rem 1.6rem 1.35rem; display: flex; flex-direction: column; gap: 0.9rem; min-height: 100px; position: relative; }
.hm-service-card__band--blue { background: var(--hm-blue-600); --hm-band-text: #fff; }
.hm-service-card__band--navy { background: var(--hm-blue-950); --hm-band-text: var(--hm-gold-500); }
.hm-service-card__band--gold { background: var(--hm-gold-500); --hm-band-text: var(--hm-ink); }
.hm-service-card__tag {
  position: absolute; top: 1.1rem; right: 1.2rem;
  font-family: var(--font-heading); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.58rem; line-height: 1;
  color: var(--hm-band-text); background: rgba(255,255,255,0.18);
  border-radius: var(--radius-pill); padding: 0.3rem 0.6rem;
}
.hm-service-card__band--gold .hm-service-card__tag { background: rgba(6,34,60,0.14); }
.hm-service-card__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: var(--radius-md); background: rgba(255,255,255,0.15); color: var(--hm-band-text);
}
.hm-service-card__band--gold .hm-service-card__icon { background: rgba(6,34,60,0.12); }
.hm-service-card__category { font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; color: var(--hm-band-text); opacity: 0.8; }
.hm-service-card__body { padding: 1.4rem 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.hm-service-card__title { font-family: var(--font-heading); font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; font-size: 1.2rem; line-height: 1.1; color: var(--hm-ink); margin: 0; }
.hm-service-card__excerpt { font-family: var(--font-body); font-size: 0.88rem; line-height: 1.6; color: var(--hm-slate-600); margin: 0; }
.hm-service-card__link { margin-top: auto; padding-top: 0.75rem; font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; color: var(--hm-blue-600); display: inline-flex; align-items: center; gap: 0.4rem; }
.hm-service-card__arrow { display: inline-block; transition: transform 180ms var(--ease-out); }
.hm-service-card:hover .hm-service-card__arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) { .hm-service-card:hover { transform: none; } .hm-service-card:hover .hm-service-card__arrow { transform: none; } }

/* ------------------------- AdviserCard ------------------------- */
.hm-adviser-card {
  display: flex; flex-direction: column; background: var(--hm-white);
  border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md);
  height: 100%; box-sizing: border-box; text-align: left; border: none; cursor: pointer; padding: 0; width: 100%;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.hm-adviser-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.hm-adviser-card__photo { height: 220px; background: var(--hm-blue-950); overflow: hidden; position: relative; flex-shrink: 0; }
.hm-adviser-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.hm-adviser-card__body { padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.hm-adviser-card__name { font-family: var(--font-heading); font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; font-size: 1.1rem; color: var(--hm-ink); margin: 0 0 0.3rem; line-height: 1.1; }
.hm-adviser-card__role { font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; color: var(--hm-blue-600); margin: 0; line-height: 1.3; }
.hm-adviser-card__creds { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hm-adviser-card__cred { font-family: var(--font-heading); font-weight: 800; font-size: 0.62rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--hm-ink); background: var(--hm-gold-500); border-radius: var(--radius-pill); padding: 0.22rem 0.55rem; line-height: 1; }
.hm-adviser-card__specialism { font-family: var(--font-body); font-size: 0.82rem; line-height: 1.55; color: var(--hm-slate-600); margin: 0; }
.hm-adviser-card__foot { margin-top: auto; padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; }
.hm-adviser-card__meta { font-family: var(--font-body); font-size: 0.7rem; color: var(--hm-slate-400); }
.hm-adviser-card__cta { font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; color: var(--hm-blue-600); text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; }
@media (prefers-reduced-motion: reduce) { .hm-adviser-card:hover { transform: none; } }

/* ------------------------- ReviewCard -------------------------- */
.hm-review-card {
  margin: 0; display: flex; flex-direction: column; gap: 1rem;
  background: var(--hm-warm-white); border: 1.5px solid var(--hm-cream-200);
  border-radius: var(--radius-xl); padding: 1.75rem; box-shadow: var(--shadow-sm);
  height: 100%; box-sizing: border-box; position: relative; overflow: hidden;
}
.hm-review-card__mark { position: absolute; top: 0.5rem; right: 1.25rem; font-family: Georgia, serif; font-size: 7rem; line-height: 1; color: var(--hm-gold-200); pointer-events: none; user-select: none; }
.hm-review-card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.hm-review-card__stars { display: flex; gap: 0.15rem; font-size: 1.05rem; line-height: 1; color: var(--hm-gold-500); }
.hm-review-card__stars .is-empty { color: var(--hm-cream-200); }
.hm-review-card__platform { font-family: var(--font-heading); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6rem; color: var(--hm-slate-400); }
.hm-review-card__quote { margin: 0; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.65; color: var(--hm-slate-700); flex: 1; position: relative; z-index: 1; }
.hm-review-card__caption { padding-top: 0.75rem; border-top: 1.5px solid var(--hm-cream-200); display: flex; flex-direction: column; gap: 0.15rem; }
.hm-review-card__author { font-family: var(--font-heading); font-weight: 900; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.8rem; color: var(--hm-ink); }
.hm-review-card__meta { font-family: var(--font-body); font-size: 0.72rem; color: var(--hm-slate-400); }

/* ------------------------ FaqAccordion ------------------------- */
.hm-faq { display: flex; flex-direction: column; gap: 0.65rem; }
.hm-faq__item { border: 1px solid var(--hm-slate-200); border-radius: var(--radius-md); background: var(--hm-white); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow var(--dur-base) var(--ease-out); }
.hm-faq__item[open] { box-shadow: var(--shadow-md); }
.hm-faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  text-align: left; cursor: pointer; padding: 1.05rem 1.25rem; list-style: none;
  font-family: var(--font-heading); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.01em; font-size: 0.95rem; color: var(--hm-ink);
}
.hm-faq__q::-webkit-details-marker { display: none; }
.hm-faq__toggle {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--hm-blue-100); color: var(--hm-blue-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.hm-faq__item[open] .hm-faq__toggle { background: var(--hm-gold-500); color: var(--hm-blue-950); }
.hm-faq__toggle::after { content: "+"; }
.hm-faq__item[open] .hm-faq__toggle::after { content: "\2013"; }
.hm-faq__a { padding: 0 1.25rem 1.2rem; font-family: var(--font-body); font-size: 0.95rem; line-height: 1.65; color: var(--hm-slate-700); }

/* --------------------------- CtaBand --------------------------- */
.hm-cta-band {
  background: var(--hm-gradient-hero); border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 5vw, 4rem); color: var(--hm-white);
  text-align: center; display: flex; flex-direction: column; align-items: center;
  gap: 1.25rem; position: relative; overflow: hidden;
}
.hm-cta-band--start { text-align: left; align-items: flex-start; }
.hm-cta-band::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 5px; background: var(--hm-gradient-gold); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.hm-cta-band > * { position: relative; z-index: 1; }
.hm-cta-band__title { font-family: var(--font-heading); font-weight: 900; text-transform: uppercase; letter-spacing: -0.02em; font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1; color: var(--hm-white); margin: 0; max-width: 18ch; }
.hm-cta-band__body { font-family: var(--font-body); font-size: 1.05rem; line-height: 1.6; color: var(--hm-blue-200); margin: 0; max-width: 52ch; }
.hm-cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 0.5rem; justify-content: center; }
.hm-cta-band--start .hm-cta-band__actions { justify-content: flex-start; }
.hm-cta-band__phone { font-family: var(--font-body); font-size: 0.85rem; color: rgba(255,255,255,0.6); margin: 0.25rem 0 0; }
.hm-cta-band__phone a { color: var(--hm-gold-500); font-weight: 700; text-decoration: none; }

/* ------------------------- TrustStrip -------------------------- */
.hm-trust-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem; padding: 0.25rem; }
.hm-trust-strip__item {
  display: inline-flex; align-items: center; gap: 0.5rem; background: var(--hm-blue-950); color: #fff;
  font-family: var(--font-heading); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 0.72rem; border-radius: var(--radius-pill); padding: 0.55rem 1rem; line-height: 1; white-space: nowrap;
}
.hm-trust-strip__item svg { color: var(--hm-gold-500); display: inline-flex; }
.hm-trust-strip--dark .hm-trust-strip__item { background: var(--hm-gold-500); color: var(--hm-ink); }
.hm-trust-strip--dark .hm-trust-strip__item svg { color: var(--hm-ink); }
