/* Project base stylesheet
   - Keep Tailwind CDN for utilities
   - Use small custom classes for brand/overrides
*/

/* Brand logo sizing (override Tailwind if arbitrary sizes are used) */
.brand-logo {
  height: 56px; /* compact header height */
  width: auto;  /* keep logo wide if source is horizontal */
  object-fit: contain;
}

/* Header link subtle transparency (mirrors current classes) */
.nav-link {
  opacity: 0.7;
  transition: color 150ms ease, opacity 150ms ease;
}
.nav-link:hover {
  opacity: 1;
}

/* Future custom styles live here */

/* Back-to-top visibility helper (Tailwind handles position/colors) */
.back-to-top.hidden { display: none; }
.back-to-top.show { display: flex; }

/* Floating back-to-top with progress */
.floating-backtop {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0A192F;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
}
.floating-backtop.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}
.floating-backtop .backtop-ring {
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
}
.floating-backtop .backtop-ring circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}
.floating-backtop .backtop-ring .track {
  stroke: rgba(255, 255, 255, 0.25);
}
.floating-backtop .backtop-ring .progress {
  stroke: #00E5FF;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.15s ease;
}
.floating-backtop .icon {
  position: absolute;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
  font-size: 24px;
}

/* Page preloader */
.preloader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 47, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 400ms ease, visibility 400ms ease;
}
.preloader-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.preloader-spinner {
  height: 44px;
  width: 44px;
  border-radius: 9999px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #00E5FF;
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Reveal on load */
.reveal-on-load {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.page-ready .reveal-on-load {
  opacity: 1;
  transform: none;
}

/* Sectors Dropdown Menu - Hover effect for arrow */
#sectorsDropdown:hover span.material-symbols-outlined {
  transform: rotate(180deg);
}

/* Product Cards - Fixed height and text truncation */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card .line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hero cinematic layers */
.hero-section {
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 55%),
              radial-gradient(circle at 80% 30%, rgba(0, 229, 255, 0.15), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero-mesh,
.hero-noise,
.hero-orb {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-section--compact {
  border-radius: 1rem;
}
.hero-section--compact .hero-mesh {
  opacity: 0.25;
  background-size: 120px 120px;
}
.hero-section--compact .hero-orb {
  width: 320px;
  height: 320px;
  top: auto;
  bottom: -60px;
  right: -80px;
}
.hero-section--compact .hero-noise {
  opacity: 0.65;
}
.hero-mesh {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 160px 160px;
  transform: scale(1.1);
  opacity: 0.35;
}
.hero-noise {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  animation: heroNoise 6s steps(10) infinite;
}
.hero-orb {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.45), transparent 60%);
  top: 10%;
  right: -120px;
  filter: blur(10px);
  animation: heroOrb 14s ease-in-out infinite alternate;
}
@keyframes heroNoise {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-30px, 30px, 0); }
}
@keyframes heroOrb {
  0% { transform: translate3d(0, 0, 0) scale(0.95); opacity: 0.8; }
  100% { transform: translate3d(-40px, 20px, 0) scale(1.05); opacity: 0.45; }
}
.hero-slide-bg {
  transition: opacity 360ms ease-out;
}
.hero-slide-fade {
  opacity: 0.6;
}
.hero-title {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25ch;
}
.hero-title span {
  display: inline-block;
  position: relative;
  overflow: hidden;
}
.hero-title span::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateY(110%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85), rgba(0, 229, 255, 0.85));
  mix-blend-mode: screen;
  transition: transform 900ms cubic-bezier(0.23, 1, 0.32, 1);
}
.page-ready .hero-title span::after {
  transform: translateY(-110%);
}

/* Scroll based animation system */
[data-animate] {
  opacity: 0;
  transform-origin: center;
  transition-property: opacity, transform, filter;
  transition-duration: 520ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--animate-delay, 0ms);
  will-change: opacity, transform;
}
[data-animate].is-visible,
.page-ready [data-animate].reveal-on-load {
  opacity: 1;
  transform: none;
  filter: none;
}
[data-animate="fade-up"] {
  transform: translate3d(0, 40px, 0);
}
[data-animate="fade-down"] {
  transform: translate3d(0, -40px, 0);
}
[data-animate="fade-right"] {
  transform: translate3d(-50px, 0, 0);
}
[data-animate="fade-left"] {
  transform: translate3d(50px, 0, 0);
}
[data-animate="scale-in"] {
  transform: scale(0.85);
}
[data-animate="tilt-drop"] {
  transform: translate3d(0, 60px, 0) rotateX(12deg);
  transform-origin: top center;
}
[data-animate="rise-blur"] {
  transform: translate3d(0, 55px, 0);
  filter: blur(12px);
}

/* References slider - manual scroll with drag */
.references-slider-container {
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox - hide bar */
  scrollbar-color: transparent transparent;
  cursor: grab;
  user-select: none;
}
.references-slider-container:active {
  cursor: grabbing;
}
.references-slider-container::-webkit-scrollbar {
  height: 0; /* Chrome/Safari - hide bar */
}
.references-slider-container::-webkit-scrollbar-track {
  background: transparent;
}
.references-slider-container::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 4px;
}
.references-slider-container::-webkit-scrollbar-thumb:hover {
  background-color: transparent;
}
.references-slider-track {
  display: flex;
  padding-left: 0;
  padding-right: 0;
}
.references-slider-item {
  user-select: none;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero-noise {
    animation: none;
  }
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  /* Manual scroll already, no animation to disable */
}

