/* ==========================================================================
   ExitPulse — marketing site stylesheet
   Dark SaaS theme matching the ExitPulse app (constants/theme.ts)
   ========================================================================== */

/* ----------------------------- Design tokens ---------------------------- */
:root {
  --bg: #0B0F1A;
  --surface: #131829;
  --elevated: #1A2035;
  --mint: #00E5A0;
  --cyan: #00B4D8;
  --blue: #3B82F6;
  --purple: #8B5CF6;
  --amber: #FFB547;
  --text: #E8EDF5;
  --muted: #8892A7;
  --dim: #5A6478;
  --border: #1E2740;

  --grad: linear-gradient(135deg, #00E5A0 0%, #00B4D8 50%, #8B5CF6 100%);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --container: 1100px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 12px 30px -18px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 20px 50px -24px rgba(0, 0, 0, 0.85);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ------------------------------- Reset ---------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ------------------------------ Layout ---------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}

.section-sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ------------------------------ Buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--mint);
  color: #05130E;
  box-shadow: 0 8px 24px -10px rgba(0, 229, 160, 0.6);
}

.btn-primary:hover {
  background: #24f2b4;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -10px rgba(0, 229, 160, 0.7);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--elevated);
  border-color: #2b3860;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

/* -------------------------------- Header -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 26, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand-logo {
  width: 154px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 18px;
}

.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* -------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  padding: 112px 0 88px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(closest-side, rgba(0, 229, 160, 0.16), rgba(0, 180, 216, 0.06) 55%, transparent 75%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 26px;
}

.badge-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 900;
  letter-spacing: -0.035em;
  max-width: 820px;
  margin: 0 auto;
}

.hero-sub {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted);
}

.hero-meta {
  margin-top: 22px;
  font-size: 13px;
  color: var(--dim);
}

/* ------------------------------ Features -------------------------------- */
.grid {
  display: grid;
  gap: 20px;
}

.features-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: #2b3860;
  background: var(--elevated);
  box-shadow: var(--shadow-lift);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------- Five questions ------------------------------ */
.questions-list {
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: q;
}

.questions-list li {
  counter-increment: q;
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(16px, 2.4vw, 20px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.questions-list li::before {
  content: '0' counter(q);
  flex: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mint);
}

/* ------------------------------- Steps ----------------------------------- */
.steps-grid {
  grid-template-columns: repeat(4, 1fr);
}

.step {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.step-num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mint);
}

.step h3 {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ------------------------------ Audience --------------------------------- */
.audience {
  text-align: center;
}

.audience .section-sub {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.audience-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.audience-pill {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}

/* ------------------------------- Pricing -------------------------------- */
.pricing-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: stretch;
}

.pricing-section {
  padding-bottom: 56px;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.plan:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.plan-featured {
  border-color: rgba(0, 229, 160, 0.5);
  background: linear-gradient(180deg, rgba(0, 229, 160, 0.06), transparent 40%), var(--surface);
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #05130E;
  background: var(--mint);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.plan-badge.alt {
  background: var(--amber);
  color: #1a1204;
}

.plan-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}

.plan-price {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price .amount {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.plan-price .period {
  font-size: 13px;
  color: var(--dim);
  font-weight: 500;
}

.plan-desc {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
  min-height: 40px;
}

.plan-features {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.plan-features li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--text);
}

.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--mint);
  border-bottom: 2px solid var(--mint);
  transform: rotate(-45deg);
}

.plan .btn {
  margin-top: 22px;
}

.pricing-note {
  position: relative;
  max-width: 840px;
  margin: 32px auto 0;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 160, 0.28);
  border-radius: var(--radius);
  padding: 18px 58px;
  background:
    linear-gradient(180deg, rgba(0, 229, 160, 0.08), rgba(0, 180, 216, 0.04)),
    var(--surface);
  box-shadow: 0 18px 45px -30px rgba(0, 229, 160, 0.65);
}

.pricing-note::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 24px rgba(0, 229, 160, 0.55);
  transform: translateY(-50%);
}

.pricing-note::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 22%, transparent 78%, rgba(255, 255, 255, 0.04));
}

.pricing-note p {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.65;
  text-align: center;
}

/* ------------------------------- CTA band ------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 64px 40px;
  text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, rgba(0, 229, 160, 0.14), transparent 55%),
    linear-gradient(180deg, var(--elevated), var(--surface));
}

.cta-band h2 {
  font-size: clamp(28px, 4vw, 40px);
  max-width: 620px;
  margin: 0 auto;
}

.cta-band p {
  margin: 16px auto 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 17px;
}

.cta-band .hero-cta {
  margin-top: 30px;
}

/* --------------------------- Legal / prose ------------------------------ */
.page-head {
  padding: 72px 0 24px;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.page-head .lede {
  margin-top: 14px;
  color: var(--muted);
  max-width: 620px;
}

.draft-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  background: rgba(255, 181, 71, 0.1);
  border: 1px solid rgba(255, 181, 71, 0.28);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.prose {
  max-width: 760px;
  padding: 48px 0 40px;
}

.prose h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--muted);
  margin-bottom: 14px;
}

.prose ul.bulleted {
  list-style: disc;
  padding-left: 22px;
  color: var(--muted);
  margin-bottom: 14px;
}

.prose ul.bulleted li {
  margin-bottom: 8px;
}

.prose a {
  color: var(--mint);
}

.prose a:hover {
  text-decoration: underline;
}

.prose h3 {
  font-size: 17px;
  margin-top: 26px;
  margin-bottom: 10px;
  color: var(--text);
}

.prose strong {
  color: var(--text);
}

.prose .table-wrap {
  overflow-x: auto;
  margin: 18px 0;
}

.prose table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}

.prose th {
  color: var(--text);
  background: var(--surface);
  font-size: 13px;
}

/* ------------------------------- Contact -------------------------------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  padding: 56px 0 40px;
  align-items: start;
}

.contact-intro h1 {
  font-size: clamp(28px, 4vw, 40px);
}

.contact-intro p {
  margin-top: 16px;
  color: var(--muted);
}

.contact-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-list li {
  color: var(--muted);
  font-size: 15px;
}

.contact-list strong {
  color: var(--text);
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--dim);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(0, 229, 160, 0.16);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.banner-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 229, 160, 0.1);
  border: 1px solid rgba(0, 229, 160, 0.32);
  color: var(--mint);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

/* --------------------------------- 404 ---------------------------------- */
.notfound {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 0;
}

.notfound .code {
  font-size: clamp(80px, 16vw, 140px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.notfound h1 {
  margin-top: 12px;
  font-size: clamp(24px, 4vw, 34px);
}

.notfound p {
  margin-top: 14px;
  color: var(--muted);
  max-width: 420px;
}

.notfound .btn {
  margin-top: 28px;
}

/* -------------------------------- Footer -------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(19, 24, 41, 0.5));
  padding: 64px 0 32px;
  margin-top: 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-blurb {
  color: var(--muted);
  font-size: 14px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.15s var(--ease);
}

.footer-col a:hover {
  color: var(--mint);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom .copy {
  color: var(--dim);
  font-size: 13px;
}

.footer-bottom .tagline {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1000px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .plan-featured {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .features-grid,
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 72px 0;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding: 84px 0 64px;
  }
  .cta-band {
    padding: 48px 24px;
  }
}

@media (max-width: 560px) {
  .features-grid,
  .steps-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-note {
    padding: 20px 22px 20px 46px;
    text-align: left;
  }
  .pricing-note::before {
    left: 20px;
    top: 28px;
    transform: none;
  }
  .pricing-note p {
    text-align: left;
  }
  .nav-actions .btn-ghost {
    display: none;
  }
  .container {
    padding: 0 18px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ---- App store badges (marketing) ---- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.site-footer .store-badges {
  justify-content: flex-start;
  margin-top: 18px;
}
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: var(--radius-sm, 10px);
  background: var(--elevated, #1A2035); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  transition: border-color var(--ease, .15s ease), transform var(--ease, .15s ease);
}
.store-badge:hover { border-color: var(--mint); transform: translateY(-1px); }
.store-badges.is-soon .store-badge { pointer-events: none; opacity: 0.75; }
.store-icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--text); }
.store-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-text small { font-size: 10px; letter-spacing: .02em; color: var(--muted); }
.store-text strong { font-size: 15px; font-weight: 700; }
