/* ==========================================================================
   OnToPay landing — design tokens lifted from the Fundi app design (Figma: BCIL)
   teal #12928C, mint #CCEDB1, lime #E4FD6A, ink #212121, sand #F6F1EE, blush #EDB8B1
   ========================================================================== */

@font-face {
  font-family: 'Work Sans';
  /* Variable font: one file covers 400-700, so no extra requests and no FOUT swap chain */
  src: url('../fonts/work-sans-var.woff2') format('woff2-variations'),
       url('../fonts/work-sans-var.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand teal from the app design. At 3.81:1 on white it is decorative only:
     icons, accents, sparkles. Text and buttons use --teal-strong (5.76:1). */
  --teal: #12928C;
  --teal-strong: #0D726D;
  --teal-dark: #0B5A57;
  --teal-soft: #E7F4F3;
  --mint: #CCEDB1;
  --lime: #E4FD6A;
  --blush: #EDB8B1;
  --lavender: #B2B1ED;

  --ink: #212121;
  --ink-soft: #4F5451;
  --ink-muted: #5F6462;
  --line: #E2DCD7;
  --sand: #F6F1EE;
  --sand-deep: #EFE8E3;
  --white: #FFFFFF;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 100px;

  --shell: 1160px;
  --gutter: 20px;

  --section-y: 64px;
  --shadow-card: 0 2px 8px rgba(33, 33, 33, .04);
  --shadow-float: 0 18px 40px rgba(33, 33, 33, .10);
}

/* --------------------------------------------------------------- base ---- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--teal-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Links inside running text are underlined, so colour is never the only cue.
   Navigation, buttons and badges are excluded — they read as controls, not prose. */
p a,
.prose a,
.faq__answer a,
.security-card li a,
.apply-aside li a,
.showcase__list a,
.site-footer__legal a { text-decoration: underline; text-underline-offset: 2px; }

.site-nav__list a,
.site-footer__col a,
.logo,
.btn,
.store-badge { text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0 0 16px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
}

h1 { font-size: clamp(34px, 7.2vw, 58px); }
h2 { font-size: clamp(28px, 5.2vw, 42px); }
h3 { font-size: clamp(20px, 3vw, 24px); }
h4 { font-size: 18px; }

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }

strong { font-weight: 600; }

.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Available to screen readers, removed from the visual flow */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

.section { padding-block: var(--section-y); }
.section--sand { background: var(--sand); }
.section--tight { padding-block: 48px; }

.section__head {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}
.section__head p {
  color: var(--ink-soft);
  font-size: 18px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--ink-soft);
}

/* -------------------------------------------------------------- button ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--teal-strong); color: var(--white); }
.btn--primary:hover { background: var(--teal-dark); color: var(--white); }

.btn--ghost {
  background: transparent;
  border-color: var(--teal-strong);
  color: var(--teal-strong);
}
.btn--ghost:hover { background: var(--teal-soft); }

.btn--sm { min-height: 46px; padding: 10px 20px; font-size: 16px; }
.btn--block { width: 100%; }

.store-badge { display: inline-block; line-height: 0; }
.store-badge img { width: 180px; height: auto; }
.store-badge:hover { opacity: .88; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.02em;
}
.logo:hover { text-decoration: none; }
.logo__mark { width: 40px; height: 40px; flex: none; }
.logo--footer .logo__text { color: var(--ink); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bar:nth-child(2) { width: 70%; }

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 16px var(--gutter) 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-nav.is-open { display: block; }

.site-nav__list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.site-nav__list li { margin: 0; }
.site-nav__list a {
  display: block;
  padding: 12px 0;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.site-nav__cta { width: 100%; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    align-items: center;
    gap: 28px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .site-nav__list {
    display: flex;
    gap: 26px;
    margin: 0;
  }
  .site-nav__list a {
    padding: 0;
    border: 0;
    color: var(--ink-soft);
  }
  .site-nav__list a:hover { color: var(--teal-strong); }
  .site-nav__cta { width: auto; }
}

/* ---------------------------------------------------------------- hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--sand);
  padding-block: 48px 56px;
}

.hero__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

/* Copy sits above the sparkle decoration, never behind it */
.hero__copy { position: relative; z-index: 1; }

.hero h1 { margin-bottom: 18px; }
.hero h1 em {
  font-style: normal;
  color: var(--teal);
}

/* Stacked at every width: button first, store badge underneath.
   Both share one width so their left and right edges line up. */
.hero__actions {
  /* gap doubles as the badge's clear space now that the PNG has no built-in padding */
  --cta-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 28px;
}
.hero__actions .btn { width: var(--cta-width); }
.hero__actions .store-badge img { width: var(--cta-width); }

.hero__note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.hero__note svg { width: 20px; height: 20px; flex: none; }

.hero__art {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero__art svg { width: min(100%, 380px); height: auto; }

@media (min-width: 900px) {
  .hero { padding-block: 72px 88px; }
  .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 56px; }
}

/* sparkle decoration, the app's signature motif */
.sparkle {
  position: absolute;
  pointer-events: none;
  color: var(--mint);
}
.sparkle--ink { color: var(--ink); }
.sparkle--a { top: 6%; right: 4%; width: 28px; }
.sparkle--b { bottom: 8%; right: 8%; width: 22px; }

@media (min-width: 900px) {
  .sparkle--a { width: 42px; }
  .sparkle--b { width: 30px; }
}

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

.trust-strip {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.trust-strip__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.trust-strip__item svg { width: 26px; height: 26px; flex: none; color: var(--teal); }
.trust-strip__item h3 { margin: 0 0 2px; font-size: 17px; font-weight: 600; }
.trust-strip__item p { color: var(--ink-soft); font-size: 15px; }

@media (min-width: 760px) {
  .trust-strip { grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 32px; }
}

/* --------------------------------------------------------- how it works ---- */

.steps {
  display: grid;
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 24px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.section--sand .step { background: var(--white); }

/* The 01 / 02 / 03 numeral on a rule mirrors the app's carousel counter */
.step__num {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.step__num::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 16px; margin: 0; }

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------ features ---- */

.features {
  display: grid;
  gap: 20px;
}

.feature {
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--sand);
  border-radius: var(--radius-lg);
}
.section--sand .feature { background: var(--white); }

.feature__art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 168px;
  margin-bottom: 20px;
}
.feature__art svg { width: auto; height: 100%; max-width: 100%; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 16px; margin: 0; }

@media (min-width: 700px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}

/* ----------------------------------------------------------- app showcase -- */

.showcase__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.showcase__list { margin: 24px 0 0; padding: 0; list-style: none; }
.showcase__list li {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink-soft);
}
.showcase__list svg { width: 22px; height: 22px; flex: none; color: var(--teal); }

.phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
}

/* Device frame around the exported app screens */
.phone {
  flex: 0 1 220px;
  padding: 8px;
  background: var(--ink);
  border-radius: 34px;
  box-shadow: var(--shadow-float);
}
.phone img {
  width: 100%;
  border-radius: 26px;
  background: var(--white);
}
.phone--lift { transform: translateY(-24px); }

@media (max-width: 599px) {
  .phone--side { display: none; }
  .phone { flex-basis: 260px; }
  .phone--lift { transform: none; }
}

@media (min-width: 900px) {
  .showcase__grid { grid-template-columns: .9fr 1.1fr; gap: 48px; }
}

/* ------------------------------------------------------------ security ---- */

.security-grid {
  display: grid;
  gap: 20px;
}
.security-card {
  padding: 26px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.security-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 20px;
}
.security-card h3 svg { width: 24px; height: 24px; flex: none; color: var(--teal); }
.security-card p, .security-card li { color: var(--ink-soft); font-size: 16px; }
.security-card ul { margin-bottom: 0; }

@media (min-width: 800px) {
  .security-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----------------------------------------------------------------- faq ---- */

.faq { max-width: 820px; margin-inline: auto; }

.faq__item {
  border-bottom: 1px solid var(--line);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg) translate(-4px, -4px); }
.faq__answer {
  padding: 0 0 22px;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ------------------------------------------------------------ final cta ---- */

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: 44px 24px;
  background: var(--teal-strong);
  border-radius: var(--radius-lg);
  color: var(--white);
  text-align: center;
}
.cta-panel h2 { color: var(--white); }
.cta-panel p { color: rgba(255, 255, 255, .92); max-width: 620px; margin-inline: auto; }
.cta-panel .btn--primary { background: var(--white); color: var(--teal-strong); }
.cta-panel .btn--primary:hover { background: var(--mint); color: var(--ink); }
.cta-panel .btn--ghost { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.cta-panel .btn--ghost:hover { background: rgba(255, 255, 255, .12); }

/* Stacked and matched in width, same rhythm as the hero */
.cta-panel__actions {
  /* gap doubles as the badge's clear space now that the PNG has no built-in padding */
  --cta-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
}
.cta-panel__actions .btn { width: var(--cta-width); }
.cta-panel__actions .store-badge img { width: var(--cta-width); }

@media (min-width: 700px) {
  .cta-panel { padding: 60px 48px; }
}

/* -------------------------------------------------------------- footer ---- */

.site-footer {
  padding-block: 56px 32px;
  background: var(--sand);
  border-top: 1px solid var(--line);
}

.site-footer__grid {
  display: grid;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.site-footer__tagline {
  margin: 16px 0 20px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 380px;
}
.site-footer__title {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-footer__col ul { margin: 0; padding: 0; list-style: none; }
.site-footer__col li { margin-bottom: 10px; }
.site-footer__col a { color: var(--ink-soft); font-size: 15px; }
.site-footer__col a:hover { color: var(--teal-strong); }

.site-footer__legal {
  padding-top: 28px;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.65;
}
.site-footer__legal p { margin-bottom: 12px; }
.site-footer__copy { margin-top: 18px; }

@media (min-width: 800px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
}

/* --------------------------------------------------------- inner pages ---- */

.page-hero {
  padding-block: 48px 32px;
  background: var(--sand);
}
.page-hero p { color: var(--ink-soft); max-width: 720px; }

.prose { max-width: 780px; }
.prose h2 { margin-top: 40px; font-size: clamp(24px, 3.6vw, 30px); }
.prose h3 { margin-top: 28px; font-size: 20px; }
.prose li { color: var(--ink-soft); }
.prose p { color: var(--ink-soft); }
.prose__meta {
  display: inline-block;
  margin-bottom: 24px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--sand-deep);
  color: var(--ink-soft);
  font-size: 14px;
}

.contact-cards {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}
.contact-card {
  padding: 24px;
  background: var(--sand);
  border-radius: var(--radius-lg);
}
.contact-card h3 { margin-bottom: 8px; font-size: 19px; }
.contact-card p { color: var(--ink-soft); font-size: 16px; margin: 0; }

@media (min-width: 700px) {
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------- apply page ---- */

.apply-hero { padding-block: 40px 24px; background: var(--sand); }

.apply-layout {
  display: grid;
  gap: 28px;
  padding-block: 32px 64px;
}

.form-shell {
  padding: 24px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  min-height: 320px;
}

.apply-aside {
  padding: 24px;
  background: var(--sand);
  border-radius: var(--radius-lg);
}
.apply-aside h2 { font-size: 20px; }
.apply-aside ul { margin: 0; padding: 0; list-style: none; }
.apply-aside li {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 15px;
}
.apply-aside svg { width: 20px; height: 20px; flex: none; color: var(--teal); }

@media (min-width: 900px) {
  .apply-layout { grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: start; }
  .form-shell { padding: 32px; }
}

/* -------------------------------------------------------------- motion ---- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
