/* =====================================================================
   Devlex Infotech — Corporate IT Website
   Design tokens, base styles, components, layout, responsive
   ===================================================================== */

:root {
  /* Color palette (solid only — no gradients) */
  --navy:        #0F172A;
  --navy-2:      #1E293B;
  --blue:        #2563EB;
  --blue-dark:   #1D4ED8;
  --blue-soft:   #EFF4FF;
  --accent:      #475569;
  --white:       #FFFFFF;
  --slate-50:    #F8FAFC;
  --slate-100:   #F1F5F9;
  --border:      #E2E8F0;
  --text:        #0F172A;
  --text-muted:  #475569;
  --text-soft:   #64748B;

  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1280px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, 0.28);
  --section-y: 96px;
  --header-h: 54px;
  --topbar-h: 38px;
  --chrome-h: 88px;
  --scroll-offset: calc(var(--topbar-h) + var(--chrome-h));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-offset, calc(var(--header-h) + 12px));
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  max-width: 100%;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ----------------------------- Typography ----------------------------- */
h1, h2, h3, h4 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 16px;
}

/* ----------------------------- Layout helpers ----------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px);
}

.section { padding: var(--section-y) 0; }
.section-alt { background: var(--slate-50); }

.section-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-sub {
  margin-top: 16px;
  font-size: 1.08rem;
  color: var(--text-soft);
}
.section-sub a { color: var(--blue); font-weight: 600; }

/* ----------------------------- Buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn svg { flex: 0 0 auto; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }

.btn-outline {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--navy); background: var(--slate-50); }

.btn-light {
  background: #fff;
  color: var(--navy);
}
.btn-light:hover { background: var(--slate-100); transform: translateY(-1px); }

.btn-block { width: 100%; }

/* ----------------------------- Header chrome ----------------------------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 112;
}

.site-chrome {
  position: sticky;
  top: var(--topbar-h, 0px);
  z-index: 110;
  background: #fff;
  transition: box-shadow .2s ease;
}
.site-chrome.scrolled { box-shadow: var(--shadow-sm); }

.site-header {
  position: relative;
  top: auto;
  z-index: 1;
  background: #fff;
  border-bottom: 0;
}
.site-header.scrolled { box-shadow: none; }

.header-inner {
  /* clamp() = poisoned --header-h (unstyled-page JS measurement on iOS
     refresh) can never blow the header up */
  height: clamp(48px, var(--header-h, 54px), 120px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}
.brand-mark { display: inline-flex; flex-shrink: 0; align-items: center; }
.brand-mark img { display: block; width: 40px; height: 40px; }
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  gap: 2px;
}
.brand-name {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.brand-name span { color: var(--blue); }
.brand-tag {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}
.main-nav > .nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  flex-shrink: 0;
}
.main-nav > ul > li > a:not(.btn) {
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--accent);
  transition: color .15s ease;
  position: relative;
}
.main-nav > ul > li > a:not(.btn):hover { color: var(--navy); }
.nav-cta {
  padding: 10px 16px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  color: var(--navy);
  padding: 6px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-left: auto;
}
.nav-toggle:hover { background: var(--slate-50); }
.nav-toggle .icon-close { display: none; }

/* Tablet / small laptop — hamburger menu (prevents nav overlapping logo) */
@media (max-width: 1200px) {
  .brand-tag { display: none; }
  .header-inner {
    gap: 12px;
    position: relative;
    z-index: 112;
    background: #fff;
  }
  .brand {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 52px);
  }
  .brand-name { font-size: 1.1rem; }
  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 112;
  }
  .main-nav {
    position: fixed;
    top: var(--chrome-offset, calc(var(--topbar-h) + var(--chrome-h)));
    left: 0;
    right: 0;
    bottom: 0;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: #fff;
    padding: 8px 16px 32px;
    transform: translateX(100%);
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0.28s ease;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    z-index: 115;
  }
  .main-nav.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  .main-nav > .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    flex: 1 1 auto;
  }
  .main-nav > .nav-list > li {
    border-bottom: 1px solid var(--slate-100);
    width: 100%;
  }
  .main-nav > .nav-list > li > a,
  .main-nav .nav-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 4px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    white-space: normal;
    text-align: left;
  }
  .main-nav .has-mega .mega-menu,
  .main-nav .has-dropdown .nav-dropdown {
    position: static !important;
    width: 100%;
    max-width: 100%;
  }
  .main-nav .mega-menu[hidden],
  .main-nav .nav-dropdown[hidden] {
    display: none !important;
  }
  .main-nav .nav-item {
    width: 100%;
    overflow: visible;
  }
  .nav-cta {
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 14px 20px;
    flex-shrink: 0;
  }
  .nav-toggle[aria-expanded="true"] .icon-open { display: none; }
  .nav-toggle[aria-expanded="true"] .icon-close { display: block; }
}

@media (max-width: 768px) {
  :root { --topbar-h: 0px; }
  .site-chrome { top: 0; }
}

@media (min-width: 1201px) {
  .nav-toggle { display: none !important; }
}

body.nav-open { overflow: hidden; }
body.nav-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 108;
  animation: nav-fade-in 0.25s ease;
}
@keyframes nav-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ----------------------------- Hero Slider ----------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px);
  background: #F8FAFC;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}
.hero-slider-wrap { position: relative; z-index: 1; }

.hero-slider { position: relative; }

/* Stack slides in one grid cell for equal height crossfade */
.hero-slides {
  display: grid;
  grid-template-columns: 1fr;
}
.hero-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-copy { min-width: 0; }
.hero-rank {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.hero-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 8px;
  background: #FEE2E2;
  color: #DC2626;
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 6px;
}
.hero-copy h1 {
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  line-height: 1.12;
  margin-bottom: 18px;
}
.hero-hl {
  display: block;
  color: var(--blue);
  transition: color 0.4s ease;
}
.hero-slide[data-theme="sky"] .hero-hl { color: #0284C7; }
.hero-slide[data-theme="blue"] .hero-hl { color: #2563EB; }
.hero-slide[data-theme="violet"] .hero-hl { color: #7C3AED; }
.hero-slide[data-theme="indigo"] .hero-hl { color: #4F46E5; }
.hero-slide[data-theme="navy"] .hero-hl { color: #0F172A; }

.hero-copy .lead {
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin: 0;
}

.hero-visual {
  position: relative;
  width: 100%;
  min-height: 280px;
}

.hero-media-frame {
  position: relative;
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-slide[data-theme="sky"] .hero-media-frame { border-color: #BAE6FD; }
.hero-slide[data-theme="blue"] .hero-media-frame { border-color: #BFDBFE; }
.hero-slide[data-theme="violet"] .hero-media-frame { border-color: #DDD6FE; }
.hero-slide[data-theme="indigo"] .hero-media-frame { border-color: #C7D2FE; }
.hero-slide[data-theme="navy"] .hero-media-frame { border-color: #CBD5E1; }

.hero-media-inner {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  background: var(--slate-100);
}

.hero-video,
.hero-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video {
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-video.is-playing {
  opacity: 1;
}
.hero-media-img {
  z-index: 1;
  animation: hero-kenburns 14s ease-in-out infinite alternate;
  transform-origin: center center;
}
.hero-video.is-playing + .hero-media-img {
  opacity: 0;
}

@keyframes hero-kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.5%, -1%); }
}

.hero-media-live {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
}
.hero-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
  animation: hero-live-pulse 1.4s ease-in-out infinite;
}
@keyframes hero-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.85); }
}

.hero-float-card {
  position: absolute;
  z-index: 5;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  animation: hero-float-card 4.5s ease-in-out infinite;
}
.hero-float-card--stat {
  left: -12px;
  bottom: 24px;
  border-left: 4px solid var(--blue);
}
.hero-slide[data-theme="sky"] .hero-float-card--stat { border-left-color: #0284C7; }
.hero-slide[data-theme="violet"] .hero-float-card--stat { border-left-color: #7C3AED; }
.hero-slide[data-theme="indigo"] .hero-float-card--stat { border-left-color: #4F46E5; }
.hero-slide[data-theme="navy"] .hero-float-card--stat { border-left-color: #0F172A; }
.hero-float-num {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero-float-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-top: 2px;
}
@keyframes hero-float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Dot navigation with progress animation (hidden — slider auto-advances) */
.hero-controls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.hero-dot {
  position: relative;
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: #CBD5E1;
  overflow: hidden;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.hero-dot.is-active {
  width: 56px;
  background: #E2E8F0;
}
.hero-dot::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: inherit;
}
/* progress fill is driven by JS (--p, from video playback), not a fixed timer */
.hero-dot.is-active::after {
  width: calc(var(--p, 0) * 100%);
}

@keyframes hero-progress {
  from { width: 0; }
  to { width: 100%; }
}

.hero-foot {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-rating {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-rating .rstars { display: inline-flex; gap: 2px; color: #F59E0B; }
.hero-rating strong { color: var(--navy); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity 0.3s ease; transform: none; }
  .hero-dot.is-active::after { animation: none; width: 100%; }
  .hero-media-img { animation: none; }
  .hero-float-card { animation: none; }
  .hero-live-dot { animation: none; }
}

/* AI section helper note (cards reuse .service-card) */
.ai-note { text-align: center; max-width: 780px; margin: 40px auto 0; font-size: 0.99rem; color: var(--text-soft); line-height: 1.7; }
.ai-note strong { color: var(--navy); }
.ai-note a { color: var(--blue); font-weight: 600; }

/* ----------------------------- Trust strip ----------------------------- */
.trust-strip {
  background: var(--navy);
  color: #fff;
}
.trust-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 38px 24px;
  text-align: center;
}
.trust-strip-grid div { display: flex; flex-direction: column; gap: 4px; }
.trust-strip-grid strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.trust-strip-grid span { font-size: 0.9rem; color: #94A3B8; }

/* ----------------------------- About ----------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
}
.about-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: var(--slate-100);
}
.about-copy p { margin-top: 16px; }
.about-points { margin-top: 30px; display: grid; gap: 18px; }
.about-points li { display: flex; gap: 14px; align-items: flex-start; }
.about-points svg { color: var(--blue); flex: 0 0 auto; margin-top: 2px; }
.about-points strong { display: block; color: var(--navy); font-size: 1.02rem; }
.about-points span { color: var(--text-soft); font-size: 0.95rem; }

/* ----------------------------- Cards grid ----------------------------- */
.cards-grid { display: grid; gap: 26px; }
.cards-grid > *, .tech-grid > * { min-width: 0; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 20px;
}
.card-icon svg { display: block; flex-shrink: 0; }

.feature-card, .service-card { padding: 32px 30px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.feature-card:hover, .service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #CBD5E1; }
.feature-card h3, .service-card h3 { margin-bottom: 10px; }
.feature-card p, .service-card p { font-size: 0.98rem; color: var(--text-soft); }

/* ----------------------------- Process ----------------------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  counter-reset: step;
}
.process-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 30px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.process-step h3 { margin-bottom: 8px; }
.process-step p { font-size: 0.96rem; color: var(--text-soft); }

/* ----------------------------- Industries ----------------------------- */
.industries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.industries-media { margin-top: 32px; }
.industries-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--slate-100);
}
.industry-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.industry-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, transform .2s ease;
}
.industry-list li:hover { border-color: var(--blue); transform: translateY(-2px); }
.industry-list svg { color: var(--blue); flex: 0 0 auto; }

/* ----------------------------- Technologies ----------------------------- */
#technologies { background: var(--slate-50); }

.tech-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 40px;
}
.tech-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 18px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.tech-summary-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.tech-summary-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.tech-summary-divider { display: none; }
.section-sub strong { color: var(--navy); font-weight: 700; }

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

.tech-card {
  position: relative;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}
.tech-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.tech-card-bar {
  height: 4px;
  width: 100%;
  background: var(--blue);
}
.tech-card[data-accent="blue"] .tech-card-bar { background: #2563EB; }
.tech-card[data-accent="blue"] .tech-icon { background: #EFF4FF; color: #2563EB; }
.tech-card[data-accent="blue"] .tech-count { color: #2563EB; background: #EFF4FF; }

.tech-card[data-accent="navy"] .tech-card-bar { background: #0F172A; }
.tech-card[data-accent="navy"] .tech-icon { background: #F1F5F9; color: #0F172A; }
.tech-card[data-accent="navy"] .tech-count { color: #0F172A; background: #F1F5F9; }

.tech-card[data-accent="sky"] .tech-card-bar { background: #0284C7; }
.tech-card[data-accent="sky"] .tech-icon { background: #F0F9FF; color: #0284C7; }
.tech-card[data-accent="sky"] .tech-count { color: #0284C7; background: #F0F9FF; }

.tech-card[data-accent="teal"] .tech-card-bar { background: #0D9488; }
.tech-card[data-accent="teal"] .tech-icon { background: #F0FDFA; color: #0D9488; }
.tech-card[data-accent="teal"] .tech-count { color: #0D9488; background: #F0FDFA; }

.tech-card[data-accent="indigo"] .tech-card-bar { background: #4F46E5; }
.tech-card[data-accent="indigo"] .tech-icon { background: #EEF2FF; color: #4F46E5; }
.tech-card[data-accent="indigo"] .tech-count { color: #4F46E5; background: #EEF2FF; }

.tech-card[data-accent="violet"] .tech-card-bar { background: #7C3AED; }
.tech-card[data-accent="violet"] .tech-icon { background: #F5F3FF; color: #7C3AED; }
.tech-card[data-accent="violet"] .tech-count { color: #7C3AED; background: #F5F3FF; }

.tech-card[data-accent="amber"] .tech-card-bar { background: #D97706; }
.tech-card[data-accent="amber"] .tech-icon { background: #FFFBEB; color: #D97706; }
.tech-card[data-accent="amber"] .tech-count { color: #D97706; background: #FFFBEB; }

.tech-card[data-accent="green"] .tech-card-bar { background: #16A34A; }
.tech-card[data-accent="green"] .tech-icon { background: #F0FDF4; color: #16A34A; }
.tech-card[data-accent="green"] .tech-count { color: #16A34A; background: #F0FDF4; }

.tech-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 22px 0;
}
.tech-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  flex-shrink: 0;
}
.tech-icon svg { display: block; width: 24px; height: 24px; }
.tech-head-text { flex: 1; min-width: 0; }
.tech-head-text h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
  line-height: 1.3;
}
.tech-head-text p {
  font-size: 0.84rem;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0;
}
.tech-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 16px 22px 22px;
  margin: 0;
}
.tech-tags li {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--slate-50);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  line-height: 1.2;
  white-space: nowrap;
}

/* ----------------------------- Portfolio ----------------------------- */
.portfolio-card { overflow: hidden; padding: 0; transition: transform .2s ease, box-shadow .2s ease; }
.portfolio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.portfolio-media { overflow: hidden; }
.portfolio-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--slate-100);
  transition: transform .4s ease;
}
.portfolio-card:hover .portfolio-media img { transform: scale(1.04); }
.portfolio-body { padding: 28px 30px 32px; }
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 6px;
  padding: 5px 11px;
  margin-bottom: 14px;
}
.portfolio-body h3 { margin-bottom: 10px; }
.portfolio-body p { font-size: 0.98rem; color: var(--text-soft); }

/* ----------------------------- Testimonials ----------------------------- */
.testimonial-card { padding: 32px 30px; display: flex; flex-direction: column; }
.stars { display: flex; gap: 3px; color: #F59E0B; margin-bottom: 18px; }
.testimonial-card blockquote {
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}
.testimonial-author { display: flex; align-items: center; gap: 14px; padding-top: 22px; border-top: 1px solid var(--border); }
.testimonial-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--slate-100); }
.testimonial-author span { display: flex; flex-direction: column; }
.testimonial-author strong { color: var(--navy); font-size: 0.98rem; }
.testimonial-author small { color: var(--text-soft); font-size: 0.85rem; }

/* ----------------------------- Statistics ----------------------------- */
.stats { background: var(--navy); padding: 72px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px;
  text-align: center;
}
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat-num { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1; }
.stat-label { font-size: 0.98rem; color: #94A3B8; font-weight: 500; }

/* ----------------------------- FAQ ----------------------------- */
.faq-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.faq-intro { position: sticky; top: calc(var(--chrome-offset, var(--scroll-offset)) + 24px); }
.faq-list { display: grid; gap: 14px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item.open { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.faq-chevron { color: var(--accent); flex: 0 0 auto; transition: transform .25s ease; }
.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--blue); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-answer p { padding: 0 24px 22px; color: var(--text-soft); font-size: 1rem; }

/* ----------------------------- CTA ----------------------------- */
.cta { background: var(--navy); }
.cta-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  padding: clamp(56px, 7vw, 88px) 24px;
}
.cta-copy h2 { color: #fff; }
.cta-copy p { color: #CBD5E1; font-size: 1.12rem; margin-top: 16px; max-width: 480px; }
.cta-copy .btn { margin-top: 30px; }
.cta-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--navy-2);
}

/* ----------------------------- Contact ----------------------------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.contact-details { margin-top: 36px; display: grid; gap: 22px; }
.contact-details li { display: flex; align-items: center; gap: 16px; }
.contact-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px; height: 50px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  flex: 0 0 auto;
}
.contact-details small { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); font-weight: 600; }
.contact-details a, .contact-details div > span { font-size: 1.05rem; font-weight: 600; color: var(--navy); }
.contact-details a:hover { color: var(--blue); }

.contact-form { padding: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #94A3B8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.field input.invalid, .field select.invalid { border-color: #DC2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.form-status { margin-top: 14px; font-size: 0.95rem; font-weight: 600; min-height: 1.2em; }
.form-status.success { color: #15803D; }
.form-status.error { color: #DC2626; }

/* ----------------------------- Footer ----------------------------- */
.site-footer { background: var(--navy); color: #CBD5E1; padding-top: 72px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 44px;
  padding-bottom: 56px;
}
.brand-footer .brand-name-footer { color: #fff; }
.brand-footer .brand-name-footer span { color: var(--blue); }
.footer-brand p { margin-top: 18px; font-size: 0.96rem; color: #94A3B8; max-width: 320px; }
.social { display: flex; gap: 12px; margin-top: 22px; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid #334155;
  color: #CBD5E1;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.social a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 20px; letter-spacing: 0; }
.footer-col ul { display: grid; gap: 12px; }
.footer-col a, .footer-contact li { color: #94A3B8; font-size: 0.95rem; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid #1E293B; padding: 24px 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { font-size: 0.9rem; color: #94A3B8; }
.footer-legal a:hover { color: #fff; }
.footer-legal span { margin: 0 6px; }

/* ----------------------------- Back to top ----------------------------- */
.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background-color .18s ease;
  z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--blue); }

/* ----------------------------- Scroll reveal ----------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 1024px) {
  :root { --section-y: 72px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-visual {
    order: -1;
    min-height: auto;
    margin-bottom: 4px;
  }
  .hero-media-frame { padding: 6px; border-radius: 14px; }
  .hero-media-inner { aspect-ratio: 16 / 9; max-height: min(52vw, 240px); }
  .hero-media-live { top: 14px; left: 14px; font-size: 0.62rem; padding: 5px 10px 5px 8px; }
  .hero-live-dot { width: 6px; height: 6px; }
  .hero-float-card--stat {
    position: absolute;
    left: auto;
    right: 10px;
    bottom: 10px;
    margin: 0;
    padding: 8px 12px;
    border-left-width: 3px;
    border-radius: 10px;
    animation: none;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  }
  .hero-float-num { font-size: 1.05rem; }
  .hero-float-label { font-size: 0.68rem; margin-top: 1px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-media { order: -1; }
  .industries-grid { grid-template-columns: 1fr; gap: 32px; }
  .cards-3, .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-layout { grid-template-columns: 1fr; gap: 28px; }
  .faq-intro { position: static; }
  .cta-grid { grid-template-columns: 1fr; gap: 32px; }
  .cta-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  :root { --section-y: 64px; --header-h: 54px; }
  body { font-size: 16px; }

  /* Header (phone) — compact */
  .brand-mark img { width: 30px; height: 30px; }
  .brand-name { font-size: 0.96rem; }
  .header-inner { gap: 10px; }

  /* Hero */
  .hero { padding: 24px 0 20px; }
  .hero-copy h1 {
    font-size: clamp(1.45rem, 6.2vw, 2rem);
    line-height: 1.18;
    margin-bottom: 12px;
  }
  .hero-hl { display: inline; }
  .hero-copy .lead {
    font-size: 0.94rem;
    line-height: 1.65;
    max-width: none;
  }
  .hero-rank {
    font-size: 0.8rem;
    margin-bottom: 10px;
    line-height: 1.4;
  }
  .hero-rank-num {
    min-width: 28px;
    height: 24px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }
  .hero-foot { margin-top: 20px; padding-top: 20px; }
  .hero-rating { margin-bottom: 14px; font-size: 0.84rem; gap: 8px; }
  .hero-rating .rstars svg { width: 15px; height: 15px; }
  .hero-actions .btn { flex: 1; min-width: 140px; justify-content: center; }
  .hero-controls { margin-top: 16px; gap: 8px; }
  .hero-dot { width: 26px; height: 4px; }
  .hero-dot.is-active { width: 40px; }

  /* Grids → single column */
  .cards-2, .cards-3, .process-grid { grid-template-columns: 1fr; }
  .feature-card, .service-card { padding: 26px 22px; }

  /* Tech stack */
  .tech-grid { grid-template-columns: 1fr; gap: 16px; }
  .tech-summary { grid-template-columns: 1fr; gap: 10px; margin-bottom: 28px; }
  .tech-summary-item { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 14px 16px; text-align: left; }
  .tech-head { padding: 18px 18px 0; gap: 12px; }
  .tech-tags { padding: 14px 18px 18px; gap: 7px; }
  .tech-tags li { font-size: 0.76rem; padding: 5px 10px; }
  .tech-icon { width: 44px; height: 44px; border-radius: 12px; }

  /* Other sections */
  .trust-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; padding: 32px 16px; }
  .trust-strip-grid strong { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section-head { margin-bottom: 36px; }
  .section-sub { font-size: 1rem; }
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

@media (max-width: 560px) {
  .cards-2, .industry-list, .tech-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero { padding: 20px 0 16px; }
  .hero-grid { gap: 14px; }
  .hero-media-inner { max-height: min(56vw, 210px); border-radius: 10px; }
  .hero-media-frame { padding: 5px; border-radius: 12px; }
  .hero-float-card--stat { right: 8px; bottom: 8px; padding: 7px 10px; }
  .hero-float-num { font-size: 0.98rem; }
  .hero-float-label { font-size: 0.64rem; }
  .hero-copy h1 { font-size: clamp(1.35rem, 5.8vw, 1.75rem); }
  .hero-copy .lead { font-size: 0.9rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; min-width: 0; }
  .hero-foot { margin-top: 16px; padding-top: 16px; }
  .trust-strip-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 24px 18px; }
  .tech-head-text h3 { font-size: 1rem; }
  .tech-head-text p { font-size: 0.8rem; }
  .portfolio-body { padding: 20px 18px; }
  .testimonial-card { padding: 24px 20px; }
  .cta-panel { padding: 32px 22px; }
}

/* ----------------------------- Motion preferences ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= FULL-BLEED HERO BANNER (homepage) ================= */
.hero { position: relative; overflow: hidden; padding: 0; background: #0B1220; }
.hero .hero-slider { position: relative; width: 100%; }

/* 16:9 stage so the full video shows without cropping on desktop */
.hero .hero-slides {
  position: relative;
  width: 100%;
  /* fill exactly one screen: viewport minus the sticky header/tabs */
  height: calc(100dvh - var(--chrome-offset, 150px));
  min-height: 440px;
  max-height: 760px;
}
.hero .hero-slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility .7s ease;
}
.hero .hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .hero-video,
.hero-bg .hero-media-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* readability scrim (darker on the left where the text sits) */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(7,12,22,0.86) 0%, rgba(7,12,22,0.55) 52%, rgba(7,12,22,0.30) 100%);
}

/* content overlaid on top of the video */
.hero-slide-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center;
}
.hero-content-inner { width: 100%; color: #fff; }
.hero-content-inner > * { max-width: 620px; }
.hero-content-inner .hero-rank { color: rgba(255,255,255,0.9); margin-bottom: 16px; }
.hero-content-inner h1 {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.1; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 18px;
}
.hero-content-inner .hero-hl { display: inline; }
.hero-slide[data-theme="sky"] .hero-hl { color: #38BDF8; }
.hero-slide[data-theme="blue"] .hero-hl { color: #60A5FA; }
.hero-slide[data-theme="violet"] .hero-hl { color: #A78BFA; }
.hero-slide[data-theme="indigo"] .hero-hl { color: #818CF8; }
.hero-slide[data-theme="navy"] .hero-hl { color: #93C5FD; }
.hero-content-inner .lead {
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
  color: rgba(255,255,255,0.86);
  line-height: 1.65; margin: 0 0 26px;
}
.hero-content-inner .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.btn-hero-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.55); }
.btn-hero-outline:hover { background: rgba(255,255,255,0.14); border-color: #fff; transform: translateY(-1px); }
.hero-content-inner .hero-rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.92rem; color: rgba(255,255,255,0.82); }
.hero-content-inner .hero-rating .rstars { display: inline-flex; gap: 2px; color: #FBBF24; }
.hero-content-inner .hero-rating strong { color: #fff; }

.hero .hero-controls {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: clamp(16px, 3vh, 28px);
  display: none; justify-content: center; gap: 9px;
}
.hero .hero-controls .hero-dot {
  position: relative; overflow: hidden;
  width: 30px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.35); border: none; padding: 0; cursor: pointer;
  transition: width .3s ease;
}
.hero .hero-controls .hero-dot.is-active { width: 48px; }

/* Tablet */
@media (max-width: 900px) {
  .hero .hero-slides { max-height: none; min-height: 500px; }
  .hero-scrim { background: linear-gradient(180deg, rgba(7,12,22,0.62) 0%, rgba(7,12,22,0.72) 100%); }
  .hero-content-inner > * { max-width: 100%; }
}
/* Phone */
@media (max-width: 560px) {
  .hero .hero-slides { min-height: 520px; }
  .hero-content-inner h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .hero-content-inner .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ============ HOMEPAGE: transparent chrome overlaying the hero video ============
   Pull the hero up so the video sits behind the header + section tabs. The chrome
   is glass/transparent at rest and turns solid white on scroll (.scrolled). */
.page-home main { margin-top: calc(-1 * var(--chrome-offset, calc(var(--topbar-h, 38px) + var(--chrome-h, 88px)))); }
.page-home .hero .hero-slides { height: 100dvh; }

/* Top bar follows the same states as the chrome: clear at the very top,
   navy (semi-transparent) while scrolling over the video, solid navy after. */
.page-home .top-bar {
  background: transparent;
  transition: background 0.25s ease;
}
.page-home .top-bar.on-video {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.page-home .top-bar.scrolled { background: var(--navy); }

.page-home .site-chrome {
  /* Three states: fully clear at the very top → top-bar navy (semi-transparent,
     .on-video) while scrolling over the video → solid white (.scrolled) once
     the hero has passed. */
  background: transparent;
  box-shadow: none;
  transition: background 0.25s ease, box-shadow 0.2s ease;
}
.page-home .site-chrome.on-video {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.page-home .site-header,
.page-home .header-inner,
.page-home .site-chrome .section-tabs {
  background: transparent;
  border-bottom-color: transparent;
}
.page-home .site-chrome .section-tabs { border-bottom: 0; }

/* Light brand + hamburger over the video (all widths) */
.page-home .brand-name { color: #fff; }
.page-home .brand-name span { color: #93C5FD; }
.page-home .brand-tag { color: rgba(255,255,255,0.72); }
.page-home .nav-toggle { color: #fff; }

/* Glass section-tab pills over the video */
.page-home .section-tab {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.24);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.page-home .section-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.6);
}
.page-home .section-tab.is-active {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

/* Light desktop nav links (only where the inline nav is shown, not the mobile panel) */
@media (min-width: 1201px) {
  .page-home .nav-trigger,
  .page-home .main-nav > ul > li > a:not(.btn) { color: rgba(255,255,255,0.92); }
  .page-home .nav-trigger:hover,
  .page-home .main-nav > ul > li > a:not(.btn):hover,
  .page-home .nav-item.is-open > .nav-trigger {
    color: #fff;
    background: rgba(255,255,255,0.14);
  }
}

/* --- Scrolled (hero finished): solid white chrome, revert to the normal dark styling --- */
.page-home .site-chrome.scrolled {
  background: #fff;
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.page-home .site-chrome.scrolled .header-inner { background: #fff; }
.page-home .site-chrome.scrolled .section-tabs { border-bottom: 1px solid var(--border); }
.page-home .site-chrome.scrolled .brand-name { color: var(--navy); }
.page-home .site-chrome.scrolled .brand-name span { color: var(--blue); }
.page-home .site-chrome.scrolled .brand-tag { color: var(--text-soft); }
.page-home .site-chrome.scrolled .nav-toggle { color: var(--navy); }
.page-home .site-chrome.scrolled .section-tab {
  color: var(--text-muted);
  background: var(--slate-50);
  border-color: var(--border);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.page-home .site-chrome.scrolled .section-tab:hover { color: var(--blue); border-color: var(--blue); }
.page-home .site-chrome.scrolled .section-tab.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (min-width: 1201px) {
  .page-home .site-chrome.scrolled .nav-trigger,
  .page-home .site-chrome.scrolled .main-nav > ul > li > a:not(.btn) { color: var(--accent); background: none; }
  .page-home .site-chrome.scrolled .nav-trigger:hover,
  .page-home .site-chrome.scrolled .nav-item.is-open > .nav-trigger { color: var(--navy); background: var(--slate-50); }
}

/* Short/mobile viewports: the overlay header + tabs sit on top of the hero, so
   don't vertically-center the copy (its top would hide under the tabs).
   Grid-stack the slides in one cell so the hero auto-sizes to the TALLEST slide's
   content — a robust crossfade (all slides stay in flow, only opacity animates),
   which avoids the ghosting / white-gap seen when slides were absolutely positioned. */
@media (max-width: 900px) {
  .page-home .hero .hero-slides {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .page-home .hero .hero-slide {
    position: relative;
    inset: auto;
    grid-area: 1 / 1;
  }
  .page-home .hero .hero-slide-content { position: relative; }
  .page-home .hero-slide-content {
    align-items: flex-start;
    /* clamp() guards against a mis-measured --chrome-h (stylesheet/JS race on
       mobile refresh could briefly report a huge chrome height) */
    padding-top: clamp(112px, calc(var(--chrome-h, 104px) + 12px), 200px);
    padding-bottom: 56px;
  }
  /* Tighten the copy rhythm a touch on small screens */
  .page-home .hero-content-inner .hero-rank { margin-bottom: 12px; }
  .page-home .hero-content-inner h1 { margin-bottom: 14px; }
  .page-home .hero-content-inner .lead { margin-bottom: 20px; }
  .page-home .hero-content-inner .hero-actions { margin-bottom: 18px; }
}

/* Phones: NO overlay tricks at all. Real iOS builds kept mis-rendering the
   transparent chrome (fixed and sticky+negative-margin both hit refresh races),
   so on phones the chrome is a plain in-flow sticky bar with a SOLID dark
   background that visually matches the hero. Nothing here depends on the
   JS-measured --chrome-h, so there is nothing left to break. */
@media (max-width: 768px) {
  .page-home .site-chrome {
    position: sticky;
    top: 0;
    background: #0B1220;
  }
  .page-home main { margin-top: 0; }
  /* chrome is in flow now — the hero copy needs no clearance padding */
  .page-home .hero-slide-content { padding-top: 24px; }
  /* keep the dark chrome when scrolled too (no white flip on phones) */
  .page-home .site-chrome.scrolled { background: #0B1220; box-shadow: 0 6px 20px rgba(2, 6, 23, 0.35); }
  .page-home .site-chrome.scrolled .header-inner { background: transparent; }
  .page-home .site-chrome.scrolled .brand-name { color: #fff; }
  .page-home .site-chrome.scrolled .brand-name span { color: #93C5FD; }
  .page-home .site-chrome.scrolled .brand-tag { color: rgba(255,255,255,0.72); }
  .page-home .site-chrome.scrolled .nav-toggle { color: #fff; }
  .page-home .site-chrome.scrolled .section-tab {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.24);
  }
  .page-home .site-chrome.scrolled .section-tab.is-active {
    background: #fff;
    color: var(--navy);
    border-color: #fff;
  }
}

/* ============================ AI DELIVERY STACK ============================ */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 40px;
}
.stack-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFE 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.stack-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}
/* Faint number watermark, like the reference */
.stack-card::after {
  content: attr(data-num);
  position: absolute;
  right: 10px;
  bottom: -18px;
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--navy);
  opacity: 0.035;
  pointer-events: none;
}
.stack-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #94A3B8;
  margin: 0 0 10px;
}
.stack-card h3 {
  font-size: 1.14rem;
  line-height: 1.25;
  color: var(--navy);
  margin: 0 0 18px;
  min-height: 2.5em;
}
.stack-list {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stack-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.stack-item + .stack-item { border-top: 1px solid #F1F5F9; }
.stack-ico {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack-ico svg { width: 22px; height: 22px; }
.stack-ico .stack-logo { width: 23px; height: 23px; object-fit: contain; display: block; }
.stack-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.stack-meta b { font-size: 0.96rem; font-weight: 700; color: var(--navy); }
.stack-meta small { font-size: 0.76rem; color: var(--text-muted); }
.stack-ring {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.stack-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.stack-ring .rt { fill: none; stroke: #E8EDF5; stroke-width: 4; }
.stack-ring .rp { fill: none; stroke: var(--blue); stroke-width: 4; stroke-linecap: round; }
.stack-ring b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--navy);
}

@media (max-width: 980px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-card h3 { min-height: 0; }
}
@media (max-width: 520px) {
  .stack-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================ WHY CHOOSE DEVLEX ============================ */
.why-choose-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}
.why-choose-media {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.why-choose-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  max-height: 520px;
  object-fit: cover;
}
.why-choose-body .eyebrow { display: inline-block; }
.why-choose-body h2 { margin: 8px 0 14px; }
.why-choose-lead {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 26px;
  max-width: 560px;
}
.why-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.why-stat {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.why-stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #BFD3FF;
}
.why-stat-ico {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-stat-ico svg { width: 24px; height: 24px; }
.why-stat-txt { min-width: 0; line-height: 1.2; }
.why-stat-txt b {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.why-stat-txt small { font-size: 0.82rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .why-choose-grid { grid-template-columns: 1fr; gap: 28px; }
  .why-choose-media img { max-height: 380px; }
  .why-choose-lead { max-width: none; }
}
@media (max-width: 600px) {
  .why-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .why-stat { padding: 12px 13px; gap: 10px; }
  .why-stat-ico { width: 40px; height: 40px; }
  .why-stat-txt b { font-size: 1.25rem; }
}
@media (max-width: 380px) {
  .why-stats { grid-template-columns: 1fr; }
}
