/* ========================================
   AA Tech — Dark Tech Corporate Website
   ======================================== */

/* --- CSS Variables --- */
:root {
  --bg-primary: #06060f;
  --bg-secondary: #0c0c1d;
  --bg-card: #111128;
  --bg-card-hover: #16163a;
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --text-muted: #555577;
  --accent: #00f5d4;
  --accent-glow: rgba(0, 245, 212, 0.3);
  --accent-dim: #00c4a8;
  --gradient: linear-gradient(135deg, #00f5d4, #00b4d8, #7b61ff);
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 245, 212, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Noto Sans TC', sans-serif;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Gradient Text --- */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px var(--accent-glow), 0 8px 30px rgba(0, 245, 212, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-accent);
}

.btn-outline:hover {
  background: rgba(0, 245, 212, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(6, 6, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  color: var(--accent);
  font-size: 18px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 6, 15, 0.5) 0%,
    rgba(6, 6, 15, 0.8) 50%,
    var(--bg-primary) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 900px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid var(--border-accent);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.hero-title .line1 {
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-title .line2 {
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-title .line3 {
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s 1s forwards;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 1.5s forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}

.hero-scroll-indicator span {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* --- Section Shared --- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid var(--border-accent);
  border-radius: 50px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* --- About Section --- */
.about {
  padding: 120px 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: var(--transition);
}

.about-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

.about-card:hover::before {
  opacity: 1;
}

.about-icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
  margin-bottom: 24px;
}

.about-icon svg {
  width: 100%;
  height: 100%;
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.about-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 400px;
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), transparent);
  pointer-events: none;
}

.about-image-badge {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(6, 6, 15, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  text-align: center;
}

.badge-number {
  display: block;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.badge-text {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Services Section --- */
.services {
  padding: 120px 0;
  background: var(--bg-secondary);
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.service-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.service-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.service-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--bg-card) 100%);
}

.service-content {
  padding: 32px;
}

.service-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--border-accent);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.5;
}

.service-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.service-content p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.service-tags li {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.12);
  color: var(--accent-dim);
}

/* --- Stats Section --- */
.stats {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.stats-bg {
  position: absolute;
  inset: 0;
}

.stats-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.stats-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 15, 0.7);
}

.stats-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
  padding: 40px 20px;
  background: rgba(17, 17, 40, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.stat-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
  display: inline;
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--accent-dim);
  display: inline;
}

.stat-label {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* --- Contact Section --- */
.contact {
  padding: 120px 0;
  background: var(--bg-secondary);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.1);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--border-accent);
}

.info-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--accent);
}

.info-icon svg {
  width: 100%;
  height: 100%;
}

.info-card h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Footer --- */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}

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

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 12px;
  max-width: 280px;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid,
  .about-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 6, 15, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: clamp(32px, 8vw, 48px);
  }

  .hero-desc {
    font-size: 16px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-number {
    font-size: 40px;
  }

  .about-image-badge {
    bottom: 16px;
    right: 16px;
  }

  .badge-number {
    font-size: 28px;
  }
}

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

  .stat-item {
    padding: 24px 12px;
  }

  .about-grid {
    gap: 16px;
  }

  .about-card {
    padding: 28px 24px;
  }
}
