/*
 * Helo Cash additions.
 *
 * Everything here uses the captured site's own variables for spacing and its
 * own classes for type and colour, so the new sections sit on the same grid
 * and scale the same way at every breakpoint. No new tokens, no new palette.
 */

/*
 * The language switcher. Every locale was deleted, so it was a dropdown with
 * one entry and nowhere to go. The markup is stripped during the rebrand, but
 * the app renders it again on hydration from the locale list compiled into its
 * bundle, so it also has to be hidden here.
 */
._dropdown._language-select,
.language-selector,
._language-menu-wrapper {
  display: none !important;
}

/* --------------------------------------------------------------------------
 * Brand mark
 * -------------------------------------------------------------------------- */

/*
 * The logo replaces the drawn wordmark inside the nav's existing slot, so it
 * inherits the height the navbar already sets and needs nothing else.
 */
.cc-logo {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
}

/*
 * The slot was sized for a wordmark, which reads fine at 24 to 32 pixels. The
 * mark is a drawn object with lettering inside it and turns to mush at that
 * height, so it gets its own scale. The navbar is absolutely positioned over
 * the hero, so a taller mark does not push anything down.
 */
._navbar ._wordmark:has(.cc-logo) {
  height: clamp(34px, 2.2vw + 22px, 52px);
  width: auto;
}

/* --------------------------------------------------------------------------
 * X link
 * -------------------------------------------------------------------------- */

.cc-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: currentColor;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.cc-x:hover {
  opacity: 0.7;
}

.cc-x svg {
  display: block;
}

/* In the navbar it sits beside the buttons, so it borrows their outline. */
.cc-x-nav {
  border: 1px solid currentColor;
  margin-left: 4px;
}

.cc-footer-social {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--24-16);
}

/*
 * At phone width three text buttons and an icon do not fit beside the mark,
 * so the navbar keeps only the X and the pages are reached from the menu at
 * the bottom of the screen, which is where the site puts navigation anyway.
 */
@media (max-width: 743px) {
  ._navbar .ctas > a:not(.cc-x) {
    display: none;
  }
}

.cc-x-handle {
  font-size: 0.9em;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
 * Sections
 * -------------------------------------------------------------------------- */

.cc-section {
  padding-top: var(--120-64);
  padding-bottom: var(--120-64);
}

.cc-eyebrow {
  margin-bottom: var(--16-12);
}

.cc-section-title {
  margin-bottom: var(--60-16);
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
 * How it works
 * -------------------------------------------------------------------------- */

.cc-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--48-32) var(--grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cc-step {
  border-top: 1px solid currentColor;
  padding-top: var(--24-16);
}

.cc-step-number {
  display: block;
  margin-bottom: var(--16-12);
}

.cc-step-title {
  margin-bottom: var(--12-8);
}

/* --------------------------------------------------------------------------
 * FAQ
 * -------------------------------------------------------------------------- */

.cc-faq {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid currentColor;
}

.cc-faq-item {
  border-bottom: 1px solid currentColor;
}

.cc-faq-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--24-16);
  width: 100%;
  padding: var(--24-16) 0;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cc-faq-icon {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.cc-faq-icon::before,
.cc-faq-icon::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease;
}

.cc-faq-icon::after {
  transform: rotate(90deg);
}

.cc-faq-item[data-cc-faq-item='open'] .cc-faq-icon::after {
  transform: rotate(0deg);
}

.cc-faq-panel {
  overflow: hidden;
}

.cc-faq-panel > p {
  padding-bottom: var(--24-16);
  max-width: 62ch;
}

/* --------------------------------------------------------------------------
 * Closing call to action
 * -------------------------------------------------------------------------- */

.cc-cta-inner {
  text-align: center;
  margin-inline: auto;
}

.cc-cta-body {
  margin: var(--16-12) auto var(--32-16);
  max-width: 48ch;
}

/*
 * The site's own button is a Vue component with split-text spans and a hover
 * tween, so it cannot be written as plain markup. This is the same shape,
 * radius and weight, built from the site's variables.
 */
.cc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--32-16);
  border-radius: 999px;
  background: #fff;
  color: #f73b20;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.cc-button:hover {
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .cc-faq-icon::before,
  .cc-faq-icon::after,
  .cc-button {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
 * Brand mark, before the wordmark
 * -------------------------------------------------------------------------- */

/*
 * The mark is the X profile picture with its background removed. It is drawn
 * as a mask filled with currentColor, so it always matches the wordmark next
 * to it: white over the hero, orange in the footer.
 */
.hc-mark {
  display: block;
  flex: none;
  aspect-ratio: 255 / 223;
  background: currentColor;
  -webkit-mask: url(/brand/mark.png) center / contain no-repeat;
  mask: url(/brand/mark.png) center / contain no-repeat;
}

._navbar .homepage-link.hc-has-mark {
  display: flex;
  align-items: center;
  gap: var(--12-8);
  color: #fff;
}

._navbar .homepage-link .hc-mark {
  height: calc(var(--32-24) * 1.15);
}

/*
 * In the footer the wordmark runs edge to edge, so the mark takes a column
 * sized to the letters' height: 0.1996 is (415 / 2377) x (255 / 223).
 */
footer .wordmark.hc-has-mark {
  display: grid;
  grid-template-columns: 19.96fr 100fr;
  column-gap: var(--grid-gap);
  align-items: end;
  color: #f73b20;
}

footer .wordmark .hc-mark {
  width: 100%;
  height: auto;
}

/*
 * At phone width the site hides the last link in the navbar's buttons, and the
 * X link is the last one. It stays: it is the only nav button left there.
 */
._navbar .ctas a.cc-x {
  display: inline-flex !important;
}
