@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  --brand-blue:#2563eb; --brand-blue-deep:#1d4ed8; --brand-blue-bright:#3b82f6; --brand-blue-tint:#eff6ff;
  --accent-green:#10b981; --accent-green-deep:#16a34a;
  --accent-red:#dc2626; --accent-orange:#ea580c;
  --accent-purple:#a855f7; --accent-yellow:#f59e0b;
  --bg-1:#f8fafc; --bg-2:#ffffff; --bg-3:#f1f5f9; --border:#e2e8f0; --border-strong:#64748b;
  --fg-1:#0f172a; --fg-2:#64748b;
  --tint-blue:#eff6ff; --tint-green:#f0fdf4; --tint-orange:#fff7ed; --tint-purple:#f5f0ff;
  --shadow-md: 0 2px 8px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 24px rgba(15,23,42,0.10);
  --shadow-glow-blue: 0 6px 20px rgba(59,130,246,0.30);

  --container: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-2);
  color: var(--fg-1);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-blue-deep); }

/* ----- Focus ring (WCAG AA) -----
   3px brand-blue outline with 2px offset. Brand-blue on white is 5.17:1,
   on slate-900 it's 4.5:1 — visible on every surface in the design system.
   :focus-visible only — we don't show the ring on mouse-click. */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
  border-radius: 6px;
}
.footer :focus-visible { outline-color: var(--brand-blue-bright); }
.testimonial :focus-visible { outline-color: #fff; }

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

/* ----- nav ----- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 22px; color: var(--brand-blue); letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--fg-1); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--brand-blue); }
.nav-cta { padding: 10px 18px; background: var(--brand-blue); color: #fff !important; border-radius: 10px; font-weight: 600; font-size: 15px; }
.nav-cta:hover { background: var(--brand-blue-deep); color: #fff !important; }

/* ----- hero ----- */
.hero { padding: 80px 0 96px; background: linear-gradient(180deg, #fff 0%, var(--bg-1) 100%); position: relative; overflow: hidden; }
.hero::before {
  /* Giant cropped brand mark, bleeding off the bottom-left of the hero.
     Sits behind everything; very faint so headline contrast is unaffected.
     WCAG-safe — hero text uses --fg-1 (#0f172a) on the page-tone gradient
     which already clears AA; the watermark layer never touches a text glyph. */
  content: '';
  position: absolute;
  left: -180px;
  bottom: -220px;
  width: 720px; height: 720px;
  background-image: url('logo-simple.png');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.hero-eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--brand-blue);
  background: var(--brand-blue-tint);
  padding: 8px 14px; border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(40px, 5.5vw, 64px);
  line-height: 1.04; letter-spacing: -0.025em; font-weight: 800;
  margin: 0 0 24px; text-wrap: balance;
}
.hero h1 em { color: var(--brand-blue); font-style: normal; }
.hero p.lede { font-size: 20px; color: var(--fg-2); margin: 0 0 32px; text-wrap: pretty; max-width: 52ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 24px; border-radius: 12px;
  font-weight: 600; font-size: 16px; cursor: pointer;
  border: none; transition: all 150ms cubic-bezier(0.2,0.7,0.3,1);
  text-decoration: none;
}
.btn-primary { background: var(--brand-blue); color: #fff !important; box-shadow: var(--shadow-glow-blue); }
.btn-primary:hover { background: var(--brand-blue-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--fg-1); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

.hero-mock {
  position: relative;
  display: flex; justify-content: center;
}
.phone-frame {
  width: 320px;
  background: #0f172a;
  border-radius: 36px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.18), 0 8px 16px rgba(15,23,42,0.10);
  border: 1px solid #1e293b;
}
.phone-screen {
  background: #f8fafc;
  border-radius: 24px;
  overflow: hidden;
  height: 580px;
  display: flex; flex-direction: column;
}

/* ----- trust strip ----- */
.trust { padding: 40px 0; background: var(--bg-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-label { text-align: center; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--fg-2); margin-bottom: 24px; }
.trust-logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; align-items: center; }
.logo-placeholder { height: 32px; background: #cbd5e1; border-radius: 6px; opacity: 0.7; }

/* ----- how it works ----- */
.how { padding: 64px 0 48px; }
.section-eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--brand-blue); margin-bottom: 12px; }
.section-title { font-size: clamp(32px, 4vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 16px; text-wrap: balance; }
.section-lede { font-size: 18px; color: var(--fg-2); margin: 0 0 40px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 16px;
  background: var(--brand-blue-tint); color: var(--brand-blue);
  border-radius: 10px;
  margin-bottom: 20px;
}
.step h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.step p { color: var(--fg-2); margin: 0; font-size: 15px; }

/* ----- features ----- */
.features { padding: 48px 0; background: var(--bg-1); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: all 200ms cubic-bezier(0.2,0.7,0.3,1);
}
.feat-card:hover { border-color: var(--brand-blue); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feat-icon {
  width: 44px; height: 44px;
  background: var(--brand-blue-tint);
  color: var(--brand-blue);
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.feat-icon svg { width: 22px; height: 22px; }
.feat-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.feat-card p { color: var(--fg-2); font-size: 15px; margin: 0; }

/* ----- pricing ----- */
.pricing { padding: 48px 0 32px; }
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.tier {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px;
  display: flex; flex-direction: column;
  position: relative;
}
.tier.popular {
  border-color: var(--brand-blue); border-width: 2px;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12);
}
.tier-popular-flag {
  position: absolute; top: -12px; right: 20px;
  background: var(--brand-blue); color: #fff;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 5px 12px; border-radius: 999px;
}
.tier-name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--fg-2); margin-bottom: 12px; }
.tier-price { font-size: 48px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.tier-price small { font-size: 16px; font-weight: 500; color: var(--fg-2); margin-left: 6px; }
.tier-tag { color: var(--fg-2); font-size: 14px; margin: 8px 0 28px; min-height: 2.6em; }
.tier-list { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tier-list li { font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.tier-list li::before {
  content: ''; flex-shrink: 0; margin-top: 6px;
  width: 14px; height: 14px;
  background: var(--accent-green);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center / contain;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>') no-repeat center / contain;
}
.tier-cta {
  display: block; text-align: center;
  padding: 14px 18px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  cursor: pointer; border: 1px solid var(--border-strong);
  background: #fff; color: var(--fg-1); text-decoration: none;
  transition: all 150ms;
}
.tier-cta:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.tier.popular .tier-cta { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.tier.popular .tier-cta:hover { background: var(--brand-blue-deep); }

/* ----- testimonial ----- */
.testimonial { padding: 96px 0; background: var(--brand-blue); color: #fff; }
.testimonial-q { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; max-width: 28ch; margin: 0 auto 32px; text-align: center; }
.testimonial-by { display: flex; align-items: center; gap: 14px; justify-content: center; }
.testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.testimonial-meta { text-align: left; }
.testimonial-name { font-weight: 700; font-size: 16px; }
.testimonial-title { font-size: 14px; color: var(--brand-blue-tint); }

/* ----- cta band ----- */
.cta-band { padding: 48px 0 56px; text-align: center; }
.cta-band h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 700; margin: 0 0 16px; letter-spacing: -0.015em; }
.cta-band p { color: var(--fg-2); font-size: 18px; margin: 0 0 28px; }

/* ----- footer ----- */
.footer { background: #0f172a; color: #94a3b8; padding: 64px 0 32px; position: relative; overflow: hidden; }
.footer::before {
  /* Subtle brand watermark: large logo set at ~4% effective contrast against the slate-900 footer.
     Sits in the bottom-right behind the columns. WCAG-safe because all text is high-contrast
     against #0f172a regardless of the watermark layer. */
  content: '';
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 520px;
  height: 520px;
  background-image: url('logo-simple.png');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
}
.footer .wrap { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.footer-brand img { width: 120px; height: 120px; }
.footer-brand-name { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 24px; color: var(--brand-blue-bright); letter-spacing: -0.01em; }
.footer p { font-size: 14px; max-width: 32ch; }
.footer h4 { color: #f8fafc; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer ul a { color: #94a3b8; }
.footer ul a:hover { color: #f8fafc; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; display: flex; justify-content: space-between; font-size: 13px; color: #94a3b8; }

/* ============================================================
   RESPONSIVE — tablet (<= 900px) and mobile (<= 640px)
   ============================================================ */

/* Mobile nav toggle — hidden on desktop */
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border-strong);
  border-radius: 10px;
  width: 44px; height: 44px;
  padding: 0;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--fg-1); }

@media (max-width: 900px) {
  /* nav becomes hamburger */
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    font-size: 16px;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta { text-align: center; margin-top: 8px; }

  /* hero stacks */
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-mock { order: -1; }
  .hero h1 { font-size: clamp(36px, 8vw, 48px); }
  .hero p.lede { font-size: 18px; }
  .phone-frame { width: min(280px, 80vw); }
  .phone-screen { height: 500px; }

  /* 3-up grids collapse to 2 */
  .steps, .feat-grid { grid-template-columns: 1fr 1fr; }

  /* pricing stays stacked — full-width tiers */
  .tier-grid { grid-template-columns: 1fr; gap: 16px; }
  .tier.popular { order: -1; }

  /* trust */
  .trust-logos { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .trust-logos > :nth-child(4),
  .trust-logos > :nth-child(5) { display: none; }

  /* footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }

  /* sections breathe less */
  .how, .features, .pricing, .testimonial { padding: 64px 0; }
  .cta-band { padding: 56px 0; }

  /* dial back the hero watermark so it doesn't dominate */
  .hero::before { width: 480px; height: 480px; left: -100px; bottom: -140px; opacity: 0.05; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }

  .nav-inner { padding: 12px 0; }
  .brand img { width: 36px; height: 36px; }
  .brand-name { font-size: 18px; }

  /* hero CTAs full-width */
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }

  /* steps + features collapse to single column */
  .steps, .feat-grid { grid-template-columns: 1fr; }
  .step, .feat-card { padding: 24px; }

  /* trust — 2 columns */
  .trust-logos { grid-template-columns: repeat(2, 1fr); }
  .trust-logos > :nth-child(3) { display: none; }

  /* footer — single column */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-brand img { width: 80px; height: 80px; }
  .footer-brand-name { font-size: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* shrink section padding further */
  .how, .features, .pricing, .testimonial { padding: 48px 0; }
  .section-lede { margin-bottom: 32px; }

  /* tier-popular flag wraps awkwardly on tiny widths — keep visible */
  .tier { padding: 28px 22px; }
  .tier-price { font-size: 40px; }

  /* testimonial */
  .testimonial-q { font-size: 22px; }

  /* watermark shrink */
  .hero::before { width: 360px; height: 360px; left: -80px; bottom: -100px; }
  .footer::before { width: 360px; height: 360px; bottom: -90px; right: -90px; }
}

/* ----- mini provider mock inside phone-frame ----- */
.mp-header {
  background: #1e293b; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  color: #f8fafc;
}
.mp-logo { display: flex; align-items: center; gap: 8px; }
.mp-logo img { width: 22px; height: 22px; }.mp-logo .mp-name { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px; color: #3b82f6; }
.mp-unit { background: #334155; padding: 4px 10px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #10b981; }
.mp-genbar { background: #1e293b; padding: 12px 16px; border-bottom: 1px solid #334155; }
.mp-genbar button { width: 100%; padding: 12px; background: #3b82f6; border-radius: 10px; color: #fff; font-weight: 600; font-size: 14px; border: none; display: flex; align-items: center; justify-content: center; gap: 10px; }
.mp-genbar button .ct { background: rgba(255,255,255,0.2); padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.mp-body { flex: 1; padding: 14px; background: #0f172a; color: #f8fafc; overflow-y: auto; }
.mp-eyebrow { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: #94a3b8; margin-bottom: 10px; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mp-tile { padding: 10px 8px; background: #1e293b; border: 2px solid #334155; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.mp-tile.sel { background: rgba(16,185,129,0.10); border-color: #10b981; }
.mp-tile span { font-size: 16px; }
