:root{
  --navy:#071B3A;
  --navy-2:#020B1D;
  --blue:#008CFF;
  --cyan:#00C8FF;
  --green:#65D70B;
  --light:#F5FAFF;
  --text:#0F172A;
  --muted:#64748B;
  --line:#DDEBFF;
  --orange:#f26700;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:#fff;
  overflow-x:hidden;
}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}

.container{
  width:min(1180px,calc(100% - 40px));
  margin:auto;
}

.section{padding:88px 0}
.section-sm{padding:58px 0}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  background:rgba(0,140,255,.1);
  color:#0369c9;
  border:1px solid rgba(0,140,255,.16);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border:0;
  border-radius:12px;
  padding:14px 22px;
  font-weight:800;
  cursor:pointer;
  transition:.25s ease;
  font-size:15px;
}

.btn-primary{
  background:linear-gradient(135deg,var(--blue),#0057ff);
  color:#fff;
  box-shadow:0 16px 34px rgba(0,140,255,.28);
}

.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 20px 40px rgba(0,140,255,.36);
}

.btn-outline{
  color:#fff;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.06);
}

.btn-outline:hover{background:rgba(255,255,255,.12)}

.btn-light-outline{
  color:#0F172A;
  border:1px solid var(--line);
  background:#fff;
}

.btn-light-outline:hover{
  border-color:#85c7ff;
  box-shadow:0 10px 24px rgba(0,140,255,.12);
}

/* ================= HEADER ================= */

.header{
  position:fixed;
  inset:0 0 auto 0;
  z-index:100;
  background:rgba(2,11,29,.82);
  backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.nav{
  height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

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

.brand img{
  height:46px;
  width:auto;
  border-radius:4px;
}

.nav-links{
  display:flex;
  align-items:center;
  gap:28px;
  color:rgba(255,255,255,.82);
  font-size:14px;
  font-weight:700;
}

.nav-links a:hover{color:#fff}

.hamburger{
  display:none;
  background:none;
  border:0;
  color:#fff;
  font-size:28px;
}

.mobile-menu{
  display:none;
  padding:14px 0 22px;
  border-top:1px solid rgba(255,255,255,.08);
}

.mobile-menu a{
  display:block;
  color:#fff;
  padding:12px 0;
  font-weight:700;
}

/* ================= HERO ================= */

.hero{
  position:relative;
  min-height:760px;
  padding-top:130px;
  background:
    radial-gradient(circle at 70% 20%,rgba(0,140,255,.25),transparent 35%),
    radial-gradient(circle at 50% 90%,rgba(101,215,11,.12),transparent 35%),
    linear-gradient(135deg,#020B1D 0%,#061936 60%,#031024 100%);
  color:#fff;
  overflow:hidden;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);
  gap:54px;
  align-items:center;
}

.hero-content{
  min-width:0;
}

.hero h1{
  font-size:clamp(40px,5vw,70px);
  line-height:1.05;
  margin:20px 0 18px;
  letter-spacing:-1.8px;
}

.hero h1 span{
  background:linear-gradient(90deg,#19a4ff,#6ee7ff);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hero p{
  font-size:18px;
  line-height:1.8;
  color:rgba(255,255,255,.78);
  max-width:590px;
}

.hero-actions{
  display:flex;
  gap:14px;
  margin-top:30px;
  flex-wrap:wrap;
}

.hero-points{
  display:flex;
  gap:22px;
  flex-wrap:wrap;
  margin-top:28px;
  color:rgba(255,255,255,.82);
  font-size:13px;
}

.hero-points span{
  display:flex;
  align-items:center;
  gap:8px;
}

.dot-check{
  width:18px;
  height:18px;
  border-radius:50%;
  background:rgba(101,215,11,.14);
  color:var(--green);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
}

/* HERO VISUAL ALIGNMENT FIX */

.hero-visual{
  width:100%;
  min-width:0;
  display:flex;
  justify-content:center;
  align-items:center;
}

.mockup{
  width:100%;
  max-width:720px;
  min-width:0;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(8,24,52,.78);
  border-radius:22px;
  padding:18px;
  box-shadow:0 30px 80px rgba(0,0,0,.38);
  position:relative;
  overflow:hidden;
}

.mockup-top{
  height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  color:rgba(255,255,255,.78);
  font-weight:800;
  min-width:0;
}

.mockup-body{
  display:grid;
  grid-template-columns:170px minmax(0,1fr);
  gap:14px;
  min-width:0;
}

.sidebar{
  min-width:0;
  background:rgba(2,11,29,.5);
  border-radius:16px;
  padding:14px;
}

.side-item{
  padding:11px 12px;
  border-radius:10px;
  color:rgba(255,255,255,.7);
  font-size:13px;
  margin-bottom:8px;
}

.side-item.active{
  background:linear-gradient(135deg,var(--blue),#0057ff);
  color:#fff;
}

.dash{
  display:grid;
  gap:14px;
  min-width:0;
}

.cards{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
  min-width:0;
}

.mini-card,
.chart-card{
  min-width:0;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:16px;
}

.mini-card{
  min-height:92px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.mini-card small{
  color:rgba(255,255,255,.58);
  display:block;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.mini-card strong{
  display:block;
  font-size:28px;
  margin-top:8px;
  line-height:1.05;
  white-space:nowrap;
}

.mini-card em{
  font-style:normal;
  color:var(--green);
  font-size:12px;
  white-space:nowrap;
}

.chart-row{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);
  gap:14px;
  align-items:stretch;
  min-width:0;
}

.line-chart{
  height:155px;
  border-radius:14px;
  background:linear-gradient(180deg,rgba(0,140,255,.14),rgba(101,215,11,.08));
  position:relative;
  overflow:hidden;
}

.line-chart:before{
  content:"";
  position:absolute;
  inset:26px 20px;
  background:
    linear-gradient(135deg,transparent 45%,rgba(0,200,255,.8) 46%,rgba(0,200,255,.8) 48%,transparent 49%),
    linear-gradient(25deg,transparent 45%,rgba(101,215,11,.78) 46%,rgba(101,215,11,.78) 48%,transparent 49%);
}

.donut{
  width:120px;
  height:120px;
  border-radius:50%;
  margin:14px auto;
  background:conic-gradient(var(--blue) 0 72%,var(--green) 72% 91%,rgba(255,255,255,.12) 91% 100%);
  position:relative;
}

.donut:after{
  content:"";
  position:absolute;
  inset:26px;
  background:#071b3a;
  border-radius:50%;
}

.device-strip{
  position:absolute;
  left:9%;
  right:9%;
  bottom:34px;
  height:70px;
  border-top:1px dashed rgba(0,200,255,.35);
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#fff;
}

.chip,
.cloud,
.pi{
  width:82px;
  height:58px;
  border:1px solid rgba(0,200,255,.4);
  background:rgba(0,140,255,.12);
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#9fe6ff;
}

.cloud{
  width:130px;
  border-radius:999px;
  color:#65d70b;
  font-size:34px;
}

/* ================= COMMON SECTIONS ================= */

.section-title{
  text-align:center;
  max-width:760px;
  margin:0 auto 42px;
}

.section-title h2{
  font-size:clamp(30px,3vw,44px);
  line-height:1.15;
  margin:16px 0 12px;
  letter-spacing:-.9px;
}

.section-title h2 span{color:var(--blue)}

.section-title p{
  font-size:17px;
  line-height:1.7;
  color:var(--muted);
}

.problem-grid,
.feature-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.problem-card,
.feature-card,
.step-card,
.price-card,
.use-card{
  border:1px solid var(--line);
  border-radius:20px;
  padding:24px;
  background:#fff;
  box-shadow:0 14px 36px rgba(7,27,58,.06);
  transition:.25s ease;
}

.problem-card:hover,
.feature-card:hover,
.step-card:hover,
.price-card:hover{
  transform:translateY(-5px);
  box-shadow:0 20px 44px rgba(7,27,58,.11);
}

.icon{
  width:46px;
  height:46px;
  border-radius:14px;
  background:rgba(0,140,255,.1);
  color:var(--blue);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:16px;
}

.problem-card h3,
.feature-card h3{
  margin:0 0 8px;
  font-size:17px;
}

.problem-card p,
.feature-card p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

.light-bg{
  background:linear-gradient(180deg,#fff,#f6fbff);
}

.feature-grid{
  grid-template-columns:repeat(3,1fr);
}

.steps{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.step-number{
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--blue);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  margin-bottom:18px;
}

.use-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:14px;
}

.use-card{
  text-align:center;
  padding:20px 12px;
}

.use-card .icon{
  margin:0 auto 12px;
}

.pricing{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:18px;
}

.price-card{
  text-align:center;
  position:relative;
  overflow:hidden;
}

.price-card.popular{
  border-color:rgba(101,215,11,.55);
  box-shadow:0 20px 55px rgba(101,215,11,.14);
}

.ribbon{
  position:absolute;
  right:-38px;
  top:22px;
  transform:rotate(42deg);
  background:var(--green);
  color:#073a02;
  font-weight:900;
  padding:6px 42px;
  font-size:12px;
}

.price{
  font-size:34px;
  font-weight:900;
  margin:18px 0;
  color:var(--blue);
}

.price small{
  font-size:14px;
  color:var(--muted);
  font-weight:600;
}

.price-card ul{
  padding:0;
  margin:18px 0;
  list-style:none;
  color:var(--muted);
  font-size:14px;
  line-height:2;
}

/* ================= SECURITY ================= */

.security-band{
  background:linear-gradient(135deg,#071B3A,#020B1D);
  border-radius:26px;
  color:#fff;
  padding:34px;
  display:grid;
  grid-template-columns:1.1fr 2fr;
  gap:24px;
  align-items:center;
}

.security-items{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.security-item{
  border:1px solid rgba(255,255,255,.1);
  border-radius:16px;
  padding:16px;
  background:rgba(255,255,255,.05);
}

/* ================= TRUST ================= */

.trust-box{
  background:linear-gradient(135deg,#031024,#071B3A);
  color:#fff;
  border-radius:28px;
  padding:38px;
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:36px;
  align-items:center;
}

.trust-logo{
  max-width:350px;
  margin:auto;
}

.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin-top:28px;
}

.stat{
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.05);
  border-radius:16px;
  padding:16px;
}

.stat strong{
  font-size:24px;
  color:#fff;
}

.stat span{
  display:block;
  color:rgba(255,255,255,.66);
  font-size:13px;
}

/* ================= CONTACT ================= */

.contact-grid{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:26px;
}

.contact-card,
.form-card{
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
  padding:28px;
  box-shadow:0 14px 36px rgba(7,27,58,.06);
}

.contact-row{
  display:flex;
  gap:14px;
  margin-bottom:18px;
  color:var(--muted);
  line-height:1.5;
}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.form-field label{
  display:block;
  font-size:13px;
  font-weight:800;
  margin-bottom:8px;
  color:#334155;
}

.form-field input,
.form-field select,
.form-field textarea{
  width:100%;
  border:1px solid #d8e6f8;
  border-radius:12px;
  padding:14px 14px;
  font:inherit;
  outline:none;
  background:#fbfdff;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus{
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(0,140,255,.1);
}

.full{
  grid-column:1/-1;
}

.form-message{
  margin-top:14px;
  font-weight:700;
}

/* ================= FOOTER ================= */

.footer{
  background:#020B1D;
  color:#fff;
  padding:54px 0 24px;
}

.footer-top{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr 1.2fr;
  gap:34px;
}

.footer h4{
  margin:0 0 18px;
}

.footer p,
.footer a{
  color:rgba(255,255,255,.68);
  line-height:1.8;
}

.footer a:hover{color:#fff}

.footer-logo{
  height:52px;
  width:auto;
  margin-bottom:12px;
}

.footer-links a{
  display:block;
  margin-bottom:10px;
}

.social{
  display:flex;
  gap:12px;
  margin-top:16px;
}

.social a{
  width:40px;
  height:40px;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1);
  margin-top:34px;
  padding-top:22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

.footer-wing{
  display:flex;
  align-items:center;
  gap:14px;
  color:rgba(255,255,255,.8);
}

.footer-wing img{
  height:42px;
  width:auto;
}

/* ================= ANIMATION ================= */

.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:.7s ease;
}

.reveal.visible{
  opacity:1;
  transform:none;
}

/* ================= RESPONSIVE ================= */

@media(max-width:1180px){
  .mockup{
    max-width:680px;
  }

  .mockup-body{
    grid-template-columns:155px minmax(0,1fr);
  }

  .cards{
    gap:10px;
  }

  .mini-card{
    min-height:86px;
    padding:14px;
  }

  .mini-card strong{
    font-size:24px;
  }

  .mini-card small{
    font-size:11px;
  }
}

@media(max-width:1000px){
  .hero-grid,
  .trust-box,
  .contact-grid,
  .security-band{
    grid-template-columns:1fr;
  }

  .hero{
    min-height:auto;
    padding-bottom:70px;
  }

  .hero-content{
    text-align:center;
    max-width:780px;
    margin:0 auto;
  }

  .hero p{
    margin-left:auto;
    margin-right:auto;
  }

  .hero-actions,
  .hero-points{
    justify-content:center;
  }

  .hero-visual{
    justify-content:center;
  }

  .mockup{
    max-width:820px;
    margin:0 auto;
  }

  .mockup-body{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:none;
  }

  .cards{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  .mini-card{
    min-height:88px;
  }

  .chart-row{
    grid-template-columns:1fr 1fr;
  }

  .problem-grid,
  .steps{
    grid-template-columns:repeat(2,1fr);
  }

  .feature-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .use-grid{
    grid-template-columns:repeat(3,1fr);
  }

  .pricing{
    grid-template-columns:repeat(2,1fr);
  }

  .footer-top{
    grid-template-columns:1fr 1fr;
  }

  .device-strip{
    display:none;
  }

  .nav-links,
  .nav .btn{
    display:none;
  }

  .hamburger{
    display:block;
  }

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

@media(max-width:760px){
  .chart-row{
    grid-template-columns:1fr;
  }

  .mockup{
    max-width:100%;
  }
}

@media(max-width:640px){
  .container{
    width:min(100% - 26px,1180px);
  }

  .section{
    padding:62px 0;
  }

  .hero{
    padding-top:112px;
  }

  .hero-content{
    text-align:left;
  }

  .hero p{
    margin-left:0;
    margin-right:0;
  }

  .hero-actions,
  .hero-points{
    justify-content:flex-start;
  }

  .hero-actions .btn{
    width:100%;
  }

  .cards,
  .chart-row,
  .problem-grid,
  .feature-grid,
  .steps,
  .pricing,
  .stats,
  .form-grid,
  .security-items,
  .footer-top{
    grid-template-columns:1fr;
  }

  .use-grid{
    grid-template-columns:repeat(2,1fr);
  }

  .trust-box,
  .contact-card,
  .form-card,
  .security-band{
    padding:22px;
  }

  .mockup{
    display:none;
  }

  .hero h1{
    letter-spacing:-1px;
  }

  .footer-bottom{
    align-items:flex-start;
    flex-direction:column;
  }

  .footer-wing{
    align-items:flex-start;
  }
}

/* =========================================================
   HERO FINAL ALIGNMENT FIX
   Fixes ESP32 / Cloud / Raspberry Pi strip overlapping buttons
   ========================================================= */

.hero{
  min-height: auto;
  padding-bottom: 90px;
}

.hero-grid{
  position: relative;
  z-index: 2;
}

/* Hide bottom device strip to avoid overlap */
.device-strip{
  display: none !important;
}

/* Hero dashboard clean positioning */
.hero-visual{
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mockup{
  position: relative;
  z-index: 3;
  max-width: 760px;
  width: 100%;
}

/* Buttons always above all decorative elements */
.hero-actions{
  position: relative;
  z-index: 5;
}

/* Left text width control */
.hero-content{
  position: relative;
  z-index: 5;
}

/* Tablet alignment */
@media(max-width:1000px){
  .hero{
    padding-bottom: 70px;
  }

  .hero-grid{
    grid-template-columns: 1fr !important;
  }

  .hero-content{
    text-align: center;
  }

  .hero p{
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions,
  .hero-points{
    justify-content: center;
  }

  .mockup{
    max-width: 820px;
  }
}

/* Mobile */
@media(max-width:640px){
  .hero-content{
    text-align: left;
  }

  .hero p{
    margin-left: 0;
    margin-right: 0;
  }

  .hero-actions,
  .hero-points{
    justify-content: flex-start;
  }

  .mockup{
    display: none !important;
  }
}