/* ============================================================
   REPLYFLOW — Dark Theme Landing Page v0.2
   ============================================================ */

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

:root {
  --bg:            #080810;
  --bg-1:          #0F0F1C;
  --bg-2:          #14142A;
  --border:        rgba(255,255,255,.08);
  --border-bright: rgba(255,255,255,.18);
  --brand:         #6366F1;
  --brand-dim:     rgba(99,102,241,.12);
  --brand-glow:    rgba(99,102,241,.45);
  --accent:        #10B981;
  --text:          #F1F1F5;
  --text-muted:    rgba(241,241,245,.55);
  --text-dim:      rgba(241,241,245,.28);
  --radius:        14px;
  --radius-lg:     24px;
  --font:          'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

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

/* ---- LAYOUT ---- */
.container       { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 680px; }

/* ---- SHARED TEXT ---- */
h1, h2, h3 { line-height: 1.15; font-weight: 800; }
strong { font-weight: 700; color: var(--text); }
em { font-style: italic; color: var(--brand); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: var(--font);
}
.btn-sm   { padding: 9px 20px; font-size: 14px; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: #7577F5;
  transform: translateY(-1px);
}

.btn-glow {
  box-shadow: 0 0 20px rgba(99,102,241,.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-bright);
}
.btn-ghost:hover {
  background: var(--brand-dim);
  border-color: var(--brand);
  color: #fff;
}

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(8,8,16,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--brand);
  color: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 130px 0 100px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99,102,241,.22) 0%, transparent 65%);
  pointer-events: none;
}
.hero .container {
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 1;
}
.hero-content { flex: 1; min-width: 0; }

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--brand-dim);
  border: 1px solid rgba(99,102,241,.3);
  color: #A5B4FC;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: .02em;
}

.hero-title {
  font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 800;
  letter-spacing: -.04em;
  margin-bottom: 24px;
  line-height: 1.08;
  display: flex;
  flex-wrap: wrap;
  gap: 0 .28em;
}
.italic-word { font-style: italic; color: var(--brand); }

/* Word reveal animation */
.word-wrap {
  display: inline-block;
  overflow: visible;
  vertical-align: bottom;
  padding-bottom: 0.08em;
}
.word {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .7s cubic-bezier(.16,1,.3,1), opacity .5s ease;
}
.word.visible {
  transform: translateY(0);
  opacity: 1;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.75;
  max-width: 520px;
}
.br-desktop { display: none; }
@media (min-width: 720px) { .br-desktop { display: block; } }

.hero-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.email-input {
  flex: 1;
  min-width: 200px;
  padding: 13px 18px;
  background: var(--bg-1);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.email-input::placeholder { color: var(--text-dim); }
.email-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}

.hero-tagline {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 36px;
  letter-spacing: .01em;
}

.hero-note { font-size: 13px; color: var(--text-dim); }

/* ---- PHONE MOCKUP ---- */
.phone-wrap {
  position: relative;
  flex-shrink: 0;
}
.phone-glow {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(99,102,241,.5) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.phone {
  width: 310px;
  background: #000;
  border-radius: 44px;
  padding: 18px 14px 30px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.1),
    0 40px 80px rgba(0,0,0,.6),
    inset 0 0 0 1px rgba(255,255,255,.04);
  animation: float 4s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}
.phone-notch {
  width: 110px; height: 26px;
  background: #000;
  border-radius: 0 0 18px 18px;
  margin: 0 auto 14px;
  border: 1px solid rgba(255,255,255,.06);
}
.phone-screen {
  background: #111318;
  border-radius: 30px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.msg-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.msg-avatar {
  width: 34px; height: 34px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.msg-name { font-weight: 700; font-size: 12px; color: #fff; }
.msg-time { font-size: 10px; color: rgba(255,255,255,.4); }

.bubble {
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 11.5px;
  line-height: 1.5;
  max-width: 92%;
}
.bubble-in {
  background: #1C1C2E;
  color: rgba(255,255,255,.9);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  border: 1px solid rgba(99,102,241,.2);
}
.bubble-out {
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
}
.bubble-confirm {
  background: rgba(16,185,129,.15);
  color: #34D399;
  border: 1px solid rgba(16,185,129,.25);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 13px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.bubble-rating { font-size: 11px; margin-bottom: 4px; }
.bubble-rating strong { color: #fff; font-size: 11px; }
.bubble-preview { color: rgba(255,255,255,.5); font-style: italic; font-size: 10.5px; margin-top: 3px; }
.bubble-divider { height: 1px; background: rgba(255,255,255,.06); margin: 7px 0; }
.bubble-label { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(99,102,241,.8); margin-bottom: 3px; }
.bubble-draft { color: rgba(255,255,255,.75); font-size: 10.5px; font-style: italic; }
.bubble-actions { font-size: 10px; color: rgba(255,255,255,.4); margin-top: 4px; }
.bubble-actions strong { color: var(--brand); font-weight: 700; }

/* ---- SECTIONS ---- */
.section { padding: 120px 0; position: relative; }
.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand);
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 64px;
  max-width: 720px;
  line-height: 1.15;
}

/* ---- STATS ---- */
.section-stats {
  background: linear-gradient(180deg, var(--bg) 0%, #0D0D20 50%, var(--bg) 100%);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.stat-card {
  background: rgba(99,102,241,.07);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  transform-style: preserve-3d;
  will-change: transform;
}
.stat-card:hover {
  border-color: rgba(99,102,241,.45);
  box-shadow: 0 8px 40px rgba(99,102,241,.18);
}
.stat-number {
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -.04em;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1;
}
.stat-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}
.stat-desc em { font-style: italic; color: #f87171; }
.stat-source {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.stats-callout {
  background: var(--bg-1);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.6;
}
.stats-callout span {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---- PROBLEM ---- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.problem-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  transform-style: preserve-3d;
  will-change: transform;
}
.problem-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.problem-icon { font-size: 30px; margin-bottom: 18px; }
.problem-card h3 { font-size: 20px; margin-bottom: 10px; color: var(--text); }
.problem-card p  { color: var(--text-muted); font-size: 15px; line-height: 1.65; }

/* ---- HOW IT WORKS ---- */
.section-how { background: var(--bg); }
.steps { max-width: 640px; display: flex; flex-direction: column; }
.step { display: flex; gap: 20px; }
.step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.step-number {
  width: 46px; height: 46px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 24px rgba(99,102,241,.4);
}
.step-line {
  width: 2px;
  flex: 1;
  min-height: 48px;
  background: linear-gradient(to bottom, var(--brand), rgba(99,102,241,.1));
  margin: 8px 0;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform .6s cubic-bezier(.16,1,.3,1) .3s;
}
.step.visible .step-line { transform: scaleY(1); }

.step-body { padding-top: 8px; padding-bottom: 48px; }
.step:last-child .step-body { padding-bottom: 0; }
.step-body h3 { font-size: 20px; margin-bottom: 10px; }
.step-body p  { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* ---- MISSION ---- */
.section-mission {
  background: var(--bg);
  overflow: hidden;
  text-align: center;
}
.section-mission .container-narrow { margin: 0 auto; }
.section-mission .section-label { text-align: center; }
.section-mission .section-title { margin: 0 auto 32px; text-align: center; }
.mission-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(99,102,241,.12) 0%, transparent 65%);
  pointer-events: none;
}
.mission-body {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: left;
}
.mission-quote {
  margin-top: 40px;
  padding: 28px 36px;
  background: var(--brand-dim);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  font-style: italic;
}

/* ---- WHO IT'S FOR ---- */
.section-who { overflow: hidden; background: linear-gradient(180deg, var(--bg) 0%, #0D0D20 100%); }
.ticker-wrap {
  margin-bottom: 40px;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.ticker { overflow: hidden; }
.ticker-inner {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker 28s linear infinite;
}
.ticker-inner:hover { animation-play-state: paused; }
.ticker-inner span {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  margin: 0 8px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
  transition: border-color .2s, color .2s;
}
.ticker-inner span:hover {
  border-color: rgba(99,102,241,.4);
  color: var(--text);
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.who-note {
  font-size: 17px;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- PRICING ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 740px;
  margin-bottom: 24px;
}
.pricing-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.pricing-card:hover {
  border-color: var(--border-bright);
}
.pricing-featured {
  border: 1px solid rgba(99,102,241,.45);
  box-shadow: 0 0 0 1px rgba(99,102,241,.1), 0 16px 48px rgba(99,102,241,.15);
}
.plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .04em;
}
.plan-name  { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .08em; }
.plan-price { font-size: 52px; font-weight: 800; letter-spacing: -.04em; margin-bottom: 28px; color: #fff; }
.plan-price span { font-size: 18px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 13px; margin-bottom: 32px; font-size: 15px; }
.plan-features li { display: flex; align-items: center; gap: 10px; }
.plan-features li.on  { color: var(--text); }
.plan-features li.off { color: var(--text-dim); }
.plan-features li.on::before  { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.plan-features li.off::before { content: '✗'; color: var(--text-dim); flex-shrink: 0; }
.pricing-note { font-size: 14px; color: var(--text-dim); }
.pricing-note a { color: var(--brand); text-decoration: none; font-weight: 600; }

/* ---- WAITLIST ---- */
.section-waitlist { text-align: center; overflow: hidden; }
.section-waitlist .container-narrow { margin: 0 auto; }
.waitlist-glow {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(99,102,241,.2) 0%, transparent 70%);
  pointer-events: none;
}
.waitlist-title {
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 18px;
  color: var(--text);
}
.waitlist-sub {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 44px;
  line-height: 1.7;
}
.waitlist-form { display: flex; flex-direction: column; gap: 12px; }
.waitlist-success { padding: 40px 20px; }
.success-icon {
  width: 56px; height: 56px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  margin: 0 auto 18px;
}
.waitlist-success p { font-size: 18px; color: var(--text); font-weight: 600; }
.hidden { display: none; }

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 52px 0;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-tagline { color: var(--text-muted); font-size: 15px; }
.footer-copy    { color: var(--text-dim); font-size: 13px; }

/* ---- SCROLL ENTRANCE ANIMATIONS ---- */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger siblings */
.stats-grid   .stat-card:nth-child(2)    { transition-delay: .1s; }
.stats-grid   .stat-card:nth-child(3)    { transition-delay: .2s; }
.stats-grid   .stat-card:nth-child(4)    { transition-delay: .3s; }
.problem-grid .problem-card:nth-child(2) { transition-delay: .1s; }
.problem-grid .problem-card:nth-child(3) { transition-delay: .2s; }
.steps .step:nth-child(2) { transition-delay: .1s; }
.steps .step:nth-child(3) { transition-delay: .2s; }
.steps .step:nth-child(4) { transition-delay: .3s; }
.pricing-grid .pricing-card:nth-child(2) { transition-delay: .12s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero .container { flex-direction: column; text-align: center; gap: 60px; }
  .hero-content    { display: flex; flex-direction: column; align-items: center; }
  .hero-title      { justify-content: center; }
  .hero-sub        { text-align: center; }
  .hero-form       { justify-content: center; }
}
@media (max-width: 640px) {
  .hero              { padding: 110px 0 80px; min-height: auto; }
  .section           { padding: 80px 0; }
  .section-title     { margin-bottom: 44px; }
  .phone             { width: 278px; }
  .hero-form         { flex-direction: column; }
  .hero-form .btn,
  .hero-form .email-input { width: 100%; }
  .stats-callout     { padding: 24px; font-size: 16px; }
  .mission-quote     { padding: 20px 24px; font-size: 17px; }
  .pricing-grid      { grid-template-columns: 1fr; max-width: 360px; }
}
