/* ============================================================
   VAARDENTAL — DESIGN SYSTEM
   Direction: "Precision Instrument" — blueprint calibration marks,
   spec-sheet typography, engineered grid. Inspired by the visual
   language of CNC / metrology / medical-device manufacturers.
   Palette kept from brand: navy / blue / ice / red.
   ============================================================ */

:root {
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --navy: #1D3557;
  --ink: #0E1B2C;
  --blue: #457B9D;
  --blue-deep: #2F5B77;
  --ice: #A8DADC;
  --red: #E63946;
  --paper: #F5F7F8;
  --paper-2: #EDF1F2;
  --line: rgba(14, 27, 44, 0.12);
  --line-soft: rgba(14, 27, 44, 0.07);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
}

.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ==================== BLUEPRINT GRID BACKGROUND ==================== */
.blueprint-grid {
  background-image:
    linear-gradient(rgba(69, 123, 157, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 123, 157, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
}

.blueprint-grid-dark {
  background-image:
    linear-gradient(rgba(168, 218, 220, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 218, 220, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
}

.dot-grid {
  background-image: radial-gradient(rgba(29, 53, 87, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* ==================== LIGHT HERO ==================== */
.hero-light-grid {
  background-image:
    linear-gradient(rgba(69, 123, 157, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 123, 157, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, black 40%, transparent 90%);
}

.precision-ring {
  border: 1px dashed rgba(29, 53, 87, 0.18);
  border-radius: 50%;
  animation: ring-spin 40s linear infinite;
}

@keyframes ring-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ==================== SIGNATURE: CALIBRATION CORNER BRACKETS ==================== */
.bracket-frame {
  position: relative;
}

.bracket-frame::before,
.bracket-frame::after,
.bracket-frame .bf-tr,
.bracket-frame .bf-bl {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--blue);
  transition: all .35s ease;
  z-index: 5;
}

.bracket-frame::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.bracket-frame::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

.bracket-frame .bf-tr {
  top: -1px;
  right: -1px;
  border-top: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
}

.bracket-frame .bf-bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
}

.bracket-frame:hover::before,
.bracket-frame:hover::after,
.bracket-frame:hover .bf-tr,
.bracket-frame:hover .bf-bl {
  width: 26px;
  height: 26px;
  border-color: var(--red);
}

.bracket-frame-light::before,
.bracket-frame-light::after,
.bracket-frame-light .bf-tr,
.bracket-frame-light .bf-bl {
  border-color: rgba(255, 255, 255, 0.55);
}

/* ==================== SPEC LABEL / EYEBROW ==================== */
.spec-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-deep);
}

.spec-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--red);
}

/* ==================== BUTTONS ==================== */
.btn-precision {
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  isolation: isolate;
}

.btn-precision::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  z-index: -1;
}

.btn-precision:hover::before {
  transform: translateX(0);
}

/* ==================== MARQUEE ==================== */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

/* ==================== COUNTER / STAT REVEAL ==================== */
.stat-num {
  font-variant-numeric: tabular-nums;
}

/* ==================== NAVBAR ==================== */
#site-header {
  transition: top .4s cubic-bezier(.16, 1, .3, 1), background-color .3s ease, box-shadow .3s ease;
  color: var(--ink);
}

#utility-bar {
  transition: height .4s cubic-bezier(.16, 1, .3, 1), opacity .25s ease;
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px rgba(14, 27, 44, 0.08);
}

#site-header:not(.scrolled) {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
}

#site-header .nav-link,
#site-header #logo-word {
  color: var(--ink);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width .3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ==================== PRODUCT CATEGORY CARD ==================== */
.category-card {
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), box-shadow .45s ease;
}

.category-card:hover {
  transform: translateY(-6px);
}

.category-card .cat-index {
  font-family: var(--font-mono);
  -webkit-text-stroke: 1px rgba(29, 53, 87, 0.25);
  color: transparent;
}

/* ==================== SPEC SHOWCASE SLIDER (custom, no library) ==================== */
.spot-slide {
  transition: opacity .6s ease;
}

/* ==================== PROCESS RAIL ==================== */
.process-line {
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px);
}

/* ==================== TESTIMONIAL RAIL ==================== */
.tcard {
  scroll-snap-align: start;
}

.trail {
  scroll-snap-type: x mandatory;
}

.trail::-webkit-scrollbar {
  display: none;
}

.trail {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==================== ACCORDION ==================== */
.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s cubic-bezier(.16, 1, .3, 1);
}

.acc-item.open .acc-panel {
  max-height: 300px;
}

.acc-item .acc-icon {
  transition: transform .35s ease;
}

.acc-item.open .acc-icon {
  transform: rotate(45deg);
}

/* ==================== FADE-UP ON SCROLL ==================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1);
}

.reveal-from-left {
  transform: translateX(-56px);
}

.reveal-from-right {
  transform: translateX(56px);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal.in.reveal-from-left,
.reveal.in.reveal-from-right {
  transform: translateX(0);
}

.reveal-delay-1 {
  transition-delay: 90ms;
}

.reveal-delay-2 {
  transition-delay: 180ms;
}

.reveal-delay-3 {
  transition-delay: 270ms;
}

/* ==================== MISC ==================== */
.text-outline {
  -webkit-text-stroke: 1px var(--navy);
  color: transparent;
}

.clip-corner {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes processLineMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.animate-process-line {
  animation: processLineMove 5s ease-in-out infinite;
}