:root {
  --bg: #ffffff;
  --text-main: #1a1a1a;
  --text-soft: #4b4b4b;
  --accent: #003B73;
  --accent-soft: #E3F2FD;
  --btn-glow: rgba(0, 59, 115, 0.15);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --section-bg: #f7fafe;
  --card-bg: #ffffff;
}

body.dark-mode {
  --bg: #0c0f15;
  --text-main: #f5f5f5;
  --text-soft: #b0b9c6;
  --accent: #50bfff;
  --accent-soft: #1e293b;
  --btn-glow: rgba(80, 191, 255, 0.2);
  --section-bg: #11151c;
  --card-bg: #151a22;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  font-family: var(--font-display);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
}

header.hide {
  transform: translateY(-100%);
}

body.dark-mode header {
  background: rgba(18, 24, 34, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.02);
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

nav a, .dark-toggle {
  margin-left: 2rem;
  text-decoration: none;
  font-weight: 500;
  color: var(--text-soft);
  font-size: 1.2rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

nav a:hover, .dark-toggle:hover {
  color: var(--accent);
}

.zoom-bg {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scale(1);
  width: 90vmin;
  height: 90vmin;
  background: radial-gradient(circle at center, rgba(0, 59, 115, 0.03), transparent 70%);
  animation: zoomInOut 12s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes zoomInOut {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.15); }
}

.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 10rem 4rem 4rem;
  max-width: 1200px;
  margin: auto;
  position: relative;
  background: var(--bg);
  color: var(--text-main);
  transition: background 0.4s ease, color 0.4s ease;
}

.hero-text {
  max-width: 600px;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0, 59, 115, 0.03);
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-soft);
  line-height: 1.7;
  transition: color 0.4s ease;
}

.cta-buttons {
  display: flex;
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.btn {
  padding: 0.85rem 2.2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--btn-glow);
}

.btn.primary:hover {
  background: #001F4D;
  box-shadow: 0 0 36px var(--btn-glow), 0 6px 20px rgba(0, 59, 115, 0.2);
  transform: scale(1.03);
}

.btn.ghost {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn.ghost:hover {
  background: var(--accent-soft);
}

.parallax-svg, .float-svg {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.07;
  animation: float 8s ease-in-out infinite;
}

.parallax-svg {
  position: absolute;
  right: 5%;
  top: 60%;
  transform: translateY(-50%);
  width: 400px;
  opacity: 0.07;
  pointer-events: none;
  animation: float 6.5s ease-in-out infinite;
}

.float-svg {
  width: 180px;
  opacity: 0.2;
  filter: brightness(1) contrast(1.1);
  max-width: 200px;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.float-svg.ecg {
  top: 60%;
  left: 3%;
  transform: rotate(50deg);
}

.float-svg.right {
  bottom: 20%;
  right: 5%;
}

@keyframes float {
  0%, 100% { transform: translateY(-50%) translateY(0); }
  50% { transform: translateY(-50%) translateY(-10px); }
}

section {
  max-width: 900px;
  margin: 6rem auto;
  padding: 0 2rem;
  font-family: var(--font-body);
}

section h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 1rem;
}

section p, .feature p, .preview-card p, .trust-block p {
  font-size: 1.125rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature h3, .preview-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
}

.preview-section {
  padding: 5rem 2rem;
  background: var(--section-bg);
  border-radius: 1rem; /* ⬅️ This is the key line */
  transition: background 2s ease;
  max-width: 1100px;
  margin: 0 auto;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.preview-card {
  background: var(--card-bg);
  color: var(--text-main);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  text-align: center;
  transition: background 0.4s ease, color 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.preview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 59, 115, 0.12);
}

body.dark-mode .preview-card {
  box-shadow: 0 4px 20px rgba(80, 191, 255, 0.05);
}

body.dark-mode .preview-card:hover {
  box-shadow: 0 6px 24px rgba(80, 191, 255, 0.2);
}

.trust-block {
  margin: 6rem auto;
  padding: 3rem 2rem;
  background: var(--section-bg);
  border-radius: 12px;
  max-width: 900px;
  text-align: center;
}

.trust-block h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.9rem;
  border-top: 1px solid #eee;
  margin-top: 4rem;
}

footer a {
  text-decoration: none;
  color: var(--text-soft);
  margin: 0 0.5rem;
}

footer a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 6rem 2rem 2rem;
  }

  .parallax-svg {
    display: none;
  }
}

.stethoscope {
  top: 50vh;
  right: 10vw;
  width: 150px;
}

.ecg {
  top: 110vh;
  left: 5vw;
  width: 300px;
  opacity: 0.07;
  animation: float 10s ease-in-out infinite;
  filter: none;
}

.brain {
  top: 170vh;
  right: 7vw;
  width: 320px;
  opacity: 0.07;
  animation: float 12s ease-in-out infinite;
  filter: none;
}

body.dark-mode .ecg,
body.dark-mode .brain {
  filter: none;
  opacity: 0.07;
}

/* Smooth transition for dark mode toggling */
body, header, .preview-card, .hero, .preview-section, .trust-block {
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

/* Dark mode transparent header */
body.dark-mode header {
  background-color: rgba(20, 25, 32, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(80, 191, 255, 0.05);
}