/* Scroll navigation, soft carousel, reading reveals, and the technology scene. */
:root { --header-height: clamp(76px, 5.47vw, 105px); }
html { scroll-padding-top: var(--header-height); }
section, footer { scroll-margin-top: 0; }
.site-header {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  height: var(--header-height);
  padding: 0 5%;
  z-index: 100;
  color: #fff;
  isolation: isolate;
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 8, 14, .91);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 8px 28px #0002;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity .55s ease;
}
.site-header.is-scrolled::before,
.site-header.menu-open::before { opacity: 1; }
.site-header .logo-link { width: clamp(145px, 11.3vw, 217px); }
.site-header .desktop-nav { gap: clamp(22px, 3.8vw, 73px); font-size: clamp(13px, .94vw, 18px); }
.site-header .header-actions { margin-left: clamp(25px, 2.24vw, 43px); gap: clamp(28px, 2.3vw, 44px); }
.site-header .search-toggle { width: 21px; height: 24px; }
.site-header .nav-separator { height: 18px; }
.hero-swiper .swiper-slide { transition-timing-function: cubic-bezier(.22, .61, .36, 1); }
.hero-swiper .swiper-slide img {
  transform: scale(1.045);
  transition: transform 8s cubic-bezier(.16, .35, .36, 1);
  will-change: transform;
}
.hero-swiper .swiper-slide-active img { transform: scale(1); }
.factory-swiper .swiper-slide { transition-timing-function: cubic-bezier(.22, .61, .36, 1); }

/* Scroll-driven reading: grey first, then ink advances from left to right. */
.section-heading h2 {
  --heading-grey: #bdbdbd;
  --heading-ink: #000;
  background: none;
  color: var(--heading-grey);
}
.heading-reveal-text {
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
  background-image: linear-gradient(90deg, var(--heading-ink) calc(var(--heading-edge, -10%) - 10%), var(--heading-grey) calc(var(--heading-edge, -10%) + 10%));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.technology .section-heading h2, .news .section-heading h2 {
  --heading-grey: #858890;
  --heading-ink: #fff;
}

/* PSD border: a complete, consistently thin capsule with a continuous gradient. */
.section-tag {
  position: relative;
  isolation: isolate;
  border-color: transparent;
  overflow: visible;
  background: transparent;
  transition: color .35s ease, box-shadow .5s ease;
}
.section-tag.tag-dark { border-color: transparent; }
.section-tag:is(:hover, :focus-visible) {
  background: transparent;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 5px 18px #a30b4014;
}
.section-tag .tag-label {
  display: inline-block;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.section-tag > i { transition: transform .5s cubic-bezier(.22, .61, .36, 1), background-color .35s ease; }
.section-tag:is(:hover, :focus-visible) .tag-label { transform: translateX(2px); }
.section-tag:is(:hover, :focus-visible) > i { background: #fff; transform: translateX(-2px) scale(1.08); }
.tag-border {
  --tag-stop-0: #8b0037;
  --tag-stop-1: #a11045;
  --tag-stop-2: #b9426d;
  --tag-stop-3: #d57f9d;
  --tag-stop-4: #efb9ca;
  --tag-stop-5: #fedae5;
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  overflow: visible;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}
.tag-dark .tag-border {
  --tag-stop-0: #fff; --tag-stop-1: #dedfe1; --tag-stop-2: #b6b8bc;
  --tag-stop-3: #8b8e93; --tag-stop-4: #5d6066; --tag-stop-5: #393d43;
}
.tag-border .tag-outline {
  fill: none;
  stroke-width: clamp(.75px, calc(1 * var(--u)), 1px);
  vector-effect: non-scaling-stroke;
}
.tag-border stop { transition: stop-color .45s ease; }
.tag-border .tag-fill {
  fill: var(--accent);
  opacity: 0;
  transition: opacity .5s ease;
}
.section-tag:is(:hover, :focus-visible) .tag-fill { opacity: 1; }
.section-tag:is(:hover, :focus-visible) .tag-border {
  --tag-stop-0: #e06b91; --tag-stop-1: #d4547f; --tag-stop-2: #c83d6c;
  --tag-stop-3: #ba285a; --tag-stop-4: #ad1647; --tag-stop-5: #a30b40;
}

/* Fixed background with gently shifting position; both card columns are in flow. */
.technology {
  height: auto;
  min-height: calc(1568 * var(--u));
  background: #03060b url('../image/technology.jpg') center / 100% auto no-repeat;
  overflow: clip;
}
.technology-backdrop {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, transparent 35%, #03060b38 70%, #03060b66), url('../image/technology.jpg');
  background-size: cover;
  background-position: center calc(50% + var(--parallax-y, 0px));
  background-repeat: no-repeat;
  background-attachment: fixed;
  pointer-events: none;
}
.technology-backdrop::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: calc(350 * var(--u));
  background: linear-gradient(#03060bf5 0%, #03060bc9 52%, transparent);
}
.technology .section-heading { z-index: 2; }
/* Empty card-viewport space must not intercept the heading button's pointer. */
.technology-cards-viewport { pointer-events: none; }
.technology-cards {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: calc(64 * var(--u)) calc(48 * var(--u));
  width: calc(923 * var(--u));
  margin-left: calc(899 * var(--u));
  padding-top: calc(400 * var(--u));
  padding-bottom: calc(220 * var(--u));
}
.technology-cards .tech-card {
  --tech-edge-radius: calc(15 * var(--u));
  border-radius: var(--tech-edge-radius);
  pointer-events: auto;
  isolation: isolate;
  position: relative;
  inset: auto;
  width: 100%;
  height: calc(442 * var(--u));
  min-width: 0;
  overflow: visible;
  transform: translateY(var(--card-shift, 0px));
  transition: background .45s ease, border-color .45s ease, color .45s ease, box-shadow .45s ease;
}
.technology-cards .tech-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(135deg, #28354570, #111923b3);
  opacity: 0;
  transition: opacity .45s ease;
}
/* Both opposing highlights travel together; half a turn exchanges their positions. */
@property --tech-edge-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.technology-cards .tech-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: clamp(.75px, calc(1 * var(--u)), 1px);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background:
    conic-gradient(from var(--tech-edge-angle),
      #ff005c00 0deg, #ff005c00 45deg, #ff005c20 70deg, #ff005c90 106deg, #ff005c 135deg, #ff005c30 160deg, #ff005c00 180deg,
      #ff005c00 225deg, #ff005c20 250deg, #ff005c90 286deg, #ff005c 315deg, #ff005c30 340deg, #ff005c00 360deg) center / 100% 100%,
    linear-gradient(#ff005c12, #ff005c12) center / 100% 100%;
  background-repeat: no-repeat;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  transition: opacity .45s ease;
  animation: tech-edge-flow 9s linear infinite;
  animation-play-state: paused;
}
.technology.in-view .tech-card:hover::after { animation-play-state: running; }
@keyframes tech-edge-flow { from { --tech-edge-angle: 0deg; } to { --tech-edge-angle: 360deg; } }
.technology-cards .tech-card:nth-child(even) { top: calc(120 * var(--u)); }
.technology-cards .tech-card:hover {
  background: transparent;
  border-color: transparent;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 50px #0002;
  color: #fff;
}
.technology-cards .tech-card:hover::before { opacity: 1; }
.technology-cards .tech-card:hover::after { opacity: 1; }
.technology-cards .tech-card:hover { transform: translateY(var(--card-shift, 0px)); }
.tech-card h3 { white-space: normal; }
.technology-cards .tech-card:hover .tech-number { color: #fff; -webkit-text-stroke: 0; }
.tech-card > p { transition: color .45s ease; }
.tech-card:hover > p { color: #ccd0d7; }
.particle-wave {
  position: absolute;
  top: calc(410 * var(--u));
  left: 0;
  width: 100%;
  height: calc(600 * var(--u));
  z-index: 1;
  pointer-events: none;
  mask-image: linear-gradient(transparent, #000 4%, #000 46%, transparent 55%);
  -webkit-mask-image: linear-gradient(transparent, #000 4%, #000 46%, transparent 55%);
}
.particle-wave > canvas { display: block; width: 100%; height: 100%; }
/* CountUp updates a single live value; reserve final width to keep units still. */
.stat-value strong, .aboutpage-stat-value strong { position: relative; display: inline-block; }
.stat-number-placeholder { visibility: hidden; }
.stat-count { position: absolute; top: 0; left: 0; white-space: nowrap; line-height: inherit; }
.particles-ready > .stage-background { opacity: 0; }
.manufacturing .stats { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.manufacturing .section-heading, .manufacturing .factory-preview { z-index: 3; }

@media (min-width: 768px) and (max-width: 1100px) {
  .site-header { padding: 0 4%; }
  .site-header .desktop-nav { gap: 22px; font-size: 12px; }
  .site-header .header-actions { margin-left: 24px; gap: 25px; }
}
@media (max-width: 767px) {
  .site-header { padding: 0 24px; height: 76px; }
  .site-header .logo-link { width: 145px; }
  .site-header .desktop-nav { top: 76px; left: 0; width: 100%; gap: 0; font-size: 16px; }
  .site-header .header-actions { margin-left: auto; gap: 24px; }
  .technology { min-height: 0; padding: 55px 20px 45px; }
  .technology-backdrop {
    background-attachment: scroll;
    background-position: 25% center;
    background-size: auto 100%;
    opacity: .7;
  }
  .technology-backdrop::after { height: 260px; }
  .technology-cards { width: 100%; margin: 110px 0 0; padding: 0; gap: 18px; grid-template-columns: 1fr; }
  .technology-cards .tech-card { --tech-edge-radius: 14px; height: 310px; transform: none; }
  .technology-cards .tech-card:nth-child(even) { top: auto; }
  .technology-cards .tech-card:last-child { margin-bottom: 0; }
  .particle-wave { top: 280px; height: 420px; mask-image: linear-gradient(transparent, #000 4%, #000 76%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 4%, #000 76%, transparent); }
  .manufacturing .stats { position: relative; inset: auto; margin: 46px 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .technology-cards .tech-card::after { animation: none; }
  .heading-reveal-text { background: none; color: var(--heading-ink); -webkit-text-fill-color: currentColor; }
  .hero-swiper .swiper-slide img { transform: none; transition: none; }
  .technology-backdrop { background-attachment: scroll; background-position: center; }
  .technology-cards .tech-card { transform: none; }
}
