/* =====================================================================
   PoolPay Marketing Website — Global Stylesheet
   ---------------------------------------------------------------------
   Clean white theme with the PoolPay dark-green / emerald brand accent.
   Organized as: 1) Tokens  2) Reset/base  3) Layout helpers
   4) Buttons  5) Header/Nav  6) Footer  7) Hero  8) Sections/cards
   9) Phone mockup frame  10) Forms  11) Page-specific  12) Animations
   13) Responsive breakpoints
   ===================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Brand */
  --primary: #0A2E1C;
  --primary-2: #020617;
  --primary-gradient: linear-gradient(135deg, #0A2E1C 0%, #020617 100%);
  --accent: #10B981;
  --accent-strong: #059669;
  --accent-light: #ECFDF5;
  --accent-2: #34D399;
  --gold: #D97706;
  --gold-light: #F59E0B;

  /* Neutrals */
  --text-dark: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-mint: #F0FDF4;
  --border: #E2E8F0;
  --white: #FFFFFF;

  /* Effects */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 25px 50px -12px rgba(10, 46, 28, 0.18);
  --container: 1200px;
  --header-h: 72px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text-body);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--text-dark); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-body); }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }

::selection { background: var(--accent); color: #fff; }

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

/* ---------- 3. Layout Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--mint { background: var(--bg-mint); }
.section--dark { background: var(--primary-gradient); color: #fff; }
.text-center { text-align: center; }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
}
.section--dark .eyebrow { color: var(--accent-2); background: rgba(16,185,129,0.12); }

.section-head { max-width: 680px; margin: 0 auto 56px; }
.section-head.left { margin-left: 0; }
.section-head p { font-size: 1.08rem; color: var(--text-muted); margin-top: 14px; }
.section--dark .section-head p { color: rgba(255,255,255,0.75); }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 700; font-size: 0.98rem;
  padding: 14px 26px; border-radius: 14px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .25s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 20px -8px rgba(10,46,28,0.5); }
.btn-primary:hover { background: #0d3d26; box-shadow: 0 16px 28px -8px rgba(10,46,28,0.55); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 20px -8px rgba(16,185,129,0.5); }
.btn-accent:hover { background: var(--accent-strong); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); background: var(--bg-soft); }
.btn-ghost-light { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.18); }
.btn-white { background: #fff; color: var(--primary); }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ---------- 5. Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; color: var(--text-dark); font-size: 1.25rem; letter-spacing: -0.03em; }
.brand img { width: 38px; height: 38px; }
.brand span b { color: var(--accent-strong); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 0.95rem; color: var(--text-body);
}
.nav-links a:hover { color: var(--primary); background: var(--bg-soft); }
.nav-links a.active { color: var(--primary); background: var(--accent-light); }
.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--text-dark); border-radius: 2px; transition: .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- 6. Footer ---------- */
.site-footer { background: var(--primary-gradient); color: rgba(255,255,255,0.8); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand .brand span b { color: var(--accent-2); }
.footer-brand p { color: rgba(255,255,255,0.65); max-width: 320px; font-size: 0.95rem; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 18px; letter-spacing: 0.02em; }
.footer-col a { display: block; padding: 6px 0; color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 0.88rem; color: rgba(255,255,255,0.55);
}
.social { display: flex; gap: 10px; }
.social a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,0.08); color: #fff;
}
.social a:hover { background: var(--accent); }

/* ---------- 7. Hero ---------- */
.hero { position: relative; padding: 80px 0 90px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(16,185,129,0.10), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(10,46,28,0.06), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(90deg, #10B981, #0A2E1C); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 1.18rem; color: var(--text-muted); max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-trust { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.9rem; }
.hero-trust .stars { color: var(--gold-light); letter-spacing: 2px; }

/* hero phone showcase */
.hero-phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }
.hero-phones .phone { position: absolute; }
.hero-phones .phone--back { transform: translateX(-90px) translateY(20px) scale(0.86) rotate(-7deg); opacity: 0.9; z-index: 1; }
.hero-phones .phone--front { transform: translateX(70px) rotate(5deg); z-index: 2; }
.hero-blob {
  position: absolute; width: 480px; height: 480px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, rgba(16,185,129,0.18), transparent 70%);
  filter: blur(8px);
}

/* ---------- 8. Sections & Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
  height: 100%;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card .icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-light); color: var(--accent-strong); margin-bottom: 18px;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.97rem; }

/* value strip / logos */
.stat-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 900; color: var(--primary); letter-spacing: -0.03em; }
.section--dark .stat .num { color: #fff; }
.stat .num .accent { color: var(--accent); }
.stat .label { color: var(--text-muted); font-weight: 600; font-size: 0.92rem; margin-top: 4px; }
.section--dark .stat .label { color: rgba(255,255,255,0.7); }

/* feature split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media { display: flex; justify-content: center; }
.split h2 { margin-bottom: 16px; }
.split .lead { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 24px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; color: var(--text-body); }
.feature-list .tick {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-light);
  color: var(--accent-strong); display: grid; place-items: center; margin-top: 2px;
}
.feature-list .tick svg { width: 14px; height: 14px; }
.feature-list b { color: var(--text-dark); }

/* steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.step { position: relative; padding-top: 8px; }
.step .num-badge {
  width: 48px; height: 48px; border-radius: 14px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; margin-bottom: 18px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* pill badge */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px;
  font-size: 0.78rem; font-weight: 700; background: var(--accent-light); color: var(--accent-strong);
}

/* roles table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
table.roles { width: 100%; border-collapse: collapse; min-width: 640px; background: #fff; }
table.roles th, table.roles td { padding: 16px 18px; text-align: center; border-bottom: 1px solid var(--border); }
table.roles thead th { background: var(--primary); color: #fff; font-size: 0.9rem; font-weight: 700; }
table.roles tbody th { text-align: left; font-weight: 700; color: var(--text-dark); background: var(--bg-soft); }
table.roles td .yes { color: var(--accent-strong); font-weight: 800; }
table.roles td .no { color: #cbd5e1; }
table.roles td .opt { color: var(--gold); font-weight: 700; font-size: 0.85rem; }
table.roles tbody tr:hover td, table.roles tbody tr:hover th { background: var(--accent-light); }

/* download / install steps */
.install-steps {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px;
}
.install-step {
  display: flex; align-items: center; gap: 10px; font-size: 0.9rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  padding: 12px 18px; border-radius: 12px; color: rgba(255,255,255,0.85);
}
.install-step span {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 0.8rem;
  display: grid; place-items: center;
}
.install-step b { color: #fff; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 16px; }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 auto 30px; font-size: 1.08rem; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* FAQ accordion */
.faq { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 14px; background: #fff; overflow: hidden; transition: box-shadow .2s; }
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 20px 22px; font-size: 1.02rem; font-weight: 700; color: var(--text-dark);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit;
}
.faq-q .chev { transition: transform .3s ease; flex-shrink: 0; color: var(--accent-strong); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a-inner { padding: 0 22px 20px; color: var(--text-muted); }

/* testimonials */
.quote-card { background:#fff; border:1px solid var(--border); border-radius: var(--radius); padding: 28px; height: 100%; }
.quote-card .stars { color: var(--gold-light); letter-spacing: 2px; margin-bottom: 14px; }
.quote-card p { color: var(--text-body); font-style: italic; margin-bottom: 18px; }
.quote-author { display: flex; align-items: center; gap: 12px; }
.quote-author .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color:#fff; display:grid; place-items:center; font-weight:800; }
.quote-author .meta b { display:block; color: var(--text-dark); font-size: 0.95rem; }
.quote-author .meta span { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- 9. Phone Mockup Frame ---------- */
.phone {
  width: 280px; flex-shrink: 0;
  border: 11px solid #1E293B; border-radius: 38px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow-lg); position: relative;
}
.phone::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px; background: #1E293B; border-radius: 0 0 14px 14px; z-index: 3;
}
.phone img { width: 100%; display: block; }
.phone--sm { width: 230px; }

/* ---------- 10. Forms ---------- */
.form-card { background:#fff; border:1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label { display:block; font-size: 0.9rem; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--text-dark);
  padding: 13px 15px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg-soft);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(16,185,129,0.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.field .error { color: #DC2626; font-size: 0.82rem; margin-top: 6px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #DC2626; background: #FEF2F2; }
.field.invalid .error { display: block; }
.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }
.form-success {
  display: none; background: var(--accent-light); border: 1px solid #DCFCE7; color: #14532D;
  padding: 16px 18px; border-radius: 12px; font-weight: 600; margin-bottom: 20px;
}
.form-success.show { display: block; }

.contact-info-card {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 14px;
}
.contact-info-card .ci-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-light); color: var(--accent-strong); display: grid; place-items: center; flex-shrink: 0; }
.contact-info-card .ci-icon svg { width: 22px; height: 22px; }
.contact-info-card small { color: var(--text-muted); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-info-card b { display: block; color: var(--text-dark); }

/* ---------- 11. Page-specific ---------- */
/* sub page hero */
.page-hero { background: var(--primary-gradient); color: #fff; padding: 100px 0 80px; text-align: center; position: relative; overflow: hidden; }
.page-hero::after {
  content:""; position:absolute; inset:0; z-index:0;
  background: radial-gradient(50% 60% at 80% 0%, rgba(16,185,129,0.18), transparent 60%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 620px; margin: 18px auto 0; font-size: 1.1rem; }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--accent-2); }

/* feature detail cards big grid */
.feature-grid-lg { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }

/* screens gallery */
.gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px 24px; }
.gallery .g-item { text-align: center; }
.gallery .g-item .cap { margin-top: 18px; }
.gallery .g-item .cap b { color: var(--text-dark); display: block; }
.gallery .g-item .cap span { color: var(--text-muted); font-size: 0.9rem; }

/* highlight box */
.note-box {
  background: var(--accent-light); border: 1px solid #DCFCE7; border-left: 4px solid var(--accent);
  border-radius: 12px; padding: 18px 20px; color: #14532D; font-size: 0.95rem;
}
.note-box.gold { background: #FFFBEB; border-color: #FEF3C7; border-left-color: var(--gold-light); color: #78350F; }

/* ---------- 12. Animations (scroll reveal) ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-phones { min-height: 480px; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .feature-grid-lg, .gallery { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  /* mobile nav drawer */
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; padding: 16px 24px 24px; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow); transform: translateY(-150%); transition: transform .35s ease;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 12px; border-radius: 10px; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-desktop { display: none; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .grid-2, .grid-3, .grid-4, .stat-strip, .feature-grid-lg, .gallery, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .stat-strip { gap: 28px; }
}
