:root {
  --color-primary: #10b981;
  --color-primary-dark: #0d9668;
  --color-primary-deep: #065f46;
  --color-primary-soft: rgba(16, 185, 129, 0.12);
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f8faf9;
  --color-bg-benefits: #f0faf6;
  --color-border: #e5e7eb;
  --max-width: 1100px;
}

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

html {
  scroll-padding-top: 24px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */

.site-header {
  position: relative;
  z-index: 10;
  background: var(--color-bg);
  box-shadow: none;
  transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  height: 40px;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.menu-toggle .icon-close {
  display: none;
}

.site-header.nav-open .menu-toggle .icon-menu {
  display: none;
}

.site-header.nav-open .menu-toggle .icon-close {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  padding-bottom: 4px;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--color-primary);
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-pulse {
  display: block;
  width: 100%;
  height: 6px;
  color: var(--color-primary);
  opacity: 0.35;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #eafaf3 100%);
}

.hero-bg-pulse {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: var(--color-primary);
  opacity: 0.13;
  pointer-events: none;
}

.hero-bg-pulse svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pulse-track {
  animation: pulse-scroll 16s linear infinite;
}

@keyframes pulse-scroll {
  to {
    transform: translateX(-800px);
  }
}

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

.hero-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.ekg {
  width: 180px;
  height: 72px;
}

.ekg-line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: draw-ekg 3s ease-in-out infinite;
}

@keyframes draw-ekg {
  0% {
    stroke-dashoffset: 320;
  }
  55% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -320;
  }
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  max-width: 700px;
  margin: 0 auto 16px;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.btn-outline {
  padding: 8px 18px;
  font-size: 0.9rem;
  background: transparent;
  color: var(--color-primary-dark);
  border: 1.5px solid var(--color-primary);
  box-shadow: none;
}

.btn-outline svg {
  width: 16px;
  height: 16px;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-outline:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Product preview */

.product-preview {
  padding: 72px 0;
  background: var(--color-bg);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
}

.preview-copy h2 {
  font-size: 1.75rem;
  margin-bottom: 24px;
}

.preview-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.preview-features svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 6px;
  box-sizing: content-box;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.mockup-window {
  background: var(--color-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--color-border);
}

.mockup-titlebar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.mockup-titlebar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.mockup-body {
  display: grid;
  grid-template-columns: 130px 1fr;
}

.mockup-sidebar {
  padding: 16px 12px;
  background: var(--color-bg-alt);
  border-right: 1px solid var(--color-border);
}

.mockup-sidebar-item {
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.mockup-sidebar-item.active {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
}

.mockup-main {
  padding: 18px;
}

.mockup-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mockup-stat {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.mockup-stat .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.mockup-stat .stat-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.mockup-list-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.mockup-list-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.mockup-list-row:nth-child(odd) {
  background: var(--color-bg-alt);
}

/* Benefits */

.benefits {
  padding: 72px 0;
  background: var(--color-bg-benefits);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.benefit-card {
  padding: 28px 24px;
  border-radius: 10px;
  background: var(--color-bg);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease;
}

.benefit-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.benefit-card.visible:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1) rotate(-6deg);
}

.benefit-card:nth-child(1) { transition-delay: 0s; }
.benefit-card:nth-child(2) { transition-delay: 0.1s; }
.benefit-card:nth-child(3) { transition-delay: 0.2s; }
.benefit-card:nth-child(4) { transition-delay: 0.3s; }

.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  transition: transform 0.25s ease;
}

.benefit-icon svg {
  width: 22px;
  height: 22px;
}

.benefit-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
  color: var(--color-text);
}

.benefit-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* How it works */

.how-it-works {
  padding: 72px 0;
  background: var(--color-primary-deep);
  color: #ffffff;
  text-align: center;
}

.how-it-works h2 {
  font-size: 1.75rem;
  margin-bottom: 48px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  text-align: left;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 700;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #ffffff;
}

.step p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

/* CTA final */

.cta-final {
  padding: 72px 0;
  text-align: center;
  background: var(--color-bg-alt);
}

.cta-final h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.cta-final p {
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.cta-final p.cta-highlight {
  color: var(--color-text);
  margin-bottom: 28px;
}

.cta-highlight strong {
  color: var(--color-primary-dark);
}

/* Footer */

.site-footer {
  padding: 24px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.site-footer p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* Responsive */

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    padding-bottom: 16px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-actions {
    flex-basis: 100%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  .site-header.nav-open .header-actions {
    max-height: 300px;
    opacity: 1;
    padding-top: 12px;
  }

  .site-nav {
    flex-direction: column;
    gap: 16px;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .product-preview, .benefits, .how-it-works, .cta-final {
    padding: 48px 0;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-copy {
    text-align: center;
  }

  .preview-features {
    align-items: center;
  }

  .mockup-body {
    grid-template-columns: 100px 1fr;
  }

  .mockup-sidebar-item {
    font-size: 0.72rem;
  }

  .how-it-works h2 {
    margin-bottom: 32px;
  }
}

/* Respect users who prefer less motion */

@media (prefers-reduced-motion: reduce) {
  .ekg-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .pulse-track {
    animation: none;
  }

  .benefit-card {
    transition: none;
  }

  .btn-primary {
    transition: none;
  }

  .header-actions {
    transition: none;
  }
}
