/* ═══════════════════════════════════════════════════════════════
   MELY — Main Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg-primary:   #060C1C;
  --bg-secondary: #0A1228;
  --bg-card:      #0E1830;
  --bg-card-hover:#121E3A;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(0, 180, 255, 0.3);

  --accent-blue:   #0099FF;
  --accent-cyan:   #00D4FF;
  --accent-purple: #7B61FF;
  --accent-teal:   #00E5C0;
  --accent-green:  #00E599;

  --text-primary:   #F0F4FF;
  --text-secondary: #8B9DB8;
  --text-muted:     #506080;

  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  --nav-height: 72px;
  --section-pad: 6rem;
  --container-w: 1200px;

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

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Tablet SVG theme colours */
  --t-body:   #0d1b2e;
  --t-screen: #060f1e;
  --t-appbar: #0a1830;
  --t-camera: #0a1525;
  --t-fg:     255,255,255;
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

.section-dark {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  color: #000;
  box-shadow: 0 0 24px rgba(0, 153, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(0, 153, 255, 0.5);
}

.btn-ghost {
  color: var(--text-primary);
  border: 1px solid var(--border);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.05);
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(6, 12, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 30px !important;
  width: auto !important;
  max-width: none !important;
  display: block;
  flex-shrink: 0;
  /* Dark mode: invert navy to white */
  filter: brightness(0) invert(1);
  transition: filter var(--transition), opacity var(--transition);
}

/* Light mode: show original colours */
[data-theme="light"] .logo-img {
  filter: none;
}

.nav-logo:hover .logo-img {
  opacity: 0.85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  color: var(--accent-cyan) !important;
  border: 1px solid rgba(0, 212, 255, 0.3);
  margin-left: 0.5rem;
}

.nav-cta:hover {
  background: rgba(0, 212, 255, 0.08) !important;
  border-color: var(--accent-cyan);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

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

.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}


#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(0, 100, 255, 0.08) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 20%, rgba(123, 97, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  width: 100%;
  padding: 0 2rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.07);
  border: 1px solid rgba(0, 212, 255, 0.2);
  padding: 0.35rem 1rem;
  border-radius: 99px;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 0 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-diseases {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* Smooth theme transition for all tablet SVG children */
.hero-tablet [style] {
  transition: fill var(--transition), stroke var(--transition);
}

/* ── Hero tablet visual ── */
.hero-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.hero-tablet {
  height: clamp(280px, calc(100vh - var(--nav-height) - 6rem), 400px);
  width: auto;
  filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.18)) drop-shadow(0 20px 60px rgba(0, 0, 0, 0.6));
  animation: tablet-float 6s ease-in-out infinite;
}

@keyframes tablet-float {
  0%, 100% { transform: translateY(0px) rotate(1deg); }
  50%       { transform: translateY(-10px) rotate(-0.5deg); }
}

.disease-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.02);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Stats ──────────────────────────────────────────────────── */
.stats-section {
  padding: 3.5rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Process Flow ───────────────────────────────────────────── */
.process-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 0 1rem;
}

.step-connector {
  position: absolute;
  top: 44px;
  height: 2px;
  background: linear-gradient(90deg, rgba(0,212,255,0.5), rgba(123,97,255,0.5));
  z-index: 0;
}

.step-connector.left       { left: 0;   right: 50%; }
.step-connector.right      { left: 50%; right: 0;   }
.step-connector.left-none  { display: none; }
.step-connector.right-none { display: none; }

.step-icon-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.step-number {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  opacity: 0.7;
}

.step-icon {
  width: 72px;
  height: 72px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  transition: var(--transition);
  box-shadow: 0 0 0 0 rgba(0, 212, 255, 0);
}

.step-icon svg {
  width: 28px;
  height: 28px;
}

.process-step:hover .step-icon {
  border-color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  transform: translateY(-3px);
}

.step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.step-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Technology ─────────────────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  opacity: 0;
  transition: var(--transition);
}

.tech-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

.tech-card:hover::before { opacity: 1; }

.tech-card-wide {
  grid-column: span 2;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.tech-card-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: rgba(0, 153, 255, 0.1);
  border: 1px solid rgba(0, 153, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.tech-card-icon svg { width: 32px; height: 32px; }

.tech-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.tech-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.tech-card-features {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tech-card-features li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.tech-card-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
  opacity: 0.6;
}

/* ── Solutions ──────────────────────────────────────────────── */
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.solution-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.solution-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.solution-icon svg { width: 24px; height: 24px; }

.solution-icon-blue   { background: rgba(0, 153, 255, 0.12); border: 1px solid rgba(0,153,255,0.25); color: var(--accent-blue); }
.solution-icon-purple { background: rgba(123, 97, 255, 0.12); border: 1px solid rgba(123,97,255,0.25); color: var(--accent-purple); }
.solution-icon-teal   { background: rgba(0, 229, 192, 0.12); border: 1px solid rgba(0,229,192,0.25); color: var(--accent-teal); }

.solution-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.solution-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.solution-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.solution-list li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding-left: 1.25rem;
  position: relative;
}

.solution-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-size: 0.75rem;
}

/* ── Diseases block ─────────────────────────────────────────── */
.diseases-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
}

.disease-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.disease-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.disease-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.disease-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.disease-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.disease-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Security ───────────────────────────────────────────────── */
.security-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: center;
}

.security-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}

.security-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.security-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.security-icon svg { width: 18px; height: 18px; }

.security-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.security-item-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Shield visual */
.security-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.security-shield {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: shield-pulse 3s ease-in-out infinite;
}

.shield-ring-1 {
  width: 120px; height: 120px;
  border-color: rgba(0, 212, 255, 0.35);
  animation-delay: 0s;
}
.shield-ring-2 {
  width: 160px; height: 160px;
  border-color: rgba(0, 212, 255, 0.18);
  animation-delay: 0.5s;
}
.shield-ring-3 {
  width: 200px; height: 200px;
  border-color: rgba(0, 212, 255, 0.08);
  animation-delay: 1s;
}

@keyframes shield-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.04); opacity: 0.6; }
}

.shield-core {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, rgba(0,153,255,0.15), rgba(123,97,255,0.15));
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
  position: relative;
  z-index: 1;
}

.shield-core svg { width: 44px; height: 44px; }

.compliance-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.compliance-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--accent-cyan);
}

/* ── About ──────────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 5rem;
  align-items: center;
}

.about-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.about-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.value-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  transition: var(--transition);
}

.value-pill:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.brain-graphic {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
  margin: 0 auto;
}

#brainCanvas {
  width: 100%;
  height: 100%;
}

/* ── Contact ────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 4rem;
  align-items: flex-start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.contact-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--accent-cyan);
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }

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

.form-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-submit { align-self: flex-start; }

.form-feedback {
  font-size: 0.85rem;
  min-height: 1.4em;
}

.form-feedback.success { color: var(--accent-green); }
.form-feedback.error   { color: #FF6B6B; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: #030710;
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-top {
  display: flex;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer-brand {
  flex-shrink: 0;
}

.footer-logo { margin-bottom: 1rem; }

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-nav {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-nav-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.footer-nav-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-nav-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-legal a:hover { color: var(--text-secondary); }

/* ── Scroll to top ──────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 500;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-3px);
}

.scroll-top svg { width: 18px; height: 18px; }

/* ── Scroll animations ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Theme toggle button ────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.05);
}

.theme-toggle svg { width: 16px; height: 16px; }

.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun  { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

/* ── Light theme variables ──────────────────────────────────── */
[data-theme="light"] {
  --bg-primary:   #F5F8FF;
  /* Tablet SVG light overrides */
  --t-body:   #dce4f5;
  --t-screen: #f0f4ff;
  --t-appbar: #c8d4ec;
  --t-camera: #b8c6e0;
  --t-fg:     5,15,40;
  --bg-secondary: #EAEFFb;
  --bg-card:      #FFFFFF;
  --bg-card-hover:#F0F5FF;
  --border:       rgba(0, 0, 0, 0.09);
  --border-hover: rgba(0, 153, 255, 0.4);

  --text-primary:   #0A0F1E;
  --text-secondary: #3D4F6B;
  --text-muted:     #7A8BA5;
}

/* Navbar scrolled – hardcoded dark colour override */
[data-theme="light"] .navbar.scrolled {
  background: rgba(245, 248, 255, 0.94);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

/* Footer – hardcoded dark colour override */
[data-theme="light"] .footer {
  background: #E2E8F5;
}

/* Nav hover background */
[data-theme="light"] .nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

/* Hero canvas – slightly more transparent on light bg */
[data-theme="light"] #neuralCanvas {
  opacity: 0.35;
}

/* Hero radial glow – softer on light */
[data-theme="light"] .hero::after {
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(0, 100, 255, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 20%, rgba(123, 97, 255, 0.03) 0%, transparent 60%);
}

/* Pill-like elements that use near-invisible white backgrounds */
[data-theme="light"] .value-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .disease-tag {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--text-muted);
}

/* Card hover shadows – lighter on white */
[data-theme="light"] .tech-card:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.10);
}

[data-theme="light"] .solution-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.09);
}

[data-theme="light"] .disease-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Scroll-to-top button */
[data-theme="light"] .scroll-top:hover {
  background: var(--bg-card-hover);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tech-grid { grid-template-columns: 1fr; }
  .tech-card-wide { grid-column: span 1; }
  .security-layout { grid-template-columns: 1fr; }
  .security-visual { display: none; }
  .about-layout { grid-template-columns: 1fr; }
  .about-visual { display: none; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --section-pad: 4rem; }


  .process-flow {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .step-connector { display: none; }

  .process-step {
    flex-direction: row;
    text-align: left;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .step-icon-wrap {
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .solutions-grid { grid-template-columns: 1fr; }
  .disease-cards { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .security-features { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --section-pad: 3rem; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(6, 12, 28, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }
  .nav-link { padding: 0.75rem 1rem; width: 100%; }
  .nav-toggle { display: flex; }

  [data-theme="light"] .nav-links {
    background: rgba(245, 248, 255, 0.98);
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }

  .hero-inner { flex-direction: column; gap: 2rem; padding: 1.5rem; }
  .hero-content { text-align: center; }
  .hero-subtitle { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; }
  .hero-diseases { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-tablet { height: 220px; }
  .hero-title { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .disease-cards { grid-template-columns: 1fr 1fr; }

  .footer-top { flex-direction: column; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
