/* ============================================================
   INNOTECH PRECISION COMPONENTS (M) SDN. BHD.
   Design system — dark industrial premium
   Palette: #000 / #0A0A0A / #FFF / red #E31501
   Fonts: Poppins (headings) + Inter (body)
   ============================================================ */

:root {
  --black: #000000;
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #181818;
  --line: rgba(255, 255, 255, 0.08);
  --white: #ffffff;
  --grey: #a3a8b0;
  --grey-dark: #6b7078;
  --red: #e31501;
  --red-soft: #cc3f2c;
  --red-glow: rgba(227, 21, 1, 0.35);
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --nav-h: 84px;
  --radius: 14px;
  --container: 1240px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--red); color: var(--white); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; }
.h-display { font-size: clamp(2.4rem, 5.2vw, 4.4rem); font-weight: 700; letter-spacing: -0.02em; }
.h-1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.015em; }
.h-2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.h-3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
.lead { font-size: clamp(1.02rem, 1.3vw, 1.18rem); color: var(--grey); max-width: 62ch; }
.text-red, .hl { color: var(--red); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--grey);
}
.eyebrow::before { content: ''; width: 34px; height: 1px; background: var(--red); }

/* ---------- layout ---------- */
.container { width: min(var(--container), 92vw); margin-inline: auto; }
.section { padding: clamp(84px, 10vw, 148px) 0; position: relative; }
.section--tight { padding: clamp(56px, 7vw, 96px) 0; }
.section-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head .h-1, .section-head .h-2 { margin: 14px 0 18px; }
.section-num {
  position: absolute; top: clamp(30px, 4vw, 60px); right: 4vw;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(4rem, 9vw, 8rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  pointer-events: none; user-select: none;
}

/* split layouts */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.split--rev > :first-child { order: 2; }
.split--rev > :last-child { order: 1; }

/* ---------- media frames ---------- */
.frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.frame::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); pointer-events: none;
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.frame:hover img { transform: scale(1.045); }
.frame--tag { position: relative; }
.frame-tag {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-left: 3px solid var(--red);
  padding: 8px 16px; font-family: var(--font-head); font-size: 0.82rem; font-weight: 500;
  border-radius: 6px;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--red);
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 16px 34px; border-radius: 999px; overflow: hidden;
  color: var(--white); background: var(--btn-bg);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.35s;
  will-change: transform;
}
.btn .btn-arrow { transition: transform 0.35s var(--ease-out); font-size: 1.05em; line-height: 1; }
.btn:hover { box-shadow: 0 10px 34px var(--red-glow); }
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn::before {
  content: ''; position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-22deg); transition: left 0.6s var(--ease-out);
}
.btn:hover::before { left: 130%; }
.btn--ghost {
  background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28);
}
.btn--ghost:hover { background: var(--red); box-shadow: inset 0 0 0 1.5px var(--red), 0 10px 34px var(--red-glow); }
.btn--sm { padding: 12px 26px; font-size: 0.88rem; }

/* ---------- preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--black);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.pre-inner { text-align: center; width: min(720px, 88vw); }
.pre-ring-wrap {
  position: relative; width: clamp(200px, 42vw, 280px); aspect-ratio: 1;
  margin: 0 auto; display: flex; align-items: center; justify-content: center;
}
.pre-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.pre-ring circle { fill: none; stroke-width: 3; }
.pre-ring-track { stroke: rgba(255, 255, 255, 0.08); }
.pre-ring-fill {
  stroke: var(--red); stroke-linecap: round;
  stroke-dasharray: 565.487; stroke-dashoffset: 565.487;
  filter: drop-shadow(0 0 10px var(--red-glow));
}
.pre-count {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1; color: var(--white);
  letter-spacing: -0.03em;
}
.pre-count .pct { color: var(--red); font-size: 0.4em; vertical-align: super; }
.pre-lines { margin-top: 40px; min-height: 4.6em; }
.pre-line {
  font-family: var(--font-head); opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.pre-line.show { opacity: 1; transform: translateY(0); }
.pre-line-1 { font-size: clamp(1.05rem, 2.4vw, 1.6rem); font-weight: 600; }
.pre-line-1 .hl { color: var(--red); }
.pre-line-2 { font-size: clamp(0.85rem, 1.6vw, 1.05rem); color: var(--grey); margin-top: 10px; font-weight: 400; }
/* short version for inner pages */
#preloader.quick .pre-ring-wrap, #preloader.quick .pre-lines { display: none; }
#preloader .pre-logo-mini { display: none; }
#preloader.quick .pre-logo-mini {
  display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  letter-spacing: 0.2em;
}
#preloader.quick .pre-logo-mini span { color: var(--red); }

/* ---------- progress bar / cursor ---------- */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--red); z-index: 950; box-shadow: 0 0 12px var(--red-glow);
}
#cursor-dot {
  position: fixed; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); pointer-events: none; z-index: 990;
  transform: translate(-50%, -50%); transition: width 0.25s, height 0.25s, opacity 0.25s;
  opacity: 0;
}
#cursor-ring {
  position: fixed; top: 0; left: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(227, 21, 1, 0.55); pointer-events: none; z-index: 989;
  transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, border-color 0.3s, opacity 0.3s;
  opacity: 0;
}
body.cursor-on #cursor-dot, body.cursor-on #cursor-ring { opacity: 1; }
body.cursor-hover #cursor-ring { width: 56px; height: 56px; border-color: var(--red); }
@media (hover: none), (max-width: 900px) { #cursor-dot, #cursor-ring { display: none !important; } }

/* ---------- navigation ---------- */
#site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background 0.4s, box-shadow 0.4s, transform 0.45s var(--ease-out);
}
#site-nav .nav-inner {
  width: min(1360px, 94vw); margin-inline: auto; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
#site-nav.scrolled {
  background: rgba(5, 5, 5, 0.82); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
#site-nav.hidden { transform: translateY(-100%); }
.nav-logo img { height: 54px; width: auto; border-radius: 6px; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav-links > li { position: relative; }
.nav-link {
  position: relative; font-family: var(--font-head); font-size: 0.92rem; font-weight: 500;
  padding: 8px 2px; color: rgba(255, 255, 255, 0.85); transition: color 0.3s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active { color: var(--white); }
.nav-link.active::after { transform: scaleX(1); }
.nav-caret { font-size: 0.6rem; transition: transform 0.3s; }
/* dropdown */
.nav-drop {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 230px; background: rgba(10, 10, 10, 0.96); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0.3s;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.nav-links li:hover .nav-drop, .nav-links li:focus-within .nav-drop {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-links li:hover .nav-caret { transform: rotate(180deg); }
.nav-drop a {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 8px;
  font-family: var(--font-head); font-size: 0.9rem; font-weight: 500; color: rgba(255, 255, 255, 0.82);
  transition: background 0.25s, color 0.25s, padding-left 0.25s;
}
.nav-drop a::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--red); opacity: 0; transition: opacity 0.25s; }
.nav-drop a:hover { background: rgba(227, 21, 1, 0.12); color: var(--white); padding-left: 20px; }
.nav-drop a:hover::before { opacity: 1; }
.nav-cta { margin-left: 8px; }
/* burger */
#nav-burger { display: none; flex-direction: column; gap: 6px; padding: 10px; z-index: 960; }
#nav-burger span { display: block; width: 26px; height: 2px; background: var(--white); transition: transform 0.35s var(--ease-out), opacity 0.3s; }
#nav-burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#nav-burger.open span:nth-child(2) { opacity: 0; }
#nav-burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/* mobile menu */
#mobile-menu {
  position: fixed; inset: 0; z-index: 940; background: rgba(4, 4, 4, 0.98);
  display: flex; flex-direction: column; justify-content: center; padding: 100px 8vw 60px;
  opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}
#mobile-menu.open { opacity: 1; visibility: visible; }
#mobile-menu a.mm-link {
  font-family: var(--font-head); font-size: clamp(1.7rem, 6vw, 2.6rem); font-weight: 600;
  padding: 10px 0; opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.3s;
  display: inline-block;
}
#mobile-menu.open a.mm-link { opacity: 1; transform: translateY(0); }
#mobile-menu a.mm-link:hover, #mobile-menu a.mm-link.active { color: var(--red); }
#mobile-menu .mm-sub { padding-left: 22px; border-left: 1px solid var(--line); margin: 4px 0 8px; }
#mobile-menu .mm-sub a { font-size: 1.05rem; font-family: var(--font-head); color: var(--grey); display: block; padding: 7px 0; }
#mobile-menu .mm-sub a:hover { color: var(--red); }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  position: relative; min-height: 46vh; display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 70px) 0 70px; overflow: hidden; isolation: isolate;
}
.page-hero--img .ph-bg {
  position: absolute; inset: -12% 0; z-index: -2;
  background-size: cover; background-position: center; filter: brightness(0.38) saturate(0.9);
  will-change: transform;
}
.page-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.05) 45%, var(--black));
}
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero p.lead { margin-top: 18px; }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px 30px; overflow: hidden;
  transition: transform 0.5s var(--ease-out), border-color 0.5s, box-shadow 0.5s;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--red), transparent 70%);
  transform: scaleX(0); transform-origin: left; transition: transform 0.55s var(--ease-out);
}
.card:hover { transform: translateY(-8px); border-color: rgba(227, 21, 1, 0.4); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(227, 21, 1, 0.12); }
.card:hover::before { transform: scaleX(1); }
.card h3 { font-size: 1.18rem; margin-bottom: 14px; }
.card p { color: var(--grey); font-size: 0.94rem; }
.card .card-num { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; color: var(--red); letter-spacing: 0.15em; margin-bottom: 18px; display: block; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; text-align: center; }
.stat { padding: 36px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat .stat-v { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.4rem); color: var(--white); }
.stat .stat-v .u { color: var(--red); }
.stat .stat-l { color: var(--grey); font-size: 0.9rem; margin-top: 6px; }

/* product / variety grid */
.variety-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.v-item { text-align: center; }
.v-item .frame { aspect-ratio: 1; }
.v-item .frame img { transition: transform 0.8s var(--ease-out); }
.v-item:hover .frame img { transform: scale(1.08); }
.v-item .frame::before {
  content: ''; position: absolute; inset: 0; z-index: 1; opacity: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(227, 21, 1, 0.28));
  transition: opacity 0.5s;
}
.v-item:hover .frame::before { opacity: 1; }
.v-item h4 { font-size: 0.98rem; font-weight: 500; margin-top: 16px; letter-spacing: 0.02em; }

/* media cards (services/automation) */
.media-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform 0.5s var(--ease-out), border-color 0.5s, box-shadow 0.5s; }
.media-card:hover { transform: translateY(-8px); border-color: rgba(227, 21, 1, 0.45); box-shadow: 0 26px 60px rgba(0,0,0,0.55); }
.media-card .mc-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.media-card .mc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.media-card:hover .mc-img img { transform: scale(1.06); }
.media-card .mc-body { padding: 26px 26px 30px; }
.media-card .mc-body h3 { font-size: 1.15rem; margin-bottom: 10px; }
.media-card .mc-body p { color: var(--grey); font-size: 0.93rem; }
/* play button */
.play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2;
}
.play-badge span {
  width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55); border: 1.5px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px); transition: transform 0.4s var(--ease-out), background 0.4s, border-color 0.4s;
}
.play-badge svg { width: 22px; height: 22px; fill: var(--white); margin-left: 4px; }
.media-card:hover .play-badge span, .video-trigger:hover .play-badge span { transform: scale(1.12); background: var(--red); border-color: var(--red); box-shadow: 0 0 40px var(--red-glow); }
.play-badge::after {
  content: ''; position: absolute; width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(227, 21, 1, 0.6); animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- language switch + CJK ---------- */
html[lang="zh-CN"] {
  --font-head: 'Poppins', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-body: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}
html[lang="zh-TW"] {
  --font-head: 'Poppins', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
  --font-body: 'Inter', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}
html[lang^="zh"] .hero-title, html[lang^="zh"] .h-display { letter-spacing: 0; }
.lang-switch {
  display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: 14px;
  border: 1px solid var(--line); border-radius: 99px; padding: 3px;
}
.lang-switch a {
  padding: 5px 12px; border-radius: 99px; font-size: 0.78rem; font-weight: 600;
  color: var(--grey); letter-spacing: 0.04em; transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}
.lang-switch a:hover { color: var(--white); }
.lang-switch a.active { background: var(--red); color: var(--white); }
.nav-inner .lang-switch { margin-left: auto; }
.nav-inner .nav-cta { margin-left: 0; }
#mobile-menu .lang-switch { margin: 26px 0 0; align-self: flex-start; }
@media (max-width: 900px) {
  .nav-inner .lang-switch { display: none; }
}

/* ---------- network globe ---------- */
.globe-wrap {
  width: min(820px, 94vw); height: clamp(360px, 52vw, 560px);
  margin: 8px auto 18px; position: relative; touch-action: pan-y;
}
.globe-wrap canvas { display: block; width: 100% !important; height: 100% !important; }

/* ---------- lightbox ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 980; background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
#lightbox.open { opacity: 1; visibility: visible; }
#lightbox .lb-content { position: relative; width: min(1080px, 94vw); aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 120px rgba(0,0,0,0.8); }
#lightbox iframe, #lightbox img.lb-img { width: 100%; height: 100%; border: 0; object-fit: contain; }
#lightbox .lb-close {
  position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; z-index: 2; transition: transform 0.3s;
}
#lightbox .lb-close:hover { transform: rotate(90deg); }
#lightbox .lb-content.lb-tall { aspect-ratio: auto; height: 88vh; }

/* gallery lightbox */
#lightbox .lb-gallery { background: rgba(10, 10, 10, 0.6); backdrop-filter: blur(20px); }
#lightbox .lb-fig { width: 100%; height: 100%; margin: 0; display: flex; flex-direction: column; }
#lightbox .lb-fig-img {
  flex: 1; min-height: 0; width: 100%; object-fit: contain; padding: clamp(14px, 3vw, 34px);
  transition: opacity 0.35s ease;
}
#lightbox .lb-cap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(18px, 3vw, 34px); border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.55);
}
#lightbox .lb-cap-name { font-family: var(--font-head); font-weight: 600; font-size: clamp(1rem, 2vw, 1.25rem); }
#lightbox .lb-cap-count { color: var(--grey); font-size: 0.85rem; letter-spacing: 0.12em; }
#lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}
#lightbox .lb-prev { left: 14px; }
#lightbox .lb-next { right: 14px; }
#lightbox .lb-nav:hover { background: var(--red); border-color: var(--red); }
#lightbox .lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
#lightbox .lb-next:hover { transform: translateY(-50%) translateX(3px); }
@media (max-width: 700px) {
  #lightbox .lb-nav { width: 42px; height: 42px; }
  #lightbox .lb-prev { left: 8px; }
  #lightbox .lb-next { right: 8px; }
}

/* zoomable product frames */
.gallery-zoom { cursor: pointer; position: relative; }
.gallery-zoom::after {
  content: '+'; position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line);
  color: var(--white); font-size: 1.15rem; line-height: 32px; text-align: center;
  opacity: 0; transform: scale(0.8); transition: opacity 0.3s, transform 0.3s;
}
.gallery-zoom:hover::after { opacity: 1; transform: scale(1); }

/* ---------- forms ---------- */
.form-shell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 4vw, 48px); }
.field { position: relative; margin-bottom: 26px; }
.field label { display: block; font-family: var(--font-head); font-size: 0.85rem; font-weight: 500; margin-bottom: 10px; color: rgba(255,255,255,0.85); }
.field label .req { color: var(--red); }
.field input, .field textarea, .field select {
  width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: 10px; padding: 15px 18px; color: var(--white); font: inherit; font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; outline: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--grey-dark); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 21, 1, 0.15); background: rgba(255, 255, 255, 0.06);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a3a8b0'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.field select option { background: #141414; color: var(--white); }
.form-note { font-size: 0.82rem; color: var(--grey-dark); margin-top: 14px; }
.form-success {
  display: none; align-items: center; gap: 12px; margin-top: 18px;
  background: rgba(30, 160, 80, 0.12); border: 1px solid rgba(30, 160, 80, 0.4);
  color: #7fd6a1; padding: 14px 18px; border-radius: 10px; font-size: 0.92rem;
}
.form-success.show { display: flex; }

/* ---------- maps ---------- */
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); position: relative; }
.map-frame iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; filter: invert(0.92) hue-rotate(185deg) saturate(0.4) brightness(0.9) contrast(0.95); }

/* ---------- footer ---------- */
#site-footer { background: #060606; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
#site-footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.7;
}
.footer-inner { padding: clamp(56px, 7vw, 90px) 0 0; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
.footer-brand .f-rule { width: 44px; height: 2px; background: var(--red); margin-bottom: 26px; }
.footer-brand h3 { font-size: 1.35rem; margin-bottom: 18px; }
.footer-brand p { color: var(--grey); font-size: 0.93rem; line-height: 1.9; }
.footer-col h4 { font-family: var(--font-head); font-size: 1.02rem; margin-bottom: 22px; }
.footer-col a { display: inline-flex; align-items: center; gap: 8px; color: var(--grey); font-size: 0.93rem; padding: 6px 0; transition: color 0.3s, transform 0.3s; }
.footer-col a::before { content: '→'; color: var(--red); font-size: 0.8em; opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s; }
.footer-col a:hover { color: var(--white); transform: translateX(4px); }
.footer-col a:hover::before { opacity: 1; transform: translateX(0); }
.footer-col li { display: block; }
.footer-bottom {
  margin-top: clamp(40px, 5vw, 64px); padding: 26px 0; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--grey-dark); font-size: 0.85rem;
}
.footer-bottom .made { letter-spacing: 0.06em; }

/* ---------- home hero ---------- */
#hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 60px; overflow: hidden; isolation: isolate;
}
#hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 46% 44% at 73% 46%, rgba(227, 21, 1, 0.12), transparent 68%),
    linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 32%, transparent 70%, var(--black) 100%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 76px); align-items: center; width: 100%;
}
.hero-media { position: relative; }
#hero-3d {
  display: block; width: 100%; aspect-ratio: 1 / 1;
  touch-action: pan-y;
}
#hero-3d canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-media { width: 100%; max-width: 460px; margin: 0 auto; }
  #hero { padding-bottom: 120px; }
}
.hero-grid-lines {
  position: absolute; inset: 0; z-index: -1; opacity: 0.5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.hero-content { max-width: 760px; position: relative; }
.hero-content .eyebrow { margin-bottom: 26px; }
.hero-title { font-size: clamp(2.3rem, 4.2vw, 3.6rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.hero-sub { margin: 24px 0 34px; font-size: clamp(1rem, 1.35vw, 1.2rem); color: var(--grey); max-width: 560px; }
.hero-ctas { display: flex; gap: 18px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--grey-dark); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
}
.hero-scroll .wheel { width: 24px; height: 40px; border: 1.5px solid rgba(255,255,255,0.25); border-radius: 12px; position: relative; }
.hero-scroll .wheel::after {
  content: ''; position: absolute; top: 7px; left: 50%; width: 3px; height: 8px; border-radius: 2px;
  background: var(--red); transform: translateX(-50%); animation: wheel-drop 1.8s ease-in-out infinite;
}
@keyframes wheel-drop { 0% { opacity: 1; top: 7px; } 70% { opacity: 0; top: 20px; } 100% { opacity: 0; top: 7px; } }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; background: var(--bg); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track span { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--grey-dark); display: flex; align-items: center; gap: 64px; white-space: nowrap; }
.marquee-track span i { font-style: normal; color: var(--red); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* customer network */
#network { position: relative; isolation: isolate; overflow: hidden; }
#network .net-bg {
  position: absolute; inset: -10% 0; z-index: -2;
  background:
    radial-gradient(ellipse 46% 60% at 18% 30%, rgba(227, 21, 1, 0.20), transparent 70%),
    radial-gradient(ellipse 40% 55% at 82% 65%, rgba(227, 21, 1, 0.16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 50% 45%, rgba(120, 12, 2, 0.28), transparent 72%),
    #050505;
  will-change: transform;
}
#network .net-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(227, 21, 1, 0.35) 1.2px, transparent 1.3px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 25%, transparent 78%);
  opacity: 0.5;
}
#network::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--black), rgba(0,0,0,0.25) 30%, rgba(0,0,0,0.25) 70%, var(--black)); }
.country-chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 40px; }
.country-chip {
  font-family: var(--font-head); font-weight: 500; font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 10px 22px;
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 10px;
  transition: border-color 0.35s, background 0.35s, transform 0.35s var(--ease-out);
}
.country-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red-glow); }
.country-chip:hover { border-color: var(--red); background: rgba(227, 21, 1, 0.14); transform: translateY(-4px); }

/* founder */
#founder { text-align: center; position: relative; overflow: hidden; }
#founder .quote-mark { font-family: var(--font-head); font-size: 7rem; line-height: 0.4; color: var(--red); opacity: 0.85; display: block; margin-bottom: 34px; }
#founder .q-en { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -0.01em; }
#founder .q-cn { font-size: clamp(1.3rem, 2.6vw, 2rem); color: var(--grey); margin-top: 14px; font-weight: 400; }
#founder .q-who { margin-top: 34px; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
#founder .q-who .who-name { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
#founder .q-who .who-role { font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--red); }
#founder .q-who::before { content: ''; width: 40px; height: 2px; background: var(--red); margin-bottom: 12px; }

/* ---------- team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.team-card { position: relative; }
.team-card .frame { aspect-ratio: 4/5; }
.team-card .frame img { object-position: top; }
.team-card .t-body { padding: 22px 6px 0; }
.team-card .t-role { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); font-weight: 600; font-family: var(--font-head); }
.team-card h3 { font-size: 1.3rem; margin: 8px 0 12px; }
.team-card p { color: var(--grey); font-size: 0.93rem; }

/* goals list */
.goal-list li {
  display: flex; gap: 18px; align-items: flex-start; padding: 18px 0;
  border-bottom: 1px solid var(--line); font-size: 1.02rem;
}
.goal-list li:first-child { border-top: 1px solid var(--line); }
.goal-list .g-num { font-family: var(--font-head); font-weight: 700; color: var(--red); font-size: 0.9rem; letter-spacing: 0.08em; min-width: 34px; padding-top: 3px; }

/* ---------- timeline / process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.process .p-step { position: relative; padding: 30px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.process .p-step::before {
  counter-increment: step; content: '0' counter(step);
  font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: transparent;
  -webkit-text-stroke: 1px var(--red); display: block; margin-bottom: 16px;
}
.process .p-step h4 { font-size: 1.05rem; margin-bottom: 10px; }
.process .p-step p { color: var(--grey); font-size: 0.9rem; }

/* ---------- misc ---------- */
.chart-shell { background: #fff; border-radius: var(--radius); padding: clamp(14px, 2vw, 28px); border: 1px solid var(--line); cursor: zoom-in; }
.chart-shell img { width: 100%; }
.caption { text-align: center; color: var(--grey-dark); font-size: 0.85rem; margin-top: 16px; }
.drawing-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.drawing-pair .chart-shell { padding: 10px; position: relative; }
.drawing-item { display: flex; flex-direction: column; }
.patent-tag {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-left: 3px solid var(--red);
  padding: 6px 13px; font-family: var(--font-head); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--white); border-radius: 6px;
  pointer-events: none;
}
.drawing-name { text-align: center; font-family: var(--font-head); font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; margin-top: 16px; }
.frame-name { text-align: center; font-family: var(--font-head); font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; margin-top: 16px; }
.divider-red { width: 70px; height: 3px; background: var(--red); border-radius: 2px; }
.info-rows .i-row { display: grid; grid-template-columns: 160px 1fr; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem; }
.info-rows .i-row .i-k { font-family: var(--font-head); font-weight: 600; color: rgba(255,255,255,0.9); }
.info-rows .i-row .i-v { color: var(--grey); }
.info-rows .i-row .i-v a { color: var(--red); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.info-rows .i-row .i-v a:hover { border-color: var(--red); }

/* legal pages */
.legal-wrap { display: grid; grid-template-columns: 250px 1fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--nav-h) + 30px); }
.legal-toc h4 { font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--grey-dark); margin-bottom: 18px; }
.legal-toc a { display: block; padding: 8px 0 8px 16px; border-left: 2px solid var(--line); color: var(--grey); font-size: 0.9rem; transition: color 0.3s, border-color 0.3s; }
.legal-toc a:hover, .legal-toc a.current { color: var(--white); border-color: var(--red); }
.legal-body h2 { font-size: 1.5rem; margin: 44px 0 18px; scroll-margin-top: calc(var(--nav-h) + 30px); }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.1rem; margin: 30px 0 12px; color: rgba(255,255,255,0.92); }
.legal-body p { color: var(--grey); margin-bottom: 16px; font-size: 0.97rem; }
.legal-body a { color: var(--red); }
.legal-body strong { color: rgba(255,255,255,0.9); }

/* rep cards */
.rep-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rep-card .rep-head { padding: clamp(28px, 3.5vw, 44px); }
.rep-card .rep-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 24px; }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; }
.rep-card .map-frame { border: 0; border-top: 1px solid var(--line); border-radius: 0; }

/* cta band */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(120deg, #150302, #2a0500 45%, #0c0c0c);
  border: 1px solid rgba(227, 21, 1, 0.3);
  padding: clamp(44px, 6vw, 80px); text-align: center;
}
.cta-band::before {
  content: ''; position: absolute; inset: -40%;
  background: radial-gradient(circle at 30% 40%, rgba(227, 21, 1, 0.22), transparent 45%);
  animation: cta-float 9s ease-in-out infinite alternate;
}
@keyframes cta-float { to { transform: translate(12%, 8%); } }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.cta-band p { color: var(--grey); max-width: 56ch; margin: 0 auto 34px; }

/* ---------- CJK typography (Chinese pages) — balance wraps, avoid orphaned characters ---------- */
html[lang^="zh"] h1,
html[lang^="zh"] h2,
html[lang^="zh"] h3,
html[lang^="zh"] .lead,
html[lang^="zh"] .caption,
html[lang^="zh"] .cta-band p { text-wrap: balance; line-break: strict; }
/* the ch-based cap is tuned for Latin text; CJK is far narrower per glyph, so lift it and let the sentence sit on one line */
html[lang^="zh"] .cta-band p { max-width: none; }

/* ---------- reveal (JS-driven) ---------- */
[data-reveal] { opacity: 0; transform: translateY(44px); will-change: transform, opacity; }
html.no-js [data-reveal], html.reduced [data-reveal] { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .variety-grid { grid-template-columns: repeat(3, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  #nav-burger { display: flex; }
  .split, .split--rev { grid-template-columns: 1fr; }
  .split--rev > :first-child { order: 1; }
  .split--rev > :last-child { order: 2; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .team-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  /* Mobile stacking order: Founder (Ch'ng) → Ho → Lau. Desktop keeps DOM order (founder centered). */
  .team-card:nth-child(1) { order: 3; }
  .team-card:nth-child(2) { order: 1; }
  .team-card:nth-child(3) { order: 2; }
  .legal-wrap { grid-template-columns: 1fr; }
  .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .legal-toc h4 { width: 100%; }
  .legal-toc a { border-left: 0; padding: 4px 0; }
  .rep-grid { grid-template-columns: 1fr; }
  .drawing-pair { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .variety-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .process { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .info-rows .i-row { grid-template-columns: 1fr; gap: 2px; }
  :root { --nav-h: 72px; }
  .nav-logo img { height: 44px; }
}

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