/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: #07090f;
  color: #e8eaf0;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.4rem; }
p { color: #9aa3b8; }

/* ===== LAYOUT ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
section { padding: 6rem 0; }

/* ===== SECTION LABELS ===== */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4d9fff;
  background: rgba(77,159,255,0.1);
  border: 1px solid rgba(77,159,255,0.2);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}
.section-sub { color: #7a8399; max-width: 540px; margin-bottom: 3rem; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  background: #4d9fff;
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #2d87ff; transform: translateY(-1px); }
.btn-ghost {
  display: inline-block;
  color: #9aa3b8;
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: #4d9fff; color: #4d9fff; }
.btn-nav {
  background: #4d9fff;
  color: #fff !important;
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-nav:hover { background: #2d87ff; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(7,9,15,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; height: 64px; gap: 2rem;
}
.logo { font-size: 1.3rem; font-weight: 800; color: #fff; flex-shrink: 0; }
.logo span { color: #4d9fff; }
.nav-links { display: flex; gap: 2rem; list-style: none; margin-left: auto; align-items: center; }
.nav-links a { font-size: 0.9rem; color: #9aa3b8; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; margin-left: auto; }

/* ===== HERO ===== */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 8rem 2rem 4rem;
  max-width: 1100px; margin: 0 auto; position: relative;
}
.hero-badge {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  color: #4d9fff; background: rgba(77,159,255,0.1);
  border: 1px solid rgba(77,159,255,0.25);
  padding: 5px 14px; border-radius: 100px; margin-bottom: 1.5rem;
  text-transform: uppercase;
}
#hero h1 { color: #fff; margin-bottom: 1.2rem; max-width: 720px; }
.hero-sub { font-size: 1.15rem; color: #7a8399; max-width: 560px; margin-bottom: 2.2rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3.5rem; }
.hero-stats { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-n { font-size: 1.6rem; font-weight: 700; color: #fff; }
.stat-l { font-size: 0.78rem; color: #5d6880; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-div { width: 1px; height: 36px; background: rgba(255,255,255,0.1); }
.hero-scroll-hint {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #3a4055; font-size: 0.75rem;
}
.scroll-arrow {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(77,159,255,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:0.3} 50%{opacity:1} }
.hero-bg {
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 60% at 70% 40%, rgba(30,70,140,0.15) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 20% 80%, rgba(20,50,100,0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== HOW IT WORKS ===== */
#how-it-works { background: #0b0e18; }
.steps { display: flex; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.step { flex: 1; min-width: 220px; }
.step-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(77,159,255,0.1); border: 1px solid rgba(77,159,255,0.2);
  margin-bottom: 1rem; position: relative;
}
.step-icon::after {
  content: ''; position: absolute; inset: 30%; border-radius: 2px;
  background: #4d9fff;
}
.icon-drone::after { clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.icon-ai::after { border-radius: 50%; background: conic-gradient(#4d9fff 0%, transparent 60%); }
.icon-report::after { clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%); }
.step-num { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: #4d9fff; margin-bottom: 0.5rem; }
.step h3 { color: #e8eaf0; }
.step-arrow { font-size: 1.5rem; color: #2a3050; margin-top: 1.5rem; align-self: flex-start; flex-shrink: 0; }

/* ===== DEMO SECTION ===== */
#demo { background: #07090f; }
.demo-layout {
  display: flex; gap: 1.5rem; align-items: flex-start;
  flex-wrap: wrap;
}
.viewer-wrap { flex: 1; min-width: 320px; }
.viewer-toolbar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  background: #0f1220; border: 1px solid rgba(255,255,255,0.06);
  border-bottom: none; border-radius: 10px 10px 0 0; padding: 0.6rem 1rem;
}
.toolbar-label { font-size: 0.75rem; color: #5d6880; margin-right: 4px; }
.filter-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.08);
  color: #7a8399; padding: 4px 12px; border-radius: 20px;
  font-size: 0.78rem; cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover { border-color: #4d9fff; color: #4d9fff; }
.filter-btn.active { background: rgba(77,159,255,0.15); border-color: #4d9fff; color: #4d9fff; }
.toolbar-right { margin-left: auto; }
.icon-btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.08);
  color: #7a8399; width: 28px; height: 28px; border-radius: 6px;
  cursor: pointer; font-size: 1rem; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: #4d9fff; color: #4d9fff; }
#canvas-container {
  position: relative; background: #0c0f1a;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none; border-bottom: none;
  height: 520px; overflow: hidden;
}
#three-canvas { display: block; width: 100%; height: 100%; }
#loading-overlay {
  position: absolute; inset: 0; background: #0c0f1a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  z-index: 10;
}
.loader-ring {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid rgba(77,159,255,0.15);
  border-top-color: #4d9fff;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-overlay p { color: #5d6880; font-size: 0.85rem; }
.viewer-hint {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(7,9,15,0.75); color: #5d6880;
  padding: 5px 14px; border-radius: 20px; font-size: 0.75rem;
  white-space: nowrap; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.06);
}
.analytics-bar {
  display: flex; flex-wrap: wrap; gap: 0;
  background: #0f1220; border: 1px solid rgba(255,255,255,0.06);
  border-top: none; border-radius: 0 0 10px 10px; overflow: hidden;
}
.anl-item {
  flex: 1; min-width: 80px;
  display: flex; flex-direction: column; align-items: center;
  padding: 0.75rem 0.5rem; border-right: 1px solid rgba(255,255,255,0.05);
}
.anl-item:last-child { border-right: none; }
.anl-val { font-size: 1.3rem; font-weight: 700; color: #fff; }
.anl-label { font-size: 0.68rem; color: #5d6880; text-align: center; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; }
.anl-item.critical .anl-val { color: #ff4f4f; }
.anl-item.warning .anl-val { color: #ff9c00; }
.anl-item.ok .anl-val { color: #35c47a; }

/* ===== SIDEBAR ===== */
#sidebar {
  width: 320px; flex-shrink: 0;
  background: #0f1220; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 1.5rem; min-height: 520px;
}
.hidden { display: none !important; }
.sidebar-icon-wrap { margin-bottom: 1.5rem; }
.sidebar-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(77,159,255,0.1); border: 1px solid rgba(77,159,255,0.2);
}
#sidebar-default h3 { color: #e8eaf0; margin-bottom: 0.5rem; }
.legend { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: #7a8399; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-red { background: #ff4f4f; }
.dot-orange { background: #ff9c00; }
.dot-yellow { background: #f5d000; }
.dot-green { background: #35c47a; }
#sidebar-back {
  background: transparent; border: none; color: #4d9fff;
  font-size: 0.85rem; cursor: pointer; padding: 0; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 4px;
}
#sidebar-back:hover { color: #7fbfff; }
#detail-header { margin-bottom: 1.25rem; }
.severity-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.badge-critical { background: rgba(255,79,79,0.15); color: #ff4f4f; border: 1px solid rgba(255,79,79,0.3); }
.badge-high { background: rgba(255,156,0,0.15); color: #ff9c00; border: 1px solid rgba(255,156,0,0.3); }
.badge-medium { background: rgba(245,208,0,0.12); color: #f5d000; border: 1px solid rgba(245,208,0,0.25); }
.badge-low { background: rgba(53,196,122,0.12); color: #35c47a; border: 1px solid rgba(53,196,122,0.25); }
#detail-header h3 { color: #fff; font-size: 1rem; margin-bottom: 0.2rem; }
#detail-location { font-size: 0.8rem; color: #5d6880; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1rem; }
.detail-cell {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px; padding: 0.6rem 0.75rem;
}
.dc-label { font-size: 0.7rem; color: #5d6880; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }
.dc-val { font-size: 0.9rem; color: #e8eaf0; font-weight: 500; }
.detail-section { margin-bottom: 1rem; }
.detail-section .dc-label { margin-bottom: 0.4rem; }
.urgency-pill {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 600;
}
.urgency-immediate { background: rgba(255,79,79,0.15); color: #ff4f4f; border: 1px solid rgba(255,79,79,0.3); }
.urgency-scheduled { background: rgba(255,156,0,0.15); color: #ff9c00; border: 1px solid rgba(255,156,0,0.3); }
.urgency-monitor { background: rgba(53,196,122,0.12); color: #35c47a; border: 1px solid rgba(53,196,122,0.25); }
.detail-notes { font-size: 0.85rem; color: #9aa3b8; line-height: 1.6; }
.detail-action { font-size: 0.85rem; color: #4d9fff; line-height: 1.6; }
.detail-warning {
  display: flex; align-items: flex-start; gap: 0.5rem;
  background: rgba(255,79,79,0.08); border: 1px solid rgba(255,79,79,0.2);
  border-radius: 8px; padding: 0.75rem; font-size: 0.82rem; color: #ff7a7a;
}
.warn-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }

/* ===== SERVICES ===== */
#services { background: #0b0e18; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.service-card {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.service-card:hover { border-color: rgba(77,159,255,0.25); background: rgba(77,159,255,0.04); }
.sc-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(77,159,255,0.1); border: 1px solid rgba(77,159,255,0.2);
  margin-bottom: 1rem;
}
.service-card h3 { color: #e8eaf0; margin-bottom: 0.4rem; }

/* ===== ASSETS ===== */
#assets { background: #07090f; }
.assets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.asset-card {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; overflow: hidden;
}
.asset-img {
  height: 160px;
  background: linear-gradient(135deg, #0f1a30, #1a2540);
  position: relative; overflow: hidden;
}
.asset-building::after, .asset-bridge::after, .asset-industrial::after {
  content: ''; position: absolute; inset: 0;
}
.asset-building { background: linear-gradient(135deg, #0d1525 0%, #1c2f50 100%); }
.asset-bridge { background: linear-gradient(135deg, #0d1e1e 0%, #0f3535 100%); }
.asset-industrial { background: linear-gradient(135deg, #1a1008 0%, #2e200a 100%); }
.asset-info { padding: 1.25rem; }
.asset-info h3 { color: #e8eaf0; margin-bottom: 0.3rem; }
.asset-info ul { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.asset-info li {
  font-size: 0.75rem; color: #4d9fff;
  background: rgba(77,159,255,0.08); border: 1px solid rgba(77,159,255,0.15);
  padding: 2px 9px; border-radius: 20px;
}

/* ===== CONTACT ===== */
#contact { background: #0b0e18; }
.contact-layout { display: flex; gap: 4rem; flex-wrap: wrap; align-items: flex-start; }
.contact-info { flex: 0 0 300px; display: flex; flex-direction: column; gap: 1.5rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.ci-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  background: rgba(77,159,255,0.1); border: 1px solid rgba(77,159,255,0.2);
}
.ci-label { font-size: 0.72rem; color: #5d6880; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.contact-item a, .contact-item span { font-size: 0.95rem; color: #9aa3b8; }
.contact-item a:hover { color: #4d9fff; }
.contact-note {
  font-size: 0.82rem; color: #3a4055; line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,0.05); padding-top: 1.25rem; margin-top: 0.25rem;
}
.contact-form { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 0.75rem; }
.form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.form-row input { flex: 1; min-width: 160px; }
.contact-form input, .contact-form textarea {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 0.75rem 1rem; color: #e8eaf0;
  font-size: 0.9rem; font-family: inherit; width: 100%; transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: rgba(77,159,255,0.4);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #3a4055; }
.contact-form textarea { resize: vertical; }
.contact-form .btn-primary { align-self: flex-start; }
#form-success {
  color: #35c47a; font-size: 0.88rem;
  background: rgba(53,196,122,0.1); border: 1px solid rgba(53,196,122,0.25);
  padding: 0.6rem 1rem; border-radius: 8px;
}

/* ===== FOOTER ===== */
footer {
  background: #07090f; border-top: 1px solid rgba(255,255,255,0.05);
  padding: 2rem 0;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem;
}
.footer-links { display: flex; gap: 1.5rem; margin: 0 auto; }
.footer-links a { font-size: 0.85rem; color: #3a4055; transition: color 0.2s; }
.footer-links a:hover { color: #9aa3b8; }
.footer-legal { font-size: 0.78rem; color: #2a3050; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .demo-layout { flex-direction: column; }
  #sidebar { width: 100%; min-height: auto; }
  .contact-layout { flex-direction: column; gap: 2rem; }
  .contact-info { flex: none; width: 100%; }
}
@media (max-width: 600px) {
  .nav-links { display: none; flex-direction: column; background: #0b0e18; position: absolute; top: 64px; left: 0; right: 0; padding: 1rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.06); gap: 1rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .steps { flex-direction: column; }
  .step-arrow { display: none; }
  .hero-stats { gap: 1.2rem; }
  .stat-div { display: none; }
}
