/* ===== CSS Variables ===== */
:root {
  /* Deep blue tech palette */
  --primary: #1E3A5F;
  --primary-light: #2A4F7A;
  --accent: #3B82F6;
  --accent-dark: #2563EB;
  --tpatrol: #F59E0B;
  --tpatrol-dark: #D97706;
  --tvouch: #10B981;
  --tvouch-dark: #059669;
  --bg-main: #F8FAFC;
  --bg-white: #FFFFFF;
  --bg-light: #F1F5F9;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --white: #FFFFFF;
  --success: #10B981;

  /* Spacing */
  --container-max: 1280px;
  --section-padding: 4rem;
  --section-padding-lg: 6rem;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans TC', sans-serif;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-muted);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

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

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1.0625rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 10px -1px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-product {
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
}

.btn-product-tpatrol {
  background: linear-gradient(135deg, var(--tpatrol), var(--tpatrol-dark));
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.btn-product-tpatrol:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-product-tvouch {
  background: linear-gradient(135deg, var(--tvouch), var(--tvouch-dark));
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.btn-product-tvouch:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 0.75rem;
  color: var(--white);
  box-shadow: 0 4px 6px -1px rgba(30, 58, 95, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-sub {
  font-size: 0.6875rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

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

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.nav-actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.lang-toggle:hover {
  color: var(--accent);
}

.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  color: var(--text-muted);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
}

.mobile-menu.active {
  display: flex;
}

.mobile-menu a {
  font-weight: 500;
  color: var(--text-muted);
}

.mobile-menu-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .nav-actions {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  padding: 7rem 1rem 4rem;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-white) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.hero-bg-circle-1 {
  top: 3rem;
  left: -2rem;
  width: 20rem;
  height: 20rem;
  background: var(--accent);
  opacity: 0.08;
}

.hero-bg-circle-2 {
  bottom: 2rem;
  right: -4rem;
  width: 28rem;
  height: 28rem;
  background: var(--primary);
  opacity: 0.06;
}

.hero-bg-circle-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16rem;
  height: 16rem;
  background: var(--tvouch);
  opacity: 0.05;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-title-zh {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.hero-title-en {
  display: block;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 0.5rem;
  letter-spacing: 0.1em;
}

.hero-tagline {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.hero-description {
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 9rem 1.5rem 6rem;
  }

  .hero-title-zh {
    font-size: 3.5rem;
  }

  .hero-title-en {
    font-size: 1.5rem;
  }

  .hero-tagline {
    font-size: 1.5rem;
  }

  .hero-stats {
    gap: 4rem;
  }

  .stat-value {
    font-size: 2rem;
  }
}

/* ===== Section Common ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.section-badge-blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.section-badge-accent {
  background: rgba(30, 58, 95, 0.1);
  color: var(--primary);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

/* ===== Products Section ===== */
.products {
  padding: var(--section-padding) 0;
  background: var(--bg-white);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 56rem;
  margin: 0 auto;
}

.product-card {
  padding: 2rem;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: 1.25rem;
  transition: all var(--transition-slow);
}

.product-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.product-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  color: var(--white);
}

.product-icon-tpatrol {
  background: linear-gradient(135deg, var(--tpatrol), var(--tpatrol-dark));
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.product-icon-tvouch {
  background: linear-gradient(135deg, var(--tvouch), var(--tvouch-dark));
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.product-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.product-badge-tpatrol {
  background: rgba(245, 158, 11, 0.15);
  color: var(--tpatrol-dark);
}

.product-badge-tvouch {
  background: rgba(16, 185, 129, 0.15);
  color: var(--tvouch-dark);
}

.product-card-tpatrol {
  border-color: rgba(245, 158, 11, 0.3);
}

.product-card-tvouch {
  border-color: rgba(16, 185, 129, 0.3);
}

.product-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.product-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.product-features {
  margin-bottom: 1.5rem;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.product-card-tpatrol .product-features li svg {
  color: var(--tpatrol);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.product-card-tvouch .product-features li svg {
  color: var(--tvouch);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

@media (min-width: 768px) {
  .products {
    padding: var(--section-padding-lg) 0;
  }

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

/* ===== About Section ===== */
.about {
  padding: var(--section-padding) 0;
  background: var(--bg-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

.about-card {
  padding: 2rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: all var(--transition-slow);
}

.about-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.about-icon {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 0.75rem;
  color: var(--white);
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(30, 58, 95, 0.2);
}

.about-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.about-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .about {
    padding: var(--section-padding-lg) 0;
  }

  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Team Section ===== */
.team {
  padding: var(--section-padding) 0;
  background: var(--bg-white);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 48rem;
  margin: 0 auto;
}

.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: all var(--transition-slow);
}

.team-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.team-photo {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-light), var(--border));
  border-radius: 50%;
  margin: 0 auto 1rem;
  color: var(--text-light);
}

.team-card h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.125rem;
}

.team-title-en {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.team-role {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

@media (min-width: 768px) {
  .team {
    padding: var(--section-padding-lg) 0;
  }

  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Contact Section ===== */
.contact {
  padding: var(--section-padding) 0;
  background: var(--bg-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.contact-item-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.contact-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.contact-form-wrapper {
  padding: 2rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: var(--bg-main);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 6rem;
}

@media (min-width: 768px) {
  .contact {
    padding: var(--section-padding-lg) 0;
  }

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

/* ===== Footer ===== */
.footer {
  padding: 3rem 0;
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer .nav-logo .logo-icon {
  background: rgba(255, 255, 255, 0.15);
}

.footer .logo-main {
  color: var(--white);
}

.footer .logo-sub {
  color: rgba(255, 255, 255, 0.6);
}

.footer-brand p {
  font-size: 0.875rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-products h4,
.footer-contact h4,
.footer-lang h4 {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.footer-products ul li {
  margin-bottom: 0.5rem;
}

.footer-products a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}

.footer-products a:hover {
  color: var(--white);
}

.footer-contact p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
}

.footer .lang-toggle {
  color: rgba(255, 255, 255, 0.6);
}

.footer .lang-toggle:hover {
  color: var(--white);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}
