/* Custom styles that supplement Tailwind */

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #0EA5E9;
  transition: width 0.3s ease;
}

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

/* Hero video */
.hero-video-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.88) 45%, rgba(10, 52, 54, 0.82) 100%);
  z-index: 1;
}

#hero {
  min-height: 100svh;
}

@supports (min-height: 100dvh) {
  #hero {
    min-height: 100dvh;
  }
}

.hero-content {
  width: 100%;
  padding-top: 6.5rem;
  padding-bottom: 3rem;
}

/* Product card hover */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-card .product-image {
  transition: transform 0.4s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Category card */
.category-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Keep "How Terul Engages" cards aligned consistently */
.capability-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.capability-col ul {
  margin-top: auto;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(37, 99, 168, 0.12);
}

/* Mobile nav drawer */
.mobile-nav {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

/* Filter tab active state */
.filter-tab {
  position: relative;
  transition: color 0.3s ease;
}

.filter-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2563A8;
  transition: width 0.3s ease;
}

.filter-tab.active {
  color: #2563A8;
  font-weight: 600;
}

.filter-tab.active::after {
  width: 100%;
}

/* Form input focus */
.form-input {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  border-color: #2563A8;
  box-shadow: 0 0 0 3px rgba(37, 99, 168, 0.15);
  outline: none;
}

/* Spec table zebra */
.spec-table tr:nth-child(even) {
  background-color: #F8F9FA;
}

/* Scroll-triggered animation defaults — no pre-hiding needed; gsap.from() sets start state */
.gsap-fade-up {
  /* opacity and transform are handled entirely by GSAP at runtime */
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gsap-fade-up {
    opacity: 1;
    transform: none;
  }
}

/* ================================================================== */
/*  Holographic 3D Card Effect                                        */
/* ================================================================== */
.holographic-card {
  position: relative;
  /* Shiny fluorescent silver background */
  background: linear-gradient(135deg, #fdfdfd 0%, #e2e6eb 40%, #c5cbd3 60%, #e2e6eb 80%, #ffffff 100%);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.3),
    inset 2px 2px 4px rgba(255, 255, 255, 1),
    inset -2px -2px 5px rgba(0, 0, 0, 0.1),
    inset 0 0 20px rgba(255, 255, 255, 0.6);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease;
  will-change: transform;
}

/* Holographic dynamic gradient overlay */
.holographic-sheen {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 120, 200, 0.25) 15%,
      rgba(100, 220, 255, 0.25) 30%,
      rgba(120, 255, 120, 0.25) 45%,
      rgba(255, 220, 100, 0.25) 60%,
      rgba(255, 255, 255, 0) 75%);
  filter: blur(15px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.holographic-card:hover {
  box-shadow:
    0 35px 60px -10px rgba(0, 0, 0, 0.4),
    inset 2px 2px 5px rgba(255, 255, 255, 1),
    inset -2px -2px 5px rgba(0, 0, 0, 0.1),
    inset 0 0 30px rgba(255, 255, 255, 0.8);
}

.holographic-card:hover .holographic-sheen {
  opacity: 1;
}

/* Content lifted above the background in 3D space */
.holographic-content {
  position: relative;
  z-index: 2;
  transform: translateZ(50px);
  transform-style: preserve-3d;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Embossed effect for silver background */
.embossed-text {
  color: #7b8694;
  /* Metallic gray text color */
  text-shadow:
    1.5px 1.5px 2px rgba(255, 255, 255, 1),
    -1px -1px 2px rgba(0, 0, 0, 0.15);
}

.embossed-logo {
  filter:
    drop-shadow(1.5px 1.5px 2px rgba(255, 255, 255, 1)) drop-shadow(-1px -1px 2px rgba(0, 0, 0, 0.15));
}

/* ================================================================== */
/*  Film Grain / Noise Texture Overlay                                */
/* ================================================================== */
.grain-overlay {
  position: relative;
}

.grain-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ================================================================== */
/*  Cursor Spotlight Effect                                           */
/* ================================================================== */
.cursor-spotlight {
  position: relative;
  overflow: hidden;
}

.cursor-spotlight .spotlight-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(600px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
    rgba(14, 165, 233, 0.07) 0%,
    transparent 70%);
}

.cursor-spotlight:hover .spotlight-layer {
  opacity: 1;
}

/* ================================================================== */
/*  Gradient Text                                                     */
/* ================================================================== */
.text-gradient-blue {
  background: linear-gradient(135deg, #3B82F6 0%, #0EA5E9 50%, #3B82F6 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ================================================================== */
/*  Animated Gradient Border on Cards                                 */
/* ================================================================== */
.glow-border {
  position: relative;
  border: none !important;
  background: transparent;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    rgba(14, 165, 233, 0.05) 0%,
    rgba(59, 130, 246, 0.4) 25%,
    rgba(14, 165, 233, 0.05) 50%,
    rgba(59, 130, 246, 0.4) 75%,
    rgba(14, 165, 233, 0.05) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-rotate 4s linear infinite;
  z-index: 0;
}

.glow-border > * {
  position: relative;
  z-index: 1;
}

@keyframes border-rotate {
  to { --border-angle: 360deg; }
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ================================================================== */
/*  Infinite Marquee                                                  */
/* ================================================================== */
.marquee-wrapper {
  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%);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

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

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

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  white-space: nowrap;
  color: #9CA3AF;
  font-size: 0.875rem;
}

.marquee-item::after {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.4);
  flex-shrink: 0;
}

@media (max-width: 767px) {
  #hero {
    align-items: flex-start;
  }

  .hero-content {
    padding-top: 7rem;
    padding-bottom: 2.5rem;
  }

  .hero-eyebrow {
    margin-bottom: 1rem;
  }

  .hero-eyebrow span {
    max-width: 18rem;
    justify-content: center;
    padding: 0.625rem 0.875rem;
    font-size: 0.625rem;
    line-height: 1rem;
  }

  .hero-headline {
    font-size: clamp(2.45rem, 11vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
  }

  .hero-sub {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
  }

  .hero-ctas {
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .hero-ctas .btn-outline,
  .hero-ctas .btn-primary {
    width: 100%;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .marquee-wrapper {
    max-width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  }

  .marquee-track {
    animation-duration: 24s;
  }

  .marquee-item {
    gap: 1rem;
    padding: 0 1rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 399px) {
  .hero-content {
    padding-top: 6.5rem;
  }

  .hero-headline {
    font-size: clamp(2.15rem, 12vw, 3rem);
  }
}

/* ================================================================== */
/*  Why-Terul Card Micro-Interactions                                 */
/* ================================================================== */
.why-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(37, 99, 168, 0.1);
}

/* Hamburger icon */
.hamburger-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}
