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

:root {
  --green: #2dce7c;
  --green-dark: #1aaa60;
  --green-pale: #e8fff2;
  --bg: #f2fdf7;
  --dark: #0d2b20;
  --text: #1a3a2e;
  --muted: #527668;
  --white: #ffffff;
  --card-shadow: 0 4px 24px rgba(0,0,0,0.07);
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  /* Prevent horizontal scroll without clipping vertical */
  width: 100%;
  overflow-x: clip;
}

.accent { color: var(--green); }

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

/* ===========================
   BACKGROUND
=========================== */
.background-blobs {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 55% 45% at 10% 15%, rgba(45,206,124,0.13), transparent),
    radial-gradient(ellipse 50% 50% at 90% 30%, rgba(100,220,170,0.09), transparent),
    radial-gradient(ellipse 60% 40% at 50% 95%, rgba(45,206,124,0.07), transparent),
    linear-gradient(150deg, #f0fdf6, #eafff4 50%, #f4fbff);
  animation: blobFloat 16s ease-in-out infinite alternate;
}
@keyframes blobFloat {
  from { transform: translateY(0); }
  to   { transform: translateY(-18px); }
}

.air-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.air-particles span {
  position: absolute;
  background: rgba(45,206,124,0.22);
  border-radius: 50%;
  filter: blur(1.5px);
  animation: drift linear infinite;
}
@keyframes drift {
  0%   { transform: translate(0,0);          opacity: 0; }
  10%  {                                      opacity: 0.5; }
  60%  { transform: translate(40px,-120px);   opacity: 0.3; }
  100% { transform: translate(-20px,-220px);  opacity: 0; }
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5%;
  background: #ffffff;
  border-bottom: 1px solid rgba(45,206,124,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 9px;
  background: white;
  padding: 4px;
  box-shadow: 0 3px 10px rgba(45,206,124,0.2);
}
.brand-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.3px;
}

/* Desktop nav */
.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--green); }

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
  z-index: 1002;
  position: relative;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay */
.nav-overlay {
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 980;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  pointer-events: none;
}
.nav-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===========================
   HERO
=========================== */
.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px 80px;
  gap: 18px;
}

.hero-badge {
  background: rgba(45,206,124,0.12);
  color: var(--green-dark);
  border: 1px solid rgba(45,206,124,0.3);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.main-title {
  font-size: clamp(48px, 11vw, 96px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--dark);
}

.hero-title {
  font-size: clamp(16px, 3.5vw, 26px);
  font-weight: 500;
  color: var(--muted);
  max-width: 500px;
}

.hero-sub {
  font-size: clamp(14px, 2.5vw, 17px);
  color: var(--muted);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--white);
  padding: 16px 28px;
  border-radius: 60px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.07);
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.stat-num {
  font-size: 19px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}
.stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(0,0,0,0.09);
}

.cta-btn {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(45,206,124,0.35);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.cta-btn:hover {
  transform: translateY(-3px);
  background: var(--green-dark);
  box-shadow: 0 14px 32px rgba(45,206,124,0.45);
}

/* ===========================
   SECTIONS
=========================== */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 5%;
}
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.section h2 {
  font-size: clamp(24px, 4.5vw, 38px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
  line-height: 1.2;
}
.section-intro {
  color: var(--muted);
  font-size: 15px;
  max-width: 580px;
  margin-bottom: 32px;
}

/* ===========================
   PROBLEM
=========================== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.problem-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(45,206,124,0.1);
  transition: transform 0.2s;
}
.problem-card:hover { transform: translateY(-3px); }
.problem-icon { font-size: 26px; margin-bottom: 10px; }
.problem-card p { color: var(--muted); font-size: 14px; }
.problem-card strong { color: var(--text); }

/* ===========================
   SOLUTION
=========================== */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.sol-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid var(--green);
}
.sol-check { color: var(--green); font-size: 15px; flex-shrink: 0; }

.flow-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--green-pale);
  padding: 16px 20px;
  border-radius: var(--radius);
  justify-content: center;
}
.flow-step {
  background: var(--white);
  border: 1.5px solid rgba(45,206,124,0.35);
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}
.flow-arrow { color: var(--green); font-weight: 700; font-size: 16px; }

/* ===========================
   ARCHITECTURE
=========================== */
.arch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 36px;
}
.arch-sensors {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}
.arch-chip {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  transition: transform 0.2s;
}
.arch-chip:hover { transform: translateY(-3px); }
.chip-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.arch-chip strong { font-size: 14px; color: var(--dark); }
.chip-sub { font-size: 11px; color: var(--muted); }
.sensor-chip { border-top: 3px solid var(--green); }
.brain-chip  { border: 2px solid var(--green); background: var(--green-pale); min-width: 200px; }
.app-chip    { border-top: 3px solid #3b82f6; min-width: 180px; }

.arch-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  gap: 3px;
}
.conn-line {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--green), rgba(45,206,124,0.2));
}
.conn-label { font-size: 10px; color: var(--muted); font-weight: 500; }

/* ===========================
   PCB
=========================== */
.pcb-image {
  width: 100%;
  max-width: 600px;
  margin: 36px auto 0;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
  object-fit: contain;
}

/* ===========================
   APP
=========================== */
.app-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 32px;
}
.app-img-wrap {
  position: relative;
}
.app-img-wrap::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(45,206,124,0.13), transparent 70%);
  border-radius: 50%;
  z-index: 0;
}
.app-img-wrap img {
  width: 240px;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
  position: relative;
  z-index: 1;
  object-fit: contain;
}
.app-features { display: flex; flex-direction: column; gap: 14px; }
.app-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}
.feat-dot {
  width: 9px;
  height: 9px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(45,206,124,0.18);
}
.app-tagline { font-size: 17px; color: var(--muted); margin-top: 8px; }

/* ===========================
   PRODUCT MODEL
=========================== */
.model-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 36px auto 0;
  max-width: 520px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 32px 24px;
}
.model-img {
  width: 100%;
  max-width: 340px;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 1;
}
.model-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(45,206,124,0.14), transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  animation: pulse 3.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.5; }
  50%       { transform: translate(-50%, -50%) scale(1.15); opacity: 1;  }
}

/* ===========================
   VIDEO
=========================== */
.video-wrap {
  margin-top: 36px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.video-wrap video { width: 100%; display: block; }

/* ===========================
   TABLE
=========================== */
.table-wrap {
  overflow-x: auto;
  margin-top: 32px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
th {
  background: var(--dark);
  color: var(--white);
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 14px;
  font-weight: 500;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--green-pale); }
td.yes { color: #16a34a; font-size: 17px; }
td.no  { color: #dc2626; font-size: 17px; }

/* ===========================
   WHY / VISION
=========================== */
.why-grid, .vision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.why-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 3px solid var(--green);
  transition: transform 0.2s;
}
.why-card:hover { transform: translateY(-3px); }
.why-icon { font-size: 26px; }
.why-card p { font-weight: 500; font-size: 14px; }

.vision-card {
  background: linear-gradient(135deg, var(--green-pale), #ffffff);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid rgba(45,206,124,0.2);
  transition: transform 0.2s;
}
.vision-card:hover { transform: translateY(-3px); }
.vision-card span { font-size: 24px; }
.vision-card p { font-weight: 500; font-size: 14px; margin: 0; }

/* ===========================
   FOOTER
=========================== */
footer {
  text-align: center;
  padding: 56px 20px;
  background: var(--dark);
  margin-top: 80px;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.footer-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  padding: 4px;
}
.footer-brand span {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}
.footer-quote {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  line-height: 2;
}
.footer-quote .accent { color: var(--green); }

/* ===========================
   SCROLL REVEAL
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure nav-links always visible on desktop */
@media (min-width: 769px) {
  .nav-links {
    display: flex !important;
    position: static !important;
    transform: none !important;
    visibility: visible !important;
    height: auto !important;
    width: auto !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    flex-direction: row !important;
    gap: 24px !important;
    overflow: visible !important;
  }
  .hamburger { display: none !important; }
  .nav-overlay { display: none !important; }
}

/* ===========================
   MOBILE — 768px and below
=========================== */
@media (max-width: 768px) {

  /* Show hamburger, hide inline nav */
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 65px;
    right: 0;
    width: 240px;
    height: calc(100vh - 65px);
    background: var(--white);
    flex-direction: column;
    padding: 24px 24px 32px;
    gap: 4px;
    box-shadow: -6px 8px 32px rgba(0,0,0,0.14);
    border-radius: 0 0 0 16px;
    z-index: 990;
    list-style: none;
    overflow-y: auto;
    /* Hide with transform instead of right offset — avoids horizontal scrollbar */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.32s;
  }
  .nav-links.open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-links a:hover { color: var(--green); }

  /* Hero */
  .hero { padding: 40px 20px 60px; min-height: auto; gap: 14px; }
  .main-title { letter-spacing: -1.5px; }
  .hero-stats { gap: 14px; padding: 14px 20px; }
  .stat-divider { width: 1px; height: 28px; }

  /* Sections */
  .section { padding: 52px 5%; }

  /* Problem */
  .problem-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Solution */
  .solution-grid { grid-template-columns: 1fr; gap: 10px; }

  /* Architecture */
  .arch-sensors {
    flex-direction: column;
    align-items: center;
  }
  .arch-sensors .arch-chip { width: 100%; max-width: 320px; }

  /* App */
  .app-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
    text-align: center;
  }
  .app-img-wrap img { width: 220px; }
  .app-feature { justify-content: center; }
  .app-tagline { text-align: center; }

  /* Model */
  .model-wrap { padding: 24px 16px; }
  .model-img { max-width: 260px; }

  /* Grids */
  .why-grid,
  .vision-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Table */
  th, td { padding: 10px 12px; font-size: 13px; }
}

/* ===========================
   SMALL PHONES — 420px
=========================== */
@media (max-width: 420px) {
  .hero-stats {
    flex-direction: column;
    gap: 10px;
    border-radius: 18px;
    padding: 16px 20px;
  }
  .stat-divider { width: 40px; height: 1px; }
  .cta-btn { padding: 12px 26px; font-size: 14px; }
  .flow-bar { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}
