:root {
  --bg: #f7f4ff;
  --bg-soft: #efeaff;
  --card: rgba(255, 255, 255, 0.9);
  --text: #171321;
  --muted: #6f6a7c;
  --primary: #6c4cf1;
  --primary-dark: #5337d6;
  --border: rgba(108, 76, 241, 0.14);
  --shadow: 0 18px 45px rgba(68, 45, 150, 0.12);
}

body.dark {
  --bg: #111019;
  --bg-soft: #191526;
  --card: rgba(31, 27, 44, 0.9);
  --text: #f7f4ff;
  --muted: #c5bfd6;
  --primary: #8b6cff;
  --primary-dark: #7354f5;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(circle at top left, rgba(108, 76, 241, 0.20), transparent 35%),
    radial-gradient(circle at top right, rgba(170, 130, 255, 0.12), transparent 35%),
    linear-gradient(180deg, #111019 0%, #191526 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top left, rgba(108, 76, 241, 0.18), transparent 35%),
    radial-gradient(circle at top right, rgba(170, 130, 255, 0.16), transparent 35%),
    linear-gradient(180deg, #f7f4ff 0%, #efeaff 100%);
  color: var(--text);
  transition: 0.3s ease;
}



/* Header */
.header {
  position: sticky;
  top: 18px;
  z-index: 1000;
  width: min(94%, 1320px);
  margin: 18px auto 0;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid rgba(108, 76, 241, 0.18);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 20px 55px rgba(68, 45, 150, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.dark .header {
  background: rgba(24, 20, 36, 0.92);
  border-color: transparent;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.logo {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.6px;
}

/* Apple / Tesla Logo System */
.logo-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
}

.logo-icon-img {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  object-fit: cover;
  z-index: 3;
  animation: logoBreath 4.5s ease-in-out infinite;
  box-shadow:
    0 14px 30px rgba(108, 76, 241, 0.32),
    0 0 22px rgba(139, 108, 255, 0.45);
}

.logo-orbit {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(139, 108, 255, 0.34);
  border-top-color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 0 10px rgba(139, 108, 255, 0.55));
  animation: orbitSpin 5.5s linear infinite;
}

.orbit-two {
  width: 78px;
  height: 78px;
  opacity: 0.45;
  animation-duration: 9s;
  animation-direction: reverse;
}

@keyframes logoBreath {
  0%, 100% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.045) translateY(-3px);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

.logo:hover .logo-icon-img {
  transform: scale(1.12);
  box-shadow:
    0 20px 50px rgba(108, 76, 241, 0.48),
    0 0 38px rgba(139, 108, 255, 0.75);
}

/* Cursor glow */
.cursor-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(139, 108, 255, 0.18), transparent 62%);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border-radius: 999px;
  list-style: none;
  background: rgba(108, 76, 241, 0.075);
  border: 1px solid rgba(108, 76, 241, 0.12);
}

.nav-links a {
  display: block;
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
  background: linear-gradient(135deg, var(--primary), #9b7cff);
  box-shadow: 0 12px 26px rgba(108, 76, 241, 0.28);
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  border: 1px solid rgba(108, 76, 241, 0.16);
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.58));
  cursor: pointer;
  font-size: 18px;
  transition: 0.25s ease;
  box-shadow: 0 12px 28px rgba(68, 45, 150, 0.13);
}

.theme-toggle:hover {
  transform: rotate(12deg) scale(1.08);
}

.nav-button,
.btn {
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.nav-button {
  position: relative;
  overflow: hidden;
  padding: 15px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, #6c4cf1, #8f6dff 55%, #5b3ee7);
  color: white;
  box-shadow: 0 16px 34px rgba(108, 76, 241, 0.32);
}

.nav-button:hover {
  transform: translateY(-3px) scale(1.03);
}

/* Hero */
.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  padding: 90px 70px;
  position: relative;
  overflow: hidden;
}

.tag {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(108, 76, 241, 0.12);
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -3px;
  background: linear-gradient(135deg, var(--primary), #a88bff, var(--primary-dark));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero h2 {
  font-size: clamp(24px, 3vw, 42px);
  max-width: 780px;
  margin: 20px 0;
  letter-spacing: -1px;
}

.hero-content > p:not(.tag) {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  padding: 14px 24px;
}

.primary {
  background: var(--primary);
  color: white;
}

.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.secondary {
  border: 1px solid var(--border);
  color: var(--primary);
  background: var(--card);
}

.secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Phone */
.hero-preview {
  display: flex;
  justify-content: center;
}

.phone-card {
  width: 320px;
  min-height: 560px;
  border-radius: 42px;
  padding: 24px;
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.55));
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  animation: phoneFloat 5s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-14px) rotate(1.3deg);
  }
}

.phone-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  background: rgba(108, 76, 241, 0.18);
  border-radius: 50%;
  right: -70px;
  top: -60px;
}

.phone-header,
.mini-grid {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.status {
  background: #23b26d;
  color: white;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.glucose-card {
  background: linear-gradient(135deg, var(--primary), #9d7cff);
  color: white;
  padding: 24px;
  border-radius: 28px;
  margin: 30px 0 18px;
  position: relative;
}

.glucose-card h3 {
  font-size: 34px;
  margin: 12px 0 4px;
}

.mini-grid {
  gap: 12px;
  margin-bottom: 18px;
}

.mini-grid div {
  flex: 1;
  background: rgba(108, 76, 241, 0.1);
  padding: 16px;
  border-radius: 22px;
}

.mini-grid strong {
  display: block;
  font-size: 24px;
  color: var(--primary);
}

.mini-grid span {
  color: var(--muted);
  font-size: 13px;
}

.quick-action {
  padding: 15px;
  border-radius: 18px;
  background: var(--primary);
  color: white;
  text-align: center;
  font-weight: 800;
  margin-top: 12px;
}

.quick-action.light {
  background: var(--bg-soft);
  color: var(--text);
}

/* Sections */
.section {
  padding: 95px 70px;
}

.light-section {
  background: transparent;
}

body.dark .light-section {
  background: rgba(255, 255, 255, 0.03);
}

.section-title {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-title p {
  color: var(--primary);
  font-weight: 800;
}

.section-title h2 {
  font-size: 42px;
  color: var(--text);
  letter-spacing: -1px;
}

.section-description {
  color: var(--muted) !important;
  margin-top: 12px;
  line-height: 1.7;
}

/* Grids */
.about-grid,
.features-grid,
.screens-grid,
.team-grid {
  display: grid;
  gap: 22px;
}

.about-grid {
  grid-template-columns: repeat(2, 1fr);
}

.features-grid {
  grid-template-columns: repeat(3, 1fr);
}

.screens-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Cards */
.about-card,
.feature-card,
.screen-card,
.step,
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 28px;
  backdrop-filter: blur(16px);
  transition: 0.25s ease;
}

.about-card:hover,
.feature-card:hover,
.screen-card:hover,
.team-card:hover,
.step:hover,
.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(108, 76, 241, 0.35);
}

.about-card p,
.feature-card p,
.step p {
  color: var(--muted);
  line-height: 1.7;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.step {
  text-align: center;
}

.step span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 16px;
  font-weight: 800;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px rgba(108, 76, 241, 0.28);
}

/* Screens */
.screen-card {
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  font-weight: 800;
  color: var(--primary);
  background:
    linear-gradient(135deg, rgba(108,76,241,0.14), transparent),
    var(--card);
}

/* Team */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 20px;
}

.team-card {
  min-width: 250px;
  max-width: 300px;
  padding: 25px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  transition: 0.25s ease;
}

.member-image-wrap {
  width: 100%;
  max-height: 250px;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.member-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.team-card h3 {
  font-size: 17px;
  margin-bottom: 4px;
  text-align: center;
}

.team-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

/* Tools */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 28px;
  backdrop-filter: blur(16px);
  transition: 0.25s ease;
}

.tool-card h3 {
  margin-bottom: 10px;
}

.tool-card p {
  color: var(--muted);
  line-height: 1.7;
}

/* Contact */
.contact-section {
  text-align: center;
}

.contact-card {
  max-width: 900px;
  margin: auto;
}

.contact-card h2 {
  font-size: 38px;
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--muted);
  line-height: 1.7;
}

.contact-card a {
  display: inline-block;
  margin-top: 18px;
  color: var(--primary);
  font-weight: 800;
}

/* Footer */
.footer {
  padding: 26px;
  text-align: center;
  background: var(--primary);
  color: white;
}

/* Reveal Animation */


/* Dark mode fixes for phone preview */
body.dark .phone-card .mini-grid div {
  background: rgba(139, 108, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body.dark .phone-card .mini-grid strong {
  color: #bca7ff;
}

body.dark .phone-card .mini-grid span {
  color: rgba(255, 255, 255, 0.82);
}

body.dark .phone-card .quick-action.light {
  background: linear-gradient(135deg, #3b2a78, #5d45c9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 26px rgba(108, 76, 241, 0.22);
}

/* Tablet */
@media (max-width: 1000px) {
  .hero,
  .about-grid,
  .features-grid,
  .screens-grid,
  .steps,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 70px 24px;
  }

  .section {
    padding: 75px 24px;
  }

  .phone-card {
    width: 100%;
    max-width: 340px;
  }

  .nav-links {
    display: none;
  }
}

/* Mobile navbar fix only */
@media (max-width: 700px) {
  .header {
    top: 10px;
    width: calc(100% - 20px);
    margin: 10px auto 0;
    padding: 8px 10px;
    border-radius: 28px;
  }

  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .logo {
    gap: 6px;
    font-size: 20px;
    flex-shrink: 1;
  }

  .logo-wrapper {
    width: 46px;
    height: 46px;
  }

  .logo-icon-img {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .logo-orbit {
    width: 50px;
    height: 50px;
  }

  .orbit-two {
    width: 58px;
    height: 58px;
  }

  .nav-links {
    display: none !important;
  }

  .nav-actions {
    gap: 8px;
    flex-shrink: 0;
  }

  .theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    font-size: 16px;
  }

  .nav-button {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    white-space: nowrap;
  }
}

@media (max-width: 430px) {
  .logo span {
    font-size: 18px;
  }

  .nav-button {
    padding: 10px 13px;
    font-size: 13px;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }
}
