/* Tech Indev — custom styles that complement Tailwind */
:root {
  --ti-green: #78c848;
  --ti-green-dark: #5fa632;
  --ti-green-light: #a8e070;
  --ti-charcoal: #484848;
  --ti-charcoal-deep: #2a2a2a;
  --ti-bg: #f8f9f7;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #1f2937;
  background: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
.font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

/* Subtle grid pattern for hero backgrounds */
.bg-grid {
  background-image:
    linear-gradient(rgba(120, 200, 72, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 200, 72, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Radial glow behind hero */
.hero-glow::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle at center, rgba(120, 200, 72, 0.35), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

/* Reveal-on-scroll animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Marquee for client/tech logos */
.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes marquee-reverse {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0);
  }
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 35s linear infinite;
  will-change: transform;
}

.marquee-track.marquee-reverse {
  animation-name: marquee-reverse;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* Fancy card hover */
.card-lift {
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(72, 72, 72, 0.25);
  border-color: var(--ti-green);
}

/* Buttons */
.btn-primary {
  background: var(--ti-green);
  color: #0f1a08;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-primary:hover {
  background: var(--ti-green-dark);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(120, 200, 72, 0.6);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: background .2s ease, border-color .2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--ti-green);
}

/* Nav link underline effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  background: var(--ti-green);
  transition: width .25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Logo mark */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--ti-charcoal);
  color: var(--ti-green);
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  box-shadow: inset 0 0 0 2px rgba(120, 200, 72, 0.35);
}

/* Header logo hover transition & rendering */
header a img {
  image-rendering: -webkit-optimize-contrast;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  will-change: transform;
}

header a:hover img {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 12px rgba(120, 200, 72, 0.35));
}

/* =========================================================
   Hexagon icon shape (from Tech Indev brand banner)
   Point-top hexagon used for all service / feature icons
   ========================================================= */
.icon-hex {
  --hex-size: 52px;
  --hex-border: 1.5px;
  --hex-fill: transparent;
  --hex-stroke: #c5c9c2;
  width: var(--hex-size);
  height: calc(var(--hex-size) * 1.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  color: var(--ti-green-dark);
}

.icon-hex::before,
.icon-hex::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  pointer-events: none;
}

.icon-hex::before {
  background: var(--hex-stroke);
}

.icon-hex::after {
  inset: var(--hex-border);
  background: var(--hex-fill);
}

.icon-hex>svg,
.icon-hex>* {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
}

/* Soft green fill — light sections */
.icon-hex--soft {
  --hex-fill: #78c848;
  --hex-stroke: #78c848;
  color: #484848;
}

/* Solid green fill — accent */
.icon-hex--accent {
  --hex-fill: var(--ti-green);
  --hex-stroke: var(--ti-green-dark);
  color: var(--ti-charcoal-deep);
}

/* Dark charcoal fill — dark bands / charcoal cards */
.icon-hex--solid {
  --hex-fill: var(--ti-charcoal-deep);
  --hex-stroke: rgba(255, 255, 255, 0.55);
  color: var(--ti-green);
}

/* Outline only — banner middle-row style */
.icon-hex--outline {
  --hex-fill: #ffffff;
  --hex-stroke: #ffffff;
  color: #484848;
}

/* On green / colored banners */
.icon-hex--on-green {
  --hex-fill: #484848;
  --hex-stroke: #484848;
  color: #fff;
}

/* On dark charcoal banners */
.icon-hex--on-dark {
  --hex-fill: rgba(120, 200, 72, 0.12);
  --hex-stroke: rgba(168, 224, 112, 0.65);
  color: var(--ti-green);
}

/* Charcoal glyph only — keeps existing hex fill */
.icon-hex--ink {
  color: #484848;
}

/* Product card media — photo + brand color overlay */
.product-media {
  position: relative;
  overflow: hidden;
}

.product-media>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.product-media:hover>img,
.group:hover .product-media>img {
  transform: scale(1.06);
}

.product-media__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.product-media__content {
  position: relative;
  z-index: 1;
}

/* Smaller hex for social / compact UI icons */
.icon-hex--sm {
  --hex-size: 36px;
}

.icon-hex--sm>svg,
.icon-hex--sm>* {
  width: 14px;
  height: 14px;
}

/* Footer / dark social hex */
.icon-hex--social {
  --hex-fill: rgba(255, 255, 255, 0.06);
  --hex-stroke: rgba(255, 255, 255, 0.28);
  color: inherit;
  transition: color .2s ease, --hex-fill .2s ease;
}

a:hover .icon-hex--social {
  --hex-fill: var(--ti-green);
  --hex-stroke: var(--ti-green-dark);
  color: var(--ti-charcoal-deep);
}

/* Section divider */
.section-title-accent {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(120, 200, 72, 0.12);
  color: var(--ti-green-dark);
  font-weight: 600;
}

/* Scrollbar accent */
::selection {
  background: rgba(120, 200, 72, 0.35);
}

/* ================================================
   HOME (WiztecBD-inspired) layout helpers
   ================================================ */

/* Constellation / network pattern background for the hero */
.constellation {
  background-color: #f8f9f7;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(120, 200, 72, 0.55) 2px, transparent 3px),
    radial-gradient(circle at 32% 60%, rgba(120, 200, 72, 0.4) 1.5px, transparent 3px),
    radial-gradient(circle at 55% 15%, rgba(120, 200, 72, 0.5) 2px, transparent 3px),
    radial-gradient(circle at 72% 42%, rgba(120, 200, 72, 0.35) 1.5px, transparent 3px),
    radial-gradient(circle at 90% 68%, rgba(120, 200, 72, 0.5) 2px, transparent 3px),
    radial-gradient(circle at 8% 78%, rgba(120, 200, 72, 0.4) 1.5px, transparent 3px),
    radial-gradient(circle at 45% 88%, rgba(120, 200, 72, 0.4) 1.5px, transparent 3px),
    radial-gradient(circle at 78% 92%, rgba(120, 200, 72, 0.45) 2px, transparent 3px),
    radial-gradient(circle at 22% 42%, rgba(120, 200, 72, 0.3) 1.5px, transparent 3px),
    radial-gradient(circle at 62% 72%, rgba(120, 200, 72, 0.35) 1.5px, transparent 3px);
  background-size: 100% 100%;
  position: relative;
}

.constellation::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 600' preserveAspectRatio='none'><g stroke='%2378c848' stroke-opacity='0.28' stroke-width='0.7' fill='none'><path d='M120 120 L256 360 L440 90 L580 250 L720 420'/><path d='M64 460 L280 500 L360 620 L520 460 L680 540'/><path d='M100 240 L180 380 L340 260 L500 380 L620 260 L740 380'/><path d='M180 60 L360 180 L520 60 L660 180'/></g></svg>");
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Play-button ring for the hero video card */
.play-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 10px rgba(120, 200, 72, 0.35), 0 15px 35px -10px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.play-ring svg {
  color: var(--ti-green-dark);
}

/* Floating left social sidebar */
.social-rail {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  padding: 10px 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: none;
  border-radius: 0 14px 14px 0;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-rail a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  background: #f3f4f6;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.social-rail a:hover {
  background: var(--ti-green);
  color: #0f1a08;
  transform: translateX(2px);
}

/* "What We Offer" tabs */
.offer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.offer-tab {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  color: #4b5563;
  background: transparent;
  border-bottom: 3px solid transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  cursor: pointer;
}

.offer-tab:hover {
  color: var(--ti-charcoal-deep);
}

.offer-tab.is-active {
  color: #fff;
  background: var(--ti-charcoal-deep);
  border-color: var(--ti-green);
  border-radius: 10px 10px 0 0;
}

.offer-panel {
  display: none;
}

.offer-panel.is-active {
  display: block;
  animation: fadeUp .35s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Process timeline — horizontal zig-zag pattern */
.process-track {
  position: relative;
}

.process-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px);
  z-index: 0;
}

.step-node {
  position: relative;
  z-index: 1;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  transition: background .3s ease, transform .3s ease;
}

.step-node:hover {
  background: var(--ti-green);
  color: var(--ti-charcoal-deep);
  transform: scale(1.06);
}

/* Industry card */
.industry-card {
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.industry-card:hover {
  transform: translateY(-4px);
  border-color: var(--ti-green);
  box-shadow: 0 20px 30px -20px rgba(72, 72, 72, 0.2);
}

/* Testimonial */
.testimonial-card {
  transition: transform .3s ease, box-shadow .3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 30px -20px rgba(72, 72, 72, 0.25);
}

/* ================================================
   Nav dropdown — Services sub-menu
   ================================================ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-dropdown-trigger svg.chevron-icon {
  width: 14px;
  height: 14px;
  transition: transform .25s ease;
  flex-shrink: 0;
}

.nav-dropdown:hover .nav-dropdown-trigger svg.chevron-icon {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 220px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 20px 40px -12px rgba(42, 42, 42, 0.18), 0 0 0 1px rgba(120, 200, 72, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  z-index: 100;
}

.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(255, 255, 255, 0.95);
}

/* Invisible bridge between trigger and menu so hover doesn't break */
.nav-dropdown-menu::after {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #484848;
  transition: background .2s ease, color .2s ease, transform .15s ease;
  text-decoration: none;
}

.nav-dropdown-menu a:hover {
  background: rgba(120, 200, 72, 0.1);
  color: var(--ti-green-dark);
  transform: translateX(2px);
}

.nav-dropdown-menu a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ti-green-dark);
  opacity: 0.7;
}

.nav-dropdown-menu a:hover svg {
  opacity: 1;
}

/* Mobile sub-menu */
.mobile-sub-menu {
  padding-left: 16px;
  border-left: 2px solid var(--ti-green);
  margin-left: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-sub-menu a {
  font-size: 13px;
  color: #64748b;
  padding: 4px 0;
  transition: color .2s ease;
}

.mobile-sub-menu a:hover {
  color: var(--ti-green-dark);
}

/* ================================================
   MOBILE OPTIMIZATIONS
   ================================================ */

/* Prevent iOS zoom on input focus (font-size >= 16px) */
input,
select,
textarea {
  font-size: 16px !important;
}

@media (min-width: 640px) {

  input,
  select,
  textarea {
    font-size: 14px !important;
  }
}

/* Smooth scroll with fixed nav offset */
html {
  scroll-padding-top: 80px;
}

/* Touch-friendly: minimum tap target 44×44 on all interactive elements */
@media (max-width: 1023px) {
  [data-mobile-menu] a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 8px 0;
  }

  .mobile-sub-menu a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 8px 0;
  }
}

/* Hero glow — reduce on mobile to prevent lag */
@media (max-width: 639px) {
  .hero-glow::before {
    width: 80%;
    height: 40%;
    filter: blur(40px);
    inset: -10% -5% auto auto;
  }

  /* Reduce grid pattern density on mobile */
  .bg-grid {
    background-size: 32px 32px;
  }
}

/* Smaller hex icons on very small screens */
@media (max-width: 479px) {
  .icon-hex {
    --hex-size: 42px;
  }

  .icon-hex>svg,
  .icon-hex>* {
    width: 18px;
    height: 18px;
  }
}

/* Card lift — disable translateY on touch devices (causes layout shift) */
@media (hover: none) {
  .card-lift:hover {
    transform: none;
    box-shadow: 0 4px 16px -4px rgba(72, 72, 72, 0.15);
  }

  .card-lift:active {
    transform: scale(0.98);
    transition: transform .1s ease;
  }

  .industry-card:hover {
    transform: none;
  }

  .testimonial-card:hover,
  .testimonial:hover {
    transform: none;
  }
}

/* Hide floating social sidebar on mobile */
@media (max-width: 767px) {
  .social-rail {
    display: none;
  }
}

/* Mobile header — increase height slightly for fat-finger friendliness */
@media (max-width: 1023px) {
  [data-nav]>div:first-child {
    height: 60px;
  }
}

/* Mobile menu improvements — full-width with better spacing */
@media (max-width: 1023px) {
  [data-mobile-menu] {
    max-height: calc(100vh - 60px);
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  [data-mobile-menu]>div {
    padding: 16px 20px 24px;
    gap: 4px;
  }
}

/* Fluid typography for hero headings — prevent overflow on small screens */
@media (max-width: 479px) {
  h1 {
    font-size: 1.875rem !important;
    /* 30px */
    line-height: 1.2 !important;
  }

  h2 {
    font-size: 1.5rem !important;
    /* 24px */
    line-height: 1.25 !important;
  }

  /* Reduce section padding on small mobile */
  section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Smaller section accent badges */
  .section-title-accent {
    font-size: 10px;
    padding: 3px 10px;
  }
}

/* Prevent horizontal overflow everywhere */
body {
  overflow-x: hidden;
}

img,
video,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

/* Full-width CTA buttons on very small screens */
@media (max-width: 479px) {

  .btn-primary,
  .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

/* Footer grid — stack on small screens */
@media (max-width: 639px) {
  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  footer .md\:col-span-2 {
    text-align: center;
  }

  footer .md\:col-span-2 a:first-child {
    display: inline-flex;
    justify-content: center;
  }

  footer .flex.gap-3 {
    justify-content: center;
  }
}

/* CTA banner — stack and center text on mobile */
@media (max-width: 639px) {
  .rounded-3xl.bg-ti-green {
    padding: 2rem 1.5rem !important;
    text-align: center;
  }

  .rounded-3xl.bg-ti-green .flex.flex-wrap {
    justify-content: center;
    width: 100%;
  }

  .rounded-3xl.bg-ti-green h2 {
    font-size: 1.5rem !important;
  }
}

/* Product / portfolio cards — reduce image height on mobile */
@media (max-width: 639px) {

  .portfolio-card .h-52,
  .project-card .h-56,
  .product-media.h-44 {
    height: 180px !important;
  }
}

/* Stats counters — 2-column on mobile instead of 3 */
@media (max-width: 479px) {
  .grid.grid-cols-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Process step nodes — smaller on mobile */
@media (max-width: 639px) {
  .step-node {
    width: 80px;
    height: 80px;
  }

  .process-number {
    width: 46px;
    height: 46px;
    font-size: 16px;
  }
}

/* Marquee — slower on mobile for readability */
@media (max-width: 639px) {
  .marquee-track {
    animation-duration: 20s;
    gap: 2rem;
  }
}

/* Reveal animation — reduce travel on mobile for better perf */
@media (max-width: 639px) {
  .reveal {
    transform: translateY(16px);
    transition-duration: .5s;
  }
}

/* Fix touch behavior for portfolio filter buttons */
@media (hover: none) {

  .portfolio-filter-btn:active,
  .filter-chip:active {
    transform: scale(0.96);
  }
}

/* Improve readability of body text on mobile */
@media (max-width: 639px) {
  body {
    font-size: 15px;
    line-height: 1.65;
  }

  p {
    line-height: 1.7;
  }
}

/* Featured project card — full-width image on mobile */
@media (max-width: 639px) {
  .featured-project .grid {
    grid-template-columns: 1fr !important;
  }

  .featured-project .min-h-\[320px\],
  .featured-project .min-h-\[420px\] {
    min-height: 220px !important;
  }
}

/* Contact form — full-width on mobile with proper spacing */
@media (max-width: 639px) {
  form.rounded-3xl {
    padding: 1.5rem !important;
    border-radius: 1rem;
  }

  /* Stack form disclaimer and submit button */
  form .flex.flex-col.sm\:flex-row {
    flex-direction: column;
    gap: 1rem;
  }

  form button[type="submit"] {
    width: 100%;
    justify-content: center;
  }
}

/* Safe area padding for iOS notch/home indicator */
@supports (padding: env(safe-area-inset-bottom)) {
  footer {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }

  [data-mobile-menu]>div {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}

/* Improve scrollbar on mobile */
@media (max-width: 1023px) {
  ::-webkit-scrollbar {
    width: 4px;
  }

  ::-webkit-scrollbar-track {
    background: transparent;
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(120, 200, 72, 0.3);
    border-radius: 4px;
  }
}

/* Prevent text selection flash on interactive elements */
button,
a,
.filter-chip,
.portfolio-filter-btn,
.offer-tab {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Optimized focus styles for accessibility on mobile */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ti-green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================================
   PORTFOLIO SPECIFIC STYLES 
   ========================================= */
.portfolio-hero-pattern {
  background-image:
    radial-gradient(circle at 20% 50%, rgba(120, 200, 72, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(120, 200, 72, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(120, 200, 72, 0.08) 0%, transparent 45%);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

.float-anim {
  animation: float 6s ease-in-out infinite;
}

.float-anim-delay {
  animation: float 6s ease-in-out 2s infinite;
}

.float-anim-delay2 {
  animation: float 6s ease-in-out 4s infinite;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.count-up {
  animation: countUp 0.6s ease forwards;
}

/* Masonry-like featured card */
.featured-project {
  transition: transform .5s cubic-bezier(.25, .46, .45, .94), box-shadow .5s ease;
}

.featured-project:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 30px 60px -15px rgba(42, 42, 42, 0.25);
}

/* Project card stagger and elevation */
.project-card,
.portfolio-card {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .4s ease, transform .4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .4s ease, border-color .4s ease;
}

.project-card.is-visible,
.portfolio-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover,
.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -12px rgba(42, 42, 42, 0.15), 0 8px 16px -4px rgba(120, 200, 72, 0.2);
  border-color: rgba(120, 200, 72, 0.6);
}

/* Filter active state & chip count pill */
.filter-chip {
  transition: all .25s ease;
}

.filter-chip.is-active {
  background: var(--ti-charcoal-deep) !important;
  color: #ffffff !important;
  border-color: var(--ti-charcoal-deep) !important;
  box-shadow: 0 6px 16px -4px rgba(42, 42, 42, 0.35);
}

.filter-chip .chip-count {
  background: rgba(0, 0, 0, 0.08);
  color: var(--ti-charcoal);
  transition: all .25s ease;
}

.filter-chip.is-active .chip-count {
  background: var(--ti-green) !important;
  color: var(--ti-charcoal-deep) !important;
}

/* Status indicator pulse animation */
.status-pulse-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--ti-green-dark);
}

.status-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--ti-green);
  opacity: 0.7;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }

  80%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Modal overlay and animation */
#project-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

#project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

#project-modal .modal-box {
  transform: scale(0.94) translateY(16px);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
}

#project-modal.is-open .modal-box {
  transform: scale(1) translateY(0);
}

/* Process number */
.process-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 20px;
  background: var(--ti-green);
  color: var(--ti-charcoal-deep);
  box-shadow: 0 0 0 6px rgba(120, 200, 72, 0.2);
  transition: transform .3s ease, box-shadow .3s ease;
}

.process-step:hover .process-number {
  transform: scale(1.1);
  box-shadow: 0 0 0 10px rgba(120, 200, 72, 0.3);
}

/* Testimonial card */
.testimonial {
  transition: transform .35s ease, box-shadow .35s ease;
}

.testimonial:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px rgba(42, 42, 42, 0.2);
}

/* Live Operations Progress Bar Animations */
@keyframes progressFillSurveillance {
  0% {
    width: 0%;
  }

  100% {
    width: 99.99%;
  }
}

@keyframes progressFillPower {
  0% {
    width: 0%;
  }

  100% {
    width: 100%;
  }
}

@keyframes progressFillNetwork {
  0% {
    width: 0%;
  }

  100% {
    width: 98.7%;
  }
}

@keyframes progressShimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(250%);
  }
}

.progress-bar-surveillance {
  width: 99.99%;
}

.progress-bar-power {
  width: 100%;
}

.progress-bar-network {
  width: 98.7%;
}

.reveal.is-visible .progress-bar-surveillance {
  animation: progressFillSurveillance 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal.is-visible .progress-bar-power {
  animation: progressFillPower 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal.is-visible .progress-bar-network {
  animation: progressFillNetwork 2.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.progress-shimmer {
  position: relative;
  overflow: hidden;
}

.progress-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.55) 50%,
      transparent 100%);
  animation: progressShimmer 2.2s infinite ease-in-out;
  border-radius: 9999px;
}

/* Blinking Typing Cursor */
@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.typing-cursor {
  display: inline-block;
  vertical-align: baseline;
  width: 3px;
  height: 0.85em;
  background-color: var(--ti-green);
  margin-left: 4px;
  border-radius: 1px;
  animation: cursorBlink 0.9s infinite;
}

/* Header Loader Bar (Placed directly after/below header navigation menu) */
.header-loader-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 50;
  pointer-events: none;
  background: rgba(120, 200, 72, 0.1);
  overflow: hidden;
}

.header-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #78c848 0%, #a8e070 50%, #c5f498 100%);
  box-shadow: 0 0 12px rgba(168, 224, 112, 0.95), 0 0 6px rgba(120, 200, 72, 0.9);
  transition: width 0.35s ease-out, opacity 0.4s ease-out;
  border-radius: 0 2px 2px 0;
  will-change: width, opacity;
}

.header-loader-bar.glow-pulse {
  animation: loaderPulse 1.5s ease-in-out infinite alternate;
}

@keyframes loaderPulse {
  0% {
    box-shadow: 0 0 8px rgba(168, 224, 112, 0.7);
  }

  100% {
    box-shadow: 0 0 16px rgba(168, 224, 112, 1), 0 0 8px rgba(120, 200, 72, 0.9);
  }
}

/* =========================================================
   Team Member Photo Display & Card Formatting
   ========================================================= */
.team-member-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  padding: 0;
  position: relative;
  box-sizing: border-box;
}

.team-member-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transition: transform 0.35s ease;
  display: block;
}

.card-lift:hover .team-member-image img {
  transform: scale(1.03);
}

@media (max-width: 640px) {
  .team-member-image {
    padding: 0;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .team-member-image {
    padding: 0;
  }
}

/* Technology category card layout — centered icon & title */
.card-icon-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}

.card-icon {
  margin-left: auto;
  margin-right: auto;
}

.card-title {
  text-align: center;
}

/* Typing Animation */
.typing-anim {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--ti-green);
  animation:
    typing 4s steps(var(--type-steps, 30), end) infinite,
    blink-caret .75s step-end infinite;
}

@keyframes typing {

  0%,
  10% {
    max-width: 0;
  }

  40%,
  70% {
    max-width: var(--type-width, 100%);
  }

  100% {
    max-width: 0;
  }
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: var(--ti-green);
  }
}

/* =========================================================
   DARK MODE
   ========================================================= */

/* Dark mode CSS variables */
.dark {
  --dm-bg: #0f1a0a;
  --dm-surface: #1a2612;
  --dm-surface-2: #22301a;
  --dm-border: rgba(120, 200, 72, 0.15);
  --dm-border-soft: rgba(255, 255, 255, 0.07);
  --dm-text: #e8f5e0;
  --dm-text-muted: #8aab78;
  --dm-text-soft: #b8d4a8;
}

/* Base */
.dark body {
  background: var(--dm-bg);
  color: var(--dm-text);
}

/* Navigation */
.dark [data-nav] {
  background: rgba(15, 26, 10, 0.85) !important;
  border-bottom: 1px solid var(--dm-border);
}

.dark [data-nav].shadow-md,
.dark [data-nav].bg-white\/95 {
  background: rgba(15, 26, 10, 0.97) !important;
}

.dark .nav-link {
  color: var(--dm-text-soft);
}

.dark .nav-link:hover {
  color: var(--ti-green);
}

.dark .nav-link::after {
  background: var(--ti-green);
}

.dark .nav-dropdown-menu {
  background: rgba(22, 34, 16, 0.97);
  border-color: var(--dm-border);
}

.dark .nav-dropdown-menu a {
  color: var(--dm-text-soft);
}

.dark .nav-dropdown-menu a:hover {
  background: rgba(120, 200, 72, 0.1);
  color: var(--ti-green-light);
}

.dark [data-mobile-menu] {
  background: var(--dm-surface);
  border-color: var(--dm-border);
}

.dark [data-mobile-menu] a,
.dark [data-mobile-menu] span {
  color: var(--dm-text-soft) !important;
}

.dark [data-menu-button] {
  background: var(--dm-surface-2);
  border-color: var(--dm-border);
  color: var(--dm-text);
}

/* Theme toggle button */
.theme-toggle-btn {
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.12);
}

/* Icon switching — pure CSS, no Tailwind dark: dependency */
/* Light mode: hide sun, show moon */
.theme-toggle-btn svg:first-child {
  display: none;
}

.theme-toggle-btn svg:last-child {
  display: block;
}

/* Dark mode: show sun, hide moon */
.dark .theme-toggle-btn svg:first-child {
  display: block;
}

.dark .theme-toggle-btn svg:last-child {
  display: none;
}

.dark .theme-toggle-btn {
  background: var(--dm-surface-2);
  border-color: var(--dm-border);
  color: var(--ti-green-light);
}

.dark .theme-toggle-btn:hover {
  border-color: var(--ti-green);
  color: var(--ti-green);
  background: rgba(120, 200, 72, 0.1);
}


/* Buttons */
.dark .btn-primary {
  background: var(--ti-green);
  color: #0f1a08;
}

.dark .btn-primary:hover {
  background: var(--ti-green-dark);
  color: #fff;
}

.dark .btn-ghost {
  color: var(--dm-text);
  border-color: rgba(255, 255, 255, 0.2);
}

.dark .btn-ghost:hover {
  background: rgba(120, 200, 72, 0.08);
  border-color: var(--ti-green);
}

/* Section accent badge */
.dark .section-title-accent {
  background: rgba(120, 200, 72, 0.15);
  color: var(--ti-green-light);
}

/* Body text */
.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5 {
  color: var(--dm-text);
}

.dark p {
  color: var(--dm-text-soft);
}

.dark .text-slate-600,
.dark .text-slate-500 {
  color: var(--dm-text-muted) !important;
}

.dark .text-slate-700,
.dark .text-slate-800 {
  color: var(--dm-text-soft) !important;
}

.dark .text-slate-300,
.dark .text-slate-400 {
  color: var(--dm-text-muted) !important;
}

.dark .text-ti-charcoal {
  color: var(--dm-text) !important;
}

.dark .text-ti-charcoal-deep {
  color: var(--dm-text) !important;
}

/* Force dark text on green background sections (like CTAs) in dark mode */
.dark .bg-ti-green .text-ti-charcoal-deep {
  color: #0a1207 !important;
}

.dark .bg-ti-green .text-ti-charcoal-deep\/80 {
  color: rgba(10, 18, 7, 0.8) !important;
}

.dark .bg-ti-green .text-ti-charcoal {
  color: #1a2612 !important;
}


/* Backgrounds */
.dark .bg-white {
  background: var(--dm-surface) !important;
}

.dark .bg-ti-bg {
  background: var(--dm-bg) !important;
}

.dark section.bg-white {
  background: var(--dm-surface) !important;
}

/* Borders */
.dark .border-slate-100 {
  border-color: var(--dm-border) !important;
}

.dark .border-slate-200\/90 {
  border-color: var(--dm-border) !important;
}

/* Cards */
.dark .card-lift {
  background: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
}

.dark .card-lift:hover {
  border-color: var(--ti-green) !important;
  box-shadow: 0 20px 40px -20px rgba(120, 200, 72, 0.2);
}

/* Trust strip / marquee client cards */
.dark .marquee {
  background: var(--dm-bg);
}

.dark .marquee .bg-white {
  background: var(--dm-surface) !important;
}

.dark .marquee .border-slate-200\/90 {
  border-color: var(--dm-border) !important;
}

/* Value prop stat cards */


.dark .bg-ti-charcoal {
  background: #1a2612 !important;
}

.dark .border-slate-200:not(.btn-ghost) {
  border-color: var(--dm-border) !important;
}

/* Portfolio cards */
.dark .portfolio-card {
  background: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
}

.dark .portfolio-card:hover {
  border-color: rgba(120, 200, 72, 0.5) !important;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 8px 16px -4px rgba(120, 200, 72, 0.15);
}

/* "Why Us" dark band — looks great in dark mode already, just tweak text */
.dark .bg-ti-charcoal-deep {
  background: #0a1207 !important;
}

/* Forms */
.dark input,
.dark textarea,
.dark select {
  background: var(--dm-surface-2) !important;
  border-color: var(--dm-border) !important;
  color: var(--dm-text) !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: var(--dm-text-muted) !important;
}

.dark label {
  color: var(--dm-text-soft) !important;
}

/* Industry cards */
.dark .industry-card {
  background: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
}

.dark .industry-card:hover {
  border-color: var(--ti-green) !important;
}

/* Testimonials */
.dark .testimonial-card,
.dark .testimonial {
  background: var(--dm-surface) !important;
  border-color: var(--dm-border) !important;
}

/* CTA section — keep green, it pops in dark mode */
.dark .rounded-3xl.bg-ti-green h2 {
  color: #0a1207 !important;
}

/* Footer */
.dark footer {
  background: #070f05 !important;
}

.dark footer h4 {
  color: var(--dm-text) !important;
}

.dark footer p,
.dark footer li,
.dark footer a {
  color: var(--dm-text-muted) !important;
}

.dark footer a:hover {
  color: var(--ti-green) !important;
}

.dark .border-white\/10 {
  border-color: rgba(120, 200, 72, 0.1) !important;
}

/* Hexagon icons */
.dark .icon-hex--soft {
  --hex-fill: #22301a;
  --hex-stroke: #3a4e2e;
  color: var(--ti-green);
}

.dark .icon-hex--solid {
  --hex-fill: #0a1207;
  --hex-stroke: rgba(120, 200, 72, 0.35);
  color: var(--ti-green);
}

/* =========================================================
   DARK MODE TOGGLE BUTTON
   ========================================================= */
#theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #f3f4f6;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  outline: none;
}

#theme-toggle:hover {
  box-shadow: 0 0 0 3px rgba(120, 200, 72, 0.2);
}

#theme-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

/* Sun icon (light mode) */
#theme-toggle .toggle-sun {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  color: #f59e0b;
  transition: opacity 0.2s ease, transform 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

/* Moon icon (dark mode) */
#theme-toggle .toggle-moon {
  position: absolute;
  right: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

/* Active dark state */
.dark #theme-toggle {
  background: #1a2612;
  border-color: rgba(120, 200, 72, 0.4);
}

.dark #theme-toggle::before {
  transform: translateX(20px);
  background: var(--ti-green);
}

.dark #theme-toggle .toggle-sun {
  opacity: 0;
}

.dark #theme-toggle .toggle-moon {
  opacity: 1;
  color: var(--ti-green-light);
}

/* Mobile toggle in hamburger area */
#theme-toggle-mobile {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  outline: none;
  color: #6b7280;
}

#theme-toggle-mobile:hover {
  background: rgba(120, 200, 72, 0.1);
  border-color: var(--ti-green);
  color: var(--ti-green-dark);
}

.dark #theme-toggle-mobile {
  background: var(--dm-surface-2);
  border-color: var(--dm-border);
  color: var(--ti-green);
}

/* =========================================================
   WHATSAPP FLOATING BUTTON
   ========================================================= */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background-color: #61A934;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(97, 169, 52, 0.4);
  z-index: 50;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #4d8a28;
}

.whatsapp-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #61A934;
  border-radius: 50%;
  z-index: 0;
  animation: wa-sonar 2s infinite;
}

@keyframes wa-sonar {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 640px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}