/* ==========================================================================
   One Work Design Style — ST. CROSS INDUSTRY CSS
   Path: css/style.css
   ========================================================================== */

:root {
  --bg-color: #ffffff;
  --bg-secondary: #f9f9f9;
  --text-primary: #1a1a1a;
  --text-secondary: #777777;
  --text-muted: #aaaaaa;
  --border-color: #eeeeee;
  --border-dark: #1a1a1a;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Noto Sans TC", sans-serif;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.8;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

/* --- Container & Layout --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  padding: 140px 0;
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 60px;
}

/* --- Header / Navigation --- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.4s var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

#header.scrolled {
  height: 70px;
  border-bottom-color: var(--border-color);
}

.header-container {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary);
}

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

.nav-item {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text-primary);
  transition: width 0.3s var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
}

.nav-item:hover::after, .nav-item.active::after {
  width: 100%;
}

.lang-switch {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
  cursor: pointer;
  transition: color 0.3s;
}

.lang-switch:hover {
  color: var(--text-primary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 1px;
  background-color: var(--text-primary);
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.8) 0%, rgba(240,240,240,1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.hero p {
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  font-weight: 300;
}

.hero-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 35px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 36px;
  border: 1px solid var(--text-primary);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--text-primary);
  transition: all 0.4s var(--transition-smooth);
}

.hero-btn:hover {
  background-color: var(--text-primary);
  color: #ffffff;
}

.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

.scroll-down .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 80px;
}

.about-heading h2 {
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.about-block {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
}

.about-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.about-subhead {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.about-tags span {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  background-color: var(--bg-secondary);
  padding: 3px 10px;
  border: 1px solid var(--border-color);
  font-weight: 400;
}

.about-block p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

.about-block p strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Mid Banner Section --- */
.mid-banner-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #1a1a1a;
}

.mid-banner-wrapper {
  position: relative;
  width: 100%;
  max-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mid-banner-img {
  width: 100%;
  height: 100%;
  max-height: 650px;
  object-fit: cover;
  display: block;
  filter: brightness(0.8);
}

.mid-banner-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  z-index: 2;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.banner-slogan {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.banner-subtext {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
}

/* --- Filter Bar & Grid --- */
.filter-bar {
  display: flex;
  gap: 30px;
  margin-bottom: 50px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  flex-wrap: wrap;
}

.filter-btn, .game-filter-btn {
  background: none;
  border: none;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  cursor: pointer;
  padding-bottom: 10px;
  position: relative;
  transition: color 0.3s;
}

.filter-btn.active, .filter-btn:hover,
.game-filter-btn.active, .game-filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active::after,
.game-filter-btn.active::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px 40px;
  align-items: stretch;
}

.products-grid a.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.product-card {
  cursor: pointer;
  overflow: hidden;
}

.card-img-wrapper {
  width: 100%;
  height: 320px !important;
  overflow: hidden;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.card-img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--transition-smooth);
}

.product-card:hover .card-img {
  transform: scale(1.05);
}

.card-info {
  margin-top: 12px !important;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.card-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.product-png-wrapper {
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  height: 320px;
  transition: background-color 0.3s;
}

.product-card:hover .product-png-wrapper {
  background-color: #f0f0f0;
}

.product-png-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-png-img {
  transform: scale(1.05);
}

/* --- Contact Section & Form Customization --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
}

.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.company-en {
  font-size: 0.95rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.company-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  font-style: italic;
  margin-bottom: 25px;
}

.contact-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.info-list p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.info-list strong {
  color: var(--text-primary);
  display: inline-block;
  width: 80px;
  font-weight: 500;
}

.contact-form .form-group {
  position: relative;
  margin-bottom: 35px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  font-size: 0.85rem;
  font-family: var(--font-main);
  background: transparent;
  outline: none;
  transition: border-color 0.3s;
  color: var(--text-primary);
}

.contact-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0 center;
  background-size: 16px;
}

.focus-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text-primary);
  transition: width 0.4s var(--transition-smooth);
}

.contact-form input:focus ~ .focus-border,
.contact-form select:focus ~ .focus-border,
.contact-form textarea:focus ~ .focus-border {
  width: 100%;
}

.submit-btn {
  background: var(--text-primary);
  color: #ffffff;
  border: none;
  padding: 14px 45px;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.3s;
}

.submit-btn:hover {
  opacity: 0.85;
}

/* --- Footer & Floating Button --- */
.footer {
  padding: 40px 0;
  background-color: var(--bg-color);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.back-to-top {
  cursor: pointer;
  transition: color 0.3s;
}

.back-to-top:hover {
  color: var(--text-primary);
}

.float-top-btn {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s var(--transition-smooth);
}

.float-top-btn span {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  margin-top: 2px;
  font-weight: 500;
}

.float-top-btn:hover {
  background-color: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.float-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

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

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s var(--transition-smooth) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

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

@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .banner-slogan { font-size: 1.6rem; }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .products-grid { grid-template-columns: 1fr; }
  .footer-container { flex-direction: column; gap: 15px; text-align: center; }
  .float-top-btn { bottom: 20px; right: 20px; width: 44px; height: 44px; }
  .banner-slogan { font-size: 1.2rem; letter-spacing: 0.15em; }
  .banner-subtext { font-size: 0.8rem; }
  .filter-bar { gap: 15px; }
}