/* =========================
   FORCE single font (Inter) SITE-WIDE
   Paste this at the TOP of styles.css
   ========================= */

:root {
  /* main font family used everywhere */
  --site-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* existing theme vars (keep your values) */
  --bg-dark: #000000;
  --bg-light: #ffffff;
  --text-light: #f5f5f5;
  --text-dark: #111111;
  --muted-light: #b0b0b0;
  --muted-dark: #555555;
  --card-dark: #101010;
  --card-light: #f5f5f5;
  --border-dark: #303030;
  --border-light: #e0e0e0;
  --accent: #2f9dff;
  --accent-soft: rgba(47, 157, 255, 0.18);
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.85);
  --max-width: 1120px;
  --transition: 0.2s ease-out;
}

/* Force the single font for everything (including headings, UI, code) */
html, body, input, button, textarea, select, a {
  font-family: var(--site-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Make headings slightly heavier for contrast (still Inter) */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--site-font) !important;
  font-weight: 700; /* change if you want lighter headings */
  letter-spacing: 0; /* reset any serif-specific tracking */
}

/* Ensure UI elements use same font weight as body by default */
button, .btn, .nav-link {
  font-family: var(--site-font) !important;
  font-weight: 500;
}

/* Preserve your existing font-size rules — only font-family/weight forced */



*,
*::before,
*::after {
  box-sizing: border-box;
}


/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background: #000; /* match your site theme */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
}

#preloader-video {
  width: 220px;        /* adjust size */
  height: auto;
  opacity: 1;
  transition: opacity 0.6s ease-out;
}

/* When fade-out starts */
#preloader.fade-out #preloader-video {
  opacity: 0;
}

#preloader.hide {
  display: none;
}

#preloader-video {
  width: 45%;
}



html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
  overflow-y: auto;   /* allow natural scrolling */
  scroll-behavior: smooth;  /* smooth scroll effect */
}


body {
  line-height: 1.5;
  overflow-x: hidden;                 /* keep horizontal clipping */
  -webkit-overflow-scrolling: touch;  /* smooth touch momentum on iOS */
  width: 100%;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page {
  padding-top: 80px;
}

/* =========================
   Header & Navigation
   ========================= */

/* ===== Apple-style Dark Glass Navigation Bar ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;

  /* Better frosted glass effect */
  background: rgba(10, 10, 10, 0.55); /* semi-transparent dark glass */
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);

  /* Slight gradient for depth */
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05),
    rgba(0, 0, 0, 0.25)
  );

  z-index: 10050; /* stay above carousel */
}

/* Glass noise overlay */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2P4//8/AwAI/AL+FQfc4QAAAABJRU5ErkJggg==');
  opacity: 0.08;
}


.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.logo-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.logo-tagline {
  font-size: 0.7rem;
  color: var(--muted-light);
}

/* Desktop nav */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  position: relative;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--muted-light);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--text-light);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent);
}

/* Apple-style hamburger */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 50;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  transition: transform 220ms ease-out, opacity 180ms ease-out,
    width 180ms ease-out, background 180ms ease-out;
  transform-origin: 10% 50%;
}


/* Prevent background scroll when mobile menu is open */
body.nav-open {
  overflow: hidden;
}

/* Morph into X when open */



body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(3px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
  width: 12px;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-3px) rotate(-45deg);
}

/* Mobile nav panel */

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    padding: 0.9rem 1.6rem 1.4rem;
    flex-direction: column;
    gap: 0.85rem;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-out, transform 220ms ease-out;
  }

  body.nav-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    font-size: 0.86rem;
  }
}

/* =========================
   Sections & Text
   ========================= */

.section {
  padding: 3.5rem 0;
}

.section.dark {
  background: var(--bg-dark);
  color: var(--text-light);
}

.section.light {
  background: var(--bg-light);
  color: var(--text-dark);
}

.section-title {
  margin: 0 0 0.6rem;
  font-size: 1.6rem;
}

.section-title.centered {
  text-align: center;
}

.section-intro {
  margin: 0 0 2rem;
  color: var(--muted-light);
  max-width: 640px;
}

.section-intro.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section.light .section-intro {
  color: var(--muted-dark);
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Hero */

.hero {
  padding: 5.5rem 0 3rem;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 4vw, 3.4rem);
  margin: 0.4rem 0 1rem;
}

.hero-sub {
  max-width: 520px;
  color: var(--muted-light);
  font-size: 0.98rem;
}

/* Buttons */

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.btn.primary {
  background: var(--accent);
  color: #02040a;
  box-shadow: 0 8px 28px rgba(47, 157, 255, 0.45);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(47, 157, 255, 0.55);
}

.btn.ghost {
  background: transparent;
  color: var(--text-light);
  border-color: var(--border-dark);
}

.btn.ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn.full {
  width: 100%;
}

/* Stats bar */

.stats-bar {
  padding: 1.4rem 0;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* 4 stats always in one row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: flex-start;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 1.4rem;
  font-weight: 700;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted-light);
}


/* ===== Clients logo carousel (infinite smooth with dark fade masks) ===== */
.clients-section {
  padding: 2rem 0 3rem;
  position: relative;
  z-index: 2;
}

.clients-carousel-wrap {
  position: relative;
  margin-top: 1.2rem;
  border-radius: 12px;
  overflow: visible;
}

/* viewport */
.clients-carousel {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: transparent;
  padding: 10px 0;
}

/* moving track - JS will clone to make seamless loop */
.clients-track {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  will-change: transform;
}

/* each logo box */
.clients-slide {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 72px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  transition: transform 260ms ease, box-shadow 260ms ease, filter 260ms ease;
}

/* logo image sizing */
.clients-slide img {
  max-height: auto;
  max-width: auto;
  object-fit: contain;
  display: block;
}

/* subtle hover pop (non-blocking) */
.clients-slide:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.45);
}

/* fade masks on both sides (dark overlay that vanishes logos) */
.clients-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14%;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 10;
}
.clients-fade-left {
  left: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0.0) 100%);
}
.clients-fade-right {
  right: 0;
  background: linear-gradient(270deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.6) 35%, rgba(0,0,0,0.0) 100%);
}

/* responsive */
@media (max-width: 900px) {
  .clients-slide { min-width: 140px; height: 64px; }
  .clients-fade { width: 18%; }
}
@media (max-width: 540px) {
  .clients-slide { min-width: 120px; height: 56px; }
  .clients-fade { width: 22%; }
}

/* Freebies grid */
.freebies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.freebie-item h3 { margin-top:0; margin-bottom:6px; }
.freebie-item p.muted { color: var(--muted-dark); font-size:0.92rem; }


/* =========================
   Cards & grids
   ========================= */

.card,
.card-lg {
  background: var(--card-dark);
  color: var(--text-light);
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-soft);
}

.card-lg {
  border-radius: var(--radius-lg);
  padding: 1.8rem;
}

.card:hover {
  border-color: var(--accent-soft);
}

/* Cards in white sections */

.section.light .card,
.section.light .card-lg {
  background: var(--card-light);
  color: var(--text-dark);
  border-color: var(--border-light);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

/* Service cards (generic) */

.service-card {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

/* Main card grids – 2–3 per row depending on width */

.services-grid,
.team-grid,
.testimonials-grid,
.insights-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* WORKS cards – squares & organized */

.works-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.work-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
  padding: 1.2rem;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.work-card span {
  position: relative;
  z-index: 1;
}

/* Optional image backgrounds */

.work-card.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.work-card.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    145deg,
    rgba(0, 0, 0, 0.82),
    rgba(0, 0, 0, 0.4)
  );
  z-index: 0;
}

/* ====== Carousel: no-pause on hover + drag offset support ====== */
.carousel-wrap {
  overflow: hidden;
  padding: 0;
  background: inherit;
  border-radius: var(--radius-lg);
  position: relative;
  z-index: 1;
}

/* masking container */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: inherit;
}

/* track that is animated. NOTE: animation uses --drag variable */
.carousel-track {
  display: flex;
  gap: 1rem;
  align-items: center;
  will-change: transform;
}

/* single slide */
.carousel-slide {
  flex: 0 0 auto;
  display: block;
  border-radius: 12px;
  overflow: hidden;
}

/* image sizing */
.carousel-slide img {
  display: block;
  width: 100%;

  object-fit: cover;
  min-width: 200px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.06);
}

/* wrapper that we animate (it will be duplicated/cloned by JS) */
.carousel-track-wrapper {
  display: flex;
  /* default drag offset */
  --drag: 0px;
  transform: translateX(var(--drag));
  /* animation will be applied inline by JS for correct duration */
}

/* IMPORTANT: remove pause-on-hover entirely — user requested it must never stop */
/* (previous rule '.carousel:hover .carousel-track-wrapper { animation-play-state: paused !important; }' must be removed) */

/* Keyframes for the loop: note we animate from translateX(var(--drag)) → translateX(calc(var(--drag) - 50%))
   This allows the JS to set --drag dynamically while animation keeps running */
@keyframes carousel-scroll {
  0% {
    transform: translateX(var(--drag));
  }
  100% {
    transform: translateX(calc(var(--drag) - 50%));
  }
}

/* reduced-motion accessibility still honored */
@media (prefers-reduced-motion: reduce) {
  .carousel-track-wrapper {
    animation: none !important;
  }
}




/* Placeholders */

.mockup-placeholder,
.video-wrapper,
.gallery-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  font-size: 0.95rem;
}

.section.dark .mockup-placeholder,
.section.dark .video-wrapper,
.section.dark .gallery-card {
  background: #101010;
}

.section.light .mockup-placeholder,
.section.light .video-wrapper,
.section.light .gallery-card {
  background: #f3f3f3;
}

/* Testimonials */

.testimonial p {
  color: var(--muted-light);
  font-size: 0.92rem;
}

.testimonial h4 {
  margin: 1rem 0 0.1rem;
}

.testimonial span {
  font-size: 0.8rem;
  color: var(--muted-light);
}

.section.light .testimonial p {
  color: var(--muted-dark);
}

.section.light .testimonial span {
  color: var(--muted-dark);
}

/* Why choose us */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* About */

.about-hero {
  padding-top: 1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
  gap: 2.4rem;
  margin-bottom: 3rem;
}

.about-grid.reverse {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr);
}

.image-placeholder {
  background: #eeeeee;
}

/* Team */

.team-card {
  padding: 0;
  overflow: hidden;
}

.avatar-placeholder {
  height: 180px;
  background: #222222;
}

.team-meta {
  padding: 1rem 1.2rem 1.2rem;
}

.team-meta .role {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-light);
}

.team-meta .name {
  display: block;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* Insights */

.insight-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.insight-card p {
  color: var(--muted-light);
  font-size: 0.9rem;
}

.section.light .insight-card p {
  color: var(--muted-dark);
}

.text-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.contact-info .meta {
  font-size: 0.9rem;
  color: var(--muted-light);
}

.section.light .contact-info .meta {
  color: var(--muted-dark);
}

.contact-info h3 {
  margin-top: 1.2rem;
}

/* Forms */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-dark);
  background: #0f0f0f;
  color: var(--text-light);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition),
    background var(--transition);
}

.section.light input,
.section.light select,
.section.light textarea {
  background: #111111;
  color: var(--text-light);
  border-color: var(--border-dark);
}

textarea {
  border-radius: 18px;
  resize: vertical;
  min-height: 120px;
}

input::placeholder,
textarea::placeholder {
  color: #666666;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
  background: #151515;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #ffffff 50%),
    linear-gradient(135deg, #ffffff 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.privacy-note {
  font-size: 0.78rem;
  color: var(--muted-light);
}

/* =========================
   Scroll reveal & hover tilt
   ========================= */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(6px);
  transition:
    opacity 450ms ease-out,
    transform 450ms ease-out,
    filter 450ms ease-out;
  will-change: opacity, transform, filter;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.card.reveal-on-scroll,
.card-lg.reveal-on-scroll {
  transform: translateY(18px) scale(0.99);
}

.hover-tilt {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: pointer;
}

.hover-tilt::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.25), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(47, 157, 255, 0.4), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out;
  mix-blend-mode: screen;
}

.hover-tilt:hover::before {
  opacity: 1;
}

.hover-tilt:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

/* =========================
   Footer
   ========================= */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #000000;
  padding: 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

.footer-logo .logo-mark {
  width: 40px;
  height: 40px;
  font-size: 0.8rem;
}

.footer-brand .trusted {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--muted-light);
}

.trusted-icons {
  font-size: 0.8rem;
  color: var(--muted-light);
  display: inline-flex;
  margin-top: -15px;
}

.footer-column h4 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
}

.footer-column li {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--muted-light);
}

.footer-links a {
  color: var(--muted-light);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.social-icons {
  font-size: 0.85rem;
  color: var(--muted-light);
  display: inline-flex;
  margin-top: 1px;
}

.copyright {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--muted-light);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  /* still 4 stats in one row */
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .about-grid,
  .about-grid.reverse,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .container {
    padding: 0 1.2rem;
  }

  .works-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 540px) {
  /* still 4 stats in one row */
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 4.5rem;
  }

  .page {
    padding-top: 72px;
  }

  /* 2 cards per row on small screens */
  .services-grid,
  .team-grid,
  .testimonials-grid,
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .work-card {
    aspect-ratio: 4 / 5; /* a little taller on tiny screens */
  }
}


/* ===== TEMPORARY / DEFENSIVE: make carousel sit above neighbors and avoid being clipped ===== */
.carousel-wrap {
  position: relative !important;
  z-index: 1000 !important;          /* bring carousel above siblings that might overlap */
  overflow: visible !important;      /* allow carousel contents to show (no clipping) */
  margin-bottom: 0.8rem;             /* small gap so the next section doesn't bump into it */
}

/* the inner animated wrapper should stay clipped inside the wrap but we allowed visible above.
   ensure the animated wrapper doesn't expand layout unexpectedly */
.carousel-track-wrapper {
  will-change: transform;
  z-index: 1;
}

/* ensure the immediate following section does not overlap the carousel:
   increases spacing and ensures it paints underneath */
.carousel-wrap + .section,
.carousel-wrap + .card-lg,
.carousel-wrap + .mockup-placeholder {
  margin-top: 1.25rem !important;
  position: relative;
  z-index: 0;
}

/* if the mockup below uses .card-lg or .mockup-placeholder, force it not to overlap */
.card-lg,
.mockup-placeholder {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* if you still want hard clipping within rounded corners but no outer overlap,
   uncomment the following (keeps rounded stroke but removes visible background gap)
*/
/*
.carousel {
  overflow: hidden;
  border-radius: var(--radius-lg);
}
*/


/* ===== HEADER ALWAYS ON TOP (fix overlap) ===== */

/* Make sure header is in the top stacking context and above carousels */
.site-header {
  position: fixed;     /* should already be fixed, but ensure it */
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;      /* much higher than carousel; adjust if needed */
}

/* Put carousel under the header (defensive) */
.carousel-wrap {
  z-index: 1;          /* keep carousel visible above normal content, but below header */
  position: relative;
}

/* ---------- SEAMLESS CAROUSEL PATCH (replace previous carousel CSS) ---------- */

/* outer mask: single rounded container that clips everything */
.carousel-wrap {
  position: relative;
  overflow: hidden;              /* clip children to this rounded rect */
  border-radius: var(--radius-lg); 
  width: 100%;
  z-index: 1;                    /* below header but above page content */
  background: transparent;
}

/* inner carousel viewport (no own radius) */
.carousel {
  width: 100%;
  overflow: visible;             /* allow track transforms, but wrap will clip */
  border-radius: 0;              /* no radius here */
  position: relative;
}

/* the moving track: no gap between slides so no seams */
.carousel-track {
  display: flex;
  gap: 0;                        /* IMPORTANT: remove gap so slides butt up */
  align-items: stretch;
  will-change: transform;
  /* keep animation applied via JS as before */
}

/* slide wrappers: remove border/border-radius so they don't show seams */
.carousel-slide {
  flex: 0 0 auto;
  display: block;
  border-radius: 0 !important;   /* ensure slides themselves have no rounding */
  overflow: hidden;
  margin: 0;
  border: 0;
  background: transparent;
}

/* image inside slide: remove border and rounding */
.carousel-slide img {
  display: block;
  width: 100%;
  height: 360px;                 /* keep your chosen height */
  object-fit: cover;
  border-radius: 0 !important;   /* critical */
  border: 0 !important;          /* remove any thin outline */

}

/* If you previously added shadows on slides, move them to the track container
   so shadows don't create extra visual edges. Example: (optional)
*/
.carousel-track .carousel-slide img {
  box-shadow: none;
}

/* =========================
   CAROUSEL FADE — SOFT MASK (MATCHES TRUSTED BY)
   ========================= */

.carousel-fade {
  width: 6%;                /* narrow = premium */
  pointer-events: none;
  z-index: 60;
}


/* LEFT fade */
.carousel-fade-left {
  left: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.45) 40%,
    rgba(0,0,0,0.0) 100%
  );
}

/* RIGHT fade */
.carousel-fade-right {
  right: 0;
  background: linear-gradient(
    270deg,
    rgba(0,0,0,0.88) 0%,
    rgba(0,0,0,0.45) 40%,
    rgba(0,0,0,0.0) 100%
  );
}

/* Mobile: slightly stronger but still soft */
@media (max-width: 600px) {
  .carousel-fade {
    width: 10%;
  }
}



/* If any nearby card elements used transform to fix GPU rendering, make sure they don't create higher stacking above header.
   Only apply if you added transform: translateZ(0) previously. If not needed, you can remove this override. */
.card-lg,
.mockup-placeholder {
  transform: none !important;  /* remove transform stacking context if causing layering problems */
  backface-visibility: hidden;
}

/* If you prefer not to remove transforms globally, instead lower the z-index of those stacking contexts */
.card-lg[style], .card-lg {
  z-index: 0;
}

/* Ensure mobile nav overlay still appears above everything when opened */
body.nav-open .nav-links {
  z-index: 10060; /* above header for the menu overlay */
}


/* Roadmap (How we work) */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  align-items: stretch;
  margin-top: 1rem;
}

.roadmap-step {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 1.2rem;
  border-radius: 12px;
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  transition: transform 380ms cubic-bezier(.2,.9,.2,1), box-shadow 300ms ease;
}

.roadmap-step .step-num {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:1rem;
  color:var(--text-light);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.roadmap-step h4 { margin:0; font-size:1.05rem; }
.roadmap-step p { margin:0; color:var(--muted-light); font-size:0.94rem; }

/* reveal interaction */
.roadmap-step:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 26px 80px rgba(0,0,0,0.56);
}

/* responsive */
@media (max-width:980px) {
  .roadmap-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:540px) {
  .roadmap-grid { grid-template-columns: 1fr; }
}



/* -------------------------
   Preloader / header visibility fix
   ------------------------- */

/* Make sure preloader sits above everything (higher than header z-index) */
#preloader {
  z-index: 100500 !important; /* higher than .site-header (10050) */
}

/* Defensive selectors: if preloader exists/visible, hide header until preloader is gone.
   Works whether #preloader is before or after header in DOM (sibling selector + explicit class). */
#preloader:not(.hide) ~ .site-header,
#preloader:not(.hide) + .site-header,
.site-header.preloading {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease-out, visibility 260ms ease-out;
}

/* When preloader removed (we will toggle .preloader-done via JS), show header */
.site-header {
  transition: opacity 260ms ease-out, visibility 260ms ease-out;
}
.site-header.preloader-done {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* -------------------------
   Carousel seam & animation defaults
   ------------------------- */

/* Ensure the viewport clip is the canonical clipping container */
.carousel-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

/* The moving track should have no gap between slides */
.carousel-track {
  gap: 0;                        /* force no gap so slides butt up exactly */
  align-items: stretch;
  display: flex;
  will-change: transform;
}

/* The wrapper that is animated must use linear timing for perfect loop */
.carousel-track-wrapper {
  --drag: 0px;
  transform: translateX(var(--drag));
  will-change: transform;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  animation-name: none; /* JS will assign animation with proper duration */
}

/* If animation is applied by JS, ensure it can't be paused by hover */
.carousel, .carousel-track-wrapper {
  -webkit-animation-play-state: running !important;
  animation-play-state: running !important;
}

/* small responsive smoothing (keeps heights consistent on iPad/large screens) */
.carousel-slide img {
  object-fit: cover;
  display: block;
  width: auto; /* allow images to keep intrinsic widths so track width is correct */
  min-width: 200px; /* preserve your existing minimum */
}


/* === CAROUSEL IMAGE SIZE (DEVICE RESPONSIVE) === */
.carousel-slide img {
  display: block;
  height: clamp(180px, 28vw, 420px); /* mobile → tablet → desktop */
  width: auto;
  min-width: 220px;
  object-fit: cover;
}


/* =========================
   FOOTER RESPONSIVE LOGIC FIX
   ========================= */

/* Tablets (iPad Air & iPad Pro) → KEEP DESKTOP FOOTER */
@media (max-width: 1024px) and (min-width: 601px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    text-align: left;
  }
}

/* Phones ONLY → stacked footer */
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    text-align: left;
  }
}



.lottie-preview {
  width: 100%;
  height: 220px;
  border-radius: 14px;
  overflow: hidden;
  background: none;
  margin-bottom: 0.8rem;
}

.lottie-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}




.s3d-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.s3d-item.hero-item .s3d-frame {
  min-height: 360px;
  max-height: 500px;
  overflow: hidden;
}