:root {
  --ink: #0c1522;
  --ink-soft: #1a2738;
  --paper: #dfe7ef;
  --paper-deep: #c8d4e0;
  --line: rgba(12, 21, 34, 0.12);
  --muted: #4a5b6e;
  --accent: #0f7a6e;
  --accent-bright: #18a896;
  --signal: #c45c26;
  --font-display: "Syne", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(24, 168, 150, 0.14), transparent 55%),
    radial-gradient(900px 500px at -10% 40%, rgba(196, 92, 38, 0.08), transparent 50%),
    linear-gradient(165deg, #e8eef4 0%, var(--paper) 45%, #d2dde8 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(10px);
  background: rgba(223, 231, 239, 0.72);
  border-bottom: 1px solid var(--line);
}

.mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}

.nav a:hover::after {
  width: 100%;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(6rem, 12vh, 8rem) clamp(1.25rem, 4vw, 3rem) 3rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
  animation: grid-drift 28s linear infinite;
}

@keyframes grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 48px 48px, 48px 48px;
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.brand {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 30rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.45rem;
  background: var(--ink);
  color: #f3f6f9;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.cta:hover {
  background: var(--ink-soft);
  transform: translateY(-2px);
}

.cta-ghost {
  display: inline-flex;
  padding: 0.85rem 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cta-ghost:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.hero-viz {
  position: relative;
  z-index: 1;
  aspect-ratio: 720 / 520;
  width: 100%;
  max-width: 40rem;
  justify-self: end;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18));
  overflow: hidden;
}

.hero-viz canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.viz-meta {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.9rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

.strip {
  border-block: 1px solid var(--line);
  background: rgba(12, 21, 34, 0.92);
  color: #d7e0ea;
  overflow: hidden;
  padding: 0.85rem 0;
}

.marquee {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  animation: marquee 28s linear infinite;
  white-space: nowrap;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.products,
.contact {
  padding: clamp(4rem, 10vh, 6.5rem) clamp(1.25rem, 4vw, 3rem);
  position: relative;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: var(--accent);
}

.section-head h2,
.contact-panel h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-lede {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
}

.tag {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  color: var(--signal);
}

.product-block {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.2rem) 0;
  border-top: 1px solid var(--ink);
}

.product-block + .product-block {
  border-top: 1px solid var(--line);
}

.product-block.reverse .product-copy {
  order: 2;
}

.product-block.reverse .product-chart {
  order: 1;
}

.product-copy h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-en {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.product-name {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.product-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
}

.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 1px;
  background: var(--accent);
}

.product-chart {
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.22));
  padding: 0.85rem 0.85rem 0.7rem;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.55rem;
}

.product-chart canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 320;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.55rem;
  font-size: 0.68rem;
  color: var(--muted);
}

.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 0.7rem;
  height: 2px;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.leg-ink::before {
  background: var(--ink);
}

.leg-teal::before {
  background: var(--accent);
}

.leg-signal::before {
  background: var(--signal);
  height: 0.45rem;
  width: 0.45rem;
  border-radius: 50%;
}

.contact-panel {
  max-width: 42rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--ink);
}

.contact-form {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-form .full {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  padding: 0.75rem 0.85rem;
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form .cta {
  grid-column: 1 / -1;
  width: fit-content;
  margin-top: 0.35rem;
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
  color: var(--accent);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.foot strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  margin-bottom: 0.2rem;
}

.foot .mono {
  font-size: 0.75rem;
}

.disclaimer {
  margin: 0;
  max-width: 28rem;
  font-size: 0.78rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 6.5rem;
  }

  .hero-viz {
    justify-self: stretch;
    max-width: none;
    order: -1;
    margin-bottom: 0.5rem;
  }

  .product-block,
  .product-block.reverse {
    grid-template-columns: 1fr;
  }

  .product-block.reverse .product-copy,
  .product-block.reverse .product-chart {
    order: unset;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    gap: 1rem;
    font-size: 0.82rem;
  }

  .foot {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero::before,
  .marquee {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
