/* =========================
   Dexivra — style.css
   ========================= */

/* --------- Root & Reset --------- */
:root{
  --nav-h:72px;
  --accent-blue:#1e3a8a;
  --accent-bright:#3b82f6;
  --accent-green:#22c55e;
  --accent-orange:#f97316;
  --muted:#f3f4f6;
  --text:#0f172a;
  --soft:#eef2f7;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color:var(--text);
  background:#fafafa;
  line-height:1.55;
  padding-top: var(--nav-h); /* reserve space for fixed nav */
}

/* ensure anchors aren't hidden behind nav */
section { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* --------- NAVBAR --------- */
.navbar{
  position: fixed;
  top:0; left:0; right:0;
  height: var(--nav-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 0 18px;
  background: #ffffff;
  z-index:2200;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
}

/* logo */
.navbar .logo img{
  height:48px; width:auto; display:block;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px; /* space between image and text */
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

/* Logo image */
.logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* desktop links */
.nav-links{
  display:flex;
  gap:18px;
  list-style:none;
  align-items:center;
}
.nav-links li a{
  color:var(--accent-blue);
  text-decoration:none;
  font-weight:600;
  padding:8px 10px;
  border-radius:8px;
  transition: all .15s ease;
}
.nav-links li a:hover, .nav-links li a.active{
  color:var(--accent-bright);
  background: rgba(59,130,246,0.06);
  transform:translateY(-2px);
}

/* hamburger - visible on small screens */
.hamburger{
  display:none;
  cursor:pointer;
  font-size:1.3rem;
  color:var(--accent-blue);
  background:transparent;
  border:none;
  padding:6px;
  z-index:2300;
}

/* mobile menu - hidden by default */
.mobile-menu{
  display:none; /* JS toggles inline style or add .open class */
  position: fixed;
  top: var(--nav-h);
  right: 0;
  width: 260px;
  height: calc(100vh - var(--nav-h));
  background: #fff;
  box-shadow: 0 12px 40px rgba(2,6,23,0.12);
  z-index:2300;
  padding:16px;
  flex-direction:column;
  gap:8px;
  overflow-y:auto;
}
.mobile-menu a{
  color:var(--accent-blue);
  text-decoration:none;
  font-weight:700;
  padding:10px 6px;
  border-bottom:1px solid rgba(2,6,23,0.04);
}
.mobile-menu a:hover{ color:var(--accent-bright); }

/* also support class-based show */
.mobile-menu.open{ display:flex; }

/* --------- HERO (leave this intact) --------- */
.hero{
  position:relative;
  min-height: calc(100vh - var(--nav-h));
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:40px 18px;
  overflow:hidden;
  background: linear-gradient(-45deg, var(--accent-blue), var(--accent-bright), var(--accent-green), var(--accent-orange));
  background-size:400% 400%;
  animation: gradientMove 14s ease infinite;
  color:#fff;
}
.hero-overlay{
  position:absolute; inset:0;
  background: linear-gradient(rgba(2,6,23,0.18), rgba(2,6,23,0.26));
  z-index:1;
}
.hero-content{ position:relative; z-index:3; max-width:1100px; width:100%; padding:8px; }
.logo-burst{ display:inline-block; position:relative; margin: 0 auto 12px; }

.hero-logo {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 5; /* higher than animation */
  animation: floatLogo 5s ease-in-out infinite;
}

/* hero headline */
.hero-title{ font-size:clamp(1.6rem,3vw,2.6rem); line-height:1.05; margin:12px 0 8px; font-weight:700; color: #fff; }
.hero-title span{ color:var(--accent-green) }
.hero-subtext{ color: rgba(255,255,255,0.92); font-size:clamp(0.95rem,1.2vw,1.1rem); margin-bottom:18px; }

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  text-align: center;
  color: #ffffff; /* solid white for contrast */
  text-shadow: 0 3px 8px rgba(0,0,0,0.4); /* improves readability */
  letter-spacing: 1px;
  animation: fadeSlideUp 1.5s ease forwards;
}
/* Highlight second line for extra punch */
.hero-title br + * {
  color: #22c55e; /* green accent for "Driving Innovation" */
}

/* CTA buttons */
.cta-buttons{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.cta-buttons .btn{
  display:inline-block; padding:12px 20px; border-radius:10px; text-decoration:none;
  font-weight:700; color:#fff; border:1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.08);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.cta-buttons .btn:hover{ transform:translateY(-4px); box-shadow:0 10px 30px rgba(2,6,23,0.14) }
.cta-buttons .btn.secondary{ background: rgba(0,0,0,0.12) }

/* Burst icons (radiate in all directions) */
.burst-icons {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 700px;
  height: 700px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2; /* lower than logo */
}
.burst-icons i{
  position:absolute; top:50%; left:50%;
  transform: translate(-50%,-50%) scale(.6);
  color: rgba(255,255,255,0.88);
  font-size:1.8rem; opacity:0;
  animation: burstMove 7.2s infinite cubic-bezier(.22,.9,.37,.99);
  mix-blend-mode: screen;
}
/* define vector offsets per icon via CSS variables */
.burst-icons i:nth-child(1){ --tx:0;    --ty:-220px;  animation-delay:0s; } /* N */
.burst-icons i:nth-child(2){ --tx:220px; --ty:0;      animation-delay:.6s; } /* E */
.burst-icons i:nth-child(3){ --tx:0;    --ty:220px;   animation-delay:1.2s; } /* S */
.burst-icons i:nth-child(4){ --tx:-220px;--ty:0;      animation-delay:1.8s; } /* W */
.burst-icons i:nth-child(5){ --tx:-150px;--ty:-150px; animation-delay:2.4s; } /* NW */
.burst-icons i:nth-child(6){ --tx:150px; --ty:-150px; animation-delay:3.0s; } /* NE */
.burst-icons i:nth-child(7){ --tx:150px; --ty:150px;  animation-delay:3.6s; } /* SE */
.burst-icons i:nth-child(8){ --tx:-150px;--ty:150px;  animation-delay:4.2s; } /* SW */

@keyframes burstMove{
  0%   { transform: translate(-50%,-50%) scale(.5); opacity:0; }
  12%  { transform: translate(-50%,-50%) scale(1.05); opacity:1; }
  48%  { transform: translate(calc(-50% + var(--tx)*0.6), calc(-50% + var(--ty)*0.6)) scale(1.25); opacity:.85; }
  84%  { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.6); opacity:.45; }
  100% { transform: translate(calc(-50% + calc(var(--tx)*1.25)), calc(-50% + calc(var(--ty)*1.25))) scale(2); opacity:0; }
}

@keyframes gradientMove{ 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
@keyframes floatLogo{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* --------- ABOUT (modern, distinct from hero) --------- */
.about{
  padding:72px 18px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef7f5 100%);
}
.about-container{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:28px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.about-text{ flex:1 1 520px; min-width:280px; }
.about-text h2{ font-size:2rem; color:var(--accent-blue); margin-bottom:8px; }
.about-text p{ color:#334155; margin-bottom:12px; font-size:1.03rem; line-height:1.6 }

/* about visual: floating grid + subtle network lines */
.about-visual{ flex:1 1 380px; min-height:260px; position:relative; display:flex; align-items:center; justify-content:center; }
.about-visual svg.network-lines{ position:absolute; inset:0; width:100%; height:100%; z-index:0; }
.about-visual svg.network-lines line{ stroke: rgba(30,58,138,0.12); stroke-width:1.2; stroke-dasharray:6; animation: dashMove 6s linear infinite; }

.floating-grid{ position:relative; z-index:1; display:grid; grid-template-columns:repeat(3,1fr); gap:14px; list-style:none; padding:0; margin:0; width:100%; max-width:320px; justify-items:center; }
.floating-grid li{
  background:#fff; padding:12px; border-radius:12px; box-shadow:0 8px 20px rgba(2,6,23,0.06);
  font-size:1.6rem; display:flex; align-items:center; justify-content:center; width:82px; height:82px;
  animation: floaty 6s ease-in-out infinite;
}
.floating-grid li:nth-child(1){ animation-delay:0s; color:var(--accent-bright) }
.floating-grid li:nth-child(2){ animation-delay:.8s; color:var(--accent-green) }
.floating-grid li:nth-child(3){ animation-delay:1.6s; color:var(--accent-orange) }
.floating-grid li:nth-child(4){ animation-delay:2.4s; color:var(--accent-blue) }
.floating-grid li:nth-child(5){ animation-delay:3.2s; color:#dc2626 }
.floating-grid li:nth-child(6){ animation-delay:4s; color:#0ea5e9 }

@keyframes floaty{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes dashMove{ to{ stroke-dashoffset:-12 } }

/* --------- SERVICES --------- */
#services{ padding:60px 18px; background: linear-gradient(135deg, #eef2ff, #e0f2fe); text-align:center; }
#services h2{ font-size:1.9rem; color:var(--accent-blue) }
.services-grid{ margin-top:28px; display:grid; gap:18px; grid-template-columns:repeat(4,1fr); max-width:1100px; margin-left:auto; margin-right:auto; }
.service-card{ background:linear-gradient(180deg,#ffffff,#f8fafc); padding:20px; border-radius:12px; box-shadow:0 8px 20px rgba(2,6,23,0.04); transition:transform .18s, box-shadow .18s; display:flex; flex-direction:column; align-items:center; gap:12px; min-height:120px; justify-content:center; }
.service-card i{ font-size:22px; color:var(--accent-blue) }
.service-card h3{ margin:0; font-size:1.02rem; color:#0f172a }

/* --------- CONTACT --------- */
#contact{ padding:64px 18px; background: linear-gradient(180deg,#eef7ff,#f8fbff); text-align:center; }
#contact h2{ color:var(--accent-blue) }
#contact form{ max-width:620px; margin:12px auto 0; display:flex; flex-direction:column; gap:12px; }
#contact input, #contact textarea{ padding:12px; border-radius:10px; border:1px solid rgba(2,6,23,0.06); font-size:1rem; }
#contact button{ padding:12px; border-radius:10px; border:none; background:var(--accent-bright); color:#fff; font-weight:700; cursor:pointer; }
.form-msg{ margin-top:8px; font-size:.95rem; }
.form-msg.success{ color:#065f46 } .form-msg.error{ color:#b91c1c }

/* spinner small */
.spinner{ width:16px; height:16px; border-radius:50%; border:2px solid rgba(255,255,255,0.25); border-top-color:rgba(255,255,255,0.9); animation: spin .7s linear infinite; display:inline-block }
@keyframes spin{ to{ transform:rotate(360deg) } }

/* --------- LOGIN --------- */
#login{ padding:56px 18px; background:#fff; text-align:center; }
#login form{ max-width:420px; margin:12px auto; display:flex; flex-direction:column; gap:12px; }
#login input{ padding:12px; border-radius:8px; border:1px solid rgba(2,6,23,0.06); }

#login button {
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: var(--accent-bright);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
#login button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2,6,23,0.12);
}

/* --------- FOOTER --------- */
footer{ padding:18px; background:var(--accent-blue); color:#fff; text-align:center }

/* --------- BACK TO TOP (hexagon) --------- */
#backToTop{
  position:fixed; right:20px; bottom:20px; z-index:2100;
  width:64px; height:40px; display:none; align-items:center; justify-content:center;
  background:var(--accent-bright); color:#fff; border:none; cursor:pointer;
  clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);
  box-shadow:0 10px 26px rgba(16,24,40,0.14);
}
#backToTop:hover{ transform:scale(1.06); background:#2563eb }

/* --------- Fade-in helper --------- */
.fade-in{ opacity:0; transform:translateY(20px); transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .7s ease; }
.fade-in.visible{ opacity:1; transform:translateY(0) }

@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* --------- Responsive rules --------- */
@media (max-width:1100px){ .services-grid{ grid-template-columns:repeat(3,1fr) } }
@media (max-width:880px){ .services-grid{ grid-template-columns:repeat(2,1fr) } }
@media (max-width:768px){
  .nav-links{ display:none }         /* hide desktop links on small */
  .hamburger{ display:block }        /* show hamburger */
  .mobile-menu{ display:none }       /* still hidden until JS toggles */
  .about-container{ flex-direction:column; gap:20px; align-items:stretch }
  .floating-grid{ justify-items:center; grid-template-columns:repeat(3,1fr) }
  .hero-logo{ max-width:360px }
  .hero-title {
    font-size: 2.2rem;
  }
  #contact form, #login form{ width:95%; margin:12px auto }
}
@media (max-width:480px){
  .hero-logo{ max-width:300px }
  .services-grid{ grid-template-columns:1fr }
  .floating-grid{ grid-template-columns:repeat(3,1fr); gap:8px }
}


/* Smaller screens */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
}

.about {
  padding: 80px 20px;
  background: #f9fafb;
}

.about-container {
  max-width: 1100px;
  margin: 0 auto 20px;
  text-align: center;
}

.about-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #1e293b;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #475569;
}
.about-text p:last-child {
  margin-bottom: 20px; /* keep tighter spacing */
}

/* Cards Grid */
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-card {
  background: #ffffff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.about-card i {
  font-size: 2rem;
  color: #2563eb;
  margin-bottom: 15px;
}

.about-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1e293b;
}

.about-card p {
  font-size: 0.95rem;
  color: #475569;
}

/* Mobile spacing adjustments */
@media (max-width: 768px) {
  .about {
    padding: 60px 15px;
  }
  .about-container {
    margin-bottom: 10px;
  }
  .about-text p:last-child {
    margin-bottom: 15px;
  }
}

.about {
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
  border-bottom: 1px solid #e5e7eb;
}

/* Edge / Differentiator cards inside Services */
.edge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: 0 auto 40px; /* spacing before services grid */
}

.edge-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.edge-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.edge-card i {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #2563eb;
}

.edge-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1e293b;
}

.edge-card p {
  font-size: 0.95rem;
  color: #475569;
}
