/* ============================================================================
   Golden Vantage — homepage (Apple-style + glassmorphism UI)
   ----------------------------------------------------------------------------
   White, clean layout with a frosted-glass UI: semi-transparent panels,
   backdrop blur, thin translucent borders — no blue accent (neutral graphite).
   Full-viewport video hero on top, normal content sections below.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f1f3f5;
  --ink: #171c21;
  --ink-soft: #5c6670;
  --accent: #2a3138;          /* neutral graphite (not blue) */
  --accent-2: #4a5560;
  --line: #e7eaee;

  --brand-red: #C8102E;        /* Golden Vantage accent red */
  --brand-red-dark: #9E0C24;
  --brand-red-bright: #ff4d5e; /* readable accent red on dark video */

  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-dark: rgba(23, 28, 33, 0.12);

  --font-display: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }

/* ---------------------------------------------------------------------------
   Progress bar
--------------------------------------------------------------------------- */
#sw-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 80;
  background: transparent;
}
#sw-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--brand-red), var(--brand-red-dark));
}

/* ---------------------------------------------------------------------------
   Topbar — frosted glass (dark glass over hero, light glass after scrolling)
--------------------------------------------------------------------------- */
#sw-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(10px, 2vw, 18px) clamp(18px, 5vw, 64px);
  color: #fff;
  background: rgba(10, 16, 22, 0.24);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  transition: color 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
#sw-topbar.is-scrolled {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: rgba(23, 28, 33, 0.08);
  box-shadow: 0 10px 30px rgba(23, 28, 33, 0.06);
}

.sw-brand { display: flex; align-items: center; gap: 12px; }
.sw-brand img {
  height: clamp(34px, 5vw, 66px);
  width: auto;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
}

/* Sliding-indicator rail nav (kinetics-style). A pill slides to the hovered /
   active item via :has() + a CSS variable (--i). */
.sw-nav {
  position: relative;
  display: flex;
  gap: 0;
  padding: 4px;
  flex: 1 1 auto;
  max-width: 560px;
  --i: 0;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  /* NOTE: no backdrop-filter here on purpose — a filter/backdrop-filter on this
     element would make it the containing block for the fixed-position mega menu
     panel, which would shrink the panel to this 560px pill instead of full-width. */
}
#sw-topbar.is-scrolled .sw-nav { background: rgba(255, 255, 255, 0.5); border-color: var(--glass-border-dark); }

/* the sliding indicator pill */
.sw-nav::before {
  content: "";
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px) / 5);               /* 5 equal segments */
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s var(--ease);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  z-index: 0;
  opacity: 0;   /* hidden at the hero (no resting pill); shown on active / hover */
}
.sw-nav:has(.sw-nav__item.is-active)::before,
.sw-nav:has(.sw-nav__item:hover)::before { opacity: 1; }
#sw-topbar.is-scrolled .sw-nav::before { background: var(--brand-red); box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35); }

/* active position (base) */
.sw-nav:has(.sw-nav__item:nth-child(2).is-active) { --i: 1; }
.sw-nav:has(.sw-nav__item:nth-child(3).is-active) { --i: 2; }
.sw-nav:has(.sw-nav__item:nth-child(4).is-active) { --i: 3; }
.sw-nav:has(.sw-nav__item:nth-child(5).is-active) { --i: 4; }
/* hover position (later in source = wins while hovering) */
.sw-nav:has(.sw-nav__item:nth-child(2):hover) { --i: 1; }
.sw-nav:has(.sw-nav__item:nth-child(3):hover) { --i: 2; }
.sw-nav:has(.sw-nav__item:nth-child(4):hover) { --i: 3; }
.sw-nav:has(.sw-nav__item:nth-child(5):hover) { --i: 4; }
/* dropdown items (Saw Blades / Tooling wrappers) — active / hover / open keep the pill on that slot */
.sw-nav:has(.sw-nav-drop:nth-child(2).is-active) { --i: 1; }
.sw-nav:has(.sw-nav-drop:nth-child(3).is-active) { --i: 2; }
.sw-nav:has(.sw-nav-drop:nth-child(2):hover) { --i: 1; }
.sw-nav:has(.sw-nav-drop:nth-child(3):hover) { --i: 2; }
.sw-nav:has(.sw-nav-drop:nth-child(2).is-open) { --i: 1; }
.sw-nav:has(.sw-nav-drop:nth-child(3).is-open) { --i: 2; }

.sw-nav__item {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;               /* allow equal-width flex segments */
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: inherit;
  opacity: 0.85;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.25s, opacity 0.25s;
}
/* text flips to match the pill that is underneath */
.sw-nav__item:hover { color: var(--ink); opacity: 1; }
#sw-topbar.is-scrolled .sw-nav__item:hover { color: #fff; }
.sw-nav__item.is-active { color: var(--ink); opacity: 1; }
#sw-topbar.is-scrolled .sw-nav__item.is-active { color: #fff; }
/* while another item is hovered, drop the active highlight (pill has moved) */
.sw-nav:has(.sw-nav__item:hover) .sw-nav__item.is-active { color: inherit; opacity: 0.85; }
#sw-topbar.is-scrolled .sw-nav:has(.sw-nav__item:hover) .sw-nav__item.is-active { color: inherit; opacity: 0.85; }

/* ---- dropdown (Saw Blades / Tooling) ---- */
.sw-nav-drop {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sw-nav-drop .sw-nav__label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
}
/* split-button: the small caret button opens the mega panel, the label is a link */
.sw-nav-drop .sw-nav__caret-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -4px;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.25s;
}
.sw-nav-drop .sw-nav__caret-btn:hover { opacity: 1; }
.sw-nav__caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transition: transform 0.25s var(--ease);
}
.sw-nav-drop:hover .sw-nav__caret,
.sw-nav-drop.is-open .sw-nav__caret { transform: rotate(180deg); }

/* dropdown panel — full-width mega menu (spans the whole viewport below the topbar) */
.sw-nav-drop__panel {
  position: fixed;
  top: var(--topbar-h, 0px);
  left: 0;
  right: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--glass-border-dark);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(23, 28, 33, 0.2);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  z-index: 95;
}
.sw-nav-drop:hover .sw-nav-drop__panel,
.sw-nav-drop.is-open .sw-nav-drop__panel,
.sw-nav-drop:focus-within .sw-nav-drop__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* multi-column grid — each cell is one product category */
.sw-mega__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px 40px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 34px clamp(20px, 5vw, 48px) 32px;
}
.sw-mega__col { min-width: 0; }
.sw-mega__col-title {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--brand-red);
  transition: color 0.2s;
}
.sw-mega__col-title:hover { color: var(--brand-red); }
.sw-mega__col-desc {
  margin: 0 0 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.sw-mega__links { display: flex; flex-direction: column; gap: 2px; }
.sw-mega__links a {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 9px 0;
  line-height: 1.4;
  border-bottom: 1px solid rgba(23, 28, 33, 0.06);
  transition: color 0.2s, transform 0.2s var(--ease);
}
.sw-mega__links a:last-child { border-bottom: 0; }
.sw-mega__links a:hover { color: var(--brand-red); transform: translateX(3px); }

/* ---- two-level accordion (Saw Blades / Tooling) ----
   Progressive enhancement: JS adds .sw-acc so the CSS collapses the
   sub-links; without JS the classic always-visible grid is preserved.
   Big-category titles remain links to their section; the injected
   chevron toggle expands / collapses the sub-links below. */
.sw-nav.sw-acc .sw-mega__col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--brand-red);
}
.sw-nav.sw-acc .sw-mega__col-title { margin: 0; padding: 0; border: 0; }
.sw-nav.sw-acc .sw-mega__col-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.sw-nav.sw-acc .sw-mega__col-toggle:hover { color: var(--brand-red); background: rgba(200, 16, 46, 0.08); }
/* chevron: collapsed points right, open points down (overrides the top-level hover rotate) */
.sw-nav-drop .sw-mega__col-toggle .sw-nav__caret { transform: rotate(-90deg); }
.sw-nav-drop .sw-mega__col.is-open .sw-mega__col-toggle .sw-nav__caret { transform: rotate(0deg); }
/* sub-links collapse by default and animate open via grid-template-rows */
.sw-nav.sw-acc .sw-mega__links {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease);
}
.sw-nav.sw-acc .sw-mega__links-inner { overflow: hidden; min-height: 0; }
.sw-nav.sw-acc .sw-mega__col.is-open .sw-mega__links { grid-template-rows: 1fr; }

/* footer bar — "View all …" */
.sw-mega__foot {
  border-top: 1px solid var(--line);
  background: rgba(241, 243, 245, 0.65);
}
.sw-mega__foot .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}
.sw-mega__all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--brand-red);
  transition: color 0.2s, transform 0.2s var(--ease);
}
.sw-mega__all:hover { color: var(--brand-red-dark); transform: translateX(3px); }

.sw-cta {
  font-size: 0.9rem;
  font-weight: 700;
  color: #E60000;
  background: transparent;
  border: 1px solid #E60000;
  padding: 10px 20px;
  border-radius: 999px;
  white-space: nowrap;
  animation: neon-pulse 2s ease-in-out infinite;
  transition: transform 0.25s var(--ease);
}
.sw-cta:hover {
  transform: translateY(-2px) scale(1.03);
  color: #ff4d4d;
  border-color: #ff4d4d;
}
/* Get a Quote：旋轉光束邊框 */
.beam { position: relative; padding: 1.5px; overflow: hidden; border-radius: 14px; }
.sw-cta.beam {
  display: inline-block;
  background: transparent;
  border: none;
  animation: none;
  text-decoration: none;
}
.beam::before {
  content: ''; position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, transparent 0 72%, #FF8A00 84%, #EDE9E0 90%, transparent 96%);
  animation: spin 3s linear infinite;
  pointer-events: none;
}
.beam-inner { position: relative; border-radius: 12.5px; background: #232326; }
.sw-cta.beam .beam-inner {
  display: block;
  color: #fff;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}
.sw-cta.beam:hover { transform: translateY(-2px); }
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes neon-pulse {
  0%, 100% {
    text-shadow: 0 0 4px #E60000;
    box-shadow: 0 0 6px -1px #E60000, inset 0 0 6px -2px #E60000;
  }
  50% {
    text-shadow: 0 0 12px #E60000, 0 0 22px #E60000;
    box-shadow: 0 0 18px 0 #E60000, inset 0 0 12px -2px #E60000;
  }
}

.sw-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.sw-burger i { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.3s var(--ease), opacity 0.3s; }
body.menu-open .sw-burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .sw-burger i:nth-child(2) { opacity: 0; }
body.menu-open .sw-burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------------------
   Hero — video at the very top (Apple-style)
--------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: hero-zoom 24s ease-in-out infinite alternate;
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 14, 20, 0.6) 0%, rgba(8, 14, 20, 0.34) 46%, rgba(8, 14, 20, 0.14) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 clamp(22px, 6vw, 88px);
  margin-top: -30px;
}
.hero-copy { max-width: 640px; }

/* Hero entrance — staggered fade-up on load */
@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-copy > * {
  opacity: 0;
  animation: hero-fade-up 0.8s var(--ease) forwards;
}
.hero-copy .eyebrow { animation-delay: 0.1s; }
.hero-copy .hero-title { animation-delay: 0.25s; }
.hero-copy .hero-body { animation-delay: 0.4s; }
.hero-copy .cta-row { animation-delay: 0.55s; }

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  margin-right: 10px;
  vertical-align: middle;
  background: var(--brand-red);
  border-radius: 2px;
  transform-origin: left center;
}
.reveal.is-visible .eyebrow::before {
  animation: eyebrow-line 0.7s var(--ease) 0.15s backwards;
}
@keyframes eyebrow-line {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 14px 0 0;
  text-shadow: 0 3px 26px rgba(0, 0, 0, 0.4);
}
.hero-title .accent {
  color: var(--brand-red-bright);
  text-shadow: 0 0 30px rgba(200, 16, 46, 0.55), 0 3px 26px rgba(0, 0, 0, 0.4);
}

.hero-body {
  margin: 20px 0 0;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 46ch;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-row.center { justify-content: center; }

/* Liquid Glass Press buttons — frosted translucent surface, inset top highlight,
   soft ambient shadow, a specular streak sweeping across on hover, and a tactile
   squish on press (kinetics.colorion.co style). Pure CSS, no JS. */
.btn {
  position: relative;
  overflow: hidden;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 60%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-150%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(190%); }
.btn:active { transform: scale(0.96); }

.btn--primary {
  color: #fff;
  background-image: linear-gradient(120deg, #870000 0%, #190A05 51%, #870000 100%);
  background-size: 220% auto;
  background-position: left center;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px rgba(135, 0, 0, 0.35);
  animation: btn-glow 2.8s ease-in-out infinite;
  transition: background-position 0.5s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s, color 0.25s;
}
.btn--primary:hover {
  animation: none;
  background-position: right center;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 38px rgba(135, 0, 0, 0.45);
}
@keyframes btn-glow {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px rgba(135, 0, 0, 0.3); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 48px rgba(135, 0, 0, 0.55); }
}

.btn--ghost {
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn--ghost:hover { border-color: #fff; }

/* light-background variants — frosted glass with dark text */
#about .btn, #contact .btn, #quote .btn, #tooling .btn { color: var(--ink); }
#about .btn--primary, #contact .btn--primary, #quote .btn--primary, #tooling .btn--primary {
  color: #fff;
  background-image: linear-gradient(120deg, #870000 0%, #190A05 51%, #870000 100%);
  background-size: 220% auto;
  background-position: left center;
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px rgba(135, 0, 0, 0.28);
}
#about .btn--ghost, #contact .btn--ghost, #quote .btn--ghost, #tooling .btn--ghost {
  border-color: rgba(23, 28, 33, 0.18);
  background: rgba(255, 255, 255, 0.42);
}

.hero-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.hero-hint i {
  width: 18px; height: 30px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  border-radius: 11px;
  position: relative;
}
.hero-hint i::after {
  content: "";
  position: absolute;
  left: 50%; top: 6px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 3px;
  background: var(--brand-red-bright);
  animation: hero-scroll 1.6s var(--ease) infinite;
}
@keyframes hero-scroll {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(11px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------------------------------------------------------------------------
   Content sections
--------------------------------------------------------------------------- */
.section { padding: clamp(64px, 9vw, 110px) 0; position: relative; }
.section--alt {
  background:
    radial-gradient(48% 60% at 12% 20%, rgba(42, 49, 56, 0.06), transparent 70%),
    radial-gradient(42% 55% at 88% 80%, rgba(74, 85, 96, 0.05), transparent 70%),
    radial-gradient(56% 34% at 50% 0%, rgba(200, 16, 46, 0.055), transparent 72%),
    linear-gradient(180deg, #f1f3f5, #e9edf0);
}

.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 12px 0 0;
}
.section-body { margin: 16px 0 0; font-size: clamp(1rem, 1.15vw, 1.1rem); line-height: 1.65; color: var(--ink-soft); max-width: 60ch; }
.section-head.center .section-body { margin-left: auto; margin-right: auto; }
.section-title .accent { color: var(--brand-red); }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; }
.tag-list li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(23, 28, 33, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease), border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.tag-list li:hover {
  transform: translateY(-3px);
  border-color: var(--brand-red);
  color: var(--brand-red);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.14);
}

/* About — two column split */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split__media { position: relative; }
.split__media img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(23, 28, 33, 0.16);
}
.split__media::before {
  content: "";
  position: absolute;
  inset: 14% -8% -8% 12%;
  background: radial-gradient(closest-side, rgba(74, 85, 96, 0.22), transparent 72%);
  z-index: -1;
  border-radius: 40px;
}

/* About — product image carousel (all homepage product shots, horizontal slide) */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(23, 28, 33, 0.16);
}
.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.7s var(--ease);
}
.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split__media .carousel img { border-radius: 0; box-shadow: none; }
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(23, 28, 33, 0.35);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s, transform 0.2s var(--ease);
}
.carousel__btn--prev { left: 14px; }
.carousel__btn--next { right: 14px; }
.carousel__btn:hover { background: rgba(23, 28, 33, 0.6); transform: translateY(-50%) scale(1.08); }

/* Supplier / machinery logos */
.logo-group { margin-bottom: 34px; }
.logo-group:last-child { margin-bottom: 0; }
.logo-group__title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 18px 16px;
  background: #ffffff;
  border: 1px solid var(--glass-border-dark);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(23, 28, 33, 0.06);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.logo-card:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 22px 48px rgba(23, 28, 33, 0.12), 0 8px 26px rgba(200, 16, 46, 0.16); border-color: var(--brand-red); }
.logo-card img {
  width: 100%;
  height: 144px;
  object-fit: contain;
}

/* Product cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card {
  position: relative;
  display: block;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 16px 40px rgba(23, 28, 33, 0.07);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
  animation: float-bob 4s ease-in-out infinite;
}
.product-card:hover { animation-play-state: paused; }
@keyframes float-bob {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 10px 20px -8px rgba(0,0,0,0.55);
  }
  50% {
    transform: translateY(-12px);
    box-shadow: 0 26px 30px -10px rgba(0,0,0,0.45);
  }
}
.product-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-red-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
  z-index: 2;
}
.product-card:hover::before { transform: scaleX(1); }
.product-card img {
  width: 100%;
  aspect-ratio: 231 / 180;
  object-fit: contain;
  background: var(--bg-soft);
  transition: transform 0.5s var(--ease);
}
.product-card:hover img { transform: scale(1.06); }
.product-card span {
  display: block;
  padding: 16px 18px 18px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
}
.product-card span small {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 34px; }
.contact-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 28px 24px;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 16px 40px rgba(23, 28, 33, 0.07);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-red);
  box-shadow: 0 24px 52px rgba(23, 28, 33, 0.12);
}
.contact-card .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(42, 49, 56, 0.07);
  border: 1px solid rgba(42, 49, 56, 0.1);
  font-size: 1.2rem;
  margin-bottom: 14px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.contact-card:hover .ico {
  background: var(--brand-red);
  color: #fff;
  transform: scale(1.08) rotate(-5deg);
}
.contact-card h3 { font-size: 1rem; font-weight: 800; margin: 0 0 6px; }
.contact-card p, .contact-card a { font-size: 0.95rem; line-height: 1.6; color: var(--ink-soft); }
.contact-card a:hover { color: var(--brand-red); }

/* Footer */
.footer { background: var(--ink); color: rgba(255, 255, 255, 0.7); padding: 40px 0; border-top: 3px solid var(--brand-red); }
.footer .container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.footer p { margin: 0; font-size: 0.9rem; line-height: 1.6; }
.footer__copy { color: rgba(255, 255, 255, 0.45); }

/* dot navigation (right-side quick jump) */
.sw-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 80;
}
.sw-dots a {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(23, 28, 33, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: background 0.25s, transform 0.25s var(--ease);
}
.sw-dots a:hover { background: var(--brand-red); }
.sw-dots a.is-active { background: var(--brand-red); transform: scale(1.3); }
@media (max-width: 860px) { .sw-dots { display: none; } }

/* ---------------------------------------------------------------------------
   Interior product pages (e.g. prod-saw-blades.html / prod-tooling.html)
--------------------------------------------------------------------------- */
.page-head { padding-top: clamp(110px, 14vw, 150px); padding-bottom: 8px; }
.page-head .section-title { margin-bottom: 10px; }

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: clamp(38px, 6vw, 66px) 0;
  border-bottom: 1px solid var(--line);
}
.detail-row:last-child { border-bottom: 0; }
.detail-row--flip .detail-row__media { order: 2; }
.detail-row__media img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 24px 54px rgba(23, 28, 33, 0.14);
}
.detail-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  margin: 12px 0 0;
}

/* category link pills (tooling / saw-blades overview pages) */
.cat-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cat-links a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border-dark);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.cat-links a:hover { background: var(--brand-red); color: #fff; transform: translateY(-2px); }
.cat-links a small { display: block; font-size: 0.7rem; font-weight: 500; opacity: 0.85; margin-top: 2px; }

/* ---------------------------------------------------------------------------
   Product detail — spec tables & media (product / about / contact pages)
--------------------------------------------------------------------------- */
.spec-table-wrap { overflow-x: auto; margin-top: 26px; }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass);
  border: 1px solid var(--glass-border-dark);
  border-radius: 14px;
  overflow: hidden;
  font-size: 0.9rem;
}
.spec-table thead th {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  padding: 13px 16px;
  text-align: left;
  white-space: nowrap;
}
.spec-table tbody td {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}
.spec-table tbody tr:nth-child(even) td { background: rgba(23, 28, 33, 0.03); }
.spec-table tbody tr:hover td { background: rgba(200, 16, 46, 0.05); }
.spec-table tbody td:first-child { font-weight: 700; }

/* product detail media strip */
.media-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.media-strip img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 14px 32px rgba(23, 28, 33, 0.1); }

/* about page */
.about-grid { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.about-media img { width: 100%; border-radius: 18px; box-shadow: 0 16px 40px rgba(23, 28, 33, 0.12); }
.about-card {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 12px;
}
.about-card h3 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; color: var(--brand-red); }
.about-card p { margin: 0 0 14px; font-size: 0.95rem; line-height: 1.7; color: var(--ink-soft); }
.about-card p:last-child { margin-bottom: 0; }
.about-quote { text-align: center; font-size: clamp(1.1rem, 1.6vw, 1.4rem); font-weight: 700; line-height: 1.7; margin: 10px 0 0; }
.about-quote .accent { color: var(--brand-red); }

/* about page — single-open accordion (no outer card box: text + toggle only) */
.about-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(23, 28, 33, 0.12);
  background: none;
  padding: 14px 0;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-red);
  cursor: pointer;
  text-align: left;
}
.about-card__caret {
  font-style: normal;
  font-size: 0.8rem;
  opacity: 0.8;
  transition: transform 0.25s var(--ease);
}
.about-card.is-open .about-card__caret { transform: rotate(180deg); }
.about-card__body { display: none; padding: 6px 0 16px; }
.about-card.is-open .about-card__body { display: block; }

/* about page — infinite marquee of product photos */
.about-media {
  min-width: 0;          /* let the grid column shrink so the marquee doesn't push the text column off-screen */
}
.reveal-zone {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}
.reveal-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: reveal-scroll 20s linear infinite;
}
.reveal-zone:hover .reveal-track {
  animation-play-state: paused;
}
.reveal-track img {
  height: clamp(180px, 30vw, 260px);
  width: auto;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(23, 28, 33, 0.12);
}
@keyframes reveal-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* contact page */
.contact-form {
  background: var(--glass);
  border: 1px solid var(--glass-border-dark);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 34px);
}
.contact-form label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.contact-form label small { color: var(--brand-red); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
  margin-bottom: 16px;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12); }
.contact-form-status {
  display: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}
.contact-form-status:not(:empty) { display: block; }
.contact-form-status.is-success { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
.contact-form-status.is-error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.map-frame { width: 100%; height: 320px; border: 0; border-radius: 18px; box-shadow: 0 16px 40px rgba(23, 28, 33, 0.12); }
.contact-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-info-card {
  background: var(--glass);
  border: 1px solid var(--glass-border-dark);
  border-radius: 16px;
  padding: 22px;
}
.contact-info-card h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 800; }
.contact-info-card p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--ink-soft); }

/* classic contact layout: map on top, form (2/3) + info (1/3) below */
.contact-layout { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(24px, 3vw, 40px); align-items: start; margin-top: 40px; }
.contact-info-side .contact-info-card { margin-bottom: 16px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-info-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Mobile
--------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .sw-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 96px 22px 22px;
    border-radius: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    overflow-y: auto;
    transition: transform 0.4s var(--ease);
  }
  body.menu-open .sw-nav { transform: translateX(0); }
  .sw-nav::before { display: none; }
  .sw-nav__item { flex: none; width: 100%; text-align: left; padding: 13px 16px; font-size: 1rem; color: var(--ink); opacity: 1; }
  .sw-cta { display: none; }
  .sw-burger { display: flex; }

  /* dropdown -> accordion in the mobile drawer */
  .sw-nav-drop {
    width: 100%;
    flex: none;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
  }
  .sw-nav-drop .sw-nav__label {
    flex: 1 1 auto;
    padding: 13px 16px;
  }
  .sw-nav-drop .sw-nav__caret-btn {
    flex: 0 0 auto;
    align-self: stretch;
    padding: 0 18px;
  }
  .sw-nav-drop__panel {
    position: static;
    min-width: 0;
    flex: 1 1 100%;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .sw-nav-drop.is-open .sw-nav-drop__panel { display: block; }
  .sw-mega__grid {
    grid-template-columns: 1fr;
    gap: 20px 0;
    max-width: none;
    margin: 0;
    padding: 4px 6px 14px 26px;
  }
  .sw-mega__foot { display: none; }
  .sw-mega__col-title { padding: 12px 12px 12px 0; }

  /* mobile: accordion headers get full-width touch targets + row dividers */
  .sw-nav.sw-acc .sw-mega__col-head { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
  .sw-nav.sw-acc .sw-mega__col { border-bottom: 1px solid rgba(23, 28, 33, 0.08); }
  .sw-nav.sw-acc .sw-mega__col-title { padding: 13px 12px 13px 0; }
  .sw-nav.sw-acc .sw-mega__col-toggle { width: 34px; height: 34px; margin-right: -4px; }
  .sw-nav.sw-acc .sw-mega__links-inner { padding: 2px 0 10px; }

  /* mobile: hide the carousel arrow buttons, swipe gestures handle nav */
  .carousel__btn { display: none; }

  /* mobile: each sub-item on its own row with clear separation */
  .sw-mega__links a {
    display: block;
    width: 100%;
    font-size: 0.92rem;
    padding: 12px 0;
    border-bottom: 1px solid rgba(23, 28, 33, 0.08);
  }
  .sw-mega__links a:last-child { border-bottom: 0; }

  .hero-title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hero-inner { padding: 0 22px; }

  .split { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; align-items: flex-start; }

  .detail-row, .detail-row--flip { grid-template-columns: 1fr; }
  .detail-row--flip .detail-row__media { order: 0; }

  /* mobile: keep the original column layout but cap product-photo size so
     low-resolution images aren't stretched full-width and blurry */
  .media-strip {
    justify-items: center;
    align-items: center;
  }
  .media-strip img {
    width: auto;
    max-width: 100%;
    max-height: 200px;
  }
}

/* ---------------------------------------------------------------------------
   Reduced motion
--------------------------------------------------------------------------- */
/* Scroll-reveal entrance */
.reveal { opacity: 0; }
.reveal.is-visible {
  opacity: 1;
  animation: reveal-up 0.7s var(--ease) backwards;
  animation-delay: var(--d, 0ms);
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 產品卡片：入場淡入後持續漂浮（避免被 .reveal.is-visible 的 reveal-up 覆蓋） */
.product-card.reveal.is-visible {
  animation: reveal-up 0.7s var(--ease) backwards, float-bob 4s ease-in-out infinite;
  animation-delay: var(--d, 0ms), var(--d, 0ms);
}

/* ---------------------------------------------------------------------------
   Reduced motion
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-hint i::after { animation: none; }
  .hero-copy > * { opacity: 1; animation: none; }
  .hero video { animation: none; }
  .reveal { opacity: 1; animation: none; }
  .btn--primary { animation: none; }
  .sw-cta { animation: none; }
  .product-card, .logo-card, .btn, .sw-cta { transition: none; }
  .product-card { animation: none; }
  .product-card.reveal.is-visible { animation: none; }
}
