/* ================================================================
   KAPAY — Mobile styles
   Mobile-first refinements for screens ≤ 768px
   ================================================================ */

@media (max-width: 768px) {

  /* ── Base ─────────────────────────────────────────────────────── */
  html { font-size: 15px; }
  section { padding: 64px 0; }
  .container { padding: 0 20px; }

  /* ── Buttons ──────────────────────────────────────────────────── */
  .btn-primary, .btn-outline {
    width: 100%;
    justify-content: center;
    padding: 15px 24px;
    font-size: 16px;
    border-radius: 12px;
  }
  .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
    text-align: center;
  }

  /* ── Navbar ───────────────────────────────────────────────────── */
  .navbar { height: 60px; }

  .nav-inner { height: 60px; }

  .nav-logo img { height: 26px; }

  .nav-links {
    top: 60px;
    padding: 20px 20px 28px;
    gap: 6px;
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 10px;
    display: block;
  }
  .nav-links .nav-cta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .nav-links .nav-cta a {
    padding: 14px;
    font-size: 16px;
    border-radius: 12px;
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  /* Login button on mobile */
  .btn-login {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
  }

  /* ── Hero ─────────────────────────────────────────────────────── */
  .hero {
    padding: 100px 0 64px;
    background: #fff;
    background-image: radial-gradient(ellipse 100% 50% at 50% 0%, rgba(232,130,30,.10) 0%, transparent 70%);
  }

  .hero-inner { gap: 0; }

  .hero-content { align-items: center; text-align: center; }

  .section-label { font-size: 11px; margin-bottom: 12px; }

  .hero-title {
    font-size: 36px;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -.5px;
  }

  .hero-sub {
    font-size: 16px;
    max-width: 100%;
    margin-bottom: 28px;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 16px;
  }

  .hero-note { font-size: 12px; }

  /* Mobile hero panel — orange gradient shell like desktop */
  .hero-mobile-panel {
    display: block !important;
    background: linear-gradient(140deg, #f97316 0%, #ea580c 50%, #9a3412 100%);
    border-radius: 16px;
    margin-top: 32px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(234,88,12,.35);
  }

  /* Mobile hero stats — inside the panel */
  .hero-mobile-stats {
    display: flex !important;
    gap: 10px;
    margin: 0;
    padding: 14px 14px 0;
    width: 100%;
  }

  .hms-card {
    flex: 1;
    background: rgba(255,255,255,.18);
    border-radius: 12px;
    padding: 14px 10px;
    border: 1px solid rgba(255,255,255,.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
  }

  .hms-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
  }
  .hms-icon .material-icons { font-size: 18px; }
  .hms-icon.lp { background: #fde8d2; } .hms-icon.lp .material-icons { color: var(--primary); }
  .hms-icon.ls { background: #ebfaf2; } .hms-icon.ls .material-icons { color: var(--success); }
  .hms-icon.lw { background: #fff8ec; } .hms-icon.lw .material-icons { color: var(--warning); }

  .hms-val { font-family: var(--mono); font-size: 22px; font-weight: 700; color: white; line-height: 1; }
  .hms-lbl { font-size: 10px; color: rgba(255,255,255,.7); font-weight: 500; }
  .hms-icon.lp, .hms-icon.ls, .hms-icon.lw { background: rgba(255,255,255,.2); }
  .hms-icon .material-icons { color: white !important; }

  /* Mobile balance strip — inside the orange panel */
  .hero-mobile-balance {
    display: flex !important;
    gap: 0;
    margin: 12px 14px 14px;
    background: rgba(0,0,0,.18);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    overflow: hidden;
  }

  .hmb-item {
    flex: 1;
    padding: 14px 10px;
    text-align: center;
    border-right: 1px solid var(--border);
  }
  .hmb-item:last-child { border-right: none; }
  .hmb-item { border-right-color: rgba(255,255,255,.1); }
  .hmb-lbl { font-size: 9px; color: rgba(255,255,255,.5); font-weight: 500; display: block; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .3px; }
  .hmb-val { font-family: var(--mono); font-size: 14px; font-weight: 700; color: white; }
  .hmb-val.red { color: var(--error); }
  .hmb-val.green { color: var(--success); }
  .hmb-val.orange { color: var(--primary); }

  /* ── Early Access ─────────────────────────────────────────────── */
  .early-access { padding: 32px 0; }

  .ea-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .ea-text h3 { font-size: 17px; }
  .ea-text p { font-size: 14px; }

  .ea-inner .btn-primary {
    width: 100%;
    border-radius: 12px;
  }

  /* ── Features grid ────────────────────────────────────────────── */
  .features-section { padding: 64px 0; }

  .section-header { margin-bottom: 36px; }
  .section-title { font-size: 26px; }
  .section-subtitle { font-size: 16px; }

  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
  }

  .feature-card {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .feature-icon { font-size: 26px; margin-bottom: 10px; }
  .feature-card h3 { font-size: 14px; margin-bottom: 6px; }
  .feature-card p { font-size: 12px; }

  .features-cta .btn-outline { max-width: 100%; }

  /* ── Screen sections ──────────────────────────────────────────── */
  .screen-section { padding: 56px 0; }

  .screen-inner { gap: 36px; }
  .screen-inner.reverse { gap: 36px; }

  /* On mobile: hide complex table mockups, show simplified card list */
  .screen-wrap { display: none; }
  .screen-mobile-preview { display: flex; flex-direction: column; }

  /* Mobile stats show */
  .hero-mobile-stats { display: flex; }
  .hero-mobile-balance { display: flex; }

  .screen-mobile-preview {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    overflow: hidden;
    width: 100%;
  }

  .smp-header {
    background: #fafafa;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .smp-title { font-size: 13px; font-weight: 700; color: var(--text); }
  .smp-btn { background: var(--primary); color: white; border: none; border-radius: 6px; padding: 5px 12px; font-size: 11px; font-weight: 600; font-family: var(--font); }

  .smp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
  }
  .smp-row:last-child { border-bottom: none; }

  .smp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .smp-dot.g { background: var(--success); }
  .smp-dot.o { background: var(--primary); }
  .smp-dot.y { background: var(--warning); }

  .smp-info { flex: 1; min-width: 0; }
  .smp-name { font-size: 13px; font-weight: 600; color: var(--text); display: block; }
  .smp-sub { font-size: 11px; color: var(--muted); display: block; }

  .smp-tag { font-size: 10px; padding: 2px 8px; border-radius: 100px; font-weight: 600; white-space: nowrap; }
  .smp-tag.paid { background: #ebfaf2; color: var(--success); }
  .smp-tag.pending { background: #fff8ec; color: #a07800; }
  .smp-tag.overdue { background: #f9e7eb; color: var(--error); }
  .smp-tag.partial { background: #fde8d2; color: var(--primary); }
  .smp-tag.active { background: #ebfaf2; color: var(--success); }
  .smp-tag.invited { background: #fff8ec; color: #a07800; }

  .smp-amount { font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0; }
  .smp-amount.red { color: var(--error); }

  .screen-text .section-title { font-size: 24px; }
  .screen-text .section-subtitle { font-size: 15px; }

  .screen-points li { font-size: 14px; }

  /* ── How it works ─────────────────────────────────────────────── */
  .how-section { padding: 64px 0; }
  .how-inner { gap: 40px; }

  .how-text .section-title { font-size: 26px; }

  .steps { gap: 24px; }

  .step {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid var(--border);
    gap: 16px;
  }
  .step-num {
    font-size: 11px;
    padding: 6px 10px;
    flex-shrink: 0;
  }
  .step h3 { font-size: 15px; margin-bottom: 5px; }
  .step p { font-size: 13px; }

  /* ── CTA ──────────────────────────────────────────────────────── */
  .cta-section { padding: 48px 0; }

  .cta-box {
    padding: 48px 24px;
    border-radius: 20px;
  }
  .cta-box h2 { font-size: 24px; margin-bottom: 12px; }
  .cta-box p { font-size: 15px; margin-bottom: 28px; }

  .btn-large {
    font-size: 16px;
    padding: 15px 24px;
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  /* ── Footer ───────────────────────────────────────────────────── */
  .footer { padding-top: 48px; }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
    padding-bottom: 32px;
  }

  .footer-brand img { height: 24px; }
  .footer-tagline { font-size: 13px; margin-top: 12px; }

  .footer-links { gap: 32px; }
  .footer-col h4 { font-size: 12px; margin-bottom: 12px; }
  .footer-col a { font-size: 13px; }

  .footer-bottom p { font-size: 12px; }

  /* ── WA Float ─────────────────────────────────────────────────── */
  .wa-float {
    bottom: 20px;
    right: 16px;
    padding: 14px;
    border-radius: 50%;
    width: 56px; height: 56px;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,.5);
  }
  .wa-float-label { display: none; }

  /* ── Contact page ─────────────────────────────────────────────── */
  .page-hero { padding: 100px 0 56px; }
  .page-hero .section-title { font-size: 30px; }
  .page-hero .section-subtitle { font-size: 15px; }

  .contact-section { padding: 48px 0 64px; }

  .contact-info h2 { font-size: 22px; }

  .channel-card { padding: 14px 16px; gap: 12px; }
  .channel-value { font-size: 15px; }
  .channel-action { font-size: 12px; }

  .contact-form-wrap {
    padding: 28px 20px;
    border-radius: 16px;
  }
  .contact-form h2 { font-size: 20px; margin-bottom: 20px; }

  .field input, .field select, .field textarea {
    font-size: 16px; /* prevents iOS zoom */
    padding: 12px 14px;
  }

  .btn-submit {
    padding: 15px;
    font-size: 16px;
    border-radius: 12px;
  }

  /* ── Features page ────────────────────────────────────────────── */
  .features-list { padding: 48px 0; }

  .feature-row, .feature-row.rev {
    gap: 32px;
    padding: 48px 0;
  }

  .feature-info .f-emoji { font-size: 32px; margin-bottom: 12px; }
  .feature-info h2 { font-size: 22px; margin-bottom: 12px; }
  .feature-info p { font-size: 15px; margin-bottom: 20px; }
  .feature-pts li { font-size: 14px; }

  .visual-box { aspect-ratio: 2/1; }
  .visual-box .v-icon { font-size: 40px; }
  .visual-box .v-label { font-size: 14px; }

} /* end @media 768px */

/* ── Extra small (iPhone SE, etc) ────────────────────────────── */
@media (max-width: 390px) {
  .hero-title { font-size: 32px; }
  .features-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-mobile-stats { gap: 8px; }
  .hms-val { font-size: 18px; }
}
