:root {
  --bg: #060d1a;
  --bg-soft: #0d1830;
  --text: #e9f3ff;
  --muted: #9fb6d4;
  --primary: #00d5ff;
  --primary-strong: #4d7dff;
  --card: rgba(14, 30, 56, 0.7);
  --border: rgba(122, 168, 255, 0.3);
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 20% 0%, #12254b 0%, var(--bg) 42%), var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  animation: orbDrift 18s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -120px;
  background: rgba(0, 213, 255, 0.2);
}

.orb-2 {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -120px;
  background: rgba(77, 125, 255, 0.2);
  animation-duration: 22s;
  animation-delay: -6s;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(161, 198, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(161, 198, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 75%);
  animation: gridPulse 14s ease-in-out infinite;
}

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

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(6, 13, 26, 0.58);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
}

.brand-logo {
  width: clamp(180px, 22vw, 280px);
  height: auto;
  display: block;
}

.brand-quote {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: clamp(170px, 30vw, 360px);
  color: #9eb7d6;
  font-size: 0.68rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
  opacity: 1;
  transition: opacity 0.32s ease;
}

.brand-quote.is-fading {
  opacity: 0.25;
}

.nav {
  display: flex;
  gap: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin-left: auto;
}

.nav a {
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
}

.nav a:hover {
  color: #dff7ff;
  border-color: var(--border);
  background: rgba(77, 125, 255, 0.15);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: rgba(9, 20, 41, 0.7);
  color: #dff3ff;
  border-radius: 0.52rem;
  padding: 0.34rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.header-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  background: rgba(9, 20, 41, 0.7);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: #b6cae6;
  border-radius: 999px;
  padding: 0.34rem 0.62rem;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.lang-btn.is-active {
  color: #eaf7ff;
  background: linear-gradient(130deg, rgba(0, 213, 255, 0.35) 0%, rgba(77, 125, 255, 0.38) 100%);
}

.hero {
  padding: 5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  right: -140px;
  top: -140px;
  background: radial-gradient(circle at center, rgba(0, 213, 255, 0.28) 0%, rgba(0, 184, 255, 0) 72%);
}

.hero::after {
  width: 360px;
  height: 360px;
  left: -120px;
  bottom: -180px;
  background: radial-gradient(circle at center, rgba(77, 125, 255, 0.24) 0%, rgba(77, 125, 255, 0) 72%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #98f1ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(100deg, #ebfbff 0%, #99d7ff 55%, #8ca8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 180% 180%;
  animation: titleShift 10s ease-in-out infinite;
}

.hero-content > p {
  color: #bad0eb;
  line-height: 1.7;
  margin: 1rem 0 0;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(130deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(224, 248, 255, 0.18), 0 8px 18px rgba(0, 174, 255, 0.35);
  animation: pulseGlow 4.8s ease-in-out infinite;
}

.btn-ghost {
  border-color: var(--border);
  color: #c8dcff;
  background: rgba(13, 24, 48, 0.62);
}

.hero-card,
.card,
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-card {
  padding: 1.2rem 1.3rem;
}

.hero-card h2 {
  margin: 0;
  font-size: 1.1rem;
}

.hero-card ul {
  margin: 0.9rem 0 0;
  padding-left: 1.05rem;
  color: #b6cceb;
  line-height: 1.65;
}

.visual-panel {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.viz-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.viz-chip {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  border-radius: 999px;
  background: rgba(104, 153, 255, 0.18);
  color: #c9e6ff;
  border: 1px solid rgba(153, 194, 255, 0.28);
}

.viz-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: end;
}

.viz-chart {
  display: flex;
  align-items: end;
  gap: 0.35rem;
  height: 72px;
}

.viz-chart span {
  width: 12px;
  height: var(--h);
  border-radius: 999px;
  background: linear-gradient(180deg, #00c0ff 0%, #007ce8 100%);
  transition: height 0.65s ease, transform 0.65s ease;
  transform-origin: bottom center;
}

.viz-score p {
  margin: 0;
  font-size: 0.72rem;
  color: #8fb0d9;
}

.viz-score strong {
  font-size: 1.05rem;
  color: #d8f3ff;
}

.section {
  padding: 3rem 0;
}

#about {
  position: relative;
  overflow: hidden;
}

#about::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/source/background/backgound2.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  pointer-events: none;
  transition: opacity 2s ease;
}

#about.is-bg-fading::before {
  opacity: 0;
}

#about[data-bg-index="0"]::before {
  background-image: url("../images/source/background/backgound2.jpeg");
}

#about[data-bg-index="1"]::before {
  background-image: url("../images/source/background/backgound3.jpeg");
}

#about::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 13, 26, 0.28) 0%, rgba(6, 13, 26, 0.56) 100%);
  pointer-events: none;
}

#about > .container {
  position: relative;
  z-index: 1;
}

#about .section-intro {
  color: #d9e6f6;
}

.section-alt {
  background: rgba(11, 22, 44, 0.52);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#case-studies {
  position: relative;
  overflow: hidden;
}

#case-studies::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/source/background/backgound1.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0.24;
  pointer-events: none;
}

#case-studies::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(6, 13, 26, 0.18) 0%, rgba(6, 13, 26, 0.4) 100%);
  pointer-events: none;
}

#case-studies > .container {
  position: relative;
  z-index: 1;
}

#case-studies .card {
  background: rgba(14, 30, 56, 0.5);
}

.signal-strip {
  padding: 0.4rem 0 0.6rem;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.signal-item {
  border: 1px solid var(--border);
  background: rgba(9, 21, 43, 0.72);
  border-radius: 0.85rem;
  padding: 0.7rem 0.8rem;
  box-shadow: var(--shadow);
}

.signal-label {
  margin: 0;
  color: #8faccf;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.signal-item strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.15rem;
  color: #e9f8ff;
  text-shadow: 0 0 14px rgba(125, 222, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

.motion-on .reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  filter: blur(8px);
  transition: opacity 0.72s ease, transform 0.8s cubic-bezier(0.18, 0.7, 0.24, 1), filter 0.8s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.motion-on .reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

h3 {
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  font-size: 1.2rem;
}

.section-intro {
  color: var(--muted);
  margin-top: 0.8rem;
  line-height: 1.75;
  max-width: 75ch;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  padding: 1rem 1rem 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.55);
}

.card.is-clickable {
  cursor: pointer;
}

.card.is-clickable:focus-visible {
  outline: 2px solid #79d3ff;
  outline-offset: 3px;
}

h4 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-icon {
  width: 3rem;
  height: 3rem;
  display: inline-grid;
  place-items: center;
  border-radius: 0.5rem;
  background: rgba(93, 148, 255, 0.14);
  border: 1px solid rgba(165, 204, 255, 0.3);
  flex: 0 0 auto;
  padding: 0;
}

.card-icon img {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
  image-rendering: auto;
  display: block;
  border-radius: 0.34rem;
  transform: translateZ(0) scale(1);
  transform-origin: center;
  transition: transform 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
  backface-visibility: hidden;
}

#services .card-icon:hover img {
  transform: translateZ(0) scale(2.2);
}

.card p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
}

.detail-list li + li {
  margin-top: 0.28rem;
}

.demo-box {
  margin-top: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(10, 23, 45, 0.68);
  border-radius: 0.75rem;
  padding: 0.75rem 0.8rem;
}

.demo-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-strong);
}

.demo-box p + p {
  margin-top: 0.45rem;
}

.card .meta {
  color: #9fc1ea;
  font-weight: 500;
}

.source-badge {
  display: inline-flex;
  margin-top: 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(153, 194, 255, 0.35);
  background: rgba(77, 125, 255, 0.16);
  color: #d9ecff;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.62rem;
}

.value-wrap p {
  color: var(--muted);
  line-height: 1.75;
  margin-top: 0.9rem;
  max-width: 75ch;
}

.pill-row {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(93, 148, 255, 0.14);
  padding: 0.42rem 0.8rem;
  color: #d2e8ff;
  font-size: 0.9rem;
}

.contact-card {
  padding: 1.6rem;
}

.contact-card p {
  color: var(--muted);
  margin: 0.6rem 0 1.1rem;
}

.site-footer {
  padding: 1.1rem 0 1.5rem;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.93rem;
}

@keyframes orbDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(18px, -14px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes gridPulse {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.5;
  }
}

@keyframes titleShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 1px rgba(224, 248, 255, 0.18), 0 8px 18px rgba(0, 174, 255, 0.25);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(224, 248, 255, 0.28), 0 12px 26px rgba(77, 125, 255, 0.36);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(224, 248, 255, 0.18), 0 8px 18px rgba(0, 174, 255, 0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

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

  .signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-wrap {
    position: relative;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .brand {
    padding-right: 8.2rem;
  }

  .nav {
    display: none;
    width: 100%;
    margin: 0.55rem 0 0;
    padding: 0.48rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: rgba(9, 20, 41, 0.94);
    flex-direction: column;
    gap: 0.35rem;
    order: 4;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    display: block;
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: 0;
  }

  .lang-switch {
    margin-left: 0;
  }

  .header-controls {
    position: absolute;
    top: 0.95rem;
    right: 0;
    z-index: 3;
  }

  .hero {
    padding-top: 3.8rem;
  }

  .viz-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero-actions {
    flex-direction: column;
    align-items: start;
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }

  .brand-logo {
    width: clamp(130px, 40vw, 190px);
  }

  .brand-quote {
    max-width: 56vw;
    font-size: 0.62rem;
  }

  .footer-wrap {
    flex-direction: column;
    align-items: start;
  }
}
