/* ======================================================
   NS Tech Services — stylesheet
   ====================================================== */

:root {
  --blue-50:  #eef4ff;
  --blue-100: #dfeaff;
  --blue-500: #3b6dfb;
  --blue-600: #2554ea;
  --blue-700: #1c40c2;
  --navy-900: #0b1330;
  --navy-950: #070c1f;
  --ink-900:  #0f1729;
  --ink-700:  #33415c;
  --gray-600: #5c6b85;
  --gray-500: #7c8aa5;
  --gray-200: #e3e8f2;
  --gray-100: #eef1f8;
  --bg-tint:  #eef3fe;
  --white:    #ffffff;

  --violet:  #7c5cf0;
  --violet-bg: #f2eeff;
  --orange:  #f0872f;
  --orange-bg: #fef1e4;
  --green:   #16a672;
  --green-bg: #e6f8f1;
  --red:     #ea4b5c;
  --red-bg:  #fdeaec;
  --teal:    #14b39a;
  --teal-bg: #e4f8f4;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 41, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 41, .08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 41, .12);

  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Baloo 2', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; }

input, select, textarea { font-family: inherit; font-size: 0.95rem; }

.container {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding: 0;
}

.text-blue { color: var(--blue-600); }
.text-violet { color: var(--violet); }
.text-green { color: var(--green); }

/* Card grids stay capped + centered even when their parent .container goes edge-to-edge */
.services-grid, .industries-grid, .case-grid, .testimonial-grid, .blog-grid {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- reveal-on-scroll ---------- */
.reveal, .reveal-up {
  opacity: 0;
  animation: none;
}
.reveal { animation: fadeIn .7s ease forwards; animation-delay: calc(var(--d, 0) * .12s); }
.reveal-up.in-view {
  animation: riseIn .65s cubic-bezier(.16,1,.3,1) forwards;
  animation-delay: calc(var(--d, 0) * .08s);
}
@keyframes fadeIn { to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(22px);} to { opacity: 1; transform: translateY(0);} }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 11px 20px; font-size: 0.85rem; }
.btn-primary {
  background: linear-gradient(180deg, var(--blue-500), var(--blue-600));
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 84, 234, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 84, 234, .36); }
.btn-outline {
  background: #fff;
  color: var(--ink-900);
  border-color: var(--gray-200);
}
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-600); transform: translateY(-2px); }
.btn-outline-blue {
  background: #fff;
  color: var(--blue-600);
  border-color: var(--blue-500);
}
.btn-outline-blue:hover { background: var(--blue-50); transform: translateY(-2px); }
.btn-outline.btn-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.28);
}
.btn-outline.btn-light:hover { background: rgba(255,255,255,.08); border-color: #fff; }
.btn-block { width: 100%; }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(15,23,41,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-700));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 6px 16px rgba(37,84,234,.35);
}
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0; color: var(--ink-900); }
.logo-text.light { color: #fff; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-700);
  text-transform: uppercase;
  letter-spacing: .04em;
  position: relative;
  padding: 4px 0;
  transition: color .15s ease;
}
.main-nav a::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--blue-600);
  transition: width .2s ease;
}
.main-nav a:hover { color: var(--blue-600); }
.main-nav a:hover::after { width: 100%; }

.header-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none; border: none;
  flex-shrink: 0;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink-900); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 100px 0 70px;
  background: linear-gradient(180deg, #f4f7ff 0%, #eef3fe 55%, #ffffff 100%);
  overflow: hidden;
  text-align: center;
}
.hero-glow {
  position: absolute;
  top: -220px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 620px;
  background: radial-gradient(closest-side, rgba(59,109,251,.20), rgba(59,109,251,0) 70%);
  pointer-events: none;
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--blue-100);
  color: var(--blue-600);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 4px var(--blue-100);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--blue-100); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--ink-900);
  margin-bottom: 26px;
}
.underline-wrap { position: relative; display: inline-block; }
.underline-svg {
  position: absolute;
  left: 0; bottom: -14px;
  width: 100%; height: 20px;
  color: var(--blue-500);
}

.hero-sub {
  max-width: 640px;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--gray-600);
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-actions.center { justify-content: center; }

.hero-stats {
  margin-top: 64px;
  display: flex; align-items: center; justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}
.stat { display: flex; align-items: center; gap: 12px; text-align: left; }
.stat-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: #fff; border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-600);
  box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--ink-900); line-height: 1.1; }
.stat span { font-size: 0.8rem; color: var(--gray-500); font-weight: 600; }
.stat-divider { width: 1px; height: 36px; background: var(--gray-200); }

/* ============ SECTION GENERIC ============ */
.section { padding: 110px 0; }
.section-tint { background: var(--bg-tint); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 14px;
}
.eyebrow-light { color: #8fb0ff; }

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--ink-900);
}
.section-sub {
  max-width: 560px;
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 14px;
}

.section-head { margin-bottom: 56px; }
.section-head.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.section-head-right { max-width: 360px; text-align: right; }
.section-head-right p { color: var(--gray-600); margin-bottom: 16px; line-height: 1.6; }
.section-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; }

/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.icon-violet { background: var(--violet-bg); color: var(--violet); }
.icon-blue   { background: var(--blue-50);   color: var(--blue-600); }
.icon-orange { background: var(--orange-bg); color: var(--orange); }
.icon-green  { background: var(--green-bg);  color: var(--green); }
.icon-red    { background: var(--red-bg);    color: var(--red); }
.icon-teal   { background: var(--teal-bg);   color: var(--teal); }

.service-index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 10px;
}
.service-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; letter-spacing: 0; }
.service-card p { color: var(--gray-600); font-size: 0.94rem; line-height: 1.6; margin-bottom: 20px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 100px;
  letter-spacing: .01em;
}
.tag-violet { background: var(--violet-bg); color: var(--violet); }
.tag-blue   { background: var(--blue-50);   color: var(--blue-600); }
.tag-orange { background: var(--orange-bg); color: var(--orange); }
.tag-green  { background: var(--green-bg);  color: var(--green); }
.tag-red    { background: var(--red-bg);    color: var(--red); }
.tag-teal   { background: var(--teal-bg);   color: var(--teal); }

.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; font-weight: 700;
  color: var(--blue-600);
  transition: gap .18s ease;
}
.card-link svg { transition: transform .18s ease; }
.card-link:hover svg { transform: translateX(3px); }

/* ============ ABOUT / GROWTH ENGINE ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.code-panel { position: relative; }
.code-card {
  background: var(--navy-950);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(7, 12, 31, .35);
}
.code-topbar {
  display: flex; align-items: center; gap: 7px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.code-filename { margin-left: 8px; font-family: var(--font-mono); font-size: 0.78rem; color: #8593b8; }
.code-body {
  padding: 28px 24px 34px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.9;
  color: #cbd5e8;
  overflow-x: auto;
}
.c-kw { color: #8fb2ff; }
.c-key { color: #7fe2c4; }
.c-str { color: #f0c674; }
.c-cmt { color: #6b7a9e; font-style: italic; }

.floating-badge {
  position: absolute;
  left: 32px; bottom: -28px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  color: var(--blue-600);
}
.floating-badge strong { display: block; font-size: 1.1rem; color: var(--ink-900); line-height: 1.2; }
.floating-badge span { font-size: 0.76rem; color: var(--gray-500); font-weight: 600; }

.about-copy .lead { color: var(--gray-600); font-size: 1.05rem; line-height: 1.7; margin: 20px 0 32px; }

.feature-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 36px; }
.feature-list li { display: flex; gap: 16px; align-items: flex-start; }
.feature-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--green-bg);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.feature-list strong { display: block; font-size: 1.02rem; margin-bottom: 3px; }
.feature-list p { color: var(--gray-600); font-size: 0.92rem; line-height: 1.55; }

/* ============ INDUSTRIES ============ */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.industry-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform .25s ease, box-shadow .25s ease;
  display: block;
}
.industry-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.industry-card h3 { font-size: 1.06rem; font-weight: 700; margin-bottom: 8px; }
.industry-card p { color: var(--gray-600); font-size: 0.88rem; line-height: 1.55; margin-bottom: 18px; }

/* ============ PROCESS ============ */
.process-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.process-line {
  position: absolute;
  top: 34px; left: 12.5%; right: 12.5%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--gray-200) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.process-step { text-align: center; position: relative; z-index: 1; }
.process-circle {
  width: 68px; height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue-100);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem;
  box-shadow: var(--shadow-md);
}
.process-step h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }
.process-step p { color: var(--gray-600); font-size: 0.88rem; line-height: 1.55; max-width: 220px; margin: 0 auto; }
.center-btn { display: flex; justify-content: center; }

/* ============ CASE STUDIES ============ */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.case-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.case-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.case-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.case-arrow {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--ink-700);
  display: flex; align-items: center; justify-content: center;
}
.case-card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 10px; letter-spacing: 0; }
.case-card > p { color: var(--gray-600); font-size: 0.92rem; line-height: 1.6; margin-bottom: 24px; }
.case-stats { display: flex; gap: 32px; margin-bottom: 22px; flex-wrap: wrap; }
.case-stats strong { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.case-stats span { font-size: 0.78rem; color: var(--gray-500); font-weight: 600; }

/* ============ TESTIMONIALS ============ */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.testimonial-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.stars { color: #f5b544; letter-spacing: 3px; margin-bottom: 16px; font-size: 1rem; }
.testimonial-card > p { color: var(--ink-700); font-size: 0.96rem; line-height: 1.65; margin-bottom: 24px; }
.testimonial-person { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-700));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.82rem; flex-shrink: 0;
}
.testimonial-person strong { display: block; font-size: 0.92rem; }
.testimonial-person div span { font-size: 0.8rem; color: var(--gray-500); }

/* ============ BLOG ============ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.blog-bar { height: 5px; }
.grad-blue   { background: linear-gradient(90deg, #4f7bff, #a9c3ff); }
.grad-orange { background: linear-gradient(90deg, #f0872f, #f7c69c); }
.grad-violet { background: linear-gradient(90deg, #7c5cf0, #c3b3f9); }
.blog-body { padding: 24px; }
.blog-body h3 { font-size: 1.06rem; font-weight: 700; line-height: 1.4; margin: 14px 0 12px; letter-spacing: 0; }
.blog-meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; color: var(--gray-500); font-weight: 600; }

/* ============ CTA BAND ============ */
.cta-band {
  background: radial-gradient(1200px 500px at 50% -10%, #14224f, var(--navy-950) 60%);
  padding: 110px 0;
  text-align: center;
}
.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 20px;
}
.cta-sub { color: #a8b6de; font-size: 1.08rem; margin-bottom: 36px; }

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 28px;
}
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex; align-items: center; gap: 16px;
}
.info-label { display: block; font-size: 0.78rem; color: var(--gray-500); font-weight: 600; margin-bottom: 3px; }
.info-card strong { font-size: 0.98rem; }

.contact-form {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: var(--ink-900); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-200);
  background: #fbfcfe;
  color: var(--ink-900);
  transition: border-color .15s ease, background .15s ease;
  resize: vertical;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  background: #fff;
}
.form-note { margin-top: 14px; text-align: center; font-size: 0.86rem; color: var(--green); font-weight: 600; min-height: 1.2em; }

/* ============ FOOTER ============ */
.site-footer { background: var(--navy-950); color: #b7c1de; padding: 80px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand p { margin-top: 16px; font-size: 0.9rem; line-height: 1.7; max-width: 280px; color: #8b98bd; }
.footer-col h4 { color: #fff; font-size: 0.86rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 20px; }
.footer-col a { display: block; font-size: 0.9rem; color: #96a2c4; margin-bottom: 13px; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px 0;
  font-size: 0.84rem; color: #7482a6;
  flex-wrap: wrap; gap: 16px;
}
.footer-legal { display: flex; gap: 24px; }
.footer-legal a:hover { color: #fff; }

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--blue-600);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(37,84,234,.4);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ============ RESPONSIVE ============ */
/* Wide desktops/monitors keep the edge-to-edge container; anything narrower than the
   card-grid cap (1320px) gets a small safety gutter so text never touches the glass. */
@media (max-width: 1360px) {
  .container { padding: 0 40px; }
}

/* Small laptops / large tablets landscape */
@media (max-width: 1180px) {
  .container { padding: 0 32px; }
  .hero-stats { gap: 24px; }
}

@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .industries-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 90px 0; }
}

/* Tablets (portrait) & large phones landscape */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 76px; left: 0; right: 0;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px 28px;
    gap: 4px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
  }
  .main-nav.open a { padding: 12px 4px; border-bottom: 1px solid var(--gray-100); }
  .about-grid { grid-template-columns: 1fr; }
  .code-panel { margin-bottom: 40px; }
  .section-head.split { flex-direction: column; align-items: flex-start; }
  .section-head-right { text-align: left; max-width: none; }
  .process-track { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .process-line { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-title { margin-bottom: 20px; }
}

/* Phones */
@media (max-width: 680px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .services-grid, .industries-grid, .testimonial-grid, .blog-grid { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: 1fr; row-gap: 36px; }
  .hero { padding: 68px 0 44px; }
  .hero-stats { gap: 18px 26px; justify-content: center; }
  .stat-divider { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero .hero-actions, .cta-inner .hero-actions { max-width: 340px; margin: 0 auto; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section-head { margin-bottom: 40px; }
  .case-card, .service-card, .testimonial-card, .contact-form { padding: 24px; }
  .code-body { padding: 22px 18px 28px; font-size: 0.82rem; }
  .floating-badge { left: 20px; padding: 12px 16px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 28px 0 76px; }
}

/* Small phones (iPhone SE / older Android) */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .badge { font-size: 0.68rem; padding: 7px 12px; }
  .hero-title { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .hero-sub { font-size: 1rem; }
  .btn { padding: 13px 18px; font-size: 0.88rem; }
  .stat strong { font-size: 1.25rem; }
  .case-stats { gap: 20px; }
  .case-stats strong { font-size: 1.25rem; }
  .contact-form { padding: 20px; }
  .info-card { padding: 16px; gap: 12px; }
}
