/* ============================================================
   Built Business OS — styles
   Mobile first. Tested widths: 320px (small Android), 375/390/430px
   (iPhone), 768px (tablet), 1280px+ (desktop).
   ============================================================ */
:root {
  --bg: #120a10;
  --bg-2: #1b0f18;
  --surface: #241522;
  --surface-2: #2e1b2b;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f6eef3;
  --muted: #c8b6c2;
  --soft: #9d8896;
  --pink: #ff5c9d;
  --pink-2: #ff8fbd;
  --pink-ink: #2a0716;
  --gold: #f4c77a;
  --green: #4fd6a0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --max: 1160px;
  --gutter: 20px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--pink-2); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--pink), #ff7a8a);
  color: var(--pink-ink);
  box-shadow: 0 10px 30px rgba(255, 92, 157, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(255, 92, 157, 0.5); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 0.95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 10, 16, 0.85);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.05rem; white-space: nowrap; }
.nav-links { display: none; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .login-link { display: none; }
.header-actions .header-cta { display: none; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer;
}
.mobile-menu { border-top: 1px solid var(--line); padding: 8px 0 16px; }
.mobile-menu a { display: block; padding: 14px 0; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 48px 0 56px;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(255, 92, 157, 0.22), transparent 70%),
    radial-gradient(50% 40% at 0% 90%, rgba(244, 199, 122, 0.10), transparent 70%);
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 92, 157, 0.12); color: var(--pink-2);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.1rem, 8.5vw, 3.9rem); }
.hero h1 em { font-style: normal; color: var(--pink-2); }
.lead { font-size: clamp(1.05rem, 3.6vw, 1.25rem); color: var(--muted); max-width: 36em; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 14px; }
.fineprint { font-size: 0.9rem; color: var(--soft); }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.92rem; }
.trust-row li { display: flex; align-items: center; gap: 8px; }
.check { width: 18px; height: 18px; flex: none; color: var(--green); }

/* ---------- App mockup ---------- */
.mockup {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 16px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
.mock-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mock-hello { font-weight: 700; }
.mock-hello small { display: block; color: var(--soft); font-weight: 500; font-size: 0.8rem; }
.mock-dots { display: flex; gap: 6px; }
.mock-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.mock-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.stat-label { font-size: 0.75rem; color: var(--soft); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.35rem; font-weight: 800; }
.stat-value.up { color: var(--green); }
.mock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mock-list li {
  display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 0.92rem;
}
.mock-time { font-weight: 800; color: var(--pink-2); }
.mock-client small { display: block; color: var(--soft); font-size: 0.78rem; }
.tag { font-size: 0.72rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: rgba(79, 214, 160, 0.14); color: var(--green); }
.tag-new { background: rgba(244, 199, 122, 0.14); color: var(--gold); }
.mock-float {
  position: absolute; right: -8px; bottom: -34px;
  background: var(--text); color: var(--pink-ink);
  border-radius: 14px; padding: 10px 14px; font-size: 0.85rem; font-weight: 700;
  box-shadow: var(--shadow); max-width: 220px;
}
.mock-float small { display: block; font-weight: 500; color: #6d4b5f; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; scroll-margin-top: 64px; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 6vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.kicker { display: block; color: var(--pink-2); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }

.grid { display: grid; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255, 92, 157, 0.12); color: var(--pink-2);
  margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; }

.pain .card { border-left: 3px solid var(--pink); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }

.steps { counter-reset: step; }
.step { position: relative; padding-top: 58px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 20px; left: 24px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pink); color: var(--pink-ink); font-weight: 800;
}

/* ---------- Pricing ---------- */
.price-card {
  max-width: 460px; margin: 0 auto;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(255, 92, 157, 0.35);
  border-radius: 24px; padding: 32px 24px; text-align: center;
  box-shadow: var(--shadow);
}
.price-badge { display: inline-block; background: var(--pink); color: var(--pink-ink); font-weight: 800; font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.price { font-size: 3rem; font-weight: 800; line-height: 1; margin: 6px 0; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-note { color: var(--muted); margin-bottom: 22px; }
.price-list { list-style: none; padding: 0; margin: 0 0 26px; text-align: left; display: grid; gap: 12px; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; }
.price-list .check { margin-top: 3px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; font-weight: 700; min-height: 56px;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--pink-2); flex: none; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--muted); }

/* ---------- Final CTA ---------- */
.final-cta {
  text-align: center;
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(255, 92, 157, 0.25), transparent 70%),
    var(--bg);
}
.final-cta h2 { font-size: clamp(1.8rem, 6.5vw, 2.8rem); }
.final-cta .lead { margin: 0 auto 28px; }

/* ---------- Waitlist form ---------- */
[hidden] { display: none !important; }
.waitlist-form { margin: 28px 0 14px; }
.waitlist-row { display: flex; flex-direction: column; gap: 10px; }
.waitlist-form input[type=email],
.waitlist-form select {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px+ stops iOS zooming into the field */
}
.waitlist-form select { appearance: none; -webkit-appearance: none; color: var(--muted); }
.waitlist-form input::placeholder { color: var(--soft); }
.waitlist-form input:focus,
.waitlist-form select:focus { outline: 3px solid var(--pink-2); outline-offset: 2px; border-color: transparent; }
.waitlist-form button[disabled] { opacity: 0.6; cursor: progress; }
.waitlist-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.waitlist-status { min-height: 1.5em; margin: 10px 0 0; font-size: 0.95rem; color: var(--muted); }
.waitlist-status[data-state="ok"] { color: var(--green); font-weight: 600; }
.waitlist-status[data-state="error"] { color: var(--pink-2); }
.waitlist-form.is-done input,
.waitlist-form.is-done select,
.waitlist-form.is-done button { display: none; }
.waitlist-form-full { display: grid; gap: 10px; max-width: 460px; margin: 0 auto 14px; text-align: left; }
.waitlist-form-full .waitlist-status { text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 calc(36px + env(safe-area-inset-bottom));
  color: var(--soft);
  font-size: 0.92rem;
}
.footer-row { display: grid; gap: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; list-style: none; }
.footer-links a { text-decoration: none; display: inline-block; padding: 6px 0; }
.footer-links a:hover { color: var(--text); }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 12px max(var(--gutter), env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom));
  background: rgba(18, 10, 16, 0.92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
body.has-mobile-cta { padding-bottom: 84px; }

/* ---------- Cookie banner ---------- */
/* Mobile: a slim bar just under the header, so it never covers the
   waitlist form or the sticky "Join the waitlist" button at the bottom. */
.cookie-banner {
  position: fixed; z-index: 60;
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  top: calc(70px + env(safe-area-inset-top));
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: #2a1a24;
  border-radius: 14px; padding: 8px 10px 8px 14px; box-shadow: var(--shadow);
  font-size: 0.8rem; line-height: 1.35;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner a { color: #a3175a; font-weight: 600; }
.cookie-actions { display: flex; gap: 6px; flex: none; }
.cookie-actions .btn { min-height: 36px; padding: 6px 12px; font-size: 0.82rem; }
.cookie-actions .btn-ghost { color: #2a1a24; border-color: rgba(42, 26, 36, 0.25); }
.cookie-actions .btn-ghost:hover { background: rgba(42, 26, 36, 0.06); }

/* ---------- Legal / simple pages ---------- */
.page { padding: 48px 0 72px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: clamp(2rem, 7vw, 2.8rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2em; font-family: var(--font); font-weight: 800; }
.prose p, .prose li { color: var(--muted); }
.prose a { color: var(--pink-2); }
.prose .updated { color: var(--soft); font-size: 0.9rem; }
.center-card { max-width: 560px; margin: 0 auto; text-align: center; }
.center-card .icon { margin: 0 auto 20px; width: 64px; height: 64px; border-radius: 20px; }
.center-card .icon svg { width: 32px; height: 32px; }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .hero-cta { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .waitlist-row { flex-direction: row; }
  .waitlist-row input { flex: 1; min-width: 0; }
  .waitlist-row .btn { flex: none; }
  .mock-stats { grid-template-columns: repeat(4, 1fr); }
  .header-actions .header-cta { display: inline-flex; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .footer-row { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 880px) {
  :root { --gutter: 32px; }
  .nav-links { display: flex; }
  .nav-toggle, .mobile-menu { display: none !important; }
  .header-actions .login-link { display: inline-flex; }
  .hero { padding: 88px 0 100px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .section { padding: 96px 0; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .mobile-cta { display: none; }
  body.has-mobile-cta { padding-bottom: 0; }
  .cookie-banner { left: auto; right: 24px; top: auto; bottom: 24px; display: block; padding: 18px; font-size: 0.93rem; }
  .cookie-banner p { margin: 0 0 14px; }
  .cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .cookie-actions .btn { min-height: 46px; padding: 10px 14px; font-size: 1rem; }
}
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .brand-name { font-size: 0.95rem; }
  .header-actions .btn-sm { padding: 10px 14px; }
  .mock-list li { grid-template-columns: 48px 1fr; }
  .mock-list .tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
