/* ================================================
   Ntact IT & Business International Limited
   Main Stylesheet
   ================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary:      #0057ff;
  --primary-dark: #0041cc;
  --primary-light:#e8eeff;
  --dark:         #0d1117;
  --dark-2:       #161b22;
  --text:         #1a1a2e;
  --text-muted:   #6b7280;
  --light:        #f5f7fa;
  --white:        #ffffff;
  --border:       #e5e7eb;
  --success:      #16a34a;
  --error:        #dc2626;
  --radius:       12px;
  --radius-lg:    20px;
  --shadow:       0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.14);
  --transition:   0.25s ease;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --navbar-h:     68px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Prevent horizontal overflow globally */
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ---------- Utility ---------- */
.container {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.section   { padding: 80px 0; }
.bg-white  { background: var(--white); }
.bg-light  { background: var(--light); }
.bg-dark   { background: var(--dark); color: var(--white); }

.center { text-align: center; }
.mt-1   { margin-top: 1rem; }
.mt-2   { margin-top: 2rem; }

/* ---------- Typography ---------- */
h1 { font-size: clamp(1.6rem, 5.5vw, 3.25rem); font-weight: 800; line-height: 1.2; word-break: break-word; }
h2 { font-size: clamp(1.3rem, 4vw, 2.4rem);   font-weight: 700; line-height: 1.25; }
h3 { font-size: 1.1rem;  font-weight: 600; }
h4 { font-size: 0.9rem;  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tag--light {
  color: #a5b4fc;
  background: rgba(165,180,252,0.12);
}

.section-header { text-align: center; margin-bottom: 52px; }
.section-sub    { color: var(--text-muted); max-width: 580px; margin: 12px auto 0; font-size: 1rem; }
.section-header--light h2 { color: var(--white); }

.highlight { color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,87,255,0.3);
}

.btn-full { width: 100%; }

.btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ---------- Flash Messages ---------- */
.flash-wrapper {
  position: fixed;
  top: calc(var(--navbar-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(520px, 92vw);
}

.flash {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
  box-shadow: var(--shadow);
}

.flash--success { background: #dcfce7; color: #15803d; border-left: 4px solid #16a34a; }
.flash--error   { background: #fee2e2; color: #b91c1c; border-left: 4px solid #dc2626; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================
   NAVBAR
   ================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--navbar-h);
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: var(--dark);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-h);
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo-accent { color: var(--primary); }

/* Desktop nav links — hidden on mobile, shown via media query */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-links a.active { color: #60a5fa; background: rgba(255,255,255,0.06); }

/* Hamburger – hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================================
   MOBILE NAV DRAWER (separate from header)
   ================================================ */
.mobile-nav {
  display: none; /* JS toggles .open */
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.mobile-nav.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav ul {
  list-style: none;
  padding: 8px 0 16px;
}

.mobile-nav ul li a {
  display: block;
  padding: 15px 24px;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--transition), background var(--transition);
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a.active {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

.mobile-nav ul li a.active { color: #60a5fa; }

/* Overlay behind drawer */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--navbar-h);
  background: rgba(0,0,0,0.55);
  z-index: 1000;
}
.nav-overlay.open { display: block; }

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #050b18 0%, #0d1a3a 50%, #0a0e1a 100%);
  overflow: visible;
  padding-top: var(--navbar-h);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(0,87,255,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 70%, rgba(0,87,255,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 760px;
  color: var(--white);
  padding: 52px 0 64px;
  overflow: visible;
}

.hero-content h1 { color: var(--white); margin-bottom: 20px; }

/* Tag inside hero — needs light-on-dark styling */
.hero-content .tag {
  color: #93c5fd;
  background: rgba(147,197,253,0.15);
  border: 1px solid rgba(147,197,253,0.3);
  margin-bottom: 20px;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  max-width: 560px;
  line-height: 1.75;
}

/* Outline button — clearly visible on dark hero background */
.btn-outline {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-color: rgba(255,255,255,0.75);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.16);
  border-color: var(--white);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-cue span {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 11px;
  position: relative;
}
.scroll-cue span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
  animation: scrollBounce 1.6s infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  80%       { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

/* ================================================
   PAGE HERO (inner pages)
   ================================================ */
.page-hero {
  padding: calc(var(--navbar-h) + 60px) 0 60px;
  background: linear-gradient(135deg, #050b18 0%, #0d1a3a 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(0,87,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero .container  { position: relative; z-index: 1; }
.page-hero h1          { color: var(--white); margin-bottom: 14px; }
.page-hero .tag        { margin-bottom: 16px; }
.page-hero .hero-sub   { color: rgba(255,255,255,0.7); max-width: 560px; font-size: 1rem; }

/* ================================================
   CARDS GRID (home overview)
   ================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.card-icon {
  width: 50px; height: 50px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--primary);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 10px; }
.card p  { color: var(--text-muted); font-size: 0.93rem; }

/* ================================================
   SERVICES GRID
   ================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.service-icon {
  width: 52px; height: 52px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
}
.service-icon svg { width: 24px; height: 24px; }

.service-card h3    { margin-bottom: 10px; font-size: 1.1rem; }
.service-card > p   { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 16px; }

.service-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.service-list li {
  font-size: 0.87rem; color: var(--text-muted);
  padding-left: 18px; position: relative;
}
.service-list li::before { content: '→'; position: absolute; left: 0; color: var(--primary); }

/* ================================================
   WHY CHOOSE US
   ================================================ */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 24px;
}

.reason {
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), background var(--transition);
}
.reason:hover { border-color: var(--primary); background: rgba(0,87,255,0.07); }

.reason-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary); opacity: 0.6; margin-bottom: 10px; line-height: 1; }
.reason h3  { color: var(--white); margin-bottom: 8px; }
.reason p   { color: rgba(255,255,255,0.6); font-size: 0.91rem; }

/* ================================================
   CTA STRIP
   ================================================ */
.cta-strip { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 64px 0; }

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-inner h2 { color: var(--white); font-size: clamp(1.3rem, 3vw, 2rem); }
.cta-inner p  { color: rgba(255,255,255,0.8); margin-top: 6px; }

.cta-inner .btn-primary {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
  flex-shrink: 0;
}
.cta-inner .btn-primary:hover { background: var(--light); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* ================================================
   ABOUT PAGE
   ================================================ */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text h2 { margin-bottom: 20px; }
.about-text p  { color: var(--text-muted); margin-bottom: 16px; font-size: 1rem; }

.about-stats-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-box {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-box:hover { border-color: var(--primary); transform: translateY(-3px); }

.stat-num   { display: block; font-size: 2.2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 8px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 20px;
}

.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.value-icon    { font-size: 2rem; margin-bottom: 14px; }
.value-card h3 { margin-bottom: 8px; }
.value-card p  { color: var(--text-muted); font-size: 0.91rem; }

/* Location */
.location-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.location-details h2 { display: none; }

.loc-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; }
.loc-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.loc-item strong { display: block; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.loc-item p, .loc-item a { color: var(--text); font-size: 0.95rem; line-height: 1.6; }
.loc-item a:hover { color: var(--primary); }

.location-map iframe { width: 100%; height: 360px; border: none; border-radius: var(--radius-lg); display: block; }

/* ================================================
   CONTACT PAGE
   ================================================ */
.contact-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-form-wrap h2,
.contact-info h2 { font-size: 1.4rem; margin-bottom: 28px; }

.contact-form { display: flex; flex-direction: column; gap: 18px; }

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

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label { font-size: 0.87rem; font-weight: 600; color: var(--text); }
.req { color: var(--primary); }

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
  /* prevent iOS zoom on focus (font-size ≥ 16px) */
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,87,255,0.1); }

.info-card {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 20px; padding: 18px;
  background: var(--light); border-radius: var(--radius);
}
.info-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.info-card strong { display: block; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px; }
.info-card p, .info-card a { color: var(--text); font-size: 0.95rem; line-height: 1.6; }
.info-card a:hover { color: var(--primary); }

.info-map { margin-top: 20px; }
.info-map iframe { width: 100%; height: 220px; border: none; border-radius: var(--radius-lg); display: block; }

/* ================================================
   FOOTER
   ================================================ */
.footer { background: var(--dark-2); color: rgba(255,255,255,0.7); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: 64px 0 40px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p     { font-size: 0.88rem; line-height: 1.7; max-width: 280px; }

.footer-col h4    { color: var(--white); margin-bottom: 16px; font-size: 0.8rem; letter-spacing: 0.1em; }
.footer-col ul    { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li,
.footer-col p     { font-size: 0.88rem; line-height: 1.7; }
.footer-col a     { transition: color var(--transition); }
.footer-col a:hover { color: #60a5fa; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ================================================
   SCROLL ANIMATIONS
   — Only enabled when JS has confirmed the page
     is loaded (body.js-ready). This prevents the
     "invisible content" bug on slow connections.
   ================================================ */
body.js-ready [data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.js-ready [data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   RESPONSIVE – DESKTOP ONLY
   ================================================ */
@media (min-width: 769px) {
  .hero { min-height: 100vh; }
}

/* ================================================
   RESPONSIVE – TABLET  (≤ 1024px)
   ================================================ */
@media (max-width: 1024px) {
  .about-story    { grid-template-columns: 1fr; gap: 40px; }
  .location-inner { grid-template-columns: 1fr; gap: 28px; }
  .contact-inner  { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ================================================
   RESPONSIVE – MOBILE  (≤ 768px)
   ================================================ */
@media (max-width: 768px) {
  .section { padding: 56px 0; }

  /* --- Hamburger on, desktop nav off --- */
  .hamburger  { display: flex; }
  .nav-links  { display: none; } /* hide desktop nav on mobile */

  /* --- Hero --- */
  .hero { min-height: auto; }
  .hero-content { padding: 36px 0 48px; }

  .hero-content .tag {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 5px 10px;
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .btn-group .btn { width: 100%; }

  /* --- Grids → single column --- */
  .cards-grid    { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .reasons-grid  { grid-template-columns: 1fr; }
  .values-grid   { grid-template-columns: 1fr 1fr; }

  /* --- About --- */
  .about-stats-panel { grid-template-columns: 1fr 1fr; }

  /* --- Contact form row → stack --- */
  .form-row { grid-template-columns: 1fr; }

  /* --- CTA --- */
  .cta-inner { flex-direction: column; text-align: center; }
  .cta-inner .btn { align-self: stretch; text-align: center; }

  /* --- Footer --- */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 44px 0 28px; }
}

/* ================================================
   RESPONSIVE – SMALL MOBILE  (≤ 480px)
   ================================================ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .values-grid       { grid-template-columns: 1fr; }
  .about-stats-panel { grid-template-columns: 1fr 1fr; }

  .service-card { padding: 24px 20px; }
  .card         { padding: 22px 18px; }

  .page-hero { padding: calc(var(--navbar-h) + 40px) 0 40px; }

  /* Hero: no forced full-screen height on very small phones */
  .hero         { min-height: auto; }
  .hero-content { padding: 28px 0 40px; }
  .scroll-cue   { display: none; }

  .location-map iframe { height: 260px; }
  .info-map iframe     { height: 200px; }
}
