/* DBConnect website — minimal clean design system
   Pure CSS, no framework. Light + dark (prefers-color-scheme). */

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

:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --bg: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --surface: #FFFFFF;
  --radius: 12px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #60A5FA;
    --primary-hover: #93C5FD;
    --bg: #0B1120;
    --bg-subtle: #0F172A;
    --text: #E2E8F0;
    --muted: #94A3B8;
    --border: #1E293B;
    --surface: #111A2E;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand span b { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
/* :not(.btn) so the Download button keeps its own (white) color — a bare
   `.nav-links a` rule outranks `.btn-primary` on specificity and greys it out. */
.nav-links a:not(.btn) { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; color: var(--text); }
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; line-height: 1;
  padding: 12px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.eyebrow { color: var(--primary); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
h1 { font-size: clamp(34px, 6vw, 54px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 19px; font-weight: 600; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { margin: 10px 0 12px; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; text-align: center; }
.hero .lead { max-width: 640px; margin: 20px auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* store badges */
.store-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  padding: 12px 20px; border-radius: 12px; font-weight: 600; font-size: 15px;
}
.store-badge:hover { text-decoration: none; opacity: .9; }
.store-badge svg { width: 22px; height: 22px; }
.store-badge small { display: block; font-size: 11px; font-weight: 500; opacity: .8; line-height: 1.1; }
.store-badge b { font-size: 16px; }

/* ---------- Grid cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
}
.card .icon {
  width: 42px; height: 42px; border-radius: 10px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary);
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* Privacy highlights — SVG icons, not emoji */
.privacy-list { list-style: none; display: grid; gap: 16px; }
.privacy-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text); }
.privacy-list svg { width: 22px; height: 22px; flex: none; color: var(--primary); }

/* ---------- Supported DBs ---------- */
.db-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.db-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 14px; text-align: center;
}
/* Logos ship with the white chip (rounded card + shadow) baked into the PNG,
   so they stay legible on the dark surface with no extra CSS. */
.db-tile img { width: 64px; height: 64px; margin: 0 auto 10px; object-fit: contain; }
.db-tile .db-name { font-weight: 600; font-size: 15px; }
.db-tile .db-tier { font-size: 12px; color: var(--muted); margin-top: 3px; }
.db-tile .db-tier.premium { color: var(--primary); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 800px; margin: 0 auto; }
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px;
}
.plan.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.plan .plan-name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.plan.featured .plan-name { color: var(--primary); }
.plan .price { font-size: 40px; font-weight: 800; margin: 12px 0 4px; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan .plan-desc { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.plan ul { list-style: none; margin-bottom: 26px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 15px; }
.plan li svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--primary); }
.plan .btn { width: 100%; justify-content: center; }

/* ---------- FAQ / accordion ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  font-family: var(--font); font-size: 17px; font-weight: 600; color: var(--text);
  padding: 22px 40px 22px 0; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 400; color: var(--muted); transition: transform .2s;
}
.faq-item.open .faq-q::after { content: "\2212"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { color: var(--muted); font-size: 15px; padding-bottom: 22px; }

/* ---------- Doc / legal prose ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 18px; margin: 26px 0 8px; }
.prose p { margin-bottom: 12px; color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }
.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-subtle); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.callout {
  background: var(--bg-subtle); border-left: 3px solid var(--primary);
  padding: 14px 16px; border-radius: 8px; margin: 14px 0;
}

/* steps */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { position: relative; padding: 0 0 22px 52px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  background: var(--primary); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--border);
}
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band .lead { margin: 0 auto 28px; max-width: 520px; }

/* ---------- Footer ---------- */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.footer-cols { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 32px; }
.footer-brand { max-width: 280px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin-bottom: 12px; }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); text-decoration: none; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Mobile hero (dark band, phone mockup) ---------- */
.hero-dark {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, #1e293b 0%, transparent 60%), #0b1120;
  background-color: #0b1120;
  color: #e2e8f0;
  padding: 84px 0 88px;
  border-bottom: 1px solid #1e293b;
}
/* subtle grid texture */
.hero-dark::before {
  content: ""; position: absolute; inset: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(900px 500px at 70% 0%, #000 30%, transparent 75%);
}
.hero-split { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-copy { max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #cbd5e1; background: #ffffff0d; border: 1px solid #ffffff1a; margin-bottom: 24px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px #34d399; }
.hero-h1 { font-size: clamp(40px, 6vw, 66px); line-height: 1.03; letter-spacing: -0.03em; font-weight: 800; color: #fff; }
.hero-h1 .grad {
  font-style: italic;
  background: #4a9dd9;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy .lead { color: #94a3b8; margin: 22px 0 32px; max-width: 500px; }
.hero-copy .lead b { color: #e2e8f0; font-weight: 600; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn-secondary { color: #e2e8f0; border-color: #ffffff26; background: #ffffff0d; }
.hero-actions .btn-secondary:hover { border-color: #ffffff55; }
.hero-trust { margin-top: 22px; font-size: 13px; color: #64748b; }

/* ---------- Phone frame ("hyperframe") ---------- */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: 200px; flex: none;
  background: #0a0a0f; border-radius: 40px; padding: 8px;
  box-shadow: 0 50px 90px -30px rgba(0,0,0,.75), 0 0 0 1.5px #ffffff14 inset, 0 0 0 7px #15161c;
}
.phone img { width: 100%; height: auto; display: block; border-radius: 32px; }
/* Hero: premium angled phone (banner style) over a soft gradient glow */
.hero-visual::before {
  content: ""; position: absolute; z-index: 0;
  width: 460px; height: 460px; border-radius: 50%; right: 4%; top: 50%;
  transform: translateY(-50%);
  background: radial-gradient(closest-side, rgba(96,165,250,.30), transparent 70%);
  filter: blur(16px); pointer-events: none;
}
.hero-visual .phone {
  position: relative; z-index: 1; width: auto;
  transform: perspective(1600px) rotateY(-11deg) rotateX(4deg) rotate(-1deg);
  transform-origin: center center;
}
/* Hero phone sized by height; width auto keeps the screenshot's aspect ratio. */
.hero-visual .phone img { width: auto; height: 450px; }
.phone-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 14px; font-size: 13px; font-weight: 700; color: #e2e8f0;
  background: #111a2ecc; backdrop-filter: blur(8px); border: 1px solid #ffffff1f;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.6);
}
.phone-chip .bolt { color: #fbbf24; }
.phone-chip.tl { top: 96px; left: -34px; }
.phone-chip.br { bottom: 120px; right: -30px; }

/* ---------- Showcase (see it in action) ---------- */
.shots {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: start;
}
.shot { text-align: center; }
.shot .phone { width: 100%; max-width: 240px; margin: 0 auto 16px; }
.shot h3 { font-size: 17px; margin-bottom: 4px; }
.shot p { font-size: 14px; color: var(--muted); }

/* App Store-style promo gallery (horizontal scroll) */
.gallery {
  display: flex; gap: 20px; align-items: flex-start;
  overflow-x: auto; scroll-snap-type: x mandatory;
  /* overflow-x:auto forces overflow-y:auto, so pad the top enough that the
     phone's outer ring/shadow isn't clipped. */
  padding: 18px 0 28px; margin: 0 -24px; padding-left: 24px; padding-right: 24px;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.gallery .gshot { flex: none; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 158px; margin: 0 auto; }
.gallery .phone img { width: 100%; display: block; border-radius: 26px; }
.gallery figcaption { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--text); }

/* per-DB mobile keyword chips */
.db-mobile-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.db-mobile-list span {
  font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--bg-subtle); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 999px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-copy { max-width: 640px; margin: 0 auto; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .shots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .db-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
  section { padding: 64px 0; }
  .hero-dark { padding: 64px 0 72px; }
  .shots { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
  .phone-chip.tl { left: 4px; top: 80px; }
  .phone-chip.br { right: 4px; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; width: 100%; }
  .nav-links .btn { margin-top: 8px; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .pricing-grid { grid-template-columns: 1fr; }
  .db-grid { grid-template-columns: repeat(2, 1fr); }
}
