/* ============================================================
   RoomPulse Marketing Site — Shared Stylesheet
   ============================================================ */

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

:root {
  --rp-primary: #6D28D9;
  --rp-primary-light: #8B5CF6;
  --rp-primary-dark: #5B21B6;
  --rp-accent: #EC4899;
  --rp-bg: #0F0A1A;
  --rp-surface: #1A1228;
  --rp-surface-2: #221836;
  --rp-text: #F1F0F5;
  --rp-text-muted: #A09BB0;
  --rp-border: #2D2540;
  --rp-success: #10B981;
  --rp-warning: #F59E0B;
  --rp-max: 1200px;
  --rp-nav-h: 68px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--rp-bg);
  color: var(--rp-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- UTILITIES ---- */
.container { max-width: var(--rp-max); margin: 0 auto; padding: 0 1.5rem; }
.grad-text {
  background: linear-gradient(135deg, var(--rp-primary-light), var(--rp-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tag {
  display: inline-block; padding: .3rem .9rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid var(--rp-border);
  background: rgba(109,40,217,.12); color: var(--rp-primary-light);
}
.tag-accent {
  background: rgba(236,72,153,.12); color: var(--rp-accent);
  border-color: rgba(236,72,153,.2);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.5rem; border-radius: .5rem; font-weight: 600; font-size: .95rem;
  cursor: pointer; transition: all .2s; border: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--rp-primary), var(--rp-accent));
  color: #fff;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(109,40,217,.3); }
.btn-ghost {
  background: transparent; border: 1px solid var(--rp-border); color: var(--rp-text);
}
.btn-ghost:hover { border-color: var(--rp-primary-light); color: #fff; }
.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .45rem 1rem; font-size: .85rem; }

/* ---- NAV ---- */
.rp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(15, 10, 26, .85);
  border-bottom: 1px solid var(--rp-border);
  height: var(--rp-nav-h);
}
.nav-inner {
  max-width: var(--rp-max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 100%;
}
.nav-logo {
  font-size: 1.35rem; font-weight: 800;
  /*
   * At rest (bg-pos 0 %) the element shows the first 33 % of this 300 %-wide
   * gradient: a clean accent→primary-light sweep (pink "Room", purple "Pulse").
   * At bg-pos 100 % it shows the last 33 %, which is the same accent→primary-light
   * sweep, so the animation loop-point is a seamless colour match.
   *
   * The pulse peak at ~46 % uses a bright lavender-pink rather than white —
   * it stays within the palette and is noticeably lighter than the resting
   * colours without washing out to plain white.
   */
  background: linear-gradient(90deg,
    /* Left zone — shown at rest (bg-pos 0 %): pink → purple */
    var(--rp-accent)         0%,
    var(--rp-primary-light) 30%,
    /* Pulse zone — transits through the word during the animation */
    var(--rp-primary-light) 37%,
    rgba(236, 72,153, .7)   42%,   /* warm pink lead-in */
    #f0b8ff                 46%,   /* peak: bright lavender-pink, not white */
    rgba(139, 92,246, .7)   50%,   /* purple tail */
    var(--rp-primary-light) 58%,
    /* Right zone — shown at rest (bg-pos 100 %): same pink → purple */
    var(--rp-accent)        67%,
    var(--rp-primary-light) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; flex-shrink: 0;
  animation: rp-logo-ecg 4s ease-in-out infinite;
}
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links > a {
  font-size: .9rem; font-weight: 500; color: var(--rp-text-muted);
  padding: .5rem .75rem; border-radius: .375rem; transition: color .2s, background .2s;
}
.nav-links > a:hover { color: #fff; background: rgba(255,255,255,.05); }

/* Dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-drop-toggle {
  font-size: .9rem; font-weight: 500; color: var(--rp-text-muted);
  padding: .5rem .75rem; border-radius: .375rem; transition: color .2s, background .2s;
  cursor: pointer; display: flex; align-items: center; gap: .35rem;
  background: none; border: none;
}
.nav-dropdown > .nav-drop-toggle:hover,
.nav-dropdown:hover > .nav-drop-toggle { color: #fff; background: rgba(255,255,255,.05); }
.nav-drop-toggle svg { width: 14px; height: 14px; transition: transform .2s; }
.nav-dropdown:hover .nav-drop-toggle svg { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute; top: calc(100% + .5rem); left: 0;
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  border-radius: .75rem; padding: .5rem;
  min-width: 240px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.dropdown-menu a {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem; border-radius: .5rem;
  font-size: .875rem; color: var(--rp-text-muted);
  transition: color .15s, background .15s;
}
.dropdown-menu a:hover { color: #fff; background: rgba(255,255,255,.07); }
.dropdown-menu a .dm-icon { font-size: 1rem; width: 1.5rem; text-align: center; flex-shrink: 0; }
.dropdown-menu a .dm-text { display: flex; flex-direction: column; gap: .1rem; }
.dropdown-menu a .dm-label { font-weight: 500; color: var(--rp-text); font-size: .875rem; }
.dropdown-menu a .dm-desc { font-size: .75rem; color: var(--rp-text-muted); }
.dropdown-divider { height: 1px; background: var(--rp-border); margin: .5rem .75rem; }
.dropdown-menu .dm-section-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--rp-text-muted); padding: .5rem .75rem .25rem; opacity: .7;
}
.dropdown-menu.wide { min-width: 480px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.dropdown-menu.wide .dm-col { display: flex; flex-direction: column; }

.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }

/* Mobile toggle */
.nav-mobile-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: .375rem;
  background: none; border: 1px solid var(--rp-border); cursor: pointer; color: var(--rp-text);
}
.mobile-menu {
  display: none; position: fixed; top: var(--rp-nav-h); left: 0; right: 0;
  background: var(--rp-surface); border-bottom: 1px solid var(--rp-border);
  padding: 1rem 1.5rem 2rem; z-index: 99; max-height: calc(100vh - var(--rp-nav-h));
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: .75rem 0;
  font-size: 1rem; font-weight: 500; color: var(--rp-text-muted);
  border-bottom: 1px solid var(--rp-border);
}
.mobile-menu a:hover { color: #fff; }
.mobile-menu .mobile-section-label {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rp-text-muted); padding: 1rem 0 .25rem; opacity: .6;
}
.mobile-menu .mobile-actions { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.5rem; }

/* ---- HERO (Home) ---- */
.home-hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--rp-nav-h) + 4rem) 1.5rem 5rem;
  position: relative; overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(109,40,217,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 70%, rgba(236,72,153,.12) 0%, transparent 50%);
  pointer-events: none;
}
.home-hero-inner {
  position: relative; max-width: var(--rp-max); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
  width: 100%;
}
.home-hero-copy { max-width: 560px; }
.home-hero-copy h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 800; line-height: 1.1;
  margin: 1rem 0 1.25rem;
}
.home-hero-copy p {
  font-size: 1.15rem; color: var(--rp-text-muted); margin-bottom: 2.5rem; line-height: 1.7;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-proof { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; }
.hero-proof-text { font-size: .85rem; color: var(--rp-text-muted); }
.hero-proof-text strong { color: var(--rp-text); }

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  padding: calc(var(--rp-nav-h) + 3.5rem) 1.5rem 3.5rem;
  position: relative; overflow: hidden; text-align: center;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(109,40,217,.15) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.page-hero .breadcrumb { display: flex; align-items: center; gap: .5rem; justify-content: center; margin-bottom: 1.5rem; }
.breadcrumb a { font-size: .85rem; color: var(--rp-text-muted); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: var(--rp-border); font-size: .85rem; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; margin: .75rem 0 1.25rem; }
.page-hero p { font-size: 1.1rem; color: var(--rp-text-muted); line-height: 1.7; margin-bottom: 2rem; }
.page-hero .hero-actions { justify-content: center; }

/* ---- SECTIONS ---- */
.section { padding: 5rem 1.5rem; }
.section-sm { padding: 3.5rem 1.5rem; }
.section-inner { max-width: var(--rp-max); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header .tag { margin-bottom: 1rem; }
.section-header h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: .75rem; line-height: 1.2; }
.section-header p { color: var(--rp-text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.section-divider { border: none; border-top: 1px solid var(--rp-border); margin: 0; }

/* ---- FEATURE CARDS ---- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.feature-grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.feature-grid-3 { grid-template-columns: repeat(3, 1fr); }
.feature-card {
  padding: 1.75rem; border-radius: .75rem;
  border: 1px solid var(--rp-border); background: var(--rp-surface);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.feature-card:hover { border-color: var(--rp-primary); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(109,40,217,.15); }
.feature-icon {
  width: 3rem; height: 3rem; border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; font-size: 1.4rem;
  background: linear-gradient(135deg, rgba(109,40,217,.15), rgba(236,72,153,.1));
}
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; }
.feature-card p { color: var(--rp-text-muted); font-size: .9rem; line-height: 1.6; }
.feature-card .learn-more {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .85rem; font-weight: 600; color: var(--rp-primary-light);
  margin-top: 1rem; transition: gap .2s;
}
.feature-card:hover .learn-more { gap: .5rem; }

/* Highlighted card */
.feature-card.highlight {
  border-color: rgba(109,40,217,.4);
  background: linear-gradient(135deg, rgba(109,40,217,.08), rgba(236,72,153,.04));
}

/* ---- TWO-COLUMN SPLIT ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split-copy h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 700; margin-bottom: 1rem; line-height: 1.25; }
.split-copy p { color: var(--rp-text-muted); font-size: 1rem; line-height: 1.8; margin-bottom: 1rem; }
.split-copy .tag { margin-bottom: .75rem; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; margin-top: 1.5rem; }
.check-list li { display: flex; align-items: flex-start; gap: .75rem; font-size: .95rem; }
.check-list li::before {
  content: '✓'; flex-shrink: 0;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: rgba(16,185,129,.15); color: var(--rp-success);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; margin-top: .1rem;
}

/* ---- MOCK SCREENS ---- */
.mock-wrap { position: relative; }
.mock-screen {
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border); border-radius: 1rem;
  padding: 1.5rem; box-shadow: 0 24px 60px rgba(0,0,0,.4);
  position: relative; overflow: hidden;
}
.mock-screen::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--rp-primary), var(--rp-accent));
}
.mock-titlebar {
  display: flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem;
}
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-dot.red { background: #FF5F57; }
.mock-dot.yellow { background: #FEBC2E; }
.mock-dot.green { background: #28C840; }
.mock-question { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.mock-bar-wrap { display: flex; flex-direction: column; gap: .75rem; }
.mock-bar-row { display: flex; flex-direction: column; gap: .3rem; }
.mock-bar-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--rp-text-muted); }
.mock-bar-track { height: 10px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.mock-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rp-primary), var(--rp-primary-light)); transition: width 1s ease; }
.mock-bar-fill.accent { background: linear-gradient(90deg, var(--rp-accent), #f97316); }
.mock-bar-fill.success { background: linear-gradient(90deg, var(--rp-success), #06b6d4); }
.mock-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rp-border); font-size: .8rem; color: var(--rp-text-muted); }
.mock-live-dot { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 600; color: var(--rp-success); }
.mock-live-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--rp-success); animation: pulse 1.5s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.mock-qa-item {
  display: flex; gap: .75rem; padding: .75rem;
  background: rgba(255,255,255,.04); border-radius: .5rem; margin-bottom: .5rem;
}
.mock-qa-votes { display: flex; flex-direction: column; align-items: center; gap: .15rem; flex-shrink: 0; }
.mock-qa-vote-btn { background: rgba(109,40,217,.2); border: none; border-radius: .25rem; width: 28px; height: 22px; color: var(--rp-primary-light); cursor: pointer; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.mock-qa-vote-count { font-size: .8rem; font-weight: 700; color: var(--rp-primary-light); }
.mock-qa-text { font-size: .85rem; color: var(--rp-text-muted); line-height: 1.5; }

.mock-wordcloud { display: flex; flex-wrap: wrap; gap: .5rem; padding: .5rem; align-items: center; justify-content: center; }
.mock-word { padding: .25rem .75rem; border-radius: 999px; background: rgba(109,40,217,.15); color: var(--rp-primary-light); font-weight: 600; }
.mock-word.lg { font-size: 1.3rem; }
.mock-word.md { font-size: 1rem; }
.mock-word.sm { font-size: .75rem; color: var(--rp-text-muted); }

.mock-routing {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.mock-node {
  background: var(--rp-surface); border: 1px solid var(--rp-primary);
  border-radius: .5rem; padding: .5rem 1rem; font-size: .8rem; font-weight: 600;
  min-width: 140px; text-align: center; position: relative;
}
.mock-node.poll { border-color: var(--rp-primary-light); }
.mock-node.branch { border-color: var(--rp-accent); }
.mock-node.end { border-color: var(--rp-success); color: var(--rp-success); }
.mock-route-line { height: 1.5rem; width: 2px; background: var(--rp-border); }
.mock-route-split { display: flex; gap: 1.5rem; align-items: flex-start; }
.mock-route-branch { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.mock-route-label { font-size: .7rem; color: var(--rp-text-muted); background: var(--rp-bg); padding: 0 .3rem; }

/* ---- STAT GRID ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.stat-card { text-align: center; }
.stat-value {
  font-size: 2.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--rp-primary-light), var(--rp-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.stat-label { font-size: .9rem; color: var(--rp-text-muted); margin-top: .4rem; }

/* ---- COMPARISON TABLE ---- */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--rp-border); font-size: .9rem; }
.compare-table thead th { font-size: .85rem; font-weight: 700; color: var(--rp-text-muted); text-transform: uppercase; letter-spacing: .04em; padding-bottom: 1rem; }
.compare-table thead th.rp-col { color: var(--rp-primary-light); }
.compare-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.compare-table td:first-child { color: var(--rp-text-muted); }
.compare-table .check { color: var(--rp-success); font-size: 1.1rem; }
.compare-table .cross { color: #6B7280; font-size: 1.1rem; }
.compare-table .partial { color: var(--rp-warning); font-size: .8rem; font-weight: 600; }
.compare-wrap { overflow-x: auto; border: 1px solid var(--rp-border); border-radius: .75rem; }

/* ---- PRICING CARDS ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; align-items: start; }
.pricing-card {
  padding: 2rem; border-radius: 1rem;
  border: 1px solid var(--rp-border); background: var(--rp-surface);
  display: flex; flex-direction: column; gap: 0;
}
.pricing-card.featured {
  border-color: var(--rp-primary);
  background: linear-gradient(135deg, rgba(109,40,217,.1), rgba(236,72,153,.05));
  box-shadow: 0 0 40px rgba(109,40,217,.2);
}
.pricing-tier { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rp-text-muted); margin-bottom: .5rem; }
.pricing-tier.featured { color: var(--rp-primary-light); }
.pricing-name { font-size: 1.4rem; font-weight: 700; margin-bottom: .25rem; }
.pricing-price { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: .25rem; }
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--rp-text-muted); }
.pricing-desc { font-size: .875rem; color: var(--rp-text-muted); margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--rp-border); }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: .7rem; margin-bottom: 2rem; flex: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: .6rem; font-size: .875rem; color: var(--rp-text-muted); }
.pricing-features li .pf-icon { flex-shrink: 0; font-size: .75rem; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: .1rem; }
.pricing-features li .pf-icon.yes { background: rgba(16,185,129,.15); color: var(--rp-success); }
.pricing-features li .pf-icon.no { background: rgba(255,255,255,.05); color: #6B7280; }
.pricing-features li strong { color: var(--rp-text); }
.pricing-badge {
  display: inline-block; padding: .2rem .7rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700; background: var(--rp-primary); color: #fff;
  margin-bottom: 1rem;
}

/* ---- TESTIMONIAL ---- */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.testimonial-card {
  padding: 1.75rem; border-radius: .75rem;
  border: 1px solid var(--rp-border); background: var(--rp-surface);
}
.testimonial-quote { font-size: .95rem; color: var(--rp-text); line-height: 1.75; margin-bottom: 1.5rem; font-style: italic; }
.testimonial-quote::before { content: '"'; font-size: 1.5rem; color: var(--rp-primary-light); line-height: 0; vertical-align: -.35rem; margin-right: .1rem; }
.testimonial-attr { display: flex; align-items: center; gap: .75rem; }
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rp-primary), var(--rp-accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: .85rem; flex-shrink: 0;
}
.testimonial-name { font-weight: 600; font-size: .875rem; }
.testimonial-role { font-size: .8rem; color: var(--rp-text-muted); }

/* ---- USE CASE CARDS ---- */
.uc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.uc-card {
  display: block; padding: 2rem; border-radius: .75rem;
  border: 1px solid var(--rp-border); background: var(--rp-surface);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.uc-card:hover { border-color: var(--rp-primary); transform: translateY(-4px); box-shadow: 0 12px 32px rgba(109,40,217,.15); }
.uc-card.church {
  border-color: rgba(236,72,153,.3);
  background: linear-gradient(135deg, rgba(236,72,153,.06), rgba(109,40,217,.04));
}
.uc-card.church:hover { border-color: var(--rp-accent); box-shadow: 0 12px 32px rgba(236,72,153,.15); }
.uc-icon { font-size: 2rem; margin-bottom: 1rem; }
.uc-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.uc-card p { font-size: .875rem; color: var(--rp-text-muted); line-height: 1.6; margin-bottom: 1rem; }
.uc-card .uc-link { font-size: .85rem; font-weight: 600; color: var(--rp-primary-light); display: flex; align-items: center; gap: .3rem; }
.uc-card.church .uc-link { color: var(--rp-accent); }

/* ---- STEPS / HOW IT WORKS ---- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.step { text-align: center; }
.step-num {
  font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: .75rem;
  background: linear-gradient(135deg, var(--rp-primary-light), var(--rp-accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.step h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; }
.step p { font-size: .875rem; color: var(--rp-text-muted); line-height: 1.6; }

/* ---- CTA SECTION ---- */
.cta-section {
  padding: 5rem 1.5rem; border-top: 1px solid var(--rp-border);
  text-align: center;
}
.cta-box {
  max-width: 640px; margin: 0 auto;
  padding: 3.5rem 2.5rem; border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(109,40,217,.12), rgba(236,72,153,.08));
  border: 1px solid rgba(109,40,217,.25);
}
.cta-box h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; margin-bottom: .75rem; }
.cta-box p { color: var(--rp-text-muted); margin-bottom: 2rem; font-size: 1rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- FOOTER ---- */
.rp-footer {
  border-top: 1px solid var(--rp-border);
  padding: 4rem 1.5rem 2.5rem;
  background: var(--rp-surface);
}
.footer-inner { max-width: var(--rp-max); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 3rem; margin-bottom: 3rem; }
.footer-brand .nav-logo { display: inline-block; margin-bottom: .75rem; }
.footer-brand p { font-size: .875rem; color: var(--rp-text-muted); line-height: 1.7; max-width: 240px; }
.footer-col h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--rp-text-muted); margin-bottom: 1rem; }
.footer-col a { display: block; font-size: .875rem; color: var(--rp-text-muted); padding: .3rem 0; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--rp-border); }
.footer-bottom p { font-size: .8rem; color: var(--rp-text-muted); }
.footer-bottom-links { display: flex; gap: 1.5rem; }
.footer-bottom-links a { font-size: .8rem; color: var(--rp-text-muted); }
.footer-bottom-links a:hover { color: #fff; }

/* ---- DIFFERENTIATOR CALLOUT ---- */
.diff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.diff-card {
  padding: 1.5rem; border-radius: .75rem;
  background: rgba(255,255,255,.03); border: 1px solid var(--rp-border);
  display: flex; align-items: flex-start; gap: 1rem;
}
.diff-icon { font-size: 1.5rem; flex-shrink: 0; }
.diff-card h4 { font-size: .95rem; font-weight: 600; margin-bottom: .25rem; }
.diff-card p { font-size: .8rem; color: var(--rp-text-muted); }

/* ---- FAQ ---- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--rp-border); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0; cursor: pointer; background: none; border: none; color: var(--rp-text);
  font-size: 1rem; font-weight: 600; text-align: left; gap: 1rem;
}
.faq-q svg { flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { display: none; padding-bottom: 1.25rem; color: var(--rp-text-muted); font-size: .925rem; line-height: 1.75; }
.faq-item.open .faq-a { display: block; }

/* ---- LOGO STRIP ---- */
.logo-strip { display: flex; align-items: center; justify-content: center; gap: 2.5rem; flex-wrap: wrap; padding: 1.5rem 0; }
.logo-pill {
  padding: .5rem 1.25rem; border-radius: .375rem;
  border: 1px solid var(--rp-border); background: var(--rp-surface);
  font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--rp-text-muted);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: span 2; }
  .feature-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .home-hero-inner { grid-template-columns: 1fr; }
  .home-hero-inner > :last-child { display: none; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split.reverse { direction: ltr; }
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-toggle { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .feature-grid-3 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .dropdown-menu.wide { grid-template-columns: 1fr; min-width: 240px; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .hero-actions { flex-direction: column; }
  .cta-actions { flex-direction: column; align-items: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- LUCIDE ICON SYSTEM ---- */
.rp-icon {
  display: inline-block; vertical-align: middle; flex-shrink: 0;
}

/* Feature icon wrapper – swap font-size for SVG dimensions */
.feature-icon {
  font-size: 0 !important; /* suppress any residual emoji */
}
.feature-icon .rp-icon {
  width: 1.4rem; height: 1.4rem;
  color: var(--rp-primary-light);
}

/* Use-case icon */
.uc-icon { font-size: 0 !important; display: flex; align-items: center; justify-content: center; }
.uc-icon .rp-icon { width: 2rem; height: 2rem; color: var(--rp-primary-light); }

/* Differentiator icon */
.diff-icon { font-size: 0 !important; }
.diff-icon .rp-icon { width: 1.5rem; height: 1.5rem; color: var(--rp-accent); }

/* Nav dropdown icons */
.dm-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dm-icon .rp-icon { width: 1rem; height: 1rem; color: var(--rp-primary-light); }
.dropdown-menu a:hover .dm-icon .rp-icon { color: var(--rp-accent); }

/* Nav chevron/menu icons */
.nav-drop-toggle .rp-icon { width: 14px; height: 14px; transition: transform .2s; }
.nav-dropdown:hover .nav-drop-toggle .rp-icon,
.nav-dropdown.open .nav-drop-toggle .rp-icon { transform: rotate(180deg); }
.nav-mobile-toggle .rp-icon { width: 20px; height: 20px; }

/* Hero image */
.hero-image-wrap {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.hero-image-wrap img {
  width: 100%; height: 100%; object-fit: cover; opacity: .18;
}
.home-hero { position: relative; }
.home-hero-inner { position: relative; z-index: 1; }

/* ---- FEATURE ILLUSTRATIONS ---- */
.feature-illustration {
  margin: -1.75rem -1.75rem 1.5rem;
  border-radius: .75rem .75rem 0 0;
  overflow: hidden;
  background: var(--rp-bg);
  border-bottom: 1px solid var(--rp-border);
  height: 148px;
  display: flex; align-items: center; justify-content: center;
}
.feature-illustration svg {
  width: 100%; height: 100%; display: block;
}

/* Routing page hero image */
.routing-hero-img {
  width: 100%; border-radius: 1rem; border: 1px solid var(--rp-border);
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

/* ---- ACTIVITY TYPE ICON GRID ---- */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
  margin-top: 2rem;
}
.activity-icon-card {
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  padding: 1.25rem .75rem;
  background: var(--rp-surface); border: 1px solid var(--rp-border);
  border-radius: .75rem; text-align: center;
  font-size: .8rem; font-weight: 500; color: var(--rp-text-muted);
  transition: border-color .2s, color .2s, transform .2s;
  cursor: default;
}
.activity-icon-card:hover {
  border-color: var(--rp-primary-light); color: var(--rp-text);
  transform: translateY(-2px);
}
.activity-icon-badge {
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-icon-badge svg { width: 1.25rem; height: 1.25rem; }
.activity-icon-badge.poll  { background: rgba(109,40,217,.18); color: #8B5CF6; }
.activity-icon-badge.game  { background: rgba(236,72,153,.15); color: #EC4899; }
.activity-icon-badge.voice { background: rgba(16,185,129,.15);  color: #10B981; }
.activity-icon-badge.platform { background: rgba(245,158,11,.12); color: #F59E0B; }
.activity-icon-card.coming-soon { opacity: .55; }
.activity-icon-card.coming-soon::after {
  content: 'Coming soon';
  font-size: .65rem; color: var(--rp-text-muted); margin-top: -.3rem;
}

/* ---- CONTEXT IMAGE (use-case pages) ---- */
.uc-context-image-wrap {
  width: 100%; margin-bottom: 0;
  border-radius: 1rem; overflow: hidden;
  border: 1px solid var(--rp-border);
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  max-height: 380px;
  position: relative;
}
.uc-context-image-wrap img {
  width: 100%; height: 380px; object-fit: cover; display: block;
}
.uc-context-image-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,10,26,.7) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- STAT STRIP ---- */
.stat-strip {
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
  padding: 1.25rem 2rem;
  background: var(--rp-surface); border: 1px solid var(--rp-border);
  border-radius: .75rem; margin-top: 2.5rem;
}
.stat-strip-item { display: flex; align-items: center; gap: .75rem; }
.stat-strip-value {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--rp-primary-light), var(--rp-accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-strip-label { font-size: .8rem; color: var(--rp-text-muted); font-weight: 500; line-height: 1.3; }
.stat-strip-divider { width: 1px; height: 2rem; background: var(--rp-border); flex-shrink: 0; }

/* ---- PAGE HERO (with background image option) ---- */
.page-hero-img {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.page-hero-img img {
  width: 100%; height: 100%; object-fit: cover; opacity: .12;
}
.page-hero.has-bg { position: relative; overflow: hidden; }
.page-hero.has-bg .page-hero-inner { position: relative; z-index: 1; }

/* ---- ICON ROW (horizontal feature overview) ---- */
.icon-row {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem;
}
.icon-chip {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem 1rem; border-radius: .5rem;
  background: var(--rp-surface); border: 1px solid var(--rp-border);
  font-size: .85rem; color: var(--rp-text-muted);
}
.icon-chip svg { width: 1rem; height: 1rem; color: var(--rp-primary-light); flex-shrink: 0; }
.icon-chip:hover { border-color: var(--rp-primary-light); color: var(--rp-text); }

/* ============================================================
   ROOMPULSE — HEARTBEAT / PULSE ANIMATIONS
   The brand idea: connecting hearts and minds. Every pulse
   is a voice being heard, a person mattering, a room alive.
   ============================================================ */

/* ── @property declarations for animatable custom props ──── */
@property --rp-trace {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@property --rp-logo-pos {
  syntax: '<percentage>';
  initial-value: 0%;
  inherits: false;
}

/* ── Logo heartbeat — gradient pulses like an ECG trace ─── */
/*
 * Spike lives at ~46 % of the 300 %-wide gradient, which means:
 *   bg-pos  0 %  → element shows  0 %– 33 % of gradient  → spike off-screen LEFT
 *   bg-pos 19 %  → spike enters element from RIGHT edge
 *   bg-pos 44 %  → spike centred in element
 *   bg-pos 69 %  → spike exits element to LEFT edge
 *   bg-pos 100 % → element shows 67 %–100 % of gradient  → spike off-screen LEFT
 * Both resting positions (0 % and 100 %) show matching neutral purples, so the
 * loop seam is invisible. The pulse sweeps RIGHT→LEFT through the word (like
 * an ECG trace reading left to right on the monitor, the dot moves forward).
 */
@keyframes rp-logo-ecg {
  /* Flatline — spike is off-screen to the left of the visible window */
  0%,  52%  { background-position:   0% 50%;  filter: brightness(1); }
  /* P-wave: barely perceptible warmth */
  58%       { background-position:  10% 50%;  filter: brightness(1.02); }
  /* QRS: spike sweeps through — brighter but not white, stays on-palette */
  64%       { background-position:  36% 50%;  filter: brightness(1.3)  saturate(1.1); }
  67%       { background-position:  47% 50%;  filter: brightness(1.5)  saturate(1.2); }
  /* S-wave: small dip */
  70%       { background-position:  54% 50%;  filter: brightness(0.92); }
  /* T-wave: gentle secondary peak */
  75%       { background-position:  62% 50%;  filter: brightness(1.07); }
  /* Return to baseline — bg-pos 100 % shows the same pink→purple as 0 %,
     so the loop seam is invisible. */
  90%, 100% { background-position: 100% 50%;  filter: brightness(1); }
}

/* ── Pulse trace that sweeps the border of a card ────────── */

/* Carrier element — added to every card that supports tracing */
.feature-card,
.uc-card,
.testimonial-card,
.pricing-card,
.stat-card,
.diff-card,
.step {
  position: relative;
}

/* The border-trace overlay */
.feature-card::before,
.uc-card::before,
.testimonial-card::before,
.pricing-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  /*
   * Subtle conic arc: most of the ring is transparent, only a short tail
   * (~55 deg) carries any colour. Reduced opacities vs. original for subtlety.
   */
  background: conic-gradient(
    from var(--rp-trace),
    transparent           0deg   308deg,
    rgba(139, 92,246,.10) 322deg,
    rgba(139, 92,246,.45) 338deg,
    rgba(255,255,255,.55) 348deg,
    rgba(236, 72,153,.45) 355deg,
    rgba(139, 92,246,.10) 360deg
  );
  /* Mask: only the 1 px border ring is visible */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}

/*
 * On hover: run TWO animations in sync.
 *   rp-trace-move  — rotates --rp-trace from 0→360 then invisibly resets to 0
 *   rp-trace-fade  — fades opacity in at the start, out after the sweep,
 *                    holds invisible during the reset / pause period
 *
 * The reset (360→0) happens at ~62 % when opacity has already reached 0,
 * so the snap-back is never visible. The result: pulse sweeps round, fades
 * out cleanly, holds dark, then fades back in for the next beat.
 */
.feature-card:hover::before,
.uc-card:hover::before,
.testimonial-card:hover::before,
.pricing-card:hover::before {
  animation:
    rp-trace-move 2.2s linear infinite,
    rp-trace-fade 2.2s ease-in-out infinite;
}

@keyframes rp-trace-move {
  0%      { --rp-trace: 0deg; }
  55%     { --rp-trace: 360deg; }  /* sweep complete */
  /* Hold at 360 ° while opacity is fading to 0 (60 % in rp-trace-fade).
     This stops the trace in place during the fade-out instead of animating it
     backward, which would be visible.  The snap to 0 ° at 60.01 % is invisible
     because opacity has already reached 0 at 60 %. */
  60%     { --rp-trace: 360deg; }  /* still fading — do not move the arc */
  60.01%  { --rp-trace: 0deg; }    /* invisible reset while opacity = 0 */
  100%    { --rp-trace: 0deg; }    /* hold ready for next beat */
}

@keyframes rp-trace-fade {
  0%    { opacity: 0; }
  5%    { opacity: 0.75; }        /* quick fade in */
  52%   { opacity: 0.75; }        /* hold through the sweep */
  60%   { opacity: 0; }           /* fade out — reset happens silently below */
  100%  { opacity: 0; }           /* dark pause before next beat */
}

/* ── Use-case card: slightly slower trace ──────────────────── */
.uc-card:hover::before {
  animation-duration: 2.6s, 2.6s;
}

/* ── Button: heartbeat on press ─────────────────────────── */
.btn {
  position: relative;
  overflow: hidden; /* for ripple */
}

@keyframes rp-btn-beat {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0   rgba(139,92,246,0);   }
  10%  { transform: scale(.965);                                            }
  19%  { transform: scale(1.04); box-shadow: 0 0 0 7px  rgba(139,92,246,.22); }
  28%  { transform: scale(.99);  box-shadow: 0 0 0 12px rgba(139,92,246,0);   }
  40%  { transform: scale(1);                                              }
  50%  { transform: scale(.978);                                           }
  60%  { transform: scale(1.028); box-shadow: 0 0 0 5px  rgba(236,72,153,.16); }
  72%  { transform: scale(.995); box-shadow: 0 0 0 9px  rgba(236,72,153,0);    }
  100% { transform: scale(1);    box-shadow: 0 0 0 0   rgba(236,72,153,0);     }
}

.btn.btn-beating {
  animation: rp-btn-beat .55s cubic-bezier(.2,.9,.25,1) forwards;
}

/* Ripple element (injected by JS on click) */
.btn-ripple {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  transform: scale(0);
  pointer-events: none;
  margin-left: -3px; margin-top: -3px;
  animation: rp-ripple .6s ease-out forwards;
}
@keyframes rp-ripple {
  to { transform: scale(60); opacity: 0; }
}

/* ── Glow on interactive elements ─────────────────────────── */
.btn-primary:hover {
  box-shadow: 0 0 0 3px rgba(139,92,246,.25), 0 8px 24px rgba(109,40,217,.35);
}
.btn-ghost:hover {
  box-shadow: 0 0 0 2px rgba(139,92,246,.2);
}

/* ── Hero image update ─────────────────────────────────────── */
.home-hero .hero-image-wrap img {
  opacity: .22;
}

/* ── Heartbeat EKG decoration on hero ─────────────────────── */
.hero-ecg-line {
  position: absolute;
  bottom: 3rem;
  left: 0; right: 0;
  height: 40px;
  pointer-events: none;
  z-index: 1;
  opacity: .18;
}
.hero-ecg-line svg {
  width: 100%; height: 100%;
}

/* ── Pulse on logo in footer ───────────────────────────────── */
.rp-footer .nav-logo {
  animation: rp-logo-ecg 4s ease-in-out infinite;
  animation-delay: 2s; /* offset so footer and nav don't sync */
}
