:root {
  --brand-red: #c9141d;
  --brand-red-dark: #9f1017;
  --brand-navy: #181d3d;
  --brand-blue: #5b8bb0;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--brand-navy);
}

.brand-text {
  color: var(--brand-navy);
}

.brand-red {
  color: var(--brand-red);
}

.bg-brand-navy {
  background-color: var(--brand-navy);
}

.bg-brand-red {
  background-color: var(--brand-red);
}

.border-brand-red {
  border-color: var(--brand-red);
}

.hero-pattern {
  position: relative;
  overflow: hidden;
}

.hero-pattern::before,
.hero-pattern::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background: var(--brand-red);
  opacity: 0.96;
  transform: rotate(45deg);
}

.hero-pattern::before {
  width: 34rem;
  height: 7rem;
  right: -7rem;
  top: 6rem;
}

.hero-pattern::after {
  width: 42rem;
  height: 5.2rem;
  right: -14rem;
  bottom: 5rem;
  background: var(--brand-red-dark);
  opacity: 0.9;
}

.dot-grid {
  background-image: radial-gradient(var(--brand-blue) 2px, transparent 2px);
  background-size: 18px 18px;
}

.diamond-frame {
  position: relative;
}

.diamond-frame::before {
  content: "";
  position: absolute;
  inset: -0.85rem;
  border: 0.55rem solid var(--brand-red);
  transform: rotate(45deg);
  z-index: 0;
}

.diamond-frame > img {
  position: relative;
  z-index: 1;
}

.nav-link.active {
  color: var(--brand-red);
}

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

.nav-link::after {
  content: "";
  display: block;
  height: 2px;
  width: 0;
  margin-top: 4px;
  background: var(--brand-red);
  transition: width 180ms ease;
}

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

.mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 240ms ease, opacity 180ms ease;
}

.mobile-menu.open {
  max-height: 24rem;
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 620ms ease, transform 620ms ease;
}

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

.product-card {
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(24, 29, 61, 0.13);
  border-color: rgba(201, 20, 29, 0.35);
}

.back-to-top {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lightbox-ready {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 13, 31, 0.88);
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox img {
  max-width: min(100%, 72rem);
  max-height: 88vh;
  border-radius: 0.5rem;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.image-lightbox button {
  position: absolute;
  right: 1rem;
  top: 1rem;
  height: 2.75rem;
  width: 2.75rem;
  border-radius: 0.375rem;
  background: #fff;
  color: var(--brand-navy);
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 700;
}

.error-text {
  min-height: 1.25rem;
}

@media (max-width: 767px) {
  .hero-pattern::before {
    width: 18rem;
    height: 4rem;
    right: -7rem;
    top: 2rem;
  }

  .hero-pattern::after {
    width: 22rem;
    height: 3.2rem;
    right: -9rem;
    bottom: 3rem;
  }

  .diamond-frame::before {
    inset: -0.45rem;
    border-width: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Two-per-row galleries (not dependent on pre-built Tailwind output) */
.gallery-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.gallery-2 > img,
.gallery-2 > a > img {
  width: 100%;
  height: 11rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  display: block;
}

.gallery-2.gallery-docs {
  gap: 1.25rem;
}

.gallery-2.gallery-docs > a > img {
  height: 24rem;
  object-fit: contain;
  background: #fff;
}

.gallery-2.gallery-refs {
  gap: 1.25rem;
}

.gallery-2.gallery-refs > img {
  height: 18rem;
}

@media (min-width: 640px) {
  .gallery-2 > img { height: 14rem; }
}

.product-link img {
  background: transparent;
}

.intro-slide { margin-top: 1rem; }
.intro-slide img { width: 100%; height: auto; display: block; border-radius: 0.75rem; box-shadow: 0 10px 30px rgba(24,29,61,.12); }

.bg-cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1024px) { .bg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bg-card { position: relative; min-height: 24rem; border-radius: 0.75rem; overflow: hidden; background-size: cover; background-position: center; display: flex; align-items: flex-end; box-shadow: 0 10px 30px rgba(24,29,61,.15); }
.bg-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(24,29,61,.95) 15%, rgba(24,29,61,.55) 60%, rgba(24,29,61,.25)); }
.bg-card-text { position: relative; padding: 1.5rem; color: #fff; }
.bg-card-text h2 { font-size: 1.5rem; font-weight: 900; }
.bg-card-text p { margin-top: 0.75rem; font-size: 0.95rem; line-height: 1.6; color: #e2e8f0; }

/* No shadows on pictures; intro slide merges with the section background */
main img, .bg-card, .intro-slide img { box-shadow: none !important; }
.intro-slide img { border-radius: 0; }
.intro-section { padding: 0 !important; background: #f8fafc; }
.intro-section .intro-wrap { max-width: none; padding: 0; }
.intro-section .intro-label { max-width: 80rem; margin: 0 auto; padding: 2rem 1rem 0; }
.intro-section .intro-slide { margin: 0 auto; max-width: 80rem; }

/* Fit the whole intro slide inside one screen */
.intro-section { background: #fff; }
.intro-section .intro-slide { max-width: none; display: flex; justify-content: center; background: #fff; }
.intro-section .intro-slide img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 8rem); object-fit: contain; }


/* Hero Image Slider */
.hero-slider {
  position: relative;
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(24, 29, 61, 0.12), 0 8px 10px -6px rgba(24, 29, 61, 0.08);
  background-color: #0f172a;
  touch-action: pan-y;
}

.hero-slider-track-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 0.75rem;
}

.hero-slider-track {
  display: flex;
  width: 100%;
  transition: transform 450ms cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.hero-slider-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 280px;
  overflow: hidden;
  user-select: none;
}

@media (min-width: 640px) {
  .hero-slider-slide {
    height: 380px;
  }
}

@media (min-width: 1024px) {
  .hero-slider-slide {
    height: 440px;
  }
}

.hero-slider-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}

.hero-slider-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.15) 35%, transparent 70%);
}

.hero-slider-caption {
  position: absolute;
  bottom: 1rem;
  left: 1.25rem;
  right: 6.5rem;
  z-index: 2;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .hero-slider-caption {
    font-size: 1.05rem;
    bottom: 1.25rem;
    left: 1.5rem;
  }
}

.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-navy);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
  backdrop-filter: blur(4px);
  padding: 0;
}

.hero-slider-arrow:hover {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(201, 20, 29, 0.35);
}

.hero-slider-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.hero-slider-arrow:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

.hero-slider-prev {
  left: 0.875rem;
}

.hero-slider-next {
  right: 0.875rem;
}

@media (max-width: 639px) {
  .hero-slider-arrow {
    width: 2.35rem;
    height: 2.35rem;
  }
  .hero-slider-prev {
    left: 0.5rem;
  }
  .hero-slider-next {
    right: 0.5rem;
  }
}

.hero-slider-dots {
  position: absolute;
  bottom: 0.95rem;
  right: 1.15rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.45);
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

.hero-slider-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 220ms ease;
}

.hero-slider-dot:hover {
  background: #ffffff;
}

.hero-slider-dot.active {
  background: var(--brand-red);
  width: 1.35rem;
  box-shadow: 0 0 8px rgba(201, 20, 29, 0.7);
}

.hero-slider-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

/* Profile intro split (text + photo as separate elements) */
.profile-split { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 1024px) { .profile-split { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; } }
.profile-brand { display: flex; align-items: center; gap: 0.75rem; }
.profile-brand-logo { height: 2.75rem; width: 2.75rem; border-radius: 9999px; object-fit: contain; }
.profile-brand-name { font-size: 0.85rem; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.02em; color: var(--brand-navy); }
.profile-dots { width: 7.5rem; height: 5rem; margin-top: 2rem; }
.profile-split-media { position: relative; }
.profile-split-media::before { content: ""; position: absolute; inset: 1rem -0.75rem -0.75rem 1rem; background: var(--brand-red); border-radius: 0.75rem; z-index: 0; }
.profile-split-media img { position: relative; z-index: 1; display: block; width: 100%; height: 20rem; object-fit: cover; border-radius: 0.75rem; }
@media (min-width: 640px) { .profile-split-media img { height: 26rem; } }
@media (min-width: 1024px) { .profile-split-media img { height: 32rem; } }
.intro-section { background: #fff; }

/* Team grid */
.team-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (min-width: 768px) { .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
@media (min-width: 1024px) { .team-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.team-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top center; border-radius: 0.5rem; border: 1px solid #e2e8f0; }
.team-name { margin-top: 0.75rem; font-size: 1.05rem; font-weight: 900; color: var(--brand-navy); }
.team-role { margin-top: 0.15rem; font-size: 0.9rem; color: #475569; }


/* Homepage & Products 2-column card grid (2 per row on desktop, 1 per row on mobile) */
.home-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .home-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

.home-product { display: flex; }
.home-product-link { display: flex; flex-direction: column; width: 100%; padding: 0.75rem; color: inherit; text-decoration: none; }
@media (min-width: 640px) { .home-product-link { padding: 1.25rem; } }
.home-product-media { display: flex; align-items: center; justify-content: center; height: 11rem; }
@media (min-width: 640px) { .home-product-media { height: 15rem; } }
@media (min-width: 1024px) { .home-product-media { height: 18rem; } }
.home-product-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border: 0; border-radius: 0; }
.home-product-name { margin-top: 0.9rem; font-size: 1rem; font-weight: 900; line-height: 1.2; color: var(--brand-navy); }
@media (min-width: 640px) { .home-product-name { font-size: 1.25rem; } }
.home-product-type { margin-top: 0.35rem; font-size: 0.8rem; color: #475569; }
@media (min-width: 640px) { .home-product-type { font-size: 0.9rem; } }
.home-product-link:hover .home-product-name, .home-product-link:focus-visible .home-product-name { color: var(--brand-red); }
.home-product-link:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; border-radius: 0.5rem; }
.product-name-link { color: inherit; text-decoration: none; }
.product-name-link:hover, .product-name-link:focus-visible { color: var(--brand-red); }


/* --- Professional Website Polish & Micro-Interactions --- */

/* Header scroll state */
header {
  transition: box-shadow 260ms ease, border-color 260ms ease, background-color 260ms ease;
}
header.is-scrolled {
  box-shadow: 0 4px 20px -2px rgba(24, 29, 61, 0.08);
  border-bottom-color: rgba(226, 232, 240, 0.85);
}

/* Polished reveal entrance with custom cubic-bezier */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1), transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered cascade entrance for product & feature grids */
.home-products-grid > *:nth-child(1) { transition-delay: 40ms; }
.home-products-grid > *:nth-child(2) { transition-delay: 90ms; }
.home-products-grid > *:nth-child(3) { transition-delay: 140ms; }
.home-products-grid > *:nth-child(4) { transition-delay: 190ms; }
.home-products-grid > *:nth-child(5) { transition-delay: 240ms; }
.home-products-grid > *:nth-child(6) { transition-delay: 290ms; }

.team-grid > *:nth-child(1) { transition-delay: 40ms; }
.team-grid > *:nth-child(2) { transition-delay: 90ms; }
.team-grid > *:nth-child(3) { transition-delay: 140ms; }
.team-grid > *:nth-child(4) { transition-delay: 190ms; }
.team-grid > *:nth-child(5) { transition-delay: 240ms; }

/* Product cards: smooth hover lift and refined shadow */
.product-card {
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1), border-color 280ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px -4px rgba(24, 29, 61, 0.12), 0 6px 12px -2px rgba(24, 29, 61, 0.06);
  border-color: rgba(201, 20, 29, 0.4);
}

.home-product-media img,
.product-card img {
  transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.product-card:hover .home-product-media img,
.product-card:hover img {
  transform: scale(1.035);
}

/* PDF Literature Indicator Badge */
.pdf-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-red);
  background: rgba(201, 20, 29, 0.07);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  margin-top: 0.5rem;
  align-self: flex-start;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.home-product-link:hover .pdf-badge,
.home-product-link:focus-visible .pdf-badge,
.product-name-link:hover .pdf-badge,
.product-name-link:focus-visible .pdf-badge {
  background: var(--brand-red);
  color: #ffffff;
  transform: translateX(2px);
}

/* Button & Link Polish */
a[class*="bg-brand-navy"],
a[class*="bg-brand-red"],
button[type="submit"] {
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

a[class*="bg-brand-navy"]:hover,
a[class*="bg-brand-red"]:hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(24, 29, 61, 0.25);
}

a[class*="bg-brand-navy"]:active,
a[class*="bg-brand-red"]:active,
button[type="submit"]:active {
  transform: translateY(0) scale(0.98);
}

/* Form input focus polish */
input[type="text"],
input[type="email"],
textarea {
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--brand-red) !important;
  box-shadow: 0 0 0 3px rgba(201, 20, 29, 0.15) !important;
  outline: none;
}

/* Gallery image transitions */
.gallery-2 > img,
.gallery-2 > a > img {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), border-color 200ms ease;
  will-change: transform;
}
.gallery-2 > img:hover,
.gallery-2 > a > img:hover {
  transform: scale(1.02);
  border-color: rgba(201, 20, 29, 0.3);
}

/* Back-to-top button enhancement */
.back-to-top {
  transition: opacity 220ms ease, transform 220ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(201, 20, 29, 0.35);
}

/* Universal keyboard focus-visible outline for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-red);
  outline-offset: 2px;
}

/* Prefers-reduced-motion safety */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .product-card:hover,
  .product-card:hover img,
  .home-product-media img,
  .gallery-2 > img:hover,
  .gallery-2 > a > img:hover {
    transform: none !important;
  }
}


/* --- Product Card Split Layout: Text on Left, Image on Right --- */
.product-card-split {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .product-card-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 1.5rem;
  }
}

.product-card-split .product-card-text {
  min-width: 0;
}

.product-card-split .product-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-split .product-card-media a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.product-card-split .product-card-media img {
  max-height: 14.5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card-media img {
  transform: scale(1.04);
}
