/* ===== Self-hosted Inter font ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Inter-SemiBoldItalic.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/Inter-Bold.woff2') format('woff2');
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', 'Noto Sans TC', 'Microsoft JhengHei', -apple-system,
    BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #131314;
  background: #ffffff;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

strong {
  font-weight: 700;
}

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

ul, ol {
  list-style: none;
}

/* ===== Container ===== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

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

.nav-logo img {
  height: 38px;
  width: auto;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #131314;
}

/* Hamburger menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #131314;
  position: absolute;
  left: 10px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle span {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle span::before {
  content: '';
  top: -6px;
}

.nav-toggle span::after {
  content: '';
  top: 6px;
}

.nav-toggle.active span {
  background: transparent;
}

.nav-toggle.active span::before {
  top: 0;
  transform: rotate(45deg);
  background: #131314;
}

.nav-toggle.active span::after {
  top: 0;
  transform: rotate(-45deg);
  background: #131314;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 6rem;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.hero-sub {
  margin-top: 2rem;
  font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.375rem);
  color: #666;
  max-width: 620px;
  line-height: 1.6;
}

/* ===== Section shared ===== */
.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #131314;
  margin-bottom: 3rem;
}

/* ===== News ===== */
.news {
  padding: 5rem 0 8rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.news-list {
  list-style: none;
}

.news-item {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.news-item:first-child {
  padding-top: 0;
}

.news-date {
  font-size: 0.875rem;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

.news-title {
  font-size: 1rem;
  color: #131314;
  transition: color 0.2s;
  line-height: 1.5;
}

.news-title:hover {
  color: #666;
}

.news-item.hidden {
  display: none;
}

.news-toggle {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.2s;
}

.news-toggle:hover {
  color: #131314;
}

/* ===== Products ===== */
.products {
  padding: 5rem 0 8rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.thales-partner {
  max-width: 180px;
  opacity: 1;
  margin-bottom: 3rem;
}

.products-subsection {
  margin-bottom: 4rem;
}

.products-subsection:last-child {
  margin-bottom: 0;
}

.products-subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

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

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.service-card p {
  color: #666;
  font-size: 1rem;
  line-height: 1.65;
}

.service-card .card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #131314;
  transition: color 0.2s;
}

.service-card .card-link:hover {
  color: #666;
}

/* ===== About ===== */
.about {
  padding: 8rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.about-text {
  font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem);
  line-height: 1.6;
  max-width: 780px;
  color: #333;
  margin-bottom: 3rem;
}

.about-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 3rem;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.about-info dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 0.5rem;
}

.about-info dd {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
}

/* Details / Summary */
.about-details {
  margin-bottom: 1rem;
}

.about-details-title {
  font-size: 1rem;
  font-weight: 600;
  color: #131314;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.about-details-content {
  padding: 1.5rem 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #666;
}

.about-details-content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #131314;
  margin: 1.5rem 0 0.5rem;
}

.about-details-content h4:first-child {
  margin-top: 0;
}

.about-details-content ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.about-details-content ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.about-details-content li {
  margin-bottom: 0.25rem;
}

.customer-group {
  margin-bottom: 1rem;
}

.customer-group h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #131314;
  margin-bottom: 0.25rem;
}

.customer-group p {
  line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
  padding: 4rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.5rem 3rem;
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-brand img {
  height: 30px;
  width: auto;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.footer-contact a,
.footer-contact span {
  font-size: 0.9375rem;
  color: #666;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: #131314;
}

.footer-copy {
  font-size: 0.8125rem;
  color: #999;
  margin-left: auto;
}

/* ===== Product Detail Pages ===== */
.product-page {
  padding-top: 64px;
}

.product-back {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  margin-top: 3rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.product-back:hover {
  color: #131314;
}

.product-header {
  margin-bottom: 3rem;
}

.product-header h1 {
  font-size: clamp(2rem, 3vw + 0.5rem, 3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.product-header .product-brand {
  font-size: 1rem;
  color: #999;
  margin-top: 0.5rem;
}

.product-image {
  max-width: min(400px, 100%);
  margin-bottom: 3rem;
}

.product-content {
  max-width: 780px;
  padding-bottom: 4rem;
}

.product-content p {
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.product-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.product-features {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}

.product-features li {
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.product-download {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #131314;
  padding: 0.75rem 0;
  transition: color 0.2s;
}

.product-download:hover {
  color: #666;
}

/* ===== News Detail Pages ===== */
.news-page {
  padding-top: 64px;
}

.news-page-back {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  margin-top: 3rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.news-page-back:hover {
  color: #131314;
}

.news-page-header {
  margin-bottom: 2rem;
}

.news-page-header h1 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.news-page-date {
  font-size: 0.875rem;
  color: #999;
  margin-top: 0.75rem;
}

.news-page-content {
  max-width: 780px;
  padding-bottom: 4rem;
}

.news-page-content p {
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.news-page-content a {
  color: #131314;
  font-weight: 500;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s;
}

.news-page-content a:hover {
  border-color: #131314;
}

.news-page-content .pdf-links {
  margin-top: 2rem;
}

.news-page-content .pdf-links a {
  display: block;
  margin-bottom: 0.75rem;
}

/* ===== Fade-in animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

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

  .hero {
    min-height: 85vh;
    padding: 7rem 0 4rem;
  }

  .news {
    padding: 5rem 0;
  }

  .news-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .products {
    padding: 5rem 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about {
    padding: 5rem 0;
  }

  .about-info {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-copy {
    margin-left: 0;
  }

  .footer-contact {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .nav-inner {
    padding: 0 1.25rem;
  }
}
