/* ============================================================
   eSecureTech Solutions Ltd — Light Tech Theme
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-2:      #f4f7fc;
  --surface:   #ffffff;
  --surface-2: #eef3fb;
  --border:    rgba(15, 40, 90, 0.10);
  --text:      #0f1b2e;   /* dark navy */
  --muted:     #5b6b86;
  --accent:    #0891b2;   /* deep cyan/teal — readable on white */
  --accent-2:  #059669;   /* emerald green */
  --accent-3:  #4f46e5;   /* indigo (for gradients) */
  --accent-ink:#ffffff;   /* text on gradient buttons */
  --glow:      rgba(8, 145, 178, 0.22);
  --shadow:    0 12px 30px rgba(15, 40, 90, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 40, 90, 0.14);
  --radius:    16px;
  --maxw:      1240px;
  --font:      'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background tint */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(650px circle at 12% -5%, rgba(8, 145, 178, 0.10), transparent 45%),
    radial-gradient(750px circle at 92% 12%, rgba(79, 70, 229, 0.08), transparent 45%),
    radial-gradient(650px circle at 50% 108%, rgba(5, 150, 105, 0.07), transparent 45%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(15, 40, 90, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 40, 90, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 100%);
}

h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; letter-spacing: -0.02em; }

a { color: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------------- Header ---------------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: 0.3s;
}
header.scrolled {
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 24px rgba(15, 40, 90, 0.08);
}
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 44px; width: 44px; display: block; border-radius: 12px; box-shadow: 0 0 18px var(--glow); }
.logo-mark {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: var(--accent-ink); font-size: 20px;
  box-shadow: 0 0 18px var(--glow);
}
.logo-text h1 {
  font-size: 19px; margin: 0; letter-spacing: 0.5px; color: var(--text);
  line-height: 1.1;
}
.logo-text span { display: block; font-size: 9px; letter-spacing: 3px; color: var(--accent); margin-top: 2px; font-weight: 600; }

.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px;
  letter-spacing: 0.5px; transition: 0.25s; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: 0.3s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  padding: 9px 20px !important; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink) !important; font-weight: 700 !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { box-shadow: 0 0 22px var(--glow); }

.menu-toggle { display: none; font-size: 24px; color: var(--text); cursor: pointer; z-index: 1001; }
.close-menu { display: none; }
.menu-overlay {
  position: fixed; inset: 0; background: rgba(15, 27, 46, 0.45);
  opacity: 0; visibility: hidden; transition: 0.3s; z-index: 998;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block; cursor: pointer; border: none;
  padding: 14px 32px; border-radius: 12px;
  font-family: var(--font); font-weight: 700; font-size: 15px; letter-spacing: 0.5px;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px rgba(8, 145, 178, 0.28);
  transition: 0.3s; text-decoration: none;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(8, 145, 178, 0.42); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 18px var(--glow); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(8, 145, 178, 0.08); border: 1px solid rgba(8, 145, 178, 0.22);
  color: var(--accent); font-size: 12px; letter-spacing: 2px; font-weight: 600;
  margin-bottom: 24px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.hero-content h1 {
  font-size: clamp(38px, 6vw, 68px); line-height: 1.05; margin-bottom: 22px; font-weight: 800;
}
.hero-desc { font-size: 18px; color: var(--muted); max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-tags { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }
.service-tag {
  cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: 1px;
  padding: 7px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: 0.25s;
}
.service-tag:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* Hero visual card */
.hero-visual { position: relative; }
.code-card {
  background: #0f1728; border: 1px solid rgba(15,40,90,0.12); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
  position: relative;
}
.code-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: var(--radius); padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 40%, var(--accent-3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.code-head { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.code-head .d { width: 11px; height: 11px; border-radius: 50%; }
.code-head .d.r { background: #ff5f56; } .code-head .d.y { background: #ffbd2e; } .code-head .d.g { background: #27c93f; }
.code-head span { margin-left: auto; font-size: 12px; color: #7d8db0; }
.code-body { padding: 20px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; line-height: 1.9; color: #cdd8ee; }
.code-body .ln { color: #4a5876; margin-right: 14px; user-select: none; }
.code-body .k { color: #818cf8; } .code-body .s { color: #34e5a3; }
.code-body .f { color: #22d3ee; } .code-body .c { color: #5b6a86; }
.hero-glow {
  position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  top: -60px; right: -60px; z-index: -1; filter: blur(30px);
}

/* ---------------- Sections ---------------- */
section { padding: 100px 0; position: relative; }
.section-sub {
  text-align: center; color: var(--accent); text-transform: uppercase;
  letter-spacing: 4px; font-size: 13px; font-weight: 700; margin-bottom: 14px;
}
.section-title { font-size: clamp(28px, 4vw, 42px); text-align: center; margin-bottom: 60px; font-weight: 800; }

/* ---------------- Stats ---------------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 30px; margin-top: -60px; position: relative; z-index: 5;
  box-shadow: var(--shadow-lg);
}
.stat { text-align: center; }
.stat .num { font-size: 40px; font-weight: 800; line-height: 1; }
.stat .lbl { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------------- Services ---------------- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px;
}
.service-card {
  position: relative; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: 0.35s; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: 0.35s;
}
.service-card:hover { transform: translateY(-8px); border-color: rgba(8,145,178,0.35); box-shadow: 0 22px 48px rgba(15,40,90,0.14); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center;
  font-size: 24px; margin-bottom: 20px; color: var(--accent);
  background: rgba(8, 145, 178, 0.08); border: 1px solid rgba(8, 145, 178, 0.15);
  transition: 0.35s;
}
.service-card:hover .service-icon { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); box-shadow: 0 8px 20px rgba(8,145,178,0.35); }
.service-card h3 { font-size: 21px; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.card-link {
  color: var(--accent); font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: 0.25s;
}
.card-link:hover { gap: 12px; }

/* ---------------- About ---------------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h3 { font-size: 28px; margin-bottom: 20px; }
.about-text p { margin-bottom: 18px; color: var(--muted); line-height: 1.8; }
.about-text p strong { color: var(--text); }
.signature { margin-top: 22px; font-style: italic; font-size: 17px; color: var(--accent); }
.about-image { position: relative; }
.about-image img { width: 100%; border-radius: var(--radius); height: 460px; object-fit: cover; border: 1px solid var(--border); }
.about-image::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 80px rgba(10,14,23,0.6); pointer-events: none;
}

/* ---------------- Gallery ---------------- */
.gallery-filter { text-align: center; margin-bottom: 44px; }
.filter-btn {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  padding: 9px 22px; margin: 5px; cursor: pointer; font-family: var(--font);
  font-weight: 600; font-size: 13px; letter-spacing: 1px; transition: 0.25s; border-radius: 999px;
}
.filter-btn:hover, .filter-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent;
}
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.portfolio-item {
  position: relative; overflow: hidden; border-radius: var(--radius); height: 300px;
  cursor: pointer; border: 1px solid var(--border);
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.portfolio-item:hover img { transform: scale(1.08); }
.overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; text-align: left;
  background: linear-gradient(transparent 35%, rgba(9, 20, 40, 0.92));
  opacity: 0; transition: 0.35s;
}
.portfolio-item:hover .overlay { opacity: 1; }
.overlay h3 { font-size: 19px; color: #fff; }
.overlay p { font-size: 13px; color: #c4d0e6; margin-top: 4px; }
.overlay i { position: absolute; top: 20px; right: 20px; font-size: 20px; color: #22d3ee; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0; background: rgba(9, 20, 40, 0.92);
  z-index: 3000; justify-content: center; align-items: center; flex-direction: column;
}
.lightbox-content { max-width: 90%; max-height: 80%; border-radius: var(--radius); border: 1px solid var(--border); }
.close-lightbox { position: absolute; top: 22px; right: 34px; color: var(--accent); font-size: 42px; cursor: pointer; transition: 0.25s; }
.close-lightbox:hover { color: #fff; }
#lightbox-caption { color: var(--text); margin-top: 18px; font-size: 17px; }

/* ---------------- Contact bar ---------------- */
.contact-bar {
  background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 46px 0; margin: 40px 0;
}
.contact-grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.contact-card {
  display: flex; align-items: center; gap: 16px; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact-card i {
  font-size: 22px; color: var(--accent); width: 48px; height: 48px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 12px;
  background: rgba(8, 145, 178, 0.08); border: 1px solid rgba(8, 145, 178, 0.15);
}
.contact-card p { margin: 2px 0; font-size: 14px; color: var(--muted); }
.contact-card a { color: var(--accent); text-decoration: none; }

/* ---------------- Contact form ---------------- */
.contact-main { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-details p { margin: 18px 0; display: flex; align-items: center; gap: 15px; color: var(--muted); }
.contact-details i { width: 26px; color: var(--accent); font-size: 18px; }
.contact-form {
  background: var(--surface); border: 1px solid var(--border);
  padding: 32px; border-radius: var(--radius);
}
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 14px 16px; margin: 8px 0;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font); color: var(--text); font-size: 15px; transition: 0.25s;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8,145,178,0.14);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #64748b; }
.contact-form select { color: var(--muted); }
.contact-form select option { background: var(--surface); color: var(--text); }
.map-frame { margin-top: 26px; }
.map-frame iframe { border: 1px solid var(--border) !important; border-radius: var(--radius); }

/* ---------------- Footer ---------------- */
footer { background: var(--bg-2); border-top: 1px solid var(--border); color: var(--muted); text-align: center; padding: 54px 0 40px; }
.footer-logo { font-size: 24px; color: var(--text); margin-bottom: 12px; font-weight: 800; }
.footer-logo span { color: var(--accent); }
.social-icons { margin: 18px 0; }
.social-icons a {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin: 0 6px;
  border-radius: 10px; color: var(--muted); font-size: 17px; transition: 0.25s;
  background: var(--surface); border: 1px solid var(--border);
}
.social-icons a:hover { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 16px var(--glow); }
footer p { font-size: 14px; }

/* ---------------- Service Modal ---------------- */
.modal {
  display: none; position: fixed; inset: 0; background: rgba(9, 20, 40, 0.88);
  backdrop-filter: blur(6px); z-index: 2000; justify-content: center; align-items: center; padding: 20px;
}
.modal-content {
  background: var(--surface); border: 1px solid var(--border);
  max-width: 620px; width: 100%; border-radius: var(--radius); position: relative;
  animation: modalIn 0.3s ease; max-height: 88vh; overflow-y: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.close-modal { position: absolute; top: 16px; right: 22px; font-size: 30px; cursor: pointer; color: var(--muted); transition: 0.25s; z-index: 10; }
.close-modal:hover { color: var(--accent); }
#modal-body { padding: 40px 36px; }
#modal-body .modal-icon { font-size: 44px; color: var(--accent); margin-bottom: 16px; }
#modal-body h2 { font-size: 28px; margin-bottom: 14px; }
#modal-body h3 { font-size: 16px; margin: 22px 0 12px; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
#modal-body p { margin-bottom: 14px; line-height: 1.7; color: var(--muted); }
#modal-body ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 24px; }
#modal-body li { color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 10px; }
#modal-body li i { color: var(--accent-2); }
.modal-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink);
  padding: 13px 30px; font-weight: 700; border: none; cursor: pointer;
  font-family: var(--font); border-radius: 12px; transition: 0.25s;
}
.modal-btn:hover { box-shadow: 0 0 22px var(--glow); }

/* ---------------- WhatsApp float ---------------- */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; background: #25D366; color: #fff;
  width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 30px; box-shadow: 0 8px 24px rgba(37,211,102,0.4); transition: 0.3s; z-index: 999; text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1) translateY(-3px); }

/* ---------------- Alerts ---------------- */
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: rgba(5,150,105,0.08); border: 1px solid rgba(5,150,105,0.35); color: var(--accent-2); }
.alert-error { background: rgba(255,90,90,0.1); border: 1px solid rgba(255,90,90,0.4); color: #ff8b8b; }
.alert-error ul { margin: 0; padding-left: 20px; }

/* ---------------- Scroll reveal ---------------- */
.fade-up { opacity: 0; transform: translateY(40px); transition: 0.6s ease; }
.fade-up.show { opacity: 1; transform: translateY(0); }

@keyframes fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero-inner, .about-grid, .contact-main { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; margin: 0 auto; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  section { padding: 70px 0; }
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 82%; max-width: 340px; height: 100vh;
    flex-direction: column; justify-content: center; gap: 28px;
    background: var(--bg-2); border-left: 1px solid var(--border);
    transition: 0.4s ease; z-index: 999; padding: 40px;
  }
  .nav-links.active { right: 0; }
  .close-menu { display: block; position: absolute; top: 22px; right: 26px; font-size: 30px; color: var(--accent); cursor: pointer; }
  .nav-links a { font-size: 18px; }
  .nav-cta { width: 100%; text-align: center; }
  .about-image img { height: 320px; }
  #modal-body ul { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .stats-strip { grid-template-columns: 1fr; margin-top: -40px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; text-align: center; }
}
