/* =========================================
   Design Tokens & Variables
========================================= */
:root {
  /* Colors */
  --color-primary: #0f172a;
  /* Deep Space Blue */
  --color-secondary: #1e293b;
  /* Lighter Blue/Slate */
  --color-accent: #2563eb;
  /* Vibrant Royal Blue */
  --color-accent-hover: #1d4ed8;
  --color-accent-glow: rgba(37, 99, 235, 0.5);
  --color-cyan: #06b6d4;
  /* Neon Cyan */
  --color-cyan-glow: rgba(6, 182, 212, 0.5);
  --color-light: #f8fafc;
  /* Off White */
  --color-white: #ffffff;
  --color-gray: #94a3b8;
  --color-green: #10b981;
  /* Line Green / Success */
  --color-yellow: #f59e0b;

  /* Typography */
  --font-sans: 'Noto Sans TC', sans-serif;

  /* Backgrounds */
  --bg-dark: #0a0f1c;
  /* Very dark blue for sections */
  --bg-card-dark: rgba(30, 41, 59, 0.7);
  /* Glass card dark */
  --bg-card-light: #ffffff;

  /* Effects */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px var(--color-accent-glow);
  --shadow-glow-cyan: 0 0 20px var(--color-cyan-glow);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(15, 23, 42, 0.6);
  --glass-blur: blur(12px);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-primary);
  background-color: var(--color-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================
   Typography & Utilities
========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
}

.text-accent {
  color: var(--color-accent);
}

.text-cyan {
  color: var(--color-cyan);
}

.text-green {
  color: var(--color-green);
}

.text-yellow {
  color: var(--color-yellow);
}

.bg-green {
  background-color: #06c755;
}

/* Line green */
.bg-blue {
  background-color: var(--color-accent);
}

.bg-slate {
  background-color: var(--color-secondary);
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--color-white);
}

.section-light {
  background-color: var(--color-light);
  color: var(--color-primary);
}

section {
  padding: 6rem 0;
}

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

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--color-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Gradients */
.title-gradient {
  background: linear-gradient(90deg, #ffffff 0%, var(--color-cyan) 50%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: gradient-shift 4s ease infinite;
}

.section-light .title-gradient {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 50%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* =========================================
   Buttons
========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.glow-btn {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* =========================================
   Navbar (Glassmorphism)
========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  transition: var(--transition-normal);
  background: transparent;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border);
  padding: 0.75rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  display: flex;
  flex-direction: column;
  color: var(--color-white);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 1px;
  display: inline-flex;
}

/* ITune Dynamic Breathing Light */
.logo-i {
  animation: breathe-i 4s ease-in-out infinite;
}

.logo-t {
  animation: breathe-t 4s ease-in-out infinite;
}

.logo-une {
  animation: breathe-une 4s ease-in-out infinite;
}

@keyframes breathe-i {

  0%,
  30% {
    color: var(--color-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    opacity: 1;
  }

  50%,
  80% {
    color: var(--color-gray);
    text-shadow: none;
    opacity: 0.4;
  }

  100% {
    color: var(--color-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    opacity: 1;
  }
}

@keyframes breathe-t {

  0%,
  30% {
    color: var(--color-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }

  50%,
  80% {
    color: var(--color-cyan);
    text-shadow: 0 0 10px var(--color-cyan-glow);
  }

  100% {
    color: var(--color-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  }
}

@keyframes breathe-une {

  0%,
  30% {
    color: var(--color-gray);
    text-shadow: none;
    opacity: 0.4;
  }

  50%,
  80% {
    color: var(--color-cyan);
    text-shadow: 0 0 10px var(--color-cyan-glow);
    opacity: 1;
  }

  100% {
    color: var(--color-gray);
    text-shadow: none;
    opacity: 0.4;
  }
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--color-gray);
  font-weight: 400;
}

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

.nav-link {
  color: var(--color-white);
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-cyan);
  transition: var(--transition-normal);
}

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

/* Language Switcher */
.lang-switcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-switcher {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 2rem 0.4rem 1rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  backdrop-filter: blur(5px);
  transition: var(--transition-normal);
}

.lang-switcher:hover, .lang-switcher:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--color-cyan);
}

.lang-switcher option {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.lang-switcher-wrap::after {
  content: '\f0d7';
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 0.75rem;
  color: var(--color-white);
  pointer-events: none;
  font-size: 0.8rem;
}

/* =========================================
   Hero Section
========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
  background-size: cover;
  background-position: center;
  z-index: 0;
  transform: scale(1.05);
  /* slightly scaled for ambient animation if needed */
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(10, 15, 28, 0.6) 0%, rgba(10, 15, 28, 0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-gray);
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
}

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-white);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-white);
  border-radius: 2px;
  animation: scroll-wheel 1.5s infinite;
}

@keyframes scroll-wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* =========================================
   Features Section (3D Cards)
========================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--color-white);
  padding: 2.5rem 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-normal);
}

.feature-card:hover .card-icon {
  background: var(--color-accent);
  color: var(--color-white);
  transform: rotateY(10deg) scale(1.1);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.card-text {
  color: var(--color-secondary);
  font-size: 1rem;
}

/* =========================================
   Case Studies Section
========================================= */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 2rem;
}

.case-card {
  background: var(--bg-card-dark);
  border: var(--glass-border);
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: var(--glass-blur);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow-cyan);
  border-color: rgba(6, 182, 212, 0.4);
}

.case-img-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.case-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.case-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.case-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.case-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-white);
}

.case-text {
  color: var(--color-gray);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.case-stats {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 1rem;
}

.stat {
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
}

/* =========================================
   Contact Section
========================================= */
.contact-card {
  background: var(--color-white);
  border-radius: 1.5rem;
  padding: 4rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.contact-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 50%;
  height: 200%;
  background: linear-gradient(to right, transparent, rgba(37, 99, 235, 0.03), rgba(6, 182, 212, 0.05));
  transform: rotate(-15deg);
  pointer-events: none;
}

.contact-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.contact-desc {
  color: var(--color-secondary);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.contact-perks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-perks li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: var(--transition-normal);
}

.contact-btn:hover {
  background: var(--color-white);
  transform: translateX(10px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.2);
}

.icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.25rem;
}

.btn-text h4 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.btn-text span {
  font-size: 0.85rem;
  color: var(--color-gray);
}

/* =========================================
   Footer
========================================= */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem 0;
  color: var(--color-gray);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* =========================================
   Floating Actions
========================================= */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
}

.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.float-line {
  background-color: #06c755;
  animation: float-pulse-green 2s infinite;
}

.float-phone {
  background-color: var(--color-accent);
}

.float-btn:hover {
  transform: scale(1.1);
}

@keyframes float-pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 199, 85, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(6, 199, 85, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(6, 199, 85, 0);
  }
}

/* =========================================
   Animations (Reveal)
========================================= */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.15s;
}

.delay-2 {
  transition-delay: 0.3s;
}

/* =========================================
   Responsive Media Queries
========================================= */
@media (max-width: 992px) {
  .contact-card {
    grid-template-columns: 1fr;
    padding: 3rem 2rem;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .nav-links {
    display: none;
    /* simple mobile behavior for now */
  }

  .section-title {
    font-size: 2rem;
  }

  .floating-actions {
    bottom: 1rem;
    right: 1rem;
  }
}