@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* =====================
   CSS VARIABLES
   ===================== */
:root {
  --bg: #050c1a;
  --bg2: #081020;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(0,110,255,0.4);
  --text: #f0f4ff;
  --text-muted: rgba(240,244,255,0.55);
  --text-dim: rgba(240,244,255,0.35);
  --accent: #0a7aff;
  --accent2: #00c6ff;
  --accent-glow: rgba(10,122,255,0.3);
  --green: #22c55e;
  --nav-bg: rgba(5,12,26,0.85);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

body.light {
  --bg: #f0f4fb;
  --bg2: #e8edf8;
  --surface: rgba(0,0,0,0.04);
  --surface-hover: rgba(0,0,0,0.07);
  --border: rgba(0,0,0,0.1);
  --border-hover: rgba(10,122,255,0.5);
  --text: #0d1a2e;
  --text-muted: rgba(13,26,46,0.6);
  --text-dim: rgba(13,26,46,0.38);
  --accent-glow: rgba(10,122,255,0.15);
  --nav-bg: rgba(240,244,251,0.9);
  --shadow: 0 8px 40px rgba(0,0,0,0.12);
}

/* =====================
   RESET & BASE
   ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  font-size: 16px;
  line-height: 1.6;
}

/* =====================
   BACKGROUND
   ===================== */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(10,122,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,122,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -2;
}

.bg-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(10,122,255,0.18) 0%, transparent 70%);
  top: -200px; left: -100px;
  animation: orbFloat1 18s ease-in-out infinite;
}
.bg-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,198,255,0.1) 0%, transparent 70%);
  bottom: 0; right: -100px;
  animation: orbFloat2 22s ease-in-out infinite;
}
.bg-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(10,122,255,0.08) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, -20px); }
}

/* =====================
   NAV
   ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 2px;
  flex-shrink: 0;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.theme-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-hover);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 20px rgba(10,122,255,0.25);
}

.btn-primary:hover {
  background: #1c8aff;
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(10,122,255,0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface);
}

.btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: 12px; }

.nav-cta { padding: 8px 18px; font-size: 0.875rem; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

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

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}

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

.mobile-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.mobile-link:hover { color: var(--text); }

.mobile-cta {
  margin-top: 12px;
  justify-content: center;
  width: 100%;
}

/* =====================
   UTILITIES
   ===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

/* =====================
   HERO
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.1s both;
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

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

.hero-logo-wrap {
  position: relative;
  margin-bottom: 32px;
  animation: fadeUp 0.6s 0.2s both;
}

.hero-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 40px rgba(10,122,255,0.3);
}

.hero-logo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(10,122,255,0.3);
  animation: spin 8s linear infinite;
}

.hero-logo-ring::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--accent);
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  animation: fadeUp 0.6s 0.3s both;
}

.title-line {
  display: block;
  font-size: clamp(3.5rem, 10vw, 7rem);
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light .title-line {
  background: linear-gradient(135deg, #0d1a2e 0%, rgba(13,26,46,0.7) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.title-sub {
  display: block;
  font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: 0.3em;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  margin-top: 4px;
}

.hero-desc {
  max-width: 560px;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  margin-top: 24px;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.4s both;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.6s 0.5s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 60px;
  padding: 20px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  animation: fadeUp 0.6s 0.6s both;
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--text);
  line-height: 1;
}

.stat-num.low-risk { color: var(--green); }

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 0.6s 0.8s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

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

/* =====================
   ABOUT
   ===================== */
.about {
  padding: 120px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.about-text h2 em {
  font-style: italic;
  color: var(--accent);
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
  font-weight: 300;
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feat-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.feat-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.feat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(10,122,255,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feat-card h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.feat-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* =====================
   PAGE HERO (dashboard page)
   ===================== */
.page-hero {
  padding: 160px 0 80px;
  text-align: center;
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-title em {
  font-style: italic;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-desc {
  max-width: 560px;
  margin: 0 auto 36px;
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
}

/* =====================
   SHOWCASE
   ===================== */
.showcase {
  padding: 40px 0 120px;
}

.showcase-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 80px 0;
  border-top: 1px solid var(--border);
  position: relative;
}

.showcase-item.reverse {
  direction: rtl;
}

.showcase-item.reverse > * {
  direction: ltr;
}

.showcase-img {
  position: relative;
}

.img-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  transition: all 0.4s ease;
}

.img-frame:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 60px rgba(10,122,255,0.2);
  transform: translateY(-4px);
}

.img-frame img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.img-frame:hover img {
  transform: scale(1.03);
}

.showcase-num {
  position: absolute;
  top: -20px;
  left: -16px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 5rem;
  color: var(--text);
  opacity: 0.04;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.showcase-text h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.showcase-text > p {
  color: var(--text-muted);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 24px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--accent);
}

/* =====================
   CTA SECTION
   ===================== */
.cta-section {
  padding: 40px 0 120px;
}

.cta-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 80px 48px;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(10,122,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
  position: relative;
}

.cta-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
  font-weight: 300;
  position: relative;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* =====================
   FOOTER
   ===================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

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

.footer-copy strong { color: var(--text-muted); }

/* =====================
   LANGUAGE SWITCHER
   ===================== */
.lang-switcher {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-hover);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}

.lang-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-align: left;
}

.lang-option:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.lang-option.active {
  color: var(--accent);
  background: rgba(10,122,255,0.08);
}

/* Mobile lang row */
.mobile-lang {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.lang-option-mobile {
  flex: 1;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.lang-option-mobile:hover,
.lang-option-mobile.active {
  background: rgba(10,122,255,0.12);
  color: var(--accent);
  border-color: var(--accent);
}

/* =====================
   SCROLL REVEAL
   ===================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .burger { display: flex; }
  .nav-logo { margin-right: auto; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .showcase-item,
  .showcase-item.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 40px;
    padding: 60px 0;
  }

  .hero-stats {
    gap: 20px;
    padding: 16px 24px;
  }
}

@media (max-width: 600px) {
  .hero { padding: 100px 20px 60px; }
  .hero-logo { width: 80px; height: 80px; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .stat-divider { display: none; }
  .about { padding: 80px 0; }
  .showcase { padding: 20px 0 80px; }
  .cta-card { padding: 48px 24px; }
  .page-hero { padding: 120px 0 60px; }
  .showcase-item { padding: 40px 0; }
  .footer-inner { flex-direction: column; text-align: center; }
}
