/* ============================================================
   COLOR TOKENS — blue palette (GCash-inspired)
   ============================================================ */
:root {
  --color-primary:        #0070F3;   /* main blue */
  --color-primary-hover:  #005AD1;   /* darker — hover */
  --color-primary-active: #0047A8;   /* darkest — pressed */
  --color-secondary:      #00B9F2;   /* light blue accent (decorative only) */
  --color-bg:             #FFFFFF;
  --color-surface:        #F2F2F2;   /* alt sections / dividers */
  --color-text:           #1A1A1A;   /* near-black body text */
  --color-text-muted:     #4A4A4A;
  --color-text-on-primary:#FFFFFF;
  --color-border:         #E2E2E2;

  --radius: 10px;
  --radius-lg: 16px;
  --maxw: 1080px;
  --gutter: clamp(1.25rem, 5vw, 3rem);  /* responsive side padding */
  --shadow: 0 4px 20px rgba(0, 112, 243, 0.08);
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Poppins', 'Inter', system-ui, sans-serif;
}

/* ============================================================
   BASE
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; }
.faq__item summary { font-family: var(--font-head); }
p { margin: 0 0 1em; }
a { color: var(--color-primary); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   BUTTONS  (hover + active + keyboard focus)
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
.btn--block { display: block; width: 100%; }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
}
.btn--primary:hover  { background: var(--color-primary-hover); }
.btn--primary:active { background: var(--color-primary-active); transform: translateY(1px); }

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover  { background: var(--color-primary); color: #fff; }
.btn--outline:active { background: var(--color-primary-active); border-color: var(--color-primary-active); color:#fff; }

/* Light button — for use on blue/dark backgrounds */
.btn--light {
  background: #fff;
  color: var(--color-primary);
}
.btn--light:hover  { background: #EAF3FF; }
.btn--light:active { background: #D6E8FF; }

.btn:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Loading spinner state */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.signup-card .btn--primary.is-loading { animation: none; }   /* stop the pulse while loading */
.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--gutter);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; z-index: 50;
}
.site-header--centered { justify-content: center; }
.logo { height: 32px; width: auto; max-width: 200px; display: block; }
.logo-link svg.logo { width: 150px; }  /* placeholder box only; a real <img class="logo"> keeps its own ratio */
.logo-link { display: inline-flex; align-items: center; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav > a:not(.btn) {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0;
}
.nav > a:not(.btn):hover { color: var(--color-primary); }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px; background: var(--color-text); border-radius: 2px;
}
.nav-toggle:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }

/* ============================================================
   HERO (image banner)
   ============================================================ */
.hero {
  background: var(--color-bg);
  padding: 0;
}
.hero__img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
}

/* ============================================================
   SIGN-UP SECTION (below hero)
   ============================================================ */
.signup-section {
  background: radial-gradient(120% 100% at 50% 0%, #EAF3FF 0%, #F5F9FF 60%, var(--color-bg) 100%);
  padding: 4rem 0;
}

/* Signup card (light background) */
.signup-card {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 5px solid var(--color-primary);
  box-shadow: 0 24px 60px rgba(0, 112, 243, 0.28);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  color: var(--color-text);
}
.signup-card h2 { font-size: clamp(1rem, 4.5vw, 1.55rem); color: var(--color-primary); text-align: center; line-height: 1.25; }

/* Gentle attention pulse on the signup CTA (disabled for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes cta-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 112, 243, 0.45); }
    50%      { box-shadow: 0 0 0 10px rgba(0, 112, 243, 0); }
  }
  .signup-card .btn--primary { animation: cta-pulse 2.2s ease-out infinite; }
  .signup-card .btn--primary:hover { animation: none; }
}
.signup-card__note { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 1.25rem; }
.signup-card input {
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font: inherit;
  color: var(--color-text);
  background: #fff;
}
.signup-card input:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 1px;
}

/* Field wrapper + inline error state (used by phone validation) */
.field { margin-bottom: 0.85rem; }
.field input { margin-bottom: 0.25rem; }
.field__error {
  display: none;
  color: #FFE0E0;
  font-size: 0.8rem;
  padding-left: 0.5rem;
}
.field.has-error input { outline: 2px solid #FFB3B3; outline-offset: 1px; }
.field.has-error .field__error { display: block; }

/* Honeypot — visually and functionally hidden from humans */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Consent row */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.95);
  margin-bottom: 1rem;
  cursor: pointer;
}
.form-consent input {
  width: auto;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  accent-color: #fff;
}
.form-consent a { color: #fff; text-decoration: underline; }
.form-consent input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Lightweight privacy note under the submit button */
.form-privacy-note {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(255,255,255,0.9);
  text-align: center;
}
.form-privacy-note a { color: #fff; text-decoration: underline; }

/* Submit status message */
.form-status {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-status.is-success { color: #1B7F3B; font-weight: 600; }
.form-status.is-error   { color: #C0392B; font-weight: 600; }

/* Success panel (replaces the form after submit) */
/* ============================================================
   SUCCESS MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 60, 0.55);
  backdrop-filter: blur(2px);
}
.modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius-lg);
  border-top: 5px solid var(--color-primary);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  padding: 2.25rem 1.75rem 2rem;
  text-align: center;
  animation: modal-in 0.25s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .modal__dialog { animation: none; }
}
.modal__img {
  display: block;
  width: 70%;
  height: auto;
  border-radius: var(--radius);
  margin: 0 auto 1.25rem;
}
.modal__dialog h2 { font-size: 1.4rem; color: var(--color-primary); margin-bottom: 0.75rem; }
.modal__dialog p { color: var(--color-text-muted); margin: 0 0 0.75rem; }
.modal__highlight { color: var(--color-text); font-weight: 700; margin-bottom: 1.5rem !important; }
.modal__dialog .btn { min-width: 160px; }
.modal__close {
  position: absolute;
  top: 0.5rem; right: 0.75rem;
  background: none; border: none;
  font-size: 1.6rem; line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem;
}
.modal__close:hover { color: var(--color-text); }
.modal__close:focus-visible,
.modal__dialog .btn:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 3rem 0 2rem; }
.section--alt { background: #EAF3FF; }
.section--soft { background: #F2F7FF; }
.section__title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 2rem; text-align: center; font-weight: 800; }
.section__cta { text-align: center; margin-top: 2.5rem; }
.section__subtitle {
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
  max-width: 60ch;
  margin: -1rem auto 2.5rem;
}

/* Steps (how it works) */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.step {
  position: relative;
  text-align: center;
  padding: 0 0.5rem;
}
.step__badge {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  box-shadow: 0 10px 22px rgba(0, 112, 243, 0.35);
}
/* dashed connector to the next step */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 32px;                       /* vertical center of the 64px badge */
  left: 50%;
  width: calc(100% + 1.5rem);      /* reach the next badge's center */
  border-top: 2px dashed #B9D3F5;
}
.step__icon {
  display: block;
  width: 44px; height: 44px;
  margin: 1.1rem auto 0.75rem;
  color: var(--color-primary);
}
.step__icon svg { width: 100%; height: 100%; display: block; }
.step__title { font-size: 1.1rem; margin: 0 0 0.35rem; color: var(--color-text); }
.step p { margin: 0; color: var(--color-text-muted); }

/* FAQ accordion */
.faq__list { max-width: 760px; margin: 0 auto; }
.faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: #fff;
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  color: var(--color-primary);
  font-size: 1.4rem;
  line-height: 1;
  flex: 0 0 auto;
}
.faq__item[open] summary::after { content: "\2212"; }  /* minus */
.faq__item summary:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: -3px; }
.faq__item p {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  color: var(--color-text-muted);
}

/* Final CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem var(--gutter);
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.5rem; }
.cta-band__note { font-style: italic; opacity: 0.95; margin-bottom: 1.5rem; }

@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
  .step:not(:last-child)::after { display: none; }
}
@media (max-width: 600px) {
  /* stay 2-up and compact so the section isn't a long scroll */
  .steps { grid-template-columns: repeat(2, 1fr); gap: 1rem; row-gap: 1.75rem; }
  .step { padding: 0; }
  .step__badge { width: 46px; height: 46px; font-size: 1.15rem; }
  .step__icon { width: 34px; height: 34px; margin: 0.75rem auto 0.5rem; }
  .step__title { font-size: 0.95rem; }
  .step p { font-size: 0.85rem; }
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.section--alt .card { border-color: #E0E0E0; }
.card__step {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.card h3 { font-size: 1.2rem; }
.card p { color: var(--color-text-muted); margin: 0; }

.card--feature { text-align: center; }
.card__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  margin: 0 auto 1rem;
  background: var(--color-surface);
  border-radius: 50%;
  font-size: 1.5rem;
}
.section--alt .card__icon { background: #fff; }

/* 4-image grid (commitments section) */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.image-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
@media (max-width: 860px) { .image-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  /* give the card breathing room from the screen edges and tighten inner padding */
  .signup-section { padding: 1.5rem 0; }
  .signup-card { margin: 0 0.5rem; padding: 1rem; }
  .signup-card h2 { line-height: 1.3; }

  /* commitments images become a swipeable carousel */
  .image-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    gap: 1rem;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
  }
  .image-grid img {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }
}

/* Image placeholder / media slot for feature cards */
.card__media {
  width: 100%;
  aspect-ratio: 5 / 3;
  margin: 0 0 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #E6EEF7;
}
.card__media svg,
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   PROMO / SIGN-UP SECTION
   ============================================================ */
.promo {
  background-image: url('BACKGROUND.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.promo .promo__content h2 { color: #fff; }
.promo .promo__accent { color: #CDE8FF; }
.promo__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.promo__media {
  width: 250px;
  max-width: 100%;
  aspect-ratio: 558 / 1100;   /* keeps the phone proportions */
  margin: 0 auto;
  background: transparent;     /* blend with the section background image */
}
.promo__media svg,
.promo__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.promo__logo { width: 64px; height: 64px; margin-bottom: 1.25rem; }
.promo__logo svg,
.promo__logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.promo__content h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 1rem;
}
.promo__accent { color: var(--color-primary); }
.promo__content p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 46ch;
}

@media (max-width: 860px) {
  .promo__inner { grid-template-columns: 1fr; gap: 2rem; }
  .promo__content { text-align: center; }
  .promo__logo { margin-left: auto; margin-right: auto; }
}

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.carousel__viewport { overflow: hidden; flex: 1; }
.carousel__track {
  display: flex;
  margin: 0; padding: 0; list-style: none;
  transition: transform 0.5s ease;
}
.carousel__slide {
  flex: 0 0 100%;
  padding: 0.5rem;
  box-sizing: border-box;
}

.card--step { text-align: center; height: 100%; }
.card--step h3 { font-size: 1.25rem; }
.card--step p { color: var(--color-text-muted); }

/* Arrows */
.carousel__arrow {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.carousel__arrow:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.carousel__arrow:active { background: var(--color-primary-active); border-color: var(--color-primary-active); }
.carousel__arrow:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }

/* Dots */
.carousel__dots {
  position: absolute;
  bottom: -1.75rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.5rem;
}
.carousel__dot {
  width: 10px; height: 10px; padding: 0;
  border: none; border-radius: 50%;
  background: #C7D8EC;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.carousel__dot.is-active { background: var(--color-primary); transform: scale(1.2); }
.carousel__dot:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }

/* Show 3 across on wide screens */
@media (min-width: 861px) {
  .carousel__slide { flex-basis: 33.3333%; }
}

/* On desktop, tuck arrows just outside the track */
@media (min-width: 1024px) {
  .carousel__arrow--prev { position: absolute; left: -22px; z-index: 2; }
  .carousel__arrow--next { position: absolute; right: -22px; z-index: 2; }
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--color-primary); color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}
.logo--footer { height: 28px; }
.footer__blurb { color: rgba(255,255,255,0.85); font-size: 0.9rem; max-width: 38ch; margin-top: 1rem; }
.site-footer h4 { font-size: 0.95rem; margin-bottom: 1rem; }
.site-footer nav a { display: block; color: rgba(255,255,255,0.9); text-decoration: none; padding: 0.3rem 0; }
.site-footer nav a:hover { color: #fff; text-decoration: underline; }
.lang-select {
  padding: 0.5rem 0.75rem; border-radius: var(--radius); border: none; font: inherit;
}
.footer__legal { background: var(--color-primary-active); font-size: 0.85rem; text-align: center; }
.footer__legal .container { padding-top: 1rem; padding-bottom: 1rem; }
.footer__legal p { margin: 0; color: rgba(255,255,255,0.85); }

/* ============================================================
   LEGAL / PRIVACY PAGE
   ============================================================ */
.legal { padding: 3rem var(--gutter) 4rem; }
.legal__inner { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 0.25rem; }
.legal__updated { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; color: var(--color-primary); }
.legal p, .legal li { color: var(--color-text); }
.legal ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.legal li { margin-bottom: 0.35rem; }
.legal a { color: var(--color-primary); }
.legal__disclaimer {
  background: var(--color-surface);
  border-left: 4px solid var(--color-secondary);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.92rem;
  margin: 2rem 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .cards, .cards--2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }
  .nav--open { display: flex; }
  .nav .btn { width: 100%; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
