/* ====================================
   丸星 Planet One — Brand Tokens
   ==================================== */
:root {
  --bg-space: #0a0e27;
  --bg-space-light: #111640;
  --accent-purple: #7c5cfc;
  --accent-blue: #4ea8f6;
  --accent-cyan: #00e5c8;
  --accent-green: #39ff9f;
  --text-primary: #f0f2ff;
  --text-secondary: #a0a8cc;
  --glow-color: rgba(0, 229, 200, 0.55);
  --glass-bg: rgba(16, 20, 56, 0.72);
  --glass-border: rgba(124, 92, 252, 0.18);
  --font-main: 'Inter', 'Noto Sans TC', sans-serif;
}

/* ====================================
   Reset & Base
   ==================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background: var(--bg-space);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ====================================
   Starfield Canvas
   ==================================== */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ====================================
   Navbar
   ==================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 2px 32px rgba(0, 0, 0, 0.35), inset 0 0 0 1px var(--glass-border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text-primary);
}

.navbar-brand .brand-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.7;
  }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  transition: width 0.3s ease;
  border-radius: 2px;
}

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

/* Mobile menu toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ====================================
   Hero Section
   ==================================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 2rem 4rem;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* — Text Side — */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-tag::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====================================
   CTA Button — Glow Effect
   ==================================== */
.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-main);
  color: var(--bg-space);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  border: none;
  border-radius: 60px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow:
    0 0 20px rgba(0, 229, 200, 0.35),
    0 0 60px rgba(0, 229, 200, 0.15);
  animation: glow-breathe 3s ease-in-out infinite;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 30px rgba(0, 229, 200, 0.55),
    0 0 80px rgba(0, 229, 200, 0.25),
    0 0 120px rgba(57, 255, 159, 0.1);
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 60px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green), var(--accent-blue));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
  filter: blur(12px);
}

.cta-btn:hover::before {
  opacity: 1;
}

.cta-btn .btn-icon {
  display: inline-block;
  transition: transform 0.3s;
}

.cta-btn:hover .btn-icon {
  transform: translateX(4px);
}

@keyframes glow-breathe {

  0%,
  100% {
    box-shadow:
      0 0 20px rgba(0, 229, 200, 0.35),
      0 0 60px rgba(0, 229, 200, 0.12);
  }

  50% {
    box-shadow:
      0 0 32px rgba(0, 229, 200, 0.55),
      0 0 90px rgba(0, 229, 200, 0.2),
      0 0 140px rgba(57, 255, 159, 0.08);
  }
}

/* Secondary button */
.cta-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: transparent;
  border: 1.5px solid var(--glass-border);
  border-radius: 60px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.cta-btn-secondary:hover {
  border-color: var(--accent-purple);
  background: rgba(124, 92, 252, 0.08);
  color: var(--accent-blue);
}

/* ====================================
   Planet Illustration
   ==================================== */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.planet-container {
  position: relative;
  width: 420px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-18px);
  }
}

/* Main Planet */
.planet {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%,
      #a78bfa 0%,
      #7c5cfc 30%,
      #4338ca 60%,
      #1e1b4b 100%);
  box-shadow:
    inset -30px -20px 60px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(124, 92, 252, 0.3),
    0 0 120px rgba(124, 92, 252, 0.1);
  overflow: hidden;
}

/* Planet surface detail */
.planet::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 40px 12px at 55% 40%, rgba(167, 139, 250, 0.4) 0%, transparent 100%),
    radial-gradient(ellipse 30px 8px at 30% 60%, rgba(99, 102, 241, 0.3) 0%, transparent 100%),
    radial-gradient(ellipse 50px 15px at 70% 70%, rgba(79, 70, 229, 0.25) 0%, transparent 100%);
}

/* Highlight shine */
.planet::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 15%;
  width: 35%;
  height: 35%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
  filter: blur(4px);
}

/* Orbit Ring */
.orbit-ring {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1.5px solid rgba(124, 92, 252, 0.15);
  animation: orbit-spin 20s linear infinite;
}

.orbit-ring-2 {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  border: 1px dashed rgba(78, 168, 246, 0.1);
  animation: orbit-spin 35s linear infinite reverse;
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Orbiting moon */
.moon {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  box-shadow: 0 0 12px var(--accent-cyan), 0 0 30px rgba(0, 229, 200, 0.2);
}

/* Small orbiting dots */
.orbit-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue);
}

.orbit-dot:nth-child(1) {
  bottom: 10px;
  right: 30px;
}

.orbit-dot:nth-child(2) {
  top: 60px;
  left: 10px;
}

/* Ambient glow behind planet */
.planet-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle,
      rgba(124, 92, 252, 0.15) 0%,
      rgba(78, 168, 246, 0.05) 50%,
      transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Decorative floating particles near planet */
.float-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  animation: particle-drift 8s ease-in-out infinite;
}

.float-particle:nth-child(1) {
  width: 4px;
  height: 4px;
  background: var(--accent-cyan);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.float-particle:nth-child(2) {
  width: 3px;
  height: 3px;
  background: var(--accent-purple);
  top: 70%;
  right: 5%;
  animation-delay: 2s;
}

.float-particle:nth-child(3) {
  width: 5px;
  height: 5px;
  background: var(--accent-green);
  bottom: 10%;
  left: 25%;
  animation-delay: 4s;
}

@keyframes particle-drift {

  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.5;
  }

  25% {
    transform: translate(8px, -12px);
    opacity: 0.9;
  }

  50% {
    transform: translate(-6px, -20px);
    opacity: 0.4;
  }

  75% {
    transform: translate(12px, -8px);
    opacity: 0.8;
  }
}

/* ====================================
   Shared Section Styles
   ==================================== */
.section-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  margin-bottom: 0.8rem;
}

.section-tag::before,
.section-tag::after {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}

/* ====================================
   Cross-Star Dot Pattern Background
   ==================================== */
.section-services,
.section-cases {
  position: relative;
}

.section-services::before,
.section-cases::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle 1.2px, rgba(124, 92, 252, 0.09) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
}

/* ====================================
   Services Section
   ==================================== */
.section-services {
  z-index: 1;
  padding: 7rem 2rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  position: relative;
  background: rgba(16, 20, 56, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s ease;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.06), rgba(0, 229, 200, 0.04));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124, 92, 252, 0.35);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(124, 92, 252, 0.08);
}

.service-card:hover::after {
  opacity: 1;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  background: rgba(124, 92, 252, 0.08);
  border: 1px solid rgba(124, 92, 252, 0.12);
  transition: all 0.4s;
}

.service-card:hover .service-icon {
  background: rgba(124, 92, 252, 0.15);
  box-shadow: 0 0 24px rgba(124, 92, 252, 0.15);
  transform: scale(1.08);
}

.service-icon svg {
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
}

.service-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.service-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ====================================
   Cases Section
   ==================================== */
.section-cases {
  z-index: 1;
  padding: 7rem 2rem;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.case-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(16, 20, 56, 0.6);
  border: 1px solid var(--glass-border);
  transition: all 0.4s ease;
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 252, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(124, 92, 252, 0.08);
}

/* Image wrapper */
.case-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.case-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.case-card:hover .case-img {
  transform: scale(1.08);
}

/* Hover overlay */
.case-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 39, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.case-card:hover .case-overlay {
  opacity: 1;
}

.case-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-main);
  color: var(--bg-space);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  border-radius: 60px;
  text-decoration: none;
  transform: translateY(12px);
  transition: transform 0.4s ease, box-shadow 0.3s;
  box-shadow: 0 0 20px rgba(0, 229, 200, 0.3);
}

.case-card:hover .case-btn {
  transform: translateY(0);
}

.case-btn:hover {
  box-shadow:
    0 0 30px rgba(0, 229, 200, 0.5),
    0 0 60px rgba(0, 229, 200, 0.15);
}

/* Card info */
.case-info {
  padding: 1.5rem 1.5rem 1.8rem;
}

.case-tag {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(0, 229, 200, 0.08);
  border: 1px solid rgba(0, 229, 200, 0.15);
  border-radius: 40px;
  margin-bottom: 0.8rem;
}

.case-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.case-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ====================================
   Scroll Reveal Animation
   ==================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====================================
   Extra Content (scroll padding)
   ==================================== */
.spacer-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.spacer-content {
  text-align: center;
  max-width: 600px;
}

.spacer-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.spacer-content p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ====================================
   Responsive
   ==================================== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-text {
    align-items: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .planet-container {
    width: 300px;
    height: 300px;
  }

  .planet {
    width: 160px;
    height: 160px;
  }

  .orbit-ring {
    width: 240px;
    height: 240px;
  }

  .orbit-ring-2 {
    width: 270px;
    height: 270px;
  }

  .planet-glow {
    width: 200px;
    height: 200px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .cases-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.96);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 99;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.4rem;
  }

  .mobile-toggle {
    display: flex;
    z-index: 101;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0.8rem 1.2rem;
  }

  .hero {
    padding: 5rem 1.2rem 3rem;
  }

  .cta-btn,
  .cta-btn-secondary {
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
  }
}