:root {
  --bg: #0b0d17;
  --bg-2: #11142a;
  --fg: #eef0ff;
  --fg-dim: #aab0d0;
  --muted: #6b7299;
  --line: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.04);
  --card-2: rgba(255, 255, 255, 0.07);
  --accent-1: #7c5cff;
  --accent-2: #00d4ff;
  --accent-3: #ff5ca8;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --max: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Background gradient blobs --- */
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 800px at 110% -10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(900px 700px at -10% 10%, rgba(0, 212, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #0b0d17 0%, #0a0c1a 100%);
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 18s ease-in-out infinite;
}
.blob-a { width: 520px; height: 520px; left: -120px; top: -120px;
  background: radial-gradient(circle, #7c5cff, transparent 60%); }
.blob-b { width: 480px; height: 480px; right: -100px; top: 20%;
  background: radial-gradient(circle, #00d4ff, transparent 60%);
  animation-delay: -6s; }
.blob-c { width: 600px; height: 600px; left: 20%; bottom: -200px;
  background: radial-gradient(circle, #ff5ca8, transparent 60%);
  animation-delay: -12s; opacity: 0.45; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(20px, -30px, 0) scale(1.05); }
}

.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* --- Layout --- */
.nav, main, footer .foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--fg);
  font-weight: 700; letter-spacing: 0.2px;
}
.logo-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35);
}
.logo-mark.sm { width: 24px; height: 24px; font-size: 14px; border-radius: 7px; }
.logo-text .dot { color: var(--accent-2); }

.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--fg-dim); text-decoration: none; font-size: 15px;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--fg); }

/* --- Hero --- */
.hero {
  padding-block: clamp(48px, 9vw, 110px) clamp(40px, 7vw, 80px);
  text-align: center;
}

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--fg-dim); font-size: 13px; letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 212, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

.hero h1 {
  font-size: clamp(38px, 7.5vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 22px auto 18px;
  max-width: 14ch;
}
.grad {
  background: linear-gradient(120deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.lede {
  margin: 0 auto;
  max-width: 56ch;
  color: var(--fg-dim);
  font-size: clamp(15px, 1.4vw, 18px);
}

/* --- CTA form --- */
.cta {
  margin: 36px auto 0;
  max-width: 520px;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  position: relative;
}
.cta input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg);
  font-size: 15px;
  padding: 12px 18px;
}
.cta input::placeholder { color: var(--muted); }

.cta button {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer;
  padding: 12px 20px;
  border-radius: 999px;
  color: white; font-weight: 600; font-size: 15px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.cta button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cta button:active { transform: translateY(0); }

.form-msg {
  position: absolute;
  left: 0; right: 0;
  bottom: -28px;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--accent-2);
  min-height: 18px;
}
.form-msg.error { color: #ff8aa5; }

/* --- Features --- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: clamp(40px, 6vw, 64px);
}
.card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  background: var(--card-2);
  border-color: rgba(255, 255, 255, 0.14);
}
.icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.2), rgba(0, 212, 255, 0.2));
  color: var(--fg);
  border: 1px solid var(--line);
}
.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.2px;
}
.card p { margin: 0; color: var(--fg-dim); font-size: 14.5px; }

/* --- About --- */
.about {
  margin: clamp(60px, 9vw, 100px) auto 80px;
  max-width: 720px;
  text-align: center;
}
.about h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.about p { color: var(--fg-dim); margin: 0; }
.about em { color: var(--fg); font-style: normal; }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--line);
  padding-block: 24px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 14px;
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot-inner > div {
  display: inline-flex; align-items: center; gap: 10px;
}
.foot-inner a {
  color: var(--fg-dim); text-decoration: none;
}
.foot-inner a:hover { color: var(--fg); }

/* --- Responsive --- */
@media (max-width: 820px) {
  .features { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .nav-links { display: none; }
  .features { grid-template-columns: 1fr; }

  .cta {
    flex-direction: column;
    border-radius: 18px;
    padding: 10px;
  }
  .cta input { padding: 14px 16px; }
  .cta button { justify-content: center; padding: 14px 16px; border-radius: 12px; }
  .form-msg { position: static; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .pulse, .card { animation: none; transition: none; }
  html { scroll-behavior: auto; }
}
