/* ═══════════════════════════════════════════════════
   REVEL FLOW — Premium Design System v4
   ═══════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --brand: #5B2EFF;
  --brand-light: #7B5CFF;
  --brand-dark: #4318D9;
  --brand-glow: rgba(91,46,255,.25);
  --green: #22C55E;
  --green-bg: rgba(34,197,94,.12);
  --red: #EF4444;
  --red-bg: rgba(239,68,68,.12);
  --amber: #F59E0B;
  --amber-bg: rgba(245,158,11,.12);
  --bg: #FAFAFE;
  --surface: #FFFFFF;
  --surface-2: #F4F3F8;
  --border: #E8E6EE;
  --text: #1A1625;
  --text-2: #6B6580;
  --text-3: #9B95A8;
  --hero-bg: #F5F2FC;
  --hero-text: #1A1625;
  --hero-text-2: rgba(26,22,37,.65);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(26,22,37,.06), 0 6px 16px rgba(26,22,37,.04);
  --shadow-lg: 0 4px 12px rgba(26,22,37,.08), 0 16px 40px rgba(26,22,37,.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { overflow-x: hidden; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
ul { list-style: none; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Buttons ── */
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--brand); color: #fff;
  border-radius: 10px; font-weight: 600; font-size: .95rem;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 12px var(--brand-glow);
}
.btn-cta:hover { background: var(--brand-light); transform: translateY(-1px); box-shadow: 0 4px 20px var(--brand-glow); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border: 1.5px solid rgba(26,22,37,.16); color: rgba(26,22,37,.75);
  border-radius: 10px; font-weight: 600; font-size: .95rem;
  transition: border-color var(--transition), color var(--transition);
}
.btn-ghost:hover { border-color: rgba(26,22,37,.35); color: var(--text); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border: 1.5px solid var(--border); color: var(--text);
  border-radius: 10px; font-weight: 600; font-size: .95rem;
  transition: border-color var(--transition), background var(--transition);
}
.btn-outline:hover { border-color: var(--brand); background: rgba(91,46,255,.04); color: var(--brand); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Section heads ── */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-eyebrow { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; color: var(--text); margin-bottom: 16px; }
.section-head p { font-size: 1.1rem; color: var(--text-2); line-height: 1.6; }

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(255,255,255,.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26,22,37,.08);
  transition: background .3s, padding .3s;
}
.nav.scrolled { padding: 10px 0; background: rgba(255,255,255,.95); box-shadow: 0 1px 0 rgba(26,22,37,.06); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 1.3rem; font-weight: 800; color: #1A1625; letter-spacing: -.02em; }
.nav-logo span { color: var(--brand-light); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: rgba(26,22,37,.65); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #1A1625; }
.nav-login { color: rgba(26,22,37,.8) !important; }
.nav-links .btn-cta { padding: 10px 22px; font-size: .88rem; color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: #1A1625; border-radius: 2px; transition: .3s; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: var(--hero-bg); overflow: hidden; padding: 120px 0 80px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  position: absolute; width: 800px; height: 800px; top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(91,46,255,.15) 0%, transparent 65%);
  animation: glowPulse 6s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.hero-grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(91,46,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(91,46,255,.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; position: relative; z-index: 2; }
.hero-eyebrow { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-light); margin-bottom: 20px; }
.hero-text h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; line-height: 1.1; color: var(--hero-text); margin-bottom: 24px; }
.hero-text h1 em { font-style: normal; background: linear-gradient(135deg, var(--brand-light), #A78BFA); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-text p { font-size: 1.15rem; color: var(--hero-text-2); line-height: 1.7; margin-bottom: 36px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero demo window */
.hero-demo { position: relative; }
.demo-window {
  background: #FFFFFF; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(26,22,37,.1), 0 0 0 1px rgba(26,22,37,.06);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.demo-window:hover { transform: perspective(1200px) rotateY(-1deg) rotateX(0deg); }
.demo-titlebar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 10px; height: 10px; border-radius: 50%; }
.demo-dots i:nth-child(1) { background: #EF4444; }
.demo-dots i:nth-child(2) { background: #F59E0B; }
.demo-dots i:nth-child(3) { background: #22C55E; }
.demo-url { font-size: .72rem; color: var(--text-3); background: var(--surface-2); padding: 4px 12px; border-radius: 6px; }
.demo-body { padding: 20px; }

/* Demo stats */
.demo-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.demo-stat { background: var(--surface-2); border-radius: 10px; padding: 14px; border: 1px solid var(--border); }
.demo-stat-val { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.demo-stat-label { font-size: .7rem; color: var(--text-3); margin-top: 2px; }
.demo-stat-change { font-size: .72rem; font-weight: 600; margin-top: 4px; }
.demo-stat-change.up { color: var(--green); }
.demo-stat-bar { height: 4px; background: var(--surface-2); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.demo-stat-fill { height: 100%; border-radius: 4px; transition: width 1.5s cubic-bezier(.4,0,.2,1); }
.demo-stat-fill.green { background: var(--green); }
.demo-stat-fill.purple { background: var(--brand); }

/* Demo feed */
.demo-feed { background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); overflow: hidden; }
.demo-feed-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: .75rem; color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--border); }
.demo-live-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; animation: livePulse 2s infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.demo-feed-list { max-height: 200px; overflow: hidden; }
.demo-feed-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  animation: feedSlideIn .5s cubic-bezier(.4,0,.2,1);
}
@keyframes feedSlideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.demo-feed-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.demo-feed-text { flex: 1; min-width: 0; }
.demo-feed-name { font-size: .75rem; font-weight: 600; color: var(--text); }
.demo-feed-comment { font-size: .68rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-feed-stars { font-size: .72rem; color: #FBBF24; flex-shrink: 0; letter-spacing: 1px; }
.demo-feed-tag { font-size: .6rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; flex-shrink: 0; }
.demo-feed-tag.pos { background: var(--green-bg); color: var(--green); }
.demo-feed-tag.neg { background: var(--red-bg); color: var(--red); }
.demo-feed-tag.neu { background: var(--amber-bg); color: var(--amber); }

/* Floating notification */
.demo-notif {
  position: absolute; top: -10px; right: -20px;
  background: #FFFFFF; border-radius: 12px; padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px rgba(26,22,37,.14); border: 1px solid var(--border);
  opacity: 0; transform: translateY(-10px) scale(.95);
  animation: notifIn 0.5s 2s forwards cubic-bezier(.4,0,.2,1);
  z-index: 3;
}
@keyframes notifIn { to { opacity: 1; transform: translateY(0) scale(1); } }
.demo-notif-icon { font-size: 1.2rem; }
.demo-notif-text strong { display: block; font-size: .75rem; color: var(--text); }
.demo-notif-text span { font-size: .68rem; color: var(--text-3); }

/* Floating phone */
.demo-phone {
  position: absolute; bottom: -20px; left: -30px;
  width: 160px; background: #FFFFFF; border-radius: 18px;
  padding: 8px; box-shadow: 0 12px 32px rgba(26,22,37,.16);
  border: 1px solid var(--border);
  opacity: 0; transform: translateY(20px) scale(.9);
  animation: phoneIn .6s 1.2s forwards cubic-bezier(.4,0,.2,1);
  z-index: 3;
}
@keyframes phoneIn { to { opacity: 1; transform: translateY(0) scale(1); } }
.demo-phone-screen { background: var(--surface-2); border-radius: 12px; padding: 14px 10px; text-align: center; }
.demo-phone-header { font-size: .65rem; color: var(--text-2); margin-bottom: 8px; font-weight: 600; white-space: nowrap; }
.demo-phone-stars { font-size: .95rem; color: #FBBF24; letter-spacing: 0; margin-bottom: 4px; white-space: nowrap; display: flex; justify-content: center; gap: 1px; flex-wrap: nowrap; overflow: hidden; }
.demo-phone-star { transition: .3s; flex-shrink: 0; line-height: 1; }
.demo-phone-label { font-size: .6rem; color: var(--green); font-weight: 600; margin-bottom: 8px; }
.demo-phone-btn { font-size: .6rem; background: var(--brand); color: #fff; padding: 5px 12px; border-radius: 6px; font-weight: 600; }

/* ═══════════════ PROBLEM ═══════════════ */
.problem { padding: 100px 0; background: var(--bg); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.problem-before, .problem-after { padding: 36px; border-radius: var(--radius-lg); }
.problem-before { background: var(--surface); border: 1px solid var(--border); }
.problem-after { background: linear-gradient(135deg, rgba(91,46,255,.04), rgba(91,46,255,.08)); border: 1px solid rgba(91,46,255,.15); }
.problem-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 6px 14px; border-radius: 6px; margin-bottom: 24px; }
.problem-tag-bad { background: var(--red-bg); color: var(--red); }
.problem-tag-good { background: rgba(91,46,255,.12); color: var(--brand); }
.problem-list li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; font-size: .95rem; color: var(--text-2); line-height: 1.5; }
.x-icon { color: var(--red); font-weight: 700; font-size: .85rem; flex-shrink: 0; margin-top: 2px; }
.check-icon { color: var(--green); font-weight: 700; font-size: .85rem; flex-shrink: 0; margin-top: 2px; }

/* ═══════════════ HOW IT WORKS ═══════════════ */
.how { padding: 100px 0; background: var(--surface); }
.how-tabs { max-width: 1000px; margin: 0 auto; }
.how-tab-bar { display: flex; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 40px; }
.how-tab {
  flex: 1; padding: 14px 8px; border-radius: 10px; text-align: center;
  font-size: .85rem; font-weight: 600; color: var(--text-2);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.how-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.how-tab-num { font-size: .65rem; font-weight: 700; color: var(--brand); display: block; }
.how-panel { display: none; gap: 48px; align-items: center; }
.how-panel.active { display: grid; grid-template-columns: 1fr 1fr; animation: panelFadeIn .4s; }
@keyframes panelFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.how-panel-text h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.how-panel-text p { font-size: 1rem; color: var(--text-2); line-height: 1.7; }

/* How visuals */
.how-phone {
  background: var(--hero-bg); border-radius: 28px; padding: 12px;
  max-width: 220px; margin: 0 auto; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.how-phone-notch { width: 80px; height: 5px; background: var(--border); border-radius: 4px; margin: 0 auto 16px; }
.how-phone-content { background: var(--surface-2); border-radius: 18px; padding: 24px 16px; text-align: center; }
.how-qr-icon { font-size: 2.4rem; margin-bottom: 12px; }
.how-phone-title { font-size: .85rem; color: var(--text-2); margin-bottom: 12px; font-weight: 600; }
.how-phone-stars { font-size: 1.4rem; color: #FBBF24; letter-spacing: 3px; margin-bottom: 8px; }
.how-phone-textarea { background: var(--surface-2); border-radius: 8px; padding: 10px; font-size: .75rem; color: var(--text-3); text-align: left; margin-bottom: 12px; font-style: italic; }
.how-phone-submit { background: var(--brand); color: #fff; padding: 10px; border-radius: 8px; font-size: .8rem; font-weight: 600; }


/* Collect step — feedback form mockup */
.how-qr-block { margin-bottom: 12px; display: flex; justify-content: center; }

/* Scan card — Step 1 visual */
.how-scan-card {
  background: var(--hero-bg); border-radius: 20px; padding: 28px 24px;
  max-width: 260px; margin: 0 auto;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(26,22,37,.1);
}
.how-scan-top { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.how-scan-qr { background: var(--surface-2); border-radius: 12px; padding: 16px; display: flex; align-items: center; justify-content: center; }
.how-scan-label { font-size: .78rem; color: var(--text-2); font-weight: 500; letter-spacing: .02em; }
.how-scan-divider { height: 1px; background: var(--border); margin: 20px 0; }
.how-scan-form { display: flex; flex-direction: column; gap: 10px; }
.how-scan-prompt { font-size: .82rem; font-weight: 600; color: var(--text); }
.how-scan-stars { font-size: 1.2rem; color: #FBBF24; letter-spacing: 3px; }
.how-scan-input { background: var(--surface-2); border-radius: 8px; padding: 10px 12px; font-size: .75rem; color: var(--text-3); font-style: italic; }
.how-scan-submit { background: var(--brand); color: #fff; border-radius: 8px; padding: 10px; font-size: .8rem; font-weight: 600; text-align: center; }

/* Inbox panel */
.how-inbox { background: var(--surface-2); border-radius: var(--radius); padding: 16px; border: 1px solid var(--border); }
.how-inbox-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: .82rem; }
.how-inbox-row.highlight { background: rgba(91,46,255,.06); }
.how-inbox-name { font-weight: 600; color: var(--text); min-width: 72px; }
.how-inbox-loc { color: var(--text-3); font-size: .75rem; flex: 1; }
.how-inbox-stars { color: #FBBF24; font-size: .8rem; letter-spacing: 1px; }
.how-inbox-tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

/* Resolve panel */
.how-resolve { max-width: 360px; margin: 0 auto; }
.how-resolve-card { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.how-resolve-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .82rem; margin-bottom: 12px; }
.how-resolve-time { color: var(--text-3); font-size: .72rem; margin-left: auto; }
.how-resolve-comment { font-size: .9rem; color: var(--text-2); font-style: italic; padding: 12px; background: var(--surface-2); border-radius: 8px; margin-bottom: 12px; }
.how-resolve-stars { font-size: .85rem; color: #FBBF24; margin-bottom: 16px; }
.how-resolve-rating { color: var(--text-3); font-size: .75rem; }
.how-resolve-status { display: flex; align-items: center; gap: 8px; }
.status-step { font-size: .72rem; font-weight: 600; padding: 5px 10px; border-radius: 6px; background: var(--surface-2); color: var(--text-3); }
.status-step.done { background: var(--green-bg); color: var(--green); }
.status-step.active { background: rgba(91,46,255,.1); color: var(--brand); }
.status-arrow { color: var(--text-3); font-size: .7rem; }

/* Chart panel */
.how-chart { background: var(--surface-2); border-radius: var(--radius); padding: 20px; border: 1px solid var(--border); }
.how-chart-header { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 20px; }
.how-chart-bars { display: flex; gap: 16px; align-items: flex-end; height: 120px; margin-bottom: 16px; }
.how-bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.how-bar { width: 100%; background: linear-gradient(180deg, var(--brand-light), var(--brand)); border-radius: 6px 6px 0 0; transition: height 1s cubic-bezier(.4,0,.2,1); }
.how-bar.accent { background: linear-gradient(180deg, #A78BFA, var(--brand)); }
.how-bar-group span { font-size: .68rem; color: var(--text-3); margin-top: 6px; }
.how-chart-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.how-chart-legend span { font-size: .72rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.dot-green, .dot-purple, .dot-amber { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); }
.dot-purple { background: var(--brand); }
.dot-amber { background: var(--amber); }

/* Tags */
.tag-sm { font-size: .65rem; font-weight: 600; padding: 3px 8px; border-radius: 5px; }
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-red { background: var(--red-bg); color: var(--red); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.topic-tag { font-size: .68rem; padding: 4px 10px; border-radius: 5px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

/* ═══════════════ FEATURES — INBOX ═══════════════ */
.features { padding: 100px 0; background: var(--bg); }
.inbox-demo { display: grid; grid-template-columns: 200px 1fr; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface); }
.inbox-sidebar { background: var(--surface-2); padding: 16px 12px; border-right: 1px solid var(--border); }
.inbox-filter { padding: 10px 12px; border-radius: 8px; font-size: .82rem; font-weight: 500; color: var(--text-2); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background .2s; margin-bottom: 2px; }
.inbox-filter:hover { background: rgba(91,46,255,.04); }
.inbox-filter.active { background: rgba(91,46,255,.08); color: var(--brand); font-weight: 600; }
.inbox-count { font-size: .72rem; font-weight: 700; background: var(--surface); padding: 2px 8px; border-radius: 10px; }
.inbox-count.green { color: var(--green); }
.inbox-count.red { color: var(--red); }
.inbox-count.amber { color: var(--amber); }
.inbox-main { padding: 8px; }
.inbox-item { display: flex; gap: 14px; padding: 16px; border-radius: 10px; transition: background .2s; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-item.urgent { border-left: 3px solid var(--red); }
.inbox-avatar { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--brand-light), var(--brand)); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.inbox-avatar.red-bg { background: linear-gradient(135deg, #F87171, var(--red)); }
.inbox-content { flex: 1; min-width: 0; }
.inbox-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.inbox-meta strong { font-size: .88rem; }
.inbox-loc-tag { font-size: .68rem; color: var(--text-3); background: var(--surface-2); padding: 2px 8px; border-radius: 4px; }
.inbox-time { font-size: .72rem; color: var(--text-3); margin-left: auto; }
.inbox-badge { font-size: .65rem; font-weight: 700; color: var(--red); background: var(--red-bg); padding: 3px 8px; border-radius: 4px; }
.inbox-text { font-size: .88rem; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; }
.inbox-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stars-sm { font-size: .78rem; color: #FBBF24; letter-spacing: 1px; }

/* ═══════════════ INSIGHTS ═══════════════ */
.insights { padding: 100px 0; background: var(--surface); }
.insights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.insight-card { background: var(--bg); border-radius: var(--radius); padding: 28px; border: 1px solid var(--border); }
.insight-icon { font-size: 1.6rem; margin-bottom: 12px; }
.insight-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }

/* Mini bars */
.mini-bars { display: flex; flex-direction: column; gap: 8px; }
.mini-bar-row { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--text-2); }
.mini-bar-row span:first-child { width: 22px; text-align: right; }
.mini-bar-row span:last-child { width: 30px; }
.mini-bar-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.mini-bar-fill { height: 100%; background: var(--brand); border-radius: 4px; }
.mini-bar-fill.amber { background: var(--amber); }
.mini-bar-fill.red { background: var(--red); }

/* Location compare */
.loc-compare { display: flex; flex-direction: column; gap: 14px; }
.loc-row { display: flex; align-items: center; gap: 10px; }
.loc-name { font-size: .82rem; color: var(--text); font-weight: 500; width: 80px; }
.loc-rating { font-size: .82rem; font-weight: 700; color: var(--brand); width: 28px; }
.loc-bar { flex: 1; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.loc-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-light)); border-radius: 4px; }

/* Topics cloud */
.topics-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pill { font-size: .82rem; padding: 8px 14px; background: var(--surface-2); border-radius: 8px; color: var(--text-2); border: 1px solid var(--border); }
.topic-pill.large { background: rgba(91,46,255,.08); color: var(--brand); border-color: rgba(91,46,255,.2); font-weight: 600; }
.topic-pill.small { font-size: .75rem; }
.topic-pill em { font-style: normal; font-weight: 700; margin-left: 4px; }

/* Resolution ring */
.resolution-ring { width: 100px; height: 100px; margin: 0 auto 16px; position: relative; }
.ring-svg { width: 100%; height: 100%; }
.ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; color: var(--brand); }
.resolution-stats { display: flex; justify-content: center; gap: 16px; font-size: .72rem; color: var(--text-3); }

/* ═══════════════ SCALE ═══════════════ */
.scale { padding: 100px 0; background: var(--bg); }
.scale-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.scale-text .section-eyebrow { text-align: left; }
.scale-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 16px; }
.scale-text p { color: var(--text-2); line-height: 1.7; margin-bottom: 28px; }
.scale-features { display: flex; flex-direction: column; gap: 12px; }
.scale-feat { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--text); }
.scale-locations { display: flex; flex-direction: column; gap: 10px; }
.scale-loc {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: var(--surface); border-radius: 10px; border: 1px solid var(--border);
  font-size: .9rem; font-weight: 500; transition: all .3s;
}
.scale-loc.active { border-color: var(--brand); background: rgba(91,46,255,.04); box-shadow: 0 0 0 3px var(--brand-glow); }
.scale-loc.dim { opacity: .45; }
.scale-loc span { margin-left: auto; font-size: .78rem; color: var(--text-3); font-weight: 600; }
.scale-loc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.scale-loc.dim .scale-loc-dot { background: var(--text-3); }

/* ═══════════════ PRICING ═══════════════ */
.pricing { padding: 100px 0; background: var(--surface); }
.pricing-toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 48px; }
.toggle-label { font-size: .9rem; font-weight: 500; color: var(--text-2); transition: color .3s; }
.toggle-label.active { color: var(--text); font-weight: 600; }
.toggle-switch {
  width: 52px; height: 28px; background: var(--surface-2); border-radius: 14px;
  position: relative; cursor: pointer; border: 1px solid var(--border); transition: background .3s;
}
.toggle-switch[aria-checked="true"] { background: var(--brand); border-color: var(--brand); }
.toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.toggle-switch[aria-checked="true"] .toggle-knob { transform: translateX(24px); }
.save-badge { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--green); background: var(--green-bg); padding: 3px 8px; border-radius: 4px; margin-left: 4px; }

.pricing-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
.price-card {
  background: var(--bg); border-radius: var(--radius-lg); padding: 32px 24px;
  border: 1px solid var(--border); position: relative; transition: transform .3s, box-shadow .3s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card.popular { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); }
.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: .68rem; font-weight: 700;
  padding: 5px 14px; border-radius: 20px; white-space: nowrap;
}
.price-tier { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: 12px; }
.price-amount { display: flex; align-items: baseline; gap: 2px; margin-bottom: 4px; }
.price-dollar { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.price-num { font-size: 3rem; font-weight: 800; color: var(--text); line-height: 1; transition: all .4s; }
.price-period { font-size: .85rem; color: var(--text-3); margin-left: 2px; }
.price-location { font-size: .82rem; color: var(--text-2); margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.price-features { margin-bottom: 28px; }
.price-features li { padding: 7px 0; font-size: .85rem; color: var(--text-2); display: flex; align-items: center; gap: 10px; }
.price-features li::before { content: '✓'; color: var(--green); font-weight: 700; font-size: .8rem; }

/* ═══════════════ FAQ ═══════════════ */
.faq { padding: 100px 0; background: var(--bg); }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; padding: 20px 0; font-size: 1rem; font-weight: 600;
  color: var(--text); display: flex; justify-content: space-between; align-items: center;
  transition: color .2s;
}
.faq-q:hover { color: var(--brand); }
.faq-icon { font-size: 1.4rem; font-weight: 300; color: var(--text-3); transition: transform .3s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s cubic-bezier(.4,0,.2,1), padding .4s; }
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 20px; }
.faq-a p { font-size: .92rem; color: var(--text-2); line-height: 1.7; }

/* ═══════════════ FINAL CTA ═══════════════ */
.final-cta {
  position: relative; padding: 120px 0; text-align: center;
  background: var(--hero-bg); overflow: hidden;
}
.cta-glow {
  position: absolute; width: 600px; height: 600px; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(91,46,255,.2) 0%, transparent 65%);
}
.final-cta-inner { position: relative; z-index: 2; }
.final-cta h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; color: var(--hero-text); margin-bottom: 16px; max-width: 600px; margin-left: auto; margin-right: auto; line-height: 1.2; }
.final-cta p { font-size: 1.05rem; color: var(--hero-text-2); margin-bottom: 36px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ═══════════════ FOOTER ═══════════════ */
.footer { padding: 64px 0 32px; background: var(--hero-bg); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--text-2); font-size: .85rem; line-height: 1.6; margin-top: 12px; max-width: 280px; }
.footer-col h4 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text-2); margin-bottom: 16px; }
.footer-col a { display: block; font-size: .88rem; color: var(--text-2); padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: .78rem; color: var(--text-3); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1000px) {
  html, body { overflow-x: hidden; }
  .hero-glow { display: none; }
  .hero { overflow: hidden; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-demo { max-width: 500px; margin: 40px auto 0; }
  .demo-window { transform: none; }
  .demo-phone { left: -10px; bottom: -10px; width: 120px; }
  .demo-notif { right: -10px; top: -5px; }
  .problem-grid { grid-template-columns: 1fr; }
  .how-panel.active { grid-template-columns: 1fr; }
  .inbox-demo { grid-template-columns: 1fr; }
  .inbox-sidebar { display: none; }
  .insights-grid { grid-template-columns: 1fr 1fr; }
  .scale-inner { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; flex-direction: column; align-items: center; justify-content: center; position: absolute; top: 0; left: 0; right: 0; padding: 80px 20px 32px; gap: 12px; z-index: 101; }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--text) !important; font-size: 1.15rem; font-weight: 600; opacity: 1; padding: 16px 32px; width: 85%; text-align: center; border-radius: 12px; background-color: var(--surface-2); border: 1px solid var(--border); }
  .nav-links a:active { background-color: var(--border); }
  .nav-links .btn-cta { background-color: var(--brand) !important; color: #fff !important; padding: 16px 32px; border-radius: 12px; font-size: 1.1rem; border: 1px solid var(--brand) !important; }
  .nav-links .nav-login { color: var(--text) !important; border: 1px solid var(--border) !important; padding: 16px 32px; border-radius: 12px; background-color: var(--surface-2) !important; }
  .mobile-menu-bg { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; background-color: var(--bg); z-index: 99; }
  .mobile-menu-bg.open { display: block; }
  .nav-toggle { display: flex; z-index: 102; }
}

/* ═══════════════ MOBILE (≤640px) — feels like an app ═══════════════ */
@media (max-width: 640px) {
  /* Typography */
  .hero { padding: 80px 0 48px; }
  .hero-text h1 { font-size: 1.7rem; line-height: 1.25; }
  .hero-text p { font-size: .95rem; }
  .section-head h2 { font-size: 1.5rem; }

  /* Actions — full-width stacked buttons */
  .hero-actions { flex-direction: column; align-items: stretch; padding: 0 16px; }
  .hero-actions .btn-cta, .hero-actions .btn-ghost { width: 100%; text-align: center; justify-content: center; font-size: 1rem; padding: 15px 20px; }

  /* Hero demo — hide complex animated window, show simplified */
  .hero-demo { margin-top: 28px; }
  .demo-window { border-radius: 16px; }
  .demo-phone { display: none; }
  .demo-notif { right: 8px; top: 8px; font-size: .75rem; padding: 8px 10px; }
  .demo-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .demo-stat { padding: 10px 8px; }
  .demo-stat-val { font-size: 1.2rem; }

  /* Problem section */
  .problem { padding: 56px 0; }
  .problem-before, .problem-after { padding: 20px; border-radius: 16px; }

  /* How It Works — horizontal scrollable tabs on mobile */
  .how { padding: 56px 0; }
  .how-tab-bar {
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 4px;
  }
  .how-tab-bar::-webkit-scrollbar { display: none; }
  .how-tab {
    flex-shrink: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 10px 16px;
    font-size: .8rem;
    min-width: 76px;
    border-radius: 12px;
  }
  .how-tab-num { font-size: .68rem; }
  .how-panels { margin-top: 20px; }
  .how-panel.active { grid-template-columns: 1fr; gap: 20px; }
  .how-panel-text h3 { font-size: 1.2rem; }
  .how-panel-text p { font-size: .9rem; }
  .how-scan-card { padding: 20px 18px; max-width: 100%; }

  /* Features inbox */
  .features { padding: 56px 0; }
  .inbox-demo { border-radius: 16px; }
  .inbox-main { padding: 12px; }
  .inbox-item { padding: 12px; }
  .inbox-text { font-size: .82rem; }

  /* Insights */
  .insights { padding: 56px 0; }
  .insights-grid { grid-template-columns: 1fr; gap: 12px; }
  .insight-card { padding: 20px; }

  /* Scale */
  .scale { padding: 56px 0; }
  .scale-inner { gap: 28px; }
  .scale-text h2 { font-size: 1.4rem; }

  /* Pricing — single column, app-store style cards */
  .pricing { padding: 56px 0; }
  .pricing-grid { grid-template-columns: 1fr; gap: 14px; }
  .price-card { padding: 24px 20px; border-radius: 16px; }
  .price-num { font-size: 2.4rem; }
  .pricing-toggle { gap: 12px; }

  /* FAQ */
  .faq { padding: 56px 0; }
  .faq-q { font-size: .95rem; padding: 16px 0; }

  /* Final CTA */
  .final-cta { padding: 72px 0; }
  .final-cta h2 { font-size: 1.5rem; }
  .final-cta p { font-size: .9rem; }
  .final-cta .btn-cta { display: block; margin: 0 auto; max-width: 320px; text-align: center; }

  /* Mobile overflow fix */
  html, body { overflow-x: hidden; max-width: 100vw; }
  .hero-inner { padding: 0 16px; box-sizing: border-box; max-width: 100%; }
  .container { padding: 0 16px; box-sizing: border-box; }
  .hero-demo { max-width: 100%; overflow: hidden; }
  .demo-window { max-width: 100%; }
  .nav-inner { padding: 0 16px; }
  .hero { overflow: hidden; }
  .hero-bg { overflow: hidden; }
  .hero-glow { display: none; }
  section { max-width: 100vw; overflow-x: hidden; }

  /* Footer */
  .footer { padding: 40px 0 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .footer-col h4 { grid-column: 1/-1; }

  /* Container gutter */
  .container { padding: 0 16px; }

  /* Nav safe-area */
  .nav-inner { padding: 0 16px; }

  /* Touch-friendly tap targets */
  .btn-cta, .btn-ghost, .btn-outline { min-height: 48px; display: inline-flex; align-items: center; }
  .faq-q { min-height: 52px; }
  .nav-login, .nav-links a { min-height: 44px; display: flex; align-items: center; }

  /* Safe area bottom padding for pages with content near bottom */
  body { padding-bottom: env(safe-area-inset-bottom, 0); }
}

/* ═══════════════ SMALL MOBILE (≤390px) ═══════════════ */
@media (max-width: 390px) {
  .hero-text h1 { font-size: 1.5rem; }
  .demo-stats { grid-template-columns: 1fr 1fr; }
  .demo-stat:last-child { grid-column: 1/-1; }
  .price-num { font-size: 2rem; }
}

/* Pricing trial note */
.pricing-trial-note { font-size: .72rem; color: var(--text-3); text-align: center; margin-top: 8px; margin-bottom: 0; line-height: 1.4; }

/* Used-by strip (franchise locations) */
.usedby-section {
  padding: 44px 0;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.usedby-label {
  text-align: center; font-size: .76rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-3); margin: 0 0 24px;
}
.usedby-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: center; gap: 14px 40px;
}
.usedby-name {
  font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--text-2); opacity: .8;
}
.usedby-disclaimer {
  text-align: center; font-size: .72rem; color: var(--text-3);
  margin: 26px auto 0; max-width: 660px; line-height: 1.6;
}
@media (max-width: 640px) {
  .usedby-section { padding: 34px 0; }
  .usedby-row { gap: 12px 24px; }
  .usedby-name { font-size: .98rem; }
}
