/* ============================================================
   Apay — Product Introduction Site
   Brand: #165DFF (Arco blue), Polygon-powered stablecoin wallet
   ============================================================ */

:root {
  --apay-primary: #165DFF;
  --apay-primary-dark: #0E42CC;
  --apay-primary-darker: #0A2FA0;
  --apay-primary-light: #E8F0FF;
  --apay-primary-tint: #F2F7FF;
  --apay-success: #00B42A;
  --apay-warning: #FF7D00;
  --apay-danger: #F53F3F;

  --text-strong: #1D2129;
  --text-secondary: #4E5969;
  --text-tertiary: #86909C;
  --bg: #FFFFFF;
  --bg-soft: #F7F8FA;
  --bg-softer: #F2F3F5;
  --border: #E5E6EB;
  --border-light: #F0F1F3;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 30, 60, 0.08);
  --shadow-lg: 0 18px 48px rgba(20, 30, 60, 0.12);
  --shadow-primary: 0 12px 32px rgba(22, 93, 255, 0.28);

  --max: 1200px;
  --nav-h: 68px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: var(--font);
  color: var(--text-strong);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
section { position: relative; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--apay-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--apay-primary-dark); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.btn-outline {
  background: #fff;
  color: var(--apay-primary);
  border-color: var(--apay-primary);
}
.btn-outline:hover { background: var(--apay-primary-tint); }
.btn-dark {
  background: var(--text-strong);
  color: #fff;
}
.btn-dark:hover { background: #000; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.3px; }
.brand .logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--apay-primary), var(--apay-primary-dark));
  color: #fff; display: grid; place-items: center;
  font-size: 17px; font-weight: 800;
  box-shadow: var(--shadow-primary);
}
.brand span { color: var(--apay-primary); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 9px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: var(--apay-primary); background: var(--apay-primary-tint); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-strong); margin: 4px 0; transition: .25s; }

/* ---------- Section helpers ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--apay-primary);
  background: var(--apay-primary-tint);
  padding: 6px 14px; border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.section-title { font-size: 38px; line-height: 1.2; font-weight: 800; letter-spacing: -.5px; }
.section-sub { margin-top: 16px; font-size: 18px; color: var(--text-secondary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(22,93,255,.35), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(14,66,204,.25), transparent 55%),
    linear-gradient(160deg, #0B1F4D 0%, #0E2A6B 45%, #123A8A 100%);
  color: #fff;
  padding: calc(var(--nav-h) + 70px) 0 110px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 90px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
  position: relative; z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  padding: 7px 16px; border-radius: var(--radius-pill);
  font-size: 13.5px; color: #cfe0ff; margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #36E27B; box-shadow: 0 0 0 4px rgba(54,226,123,.25); }
.hero h1 { font-size: 54px; line-height: 1.08; font-weight: 800; letter-spacing: -1.2px; }
.hero h1 .grad {
  background: linear-gradient(100deg, #7FB2FF, #B9D4FF);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin-top: 22px; font-size: 19px; color: #c7d6f5; max-width: 540px; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { margin-top: 38px; display: flex; gap: 30px; flex-wrap: wrap; }
.hero-meta .m { }
.hero-meta .m b { font-size: 26px; font-weight: 800; display: block; }
.hero-meta .m span { font-size: 13.5px; color: #9fb4e0; }

/* Hero phone mock */
.phone {
  width: 290px; margin: 0 auto;
  border-radius: 38px;
  background: #0a1330;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.06);
  position: relative;
}
.phone-screen {
  background: #fff; border-radius: 28px; overflow: hidden;
  font-size: 13px; color: var(--text-strong);
}
.phone-top { display:flex; justify-content:space-between; padding:10px 18px; font-size:11px; color:var(--text-tertiary); }
.phone-card {
  margin: 14px; padding: 18px;
  background: linear-gradient(135deg, var(--apay-primary), var(--apay-primary-dark));
  border-radius: 16px; color: #fff; box-shadow: var(--shadow-primary);
}
.phone-card .lbl { font-size: 11px; opacity: .85; }
.phone-card .bal { font-size: 26px; font-weight: 800; margin-top: 4px; }
.phone-card .inr { font-size: 12px; opacity: .9; margin-top: 2px; }
.phone-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin: 0 14px 14px; }
.phone-actions .pa { background: var(--apay-primary-tint); border-radius: 12px; padding: 10px 4px; text-align:center; font-size: 10.5px; color: var(--apay-primary-dark); font-weight:600; }
.phone-actions .pa .ic { font-size: 16px; display:block; margin-bottom: 3px; }
.phone-list { margin: 0 14px 16px; }
.phone-row { display:flex; justify-content:space-between; align-items:center; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 12px; }
.phone-row .amt { font-weight: 700; }
.phone-row .amt.pos { color: var(--apay-success); }
.phone-row .amt.neg { color: var(--text-strong); }
.phone-row .sub { font-size: 10.5px; color: var(--text-tertiary); }

/* ---------- Stats strip ---------- */
.stats { background: var(--text-strong); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; padding-top: 46px; padding-bottom: 46px; }
.stat { text-align: center; }
.stat .num { font-size: 40px; font-weight: 800; background: linear-gradient(100deg,#7FB2FF,#B9D4FF); -webkit-background-clip:text; background-clip:text; color:transparent; }
.stat .lbl { font-size: 14px; color: #aab8d8; margin-top: 6px; }

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.card .ic {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 24px;
  background: var(--apay-primary-tint); color: var(--apay-primary);
  margin-bottom: 18px;
}
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-secondary); font-size: 15px; }
.card .tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 12px; font-weight: 600; color: var(--apay-primary-dark); background: var(--apay-primary-tint); padding: 4px 11px; border-radius: var(--radius-pill); }

/* ---------- How it works / personas ---------- */
.persona-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.persona { background:#fff; border:1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; position: relative; overflow: hidden; }
.persona::before { content:""; position:absolute; top:0; left:0; right:0; height: 6px; background: linear-gradient(90deg,var(--apay-primary),var(--apay-primary-dark)); }
.persona .avatar { width:54px; height:54px; border-radius:50%; display:grid; place-items:center; font-size:24px; background: var(--apay-primary-tint); margin-bottom:16px; }
.persona .role { font-size:12.5px; font-weight:700; color: var(--apay-primary); text-transform:uppercase; letter-spacing:.8px; }
.persona h3 { font-size: 22px; margin: 4px 0 8px; }
.persona .who { color: var(--text-tertiary); font-size: 14px; margin-bottom: 18px; }
.persona ul { display: grid; gap: 12px; }
.persona li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-secondary); align-items:flex-start; }
.persona li .ck { color: var(--apay-success); font-weight: 700; flex-shrink: 0; }

/* ---------- Tech stack ---------- */
.tech-grid { display:grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.tech-block { background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.tech-block h3 { font-size: 19px; display:flex; align-items:center; gap:10px; margin-bottom: 14px; }
.tech-block h3 .pip { width:10px; height:10px; border-radius:50%; background: var(--apay-primary); }
.tech-block p { color: var(--text-secondary); font-size: 14.5px; margin-bottom: 14px; }
.tech-block .chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { font-size: 13px; font-weight:600; padding: 6px 13px; border-radius: var(--radius-pill); background: var(--bg-soft); border:1px solid var(--border); color: var(--text-secondary); }
.chip.hot { background: var(--apay-primary-tint); color: var(--apay-primary-dark); border-color: transparent; }

/* flow diagram */
.flow { display:flex; align-items:stretch; gap: 0; margin-top: 40px; flex-wrap: wrap; justify-content:center; }
.flow .step { background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; width: 200px; text-align:center; box-shadow: var(--shadow-sm); }
.flow .step .n { width:34px; height:34px; border-radius:50%; background: var(--apay-primary); color:#fff; display:grid; place-items:center; margin:0 auto 12px; font-weight:700; }
.flow .step h4 { font-size:15px; margin-bottom:6px; }
.flow .step p { font-size:12.5px; color: var(--text-tertiary); }
.flow .arrow { display:grid; place-items:center; color: var(--apay-primary); font-size: 22px; padding: 0 8px; align-self:center; }

/* ---------- Security ---------- */
.sec-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.sec-item { display:flex; gap:14px; }
.sec-item .si-ic { width:44px; height:44px; border-radius:12px; background: var(--apay-primary-tint); color: var(--apay-primary); display:grid; place-items:center; font-size:20px; flex-shrink:0; }
.sec-item h4 { font-size:16px; margin-bottom:4px; }
.sec-item p { font-size:14px; color: var(--text-secondary); }

/* ---------- CTA dark ---------- */
.cta {
  background:
    radial-gradient(800px 400px at 70% 0%, rgba(22,93,255,.45), transparent 60%),
    linear-gradient(160deg, #0B1F4D, #0E2A6B);
  color:#fff; text-align:center; border-radius: var(--radius-lg); padding: 70px 30px; margin: 0 auto;
  max-width: var(--max);
}
.cta h2 { font-size: 36px; font-weight: 800; letter-spacing: -.5px; }
.cta p { margin-top: 14px; font-size: 18px; color: #c7d6f5; max-width: 560px; margin-left:auto; margin-right:auto; }
.cta .hero-actions { justify-content:center; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display:grid; gap: 14px; }
.faq-item { border:1px solid var(--border); border-radius: var(--radius); background:#fff; overflow:hidden; }
.faq-q { width:100%; text-align:left; background:none; border:0; padding: 20px 24px; font-size: 16.5px; font-weight:600; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:16px; color: var(--text-strong); }
.faq-q .plus { color: var(--apay-primary); font-size: 22px; transition: transform .25s ease; flex-shrink:0; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 24px 22px; color: var(--text-secondary); font-size: 15px; }

/* ---------- Footer ---------- */
.footer { background: #0a1024; color: #9fb0d4; padding: 64px 0 30px; }
.footer-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.footer .brand { color:#fff; margin-bottom: 16px; }
.footer .brand span { color: #7FB2FF; }
.footer p.about { font-size: 14px; max-width: 320px; line-height:1.7; }
.footer h5 { color:#fff; font-size:14px; margin-bottom: 16px; letter-spacing:.5px; }
.footer ul li { margin-bottom: 11px; }
.footer ul li a { font-size: 14px; color:#9fb0d4; transition: color .15s; }
.footer ul li a:hover { color:#fff; }
.footer-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size: 13px; color:#6f80a8; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Contact Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10, 16, 36, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  position: relative;
  width: 100%; max-width: 440px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 34px 34px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(18px) scale(.97);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.modal-overlay.open .modal { transform: none; }
.modal-close {
  position: absolute; top: 16px; right: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--bg-soft); color: var(--text-secondary);
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: var(--apay-primary-tint); color: var(--apay-primary); }
.modal-icon {
  width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px;
  display: grid; place-items: center; font-size: 28px;
  background: var(--apay-primary-tint); color: var(--apay-primary);
}
.modal h3 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.modal-sub { margin-top: 8px; font-size: 15px; color: var(--text-secondary); }
.contact-rows { margin: 26px 0 8px; display: grid; gap: 12px; }
.contact-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; text-align: left;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.contact-row:hover { border-color: var(--apay-primary); background: #fff; transform: translateY(-1px); }
.contact-row .cr-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px;
  background: #fff; border: 1px solid var(--border);
}
.contact-row .cr-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.contact-row .cr-lbl { font-size: 12px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .6px; }
.contact-row .cr-val { font-size: 16px; font-weight: 700; color: var(--text-strong); word-break: break-all; }
.contact-row .cr-act {
  flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--apay-primary);
  background: var(--apay-primary-tint); padding: 6px 12px; border-radius: var(--radius-pill);
}
.contact-copy { display: flex; gap: 10px; margin-top: 16px; }
.copy-btn {
  flex: 1; padding: 11px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border); background: #fff; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.copy-btn:hover { border-color: var(--apay-primary); color: var(--apay-primary); background: var(--apay-primary-tint); }
.copy-btn.copied { border-color: var(--apay-success); color: var(--apay-success); background: #E8FBEE; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 42px; }
  .feature-grid, .persona-grid, .sec-grid { grid-template-columns: repeat(2,1fr); }
  .tech-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats .container { grid-template-columns: repeat(2,1fr); gap: 32px 24px; }
}
@media (max-width: 720px) {
  .section { padding: 70px 0; }
  .section-title { font-size: 30px; }
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; padding: 14px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md); gap: 2px;
  }
  .nav-links.open a { padding: 12px 14px; }
  .feature-grid, .persona-grid, .sec-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero p.lead { font-size: 17px; }
  .flow .arrow { transform: rotate(90deg); }
  .cta h2 { font-size: 28px; }
}
