/* ============================================================
   CareMind Labs — Shared Stylesheet
   Design system: Inter font, blue-purple brand palette
   ============================================================ */

/* ── Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --clr-primary: #4B6FE7;
  --clr-secondary: #8B5CF6;
  --clr-gradient: linear-gradient(135deg, #4B6FE7 0%, #8B5CF6 100%);
  --clr-bg: #FFFFFF;
  --clr-bg-soft: #F6F7FF;
  --clr-text: #1E1B4B;
  --clr-muted: #6B7280;
  --clr-border: #E5E7EB;
  --clr-white: #FFFFFF;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 50px;

  --shadow-sm: 0 1px 4px rgba(75, 111, 231, 0.08);
  --shadow-md: 0 4px 20px rgba(75, 111, 231, 0.12);
  --shadow-lg: 0 12px 40px rgba(75, 111, 231, 0.16);

  --max-w: 1100px;
  --section-v: 96px;
}

/* ── Dark Mode Overrides ─────────────────────────────────── */
[data-theme="dark"] {
  --clr-bg: #0F1117;
  --clr-bg-soft: #161924;
  --clr-text: #E8E9F3;
  --clr-muted: #9BA3C7;
  --clr-border: #252840;
  --clr-white: #161924;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ── Layout Utilities ────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-v) 0;
}

.section--soft {
  background: var(--clr-bg-soft);
}

/* ── Typography ──────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  color: var(--clr-muted);
  line-height: 1.75;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--clr-gradient);
  color: var(--clr-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--clr-primary);
  border: 2px solid var(--clr-primary);
}

.btn-outline:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(15, 17, 23, 0.92);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--clr-text);
}

.navbar__brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--clr-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-muted);
  transition: color 0.2s;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--clr-primary);
}

.navbar__cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme toggle button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--clr-border);
  background: var(--clr-bg-soft);
  color: var(--clr-text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--clr-border);
  transform: rotate(20deg);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 4px;
  border-top: 1px solid var(--clr-border);
  background: var(--clr-white);
}

.nav-mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--clr-text);
  padding: 10px 0;
  border-bottom: 1px solid var(--clr-border);
}

.nav-mobile.open {
  display: flex;
}

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  padding-top: calc(68px + 80px);
  padding-bottom: 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero .eyebrow {
  margin-bottom: 16px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 span {
  background: var(--clr-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 18px;
  color: var(--clr-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F0FDF4;
  color: #16A34A;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid #BBF7D0;
  margin: 0 auto 28px;
  width: fit-content;
}

.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #16A34A;
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.hero__mockup {
  margin: 60px auto 0;
  max-width: 480px;
  position: relative;
}

.hero__mockup-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero__pill-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero__pill-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__mockup-text {
  text-align: center;
}

.hero__mockup-text h3 {
  font-size: 22px;
  margin-bottom: 4px;
}

.hero__mockup-text p {
  font-size: 14px;
}

/* ── About Section ───────────────────────────────────────── */
.about {
  text-align: center;
}

.about h2 {
  margin-bottom: 16px;
}

.about__intro {
  max-width: 680px;
  margin: 0 auto 56px;
  font-size: 16px;
}

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

.stat-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.stat-card__icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.stat-card__value {
  font-size: 28px;
  font-weight: 800;
  background: var(--clr-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text);
}

.stat-card__desc {
  font-size: 13px;
  color: var(--clr-muted);
  margin-top: 4px;
}

/* ── Product Section ─────────────────────────────────────── */
.product__header {
  text-align: center;
  margin-bottom: 56px;
}

.product__header h2 {
  margin-bottom: 12px;
}

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

.feature-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--clr-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
}

/* ── Trust Section ───────────────────────────────────────── */
.trust {
  text-align: center;
}

.trust h2 {
  margin-bottom: 12px;
}

.trust__sub {
  max-width: 520px;
  margin: 0 auto 48px;
}

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

.trust-card {
  background: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
}

.trust-card__check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: white;
  font-size: 18px;
}

.trust-card h3 {
  margin-bottom: 8px;
}

.trust-card p {
  font-size: 14px;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: #1A1C2E;
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.footer__tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  max-width: 280px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.footer__links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: white;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Fade-in Animation ───────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Form Styles (contact.html) ──────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--clr-text);
  background: var(--clr-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(75, 111, 231, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-error {
  font-size: 12px;
  color: #DC2626;
  margin-top: 4px;
  display: none;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: #DC2626;
}

.form-group.has-error .form-error {
  display: block;
}

.form-success {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  font-weight: 600;
  display: none;
  margin-top: 16px;
}

/* ── Page Header (inner pages) ───────────────────────────── */
.page-header {
  padding: calc(68px + 60px) 0 60px;
  background: var(--clr-bg-soft);
  border-bottom: 1px solid var(--clr-border);
  text-align: center;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  max-width: 540px;
  margin: 0 auto;
}

/* ── Privacy Page ────────────────────────────────────────── */
.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.4rem;
  margin: 48px 0 12px;
  color: var(--clr-text);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: 16px;
}

.prose ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--clr-muted);
  line-height: 1.75;
}

.prose ul li {
  margin-bottom: 6px;
}

.prose a {
  color: var(--clr-primary);
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-v: 64px;
  }

  .navbar__links,
  .navbar__cta .btn {
    display: none;
  }

  .navbar__cta {
    gap: 8px;
  }

  /* keep theme toggle visible on mobile */
  .nav-toggle {
    display: flex;
  }

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

  .footer__links {
    text-align: left;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }
}