/* Additions on top of the Tailwind (CDN) styles generated by Stitch. */

html.nl-lock,
html.nl-lock body {
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

[id] {
  scroll-margin-top: 8rem;
}

.nl-toast {
  animation: nl-toast-in 0.2s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}
.nl-toast-out {
  opacity: 0;
  transform: translateY(8px);
}
@keyframes nl-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Home hero ---------- */
.nl-reveal {
  animation: nl-fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes nl-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.nl-rotator {
  display: grid;
  justify-items: start;
}
.nl-rotator > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.3em);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: linear-gradient(90deg, #4cd7f6, #b4c5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nl-rotator > span.is-active {
  opacity: 1;
  transform: none;
}

.nl-search-box:focus-within {
  box-shadow: 0 0 0 4px rgba(76, 215, 246, 0.25), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.nl-chip {
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef0ff;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.nl-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(76, 215, 246, 0.5);
  transform: translateY(-1px);
}

.nl-tilt {
  transition: transform 0.25s ease-out;
  will-change: transform;
}

.nl-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.7s ease, transform 1.4s ease;
}
.nl-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.nl-dot {
  flex: 1;
  padding: 6px 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nl-dot > span {
  display: block;
  position: relative;
  height: 3px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.nl-dot > span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: #4cd7f6;
}
.nl-dot.is-active > span::after {
  animation: nl-progress 5s linear forwards;
}
.is-paused .nl-dot.is-active > span::after {
  animation-play-state: paused;
}
@keyframes nl-progress {
  to { width: 100%; }
}

.nl-bounce {
  animation: nl-bounce 1.8s ease-in-out infinite;
}
@keyframes nl-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .nl-reveal,
  .nl-bounce {
    animation: none;
  }
  .nl-dot.is-active > span::after {
    animation: none;
    width: 100%;
  }
}

/* ---------- Header: home overlays the hero, solid after scroll ---------- */
body[data-page="home"] main {
  padding-top: 0 !important;
}
body[data-page="home"] header {
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s ease;
}
body[data-page="home"]:not(.nl-scrolled) header > div:first-child {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border: 0;
  pointer-events: none;
}
body[data-page="home"]:not(.nl-scrolled) header > div:nth-child(2) {
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border-color: transparent !important;
}
body[data-page="home"]:not(.nl-scrolled) header .font-headline-sm {
  color: #fff !important;
}
body[data-page="home"]:not(.nl-scrolled) header nav a:not([aria-current]) {
  color: rgba(238, 240, 255, 0.82) !important;
}
body[data-page="home"]:not(.nl-scrolled) header nav a:not([aria-current]):hover {
  color: #fff !important;
}
body[data-page="home"]:not(.nl-scrolled) header button {
  color: #eef0ff !important;
}
body[data-page="home"]:not(.nl-scrolled) header button:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* ---------- Clean cards ---------- */
.nl-assist {
  background: linear-gradient(105deg, #0b1f3a 0%, #16345c 52%, #0b1f3a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px -24px rgba(11, 31, 58, 0.55);
}
.product-item,
.resource-card,
.group.bg-surface-container-lowest,
#featured-products-container > div {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-item:hover,
.resource-card:hover,
.group.bg-surface-container-lowest:hover,
#featured-products-container > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -18px rgba(19, 27, 46, 0.22);
}
@media (prefers-reduced-motion: reduce) {
  .product-item:hover,
  .resource-card:hover,
  .group.bg-surface-container-lowest:hover,
  #featured-products-container > div:hover {
    transform: none;
  }
}

@media (max-width: 639px) {
  .nl-hide-mobile {
    display: none !important;
  }
}

/* Catalogue filter sidebar collapses to its header row on small screens. */
@media (max-width: 1023px) {
  .nl-filter-panel {
    position: static !important;
  }
  .nl-filter-panel.nl-collapsed > :not(:first-child) {
    display: none !important;
  }
  .nl-filter-panel.nl-collapsed > :first-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media print {
  header,
  footer,
  aside,
  #compareDrawer,
  #floating-rfq-tray,
  a[href^="https://wa.me"] {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
}
