/* Preview-only banner / header treatment matching
   /workspace/design/ads/moneyinorder/variant-A-1200x630.png
   The wave JPEG itself is never modified; contrast is improved with a
   CSS scrim overlay and deeper type colors only. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/PlusJakartaSans-latin.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Site-wide header wave (all public pages) ---------- */
.glow.hero-waves {
  position: absolute;
  inset: 0 0 auto 0;
  height: 820px;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
  background-color: #f4f8f8;
  background-image: url("/hero-waves-2880x1600.jpg");
  background-size: cover;
  background-position: 48% 28%;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(#000 0%, #000 58%, rgba(0,0,0,.55) 78%, transparent);
  mask-image: linear-gradient(#000 0%, #000 58%, rgba(0,0,0,.55) 78%, transparent);
}
.glow.hero-waves::after {
  /* Lighter ice scrim so the emerald wave stays visible; JPEG is unchanged */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(244, 248, 248, 0.42) 0%,
    rgba(244, 248, 248, 0.22) 36%,
    rgba(244, 248, 248, 0.10) 62%,
    rgba(244, 248, 248, 0.55) 88%,
    #f4f8f8 100%
  );
  pointer-events: none;
}
.glow.hero-waves span { display: none; }

/* Keep page copy and forms above the decorative wave band. */
main { position: relative; z-index: 1; }

/* Homepage: the hero carries the full-bleed wave, so hide the short header band. */
body:has(.hero) .glow.hero-waves { display: none; }

.nav {
  position: relative;
  z-index: 30;
}

/* Crisp nav type on the wave */
.nav .brand { color: #0c1018; }
.nav-links a { color: #14171f; }
.nav .btn-outline {
  background: rgba(255, 255, 255, 0.88);
  color: #0c1018;
  border-color: #1f2a5c;
}
.nav .btn-solid {
  box-shadow: 0 1px 0 rgba(1, 82, 112, 0.28);
}

/* Inner-page titles and intro copy sitting on the header wave */
.doc h1,
.pricing-hero h1,
.auth-card h1 {
  color: #0c1018;
  text-shadow: 0 1px 0 rgba(244, 248, 248, 0.95), 0 0 24px rgba(244, 248, 248, 0.9);
}
.doc .updated,
.pricing-hero .section-head p:not(.eyebrow),
.auth-card .sub {
  color: #2e3640;
}

/* ---------- Homepage hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  top: -96px;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -2;
  pointer-events: none;
  background-color: #f4f8f8;
  background-image: url("/hero-waves-2880x1600.jpg");
  background-size: cover;
  background-position: 48% 42%;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(#000 0%, #000 calc(100% - 88px), transparent);
  mask-image: linear-gradient(#000 0%, #000 calc(100% - 88px), transparent);
}

/* Extra left/top scrim behind hero copy only. Does not alter the JPEG. */
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -48px -56px -36px -64px;
  border-radius: 36px;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(244, 248, 248, 0.88) 0%,
    rgba(244, 248, 248, 0.72) 48%,
    rgba(244, 248, 248, 0.36) 76%,
    rgba(244, 248, 248, 0.08) 90%,
    rgba(244, 248, 248, 0) 100%
  );
}

.hero h1 {
  font-family: "Plus Jakarta Sans", var(--font-display), sans-serif;
  font-weight: 800;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #0c1018;
  max-width: none;
  text-shadow: 0 1px 0 rgba(244, 248, 248, 0.9), 0 0 28px rgba(244, 248, 248, 0.85);
}

.hero h1 .hero-line { display: block; }

.hero-accent {
  display: block;
  width: 66px;
  height: 4px;
  margin-top: clamp(16px, 2.2vh, 22px);
  border-radius: 2px;
  background: #014a68;
}

.hero .lede {
  margin-top: clamp(14px, 2vh, 20px);
  font-family: "Plus Jakarta Sans", var(--font-body), sans-serif;
  font-weight: 600;
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.28;
  color: #013c56;
  max-width: 32em;
  text-shadow: 0 1px 0 rgba(244, 248, 248, 0.85);
}

.hero .trust li {
  color: #2a3340;
  text-shadow: 0 1px 0 rgba(244, 248, 248, 0.7);
}
.hero .trust li b { color: #0c1018; }

.hero-cta .btn-solid {
  box-shadow: 0 2px 0 rgba(1, 82, 112, 0.3);
}
.hero-cta .btn-ghost {
  background: rgba(255, 255, 255, 0.94);
  border-color: #c5ccd4;
  color: #0c1018;
}
.hero-cta .btn-ghost:hover {
  background: #fff;
  border-color: #9aa3ad;
}

/* After removing the donut + savings cards, let the FX panel fill the stage. */
.fx-stage .fx-panel {
  left: 6%;
  right: 6%;
  top: 8%;
  bottom: 28%;
}
.fx-stage .fx-chips {
  left: 6%;
  right: 6%;
  bottom: 6%;
}

@media (min-width: 1081px) {
  .hero { min-height: calc(100vh - 80px); }
}

@media (max-width: 1080px) {
  .hero::before {
    top: -88px;
    background-image: url("/hero-waves-2880x1600.jpg");
    background-size: auto 140vh;
    background-position: 48% 0;
    background-repeat: no-repeat;
  }
  .hero h1 { font-size: clamp(36px, 10vw, 56px); }
  .hero-copy::before {
    inset: -28px -20px -24px -24px;
    background: linear-gradient(
      180deg,
      rgba(244, 248, 248, 0.86) 0%,
      rgba(244, 248, 248, 0.7) 58%,
      rgba(244, 248, 248, 0.28) 86%,
      rgba(244, 248, 248, 0) 100%
    );
  }
}

@media (max-width: 560px) {
  .hero::before {
    top: -76px;
    background-size: auto 175vh;
    background-position: 55% 0;
  }
  .hero-accent { width: 52px; height: 4px; }
  .fx-stage { grid-template-columns: 1fr; }
}

/* Paychecks (in-app public URL): wave behind the top bar. */
.pc-top { position: relative; z-index: 5; }
body:has(.pc-top) .glow.hero-waves { height: 420px; }


/* Keep "Log in" from wrapping on narrow auth cards. */
.auth-page .auth-card .sub a, .auth-main .auth-card .sub a { white-space: nowrap; }


/* Prevent horizontal overflow without locking vertical scroll.
   overflow-x: hidden on BOTH html and body makes overflow-y compute to
   auto on both, which Chrome can treat as a locked document scroll-port
   (the Sign up form is taller than a desktop viewport). overflow-x: clip
   does not force that overflow-y change. */
html {
  overflow-x: clip;
  overflow-y: visible;
}
body,
body.auth-page {
  overflow-x: clip;
  overflow-y: visible;
}

/* ---------- 4-page mobile polish (390×844 and below) ---------- */

@media (max-width: 560px) {
  body:has(.hero) .glow.hero-waves {
    height: 720px;
  }
  .hero {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    gap: 28px;
  }
  .hero-copy {
    max-width: 100%;
  }
  .hero-cta .btn-lg {
    min-height: 48px;
  }
  .trust {
    grid-template-columns: 1fr;
    max-width: none;
  }

  /* Currency converter fills the stage; no leftover 2-col holes, no overflow. */
  .fx-stage {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    overflow: hidden;
    box-sizing: border-box;
    padding: 16px 12px 18px;
  }
  .fx-stage .fx-panel,
  .fx-stage .fx-chips {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .fx-panel {
    min-width: 0;
  }
  .fx-pair {
    font-size: clamp(14px, 5.4vw, 22px);
  }
  .fx-rate {
    font-size: clamp(32px, 11vw, 52px);
    overflow-wrap: anywhere;
  }
  .fx-convert {
    grid-template-columns: 1fr auto 1fr;
    min-width: 0;
    gap: 10px;
  }
  .fx-field,
  .fx-amount,
  .fx-field select,
  .fx-field input {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .fx-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
  }
  .fx-chips button {
    font-size: 12px;
    padding: 7px 10px;
  }

  .auth-card {
    max-width: 100%;
    box-sizing: border-box;
  }
  .pricing-hero,
  .plans,
  .plans.plans-3,
  .doc {
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .hero h1 { font-size: clamp(32px, 9vw, 42px); }
  .hero .lede { font-size: 16px; }
  .nav-actions .btn { padding: 7px 10px; font-size: 13px; }
}


/* Admin header sits on the same wave band as other inner pages. */
body.adm { background: #f4f8f8; position: relative; }
body.adm .adm-top {
  position: relative;
  z-index: 5;
  background: color-mix(in srgb, #f4f8f8 55%, transparent);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(1, 101, 140, 0.12);
}
body.adm .glow.hero-waves { height: 360px; }



/* Inner marketing pages: body surface matches the ice/emerald palette. */
body:has(.glow.hero-waves) {
  background: #f4f8f8;
}
@media (max-width: 560px) {
  .glow.hero-waves {
    height: 640px;
    background-position: 55% 20%;
  }
}
