/* ─── MAIN LAYOUT ─── */
main {
  position: relative;
  z-index: 1;
}
section {
  position: relative;
}

/* ─── HERO ─── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(232, 93, 47, 0.3);
  background: rgba(232, 93, 47, 0.06);
  color: var(--coral);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 36px;
  animation: fadeUp 0.7s 0.1s ease both;
}
.hero-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  display: block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.4);
  }
}

.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -3px;
  color: #fff;
  margin-bottom: 24px;
  max-width: 900px;
  animation: fadeUp 0.7s 0.2s ease both;
}
.hero h1 em {
  font-style: normal;
  color: var(--coral);
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.65;
  color: #555;
  max-width: 520px;
  margin-bottom: 48px;
  animation: fadeUp 0.7s 0.3s ease both;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 80px;
  animation: fadeUp 0.7s 0.4s ease both;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coral);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  padding: 14px 28px;
  border-radius: 100px;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  box-shadow: 0 8px 32px rgba(232, 93, 47, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(232, 93, 47, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  color: #aaa;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 100px;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #ccc;
}

.hero-note {
  font-size: 12px;
  color: var(--muted);
  animation: fadeUp 0.7s 0.5s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* stat strip */
.stat-strip {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  width: 100%;
  max-width: 640px;
  animation: fadeUp 0.7s 0.55s ease both;
  background: rgba(255, 255, 255, 0.02);
}
.stat {
  flex: 1;
  padding: 20px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child {
  border-right: none;
}
.stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--coral);
  letter-spacing: -1px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ─── SECTION COMMON ─── */
.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--coral);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: #fff;
  margin-bottom: 16px;
}
.section-title em {
  font-style: normal;
  color: var(--coral);
}
.section-body {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  max-width: 520px;
}

/* ─── HOW IT WORKS ─── */
.how {
  padding: 120px 0;
}
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 72px;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: default;
  transition:
    background 0.3s,
    border-color 0.3s;
}
.step:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--coral-dim);
  border: 1px solid rgba(232, 93, 47, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--coral);
  margin-top: 2px;
}
.step-title {
  font-size: 15px;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 5px;
}
.step-body {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

.how-visual {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg2);
  padding: 28px;
  overflow: hidden;
  position: relative;
}
.how-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 70% 20%,
    rgba(232, 93, 47, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}
.metric-card {
  background: rgba(232, 93, 47, 0.06);
  border: 1px solid rgba(232, 93, 47, 0.15);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
}
.metric-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--coral);
  margin-bottom: 6px;
}
.metric-val {
  font-size: 38px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -2px;
}
.metric-sub {
  font-size: 13px;
  color: #555;
  margin-top: 4px;
}
.seg-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.seg-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.seg-item-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}
.seg-item-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}
.seg-item.risk .seg-item-val {
  color: var(--coral);
}
.customer-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.customer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.customer-row:last-child {
  border-bottom: none;
}
.c-name {
  font-size: 13px;
  color: #e85d2f;
  font-weight: 500;
}
.c-days {
  font-size: 12px;
  color: var(--muted);
}
.c-amt {
  font-size: 13px;
  font-weight: 600;
  color: #e8e8e8;
}

/* ─── FEATURES ─── */
.features {
  padding: 0 0 120px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 64px;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s,
    transform 0.3s;
}
.feature-card:hover {
  border-color: rgba(232, 93, 47, 0.3);
  transform: translateY(-4px);
}
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(232, 93, 47, 0.08) 0%,
    transparent 60%
  );
  transition: opacity 0.3s;
}
.feature-card:hover::after {
  opacity: 1;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--coral-dim);
  border: 1px solid rgba(232, 93, 47, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 18px;
}
.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: #e8e8e8;
  margin-bottom: 8px;
}
.feature-body {
  font-size: 14px;
  line-height: 1.65;
  color: #555;
}
.feature-card.large {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.feature-card.large .feature-body {
  font-size: 15px;
  color: #666;
}
.rhythm-demo {
  padding: 0;
}
.rhythm-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  align-items: center;
}
.rb {
  width: 20px;
  height: 24px;
  border-radius: 4px;
  background: var(--coral);
  animation: rhythmPop 3s ease-in-out infinite;
}
.rb.e {
  background: #222;
  animation: none;
}
.rb:nth-child(1) {
  animation-delay: 0s;
}
.rb:nth-child(2) {
  animation-delay: 0.15s;
}
.rb:nth-child(4) {
  animation-delay: 0.3s;
}
@keyframes rhythmPop {
  0%,
  80%,
  100% {
    opacity: 1;
  }
  40% {
    opacity: 0.6;
  }
}
.rhythm-label {
  font-size: 12px;
  color: var(--muted);
}

/* ─── SEGMENTS ─── */
.segments {
  padding: 0 0 120px;
}
.segments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 64px;
}
.seg-card {
  border-radius: 20px;
  padding: 36px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition:
    transform 0.3s,
    border-color 0.3s;
}
.seg-card:hover {
  transform: translateY(-4px);
}
.seg-card.active-card {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.04) 0%,
    transparent 60%
  );
}
.seg-card.active-card:hover {
  border-color: rgba(34, 197, 94, 0.25);
}
.seg-card.risk-card {
  background: linear-gradient(
    135deg,
    rgba(232, 93, 47, 0.06) 0%,
    transparent 60%
  );
}
.seg-card.risk-card:hover {
  border-color: rgba(232, 93, 47, 0.35);
}
.seg-card.new-card {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.04) 0%,
    transparent 60%
  );
}
.seg-card.new-card:hover {
  border-color: rgba(99, 102, 241, 0.25);
}
.seg-card.lost-card {
  background: linear-gradient(
    135deg,
    rgba(100, 100, 100, 0.04) 0%,
    transparent 60%
  );
}
.seg-card.lost-card:hover {
  border-color: rgba(100, 100, 100, 0.2);
}
.seg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 16px;
}
.seg-dot.green {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}
.seg-dot.coral {
  background: var(--coral);
  box-shadow: 0 0 12px rgba(232, 93, 47, 0.5);
}
.seg-dot.indigo {
  background: #818cf8;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.5);
}
.seg-dot.gray {
  background: #555;
}
.seg-card-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.seg-card-body {
  font-size: 14px;
  line-height: 1.65;
  color: #555;
}

/* ─── CTA ─── */
.cta-section {
  padding: 100px 0 120px;
  text-align: center;
}
.cta-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}
.cta-section h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -2px;
  color: #fff;
  margin-bottom: 20px;
}
.cta-section h2 em {
  font-style: normal;
  color: var(--coral);
}
.cta-section p {
  font-size: 16px;
  color: #555;
  margin-bottom: 40px;
}
.cta-fine {
  font-size: 12px;
  color: var(--muted2);
  margin-top: 16px;
}
.cta-divider {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 80px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border) 30%,
    var(--border) 70%,
    transparent
  );
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .how-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .feature-card.large {
    grid-column: span 2;
  }
  .segments-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .hero h1 {
    letter-spacing: -2px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
  .stat-strip {
    flex-direction: column;
  }
  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .stat:last-child {
    border-bottom: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-card.large {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .segments-grid {
    grid-template-columns: 1fr;
  }
}
