@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/JetBrainsMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0a0e1a;
  --bg-alt: #111827;
  --bg-card: #1a1f2e;
  --text: #f4f4f5;
  --text-muted: #94a3b8;
  --text-heading: #ffffff;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-grad: linear-gradient(90deg, #f59e0b, #ef4444);
  --brick: #c86a42;
  --navy: #1e2842;
  --border: #1f2937;

  --font-body: 'Inter', -apple-system, 'PingFang TC', 'Noto Sans TC', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

  --container: 1200px;
  --section-y: 120px;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { color: var(--text-heading); line-height: 1.2; font-weight: 800; }

a { color: inherit; text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 3px;
}

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

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.25s ease, background 0.25s ease;
  padding: 16px 0;
}
.nav.scrolled { padding: 10px 0; background: rgba(10, 14, 26, 0.92); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.nav-logo img { display: block; }
.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  background: #f5f0e6;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  transition: width 0.25s ease, height 0.25s ease;
}
.logo-badge img { width: 92%; height: 92%; object-fit: contain; }
.logo-badge-lg { width: 104px; height: 104px; }
.nav.scrolled .logo-badge { width: 56px; height: 56px; }
.nav-menu {
  position: fixed;
  top: 0;
  right: calc(max(24px, (100vw - 1200px) / 2));
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  z-index: 102;
  transition: padding 0.25s ease;
}
.nav.scrolled ~ .nav-menu { padding: 10px 0; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(26, 31, 46, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 103;
  transition: top 0.25s ease;
}
.nav.scrolled ~ .nav-toggle { top: 10px; }
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
/* ±7px = bar height (2px) + gap (5px); update together if .nav-toggle gap changes */
.nav.nav-open ~ .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.nav-open ~ .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.nav-open ~ .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 101;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav.nav-open ~ .nav-backdrop { opacity: 1; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-backdrop { display: block; pointer-events: none; }
  .nav.nav-open ~ .nav-backdrop { pointer-events: auto; }
  .nav-menu {
    top: 0;
    right: 0;
    width: min(78vw, 280px);
    height: 100vh;
    background: var(--bg);
    border-left: 1px solid var(--border);
    padding: 80px 24px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .nav.nav-open ~ .nav-menu { transform: translateX(0); }
  .nav.scrolled ~ .nav-menu { padding: 80px 24px 24px; }
  .nav-links { flex-direction: column; gap: 14px; }
  .nav-links a { font-size: 15px; letter-spacing: 1.5px; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .nav-actions .nav-lang { padding: 8px 14px; font-size: 13px; }
  .nav-actions .btn { text-align: center; padding: 10px 16px; font-size: 14px; }
}
.nav-lang {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.nav-lang:hover { border-color: var(--text-muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-grad); color: #0a0e1a; box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent-amber); }

/* Hero shell */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  overflow: hidden;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero-title > span {
  display: block;
  width: 100%;
  text-align: left;
}
.hero-title .typewriter {
  min-height: 1.2em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title .typewriter::after {
  content: '';
  display: inline-block;
  width: 0.6ch;
  height: 1em;
  vertical-align: -0.1em;
  background: var(--accent-amber);
  margin-left: 0.1em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-sub { font-size: clamp(16px, 1.8vw, 20px); color: var(--text-muted); max-width: 640px; margin-bottom: 40px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  margin-top: 0;
  background: var(--bg);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { font-weight: 800; font-size: 17px; }
.footer-tagline { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-top: 4px; }
.footer-meta { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.footer-link, .footer-copy { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); letter-spacing: 0.5px; }
.footer-link:hover { color: var(--accent-amber); }

#ambient {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}
main, .footer { position: relative; z-index: 1; }
.hero { background: transparent; }
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.section {
  padding: var(--section-y) 0;
  position: relative;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.section-lede {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 48px;
}
.section-mission { background: var(--bg); }
.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 64px;
}
.mission-col-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.mission-col p { color: var(--text-muted); font-size: 16px; line-height: 1.7; }

@media (max-width: 900px) {
  .mission-grid { grid-template-columns: 1fr; gap: 32px; }
}
.section-directions { background: var(--bg-alt); }
.directions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.direction-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition: opacity 0.8s ease, transform 0.3s ease, border-color 0.3s ease;
}
.direction-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(239, 68, 68, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.direction-card:hover { transform: translateY(-6px); border-color: var(--accent-amber); }
.direction-card:hover::before { opacity: 1; }
.direction-icon {
  width: 44px;
  height: 44px;
  color: var(--accent-amber);
  margin-bottom: 20px;
}
.direction-icon svg { width: 100%; height: 100%; display: block; }
.direction-title { font-size: 22px; margin-bottom: 12px; }
.direction-card p { color: var(--text-muted); font-size: 15px; line-height: 1.6; }

@media (max-width: 900px) { .directions-grid { grid-template-columns: 1fr; } }

.section-products { background: var(--bg); }
.products-grid {
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.8s ease, transform 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.product-card:hover { transform: translateY(-6px); border-color: var(--accent-amber); }
.product-card:hover::before { opacity: 1; }
.product-head { display: flex; gap: 20px; align-items: center; }
.product-icon { border-radius: 16px; }
.product-name { font-size: 28px; font-weight: 800; }
.product-tagline { color: var(--text-muted); font-size: 15px; margin-top: 4px; }
.product-features { list-style: none; display: grid; gap: 12px; position: relative; z-index: 1; }
.product-features li {
  padding-left: 28px;
  position: relative;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}
.product-features li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent-grad);
  transform: rotate(-15deg);
}
.product-actions { display: flex; align-items: center; gap: 24px; margin-top: auto; flex-wrap: wrap; }
.product-actions .badge { height: 44px; width: auto; }
.product-link { font-family: var(--font-mono); font-size: 14px; color: var(--accent-amber); }

@media (max-width: 900px) { .products-grid { grid-template-columns: 1fr; } }

.section-stack { background: var(--bg); }
.section-stack .section-sub {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-muted);
  max-width: 560px;
  margin-top: 4px;
  line-height: 1.6;
}
.marquee {
  margin-top: 56px;
  padding: 8px 0;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  margin-right: 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text);
  flex-shrink: 0;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.brand-pill:hover { border-color: var(--accent-amber); color: var(--accent-amber); transform: translateY(-2px); }
.brand-pill img {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}
.brand-pill span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
/* translate distance = -100% / N, where N is the number of duplicate pill
   sets rendered in the .marquee-track. Currently 4 copies → -25%. Changing
   the copy count requires updating this value to match. */
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
    overflow: visible;
    padding: 0 24px;
  }
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .brand-pill[aria-hidden="true"] { display: none; }
}

.section-stats { background: var(--bg-alt); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}
.stat-num {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 12px;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

@media (max-width: 1024px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }

.section-contact { background: var(--bg); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.contact-lede p { color: var(--text-muted); font-size: 17px; line-height: 1.7; margin-top: 16px; }
.contact-form { display: grid; gap: 16px; }
.contact-form label { display: grid; gap: 6px; }
.contact-form label span {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.contact-form input,
.contact-form textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.contact-form button { justify-self: start; margin-top: 8px; }
.form-note { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
