﻿/*
Theme Name: Casting
Theme URI: https://www.yisainuo.com/
Author: yisainuo
Author URI: https://www.yisainuo.com/
Description: HHJ Casting Industrial Theme
Version: 1.0.0
*/
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:wght@300;400;500;700&family=Inter:wght@300;400;500;600&display=swap');

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: #f4f1ec;
  background-image:
    radial-gradient(ellipse at 10% 0%, rgba(184,146,74,0.07) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 100%, rgba(184,146,74,0.05) 0%, transparent 45%);
  color: #1a1510;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #ede9e2; }
::-webkit-scrollbar-thumb { background: #b8924a; border-radius: 3px; }

/* ===== CTA BUTTON ===== */
.cta-glow {
  position: relative;
  background: linear-gradient(135deg, #b8924a 0%, #9a7435 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 28px;
  clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
  transition: all 0.3s;
}
.cta-glow:hover {
  background: linear-gradient(135deg, #d4ae72 0%, #b8924a 100%);
  box-shadow: 0 8px 32px rgba(184, 146, 74, 0.35);
  transform: translateY(-2px);
}

/* ===== SWIPER STYLES ===== */
.hero-swiper-pagination {
  bottom: 220px !important;
  left: 14% !important;
  right: auto !important;
  width: auto !important;
  display: flex;
  gap: 8px;
}
.hero-swiper-pagination .swiper-pagination-bullet {
  width: 40px; height: 3px;
  border-radius: 0;
  background: rgba(255,255,255,0.35);
  opacity: 1;
  transition: all 0.3s;
  margin: 0 !important;
}
.hero-swiper-pagination .swiper-pagination-bullet-active {
  background: #b8924a;
  width: 64px;
}

.hero-swiper-prev,
.hero-swiper-next {
  width: 48px !important;
  height: 48px !important;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s;
  top: 50% !important;
}
.hero-swiper-prev { left: clamp(1rem, 2vw, 3rem) !important; }
.hero-swiper-next { right: clamp(1rem, 2vw, 3rem) !important; }
.hero-swiper-prev:hover,
.hero-swiper-next:hover {
  background: #b8924a;
  border-color: #b8924a;
}
.hero-swiper-prev::after,
.hero-swiper-next::after {
  font-size: 14px !important;
  color: #fff;
  font-weight: 700;
}

/* Ken Burns zoom effect for hero slides */
.swiper-slide-active .hero-slide-img {
  transform: scale(1);
}

/* ===== GEOMETRIC LINES ===== */
.geometric-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.geometric-lines .line {
  position: absolute;
  background: rgba(184, 146, 74, 0.18);
}
.geometric-lines .line-1 { width: 1px; height: 40%; right: 20%; top: 0; }
.geometric-lines .line-2 { width: 1px; height: 60%; right: 10%; bottom: 0; }
.geometric-lines .line-3 { width: 30%; height: 1px; left: 0; top: 30%; }
.geometric-lines .diagonal {
  position: absolute;
  top: 0; right: 0;
  width: 2px; height: 500px;
  background: linear-gradient(to bottom, transparent, rgba(184,146,74,0.25), transparent);
  transform: skewX(-30deg);
}

/* ===== FLOATING SHAPES ===== */
.floating-shape {
  position: absolute;
  border: 2px solid rgba(184, 146, 74, 0.3);
  z-index: 3;
  pointer-events: none;
}
.shape-1 { width: 80px; height: 80px; top: 20%; right: 15%; animation: float1 6s ease-in-out infinite; }
.shape-2 { width: 40px; height: 40px; border-radius: 50%; top: 60%; right: 25%; animation: float 6s ease-in-out infinite; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-20px); }
}
@keyframes float1 {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%       { transform: translateY(-20px) rotate(225deg); }
}

/* ===== BOUNCE DOWN ANIMATION ===== */
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}
.animate-bounce-down {
  animation: bounce-down 2s infinite;
}

/* ===== STATS ===== */
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  background: linear-gradient(180deg, #fff 0%, #e8d4ab 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

/* ===== PRODUCT TABS ===== */
.product-tab-custom.active {
  background: rgba(184, 146, 74, 0.08);
}
.product-tab-custom.active .tab-num,
.product-tab-custom.active .tab-name {
  color: #b8924a;
}
.product-tab-custom.active .tab-icon {
  color: #b8924a;
  transform: translateX(5px);
}

/* Product panel animation */
.product-panel { display: none; animation: slideIn 0.5s ease; }
.product-panel.active { display: block; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== VIDEO WRAPPER HOVER ===== */
.video-wrap:hover img {
  filter: brightness(0.5) contrast(1.1);
  transform: scale(1.05);
}
.video-wrap:hover .video-overlay {
  background: rgba(184, 146, 74, 0.15);
}
.video-wrap:hover .play-icon {
  background: #b8924a;
  transform: scale(1.15);
  box-shadow: 0 0 40px rgba(184,146,74,0.6);
}
.play-icon::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(184,146,74,0.35);
  animation: ring-pulse 2s infinite;
}
@keyframes ring-pulse {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ===== CAP CARD HOVER EFFECTS ===== */
.cap-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 3px;
  background: linear-gradient(90deg, #b8924a, #e8d4ab);
  transition: width 0.5s;
}
.cap-card:hover::before { width: 100%; }
.cap-card::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 30px; height: 30px;
  border-right: 2px solid #b8924a;
  border-bottom: 2px solid #b8924a;
  opacity: 0;
  transition: opacity 0.3s 0.3s;
}
.cap-card:hover::after { opacity: 1; }

/* ===== NEWS ITEM HOVER ===== */
.news-item:hover .news-item-img img {
  transform: scale(1.08);
  filter: brightness(0.7);
}
.news-item:hover h3 {
  color: #b8924a;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s, transform 0.8s; }
.reveal-up.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 0.8s, transform 0.8s; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 0.8s, transform 0.8s; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ===== HAMBURGER MENU ACTIVE STATE ===== */
#hamburger.active span:first-child  { top: 50%; transform: translateY(-50%) rotate(45deg); }
#hamburger.active span:nth-child(2) { opacity: 0; }
#hamburger.active span:last-child   { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ===== MOBILE SUBMENU ===== */
#mobileProductsMenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

#mobileProductsMenu.open {
  max-height: 300px;
}

/* ===== BACK TO TOP ===== */
#backTop.visible {
  opacity: 1;
  visibility: visible;
}

/* ===== VIDEO MODAL ===== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.video-modal.active {
  opacity: 1;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(8px);
}
.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  aspect-ratio: 16/9;
  z-index: 1;
  animation: modal-slide-up 0.4s ease-out;
}
@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-modal-close:hover {
  background: #b8924a;
  border-color: #b8924a;
  transform: rotate(90deg);
}
.video-modal-player {
  width: 100%;
  height: 100%;
  background: black;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.video-modal-player iframe {
  width: 100%;
  height: 100%;
}

/* ===== COUNTER ===== */
.counter-num {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ===== SPECS TABLE ===== */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #b8924a;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.section-label::before {
  content: '';
  width: 40px;
  height: 1px;
  background: #b8924a;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: #1a1510;
  line-height: 1;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.text-gold {
  color: #b8924a;
}

.title-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(to right, #b8924a, #e8d4ab);
  margin: 1rem 0 2rem 0;
}

.specs-table-wrapper {
  background: #fff;
  border: 1px solid rgba(26, 21, 16, 0.1);
  box-shadow: 0 2px 16px rgba(26, 21, 16, 0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.specs-table {
  width: 100%;
}
.specs-table td {
  padding: 1rem 1.25rem;
}

.specs-table tr {
  border-bottom: 1px solid rgba(26, 21, 16, 0.08);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table tr:nth-child(even) {
  background: rgba(244, 241, 236, 0.5);
}

/* ===== FEATURES GRID ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #fff;
  border: 1px solid rgba(26, 21, 16, 0.1);
  box-shadow: 0 2px 12px rgba(26, 21, 16, 0.06);
  overflow: hidden;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: rgba(184, 146, 74, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 21, 16, 0.1);
}

.feature-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.feature-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  filter: brightness(0.7) contrast(1.05);
}

.feature-card:hover .feature-card-img img {
  transform: scale(1.1);
}

.feature-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(184, 146, 74, 0.15);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover .feature-card-overlay {
  opacity: 1;
}

.feature-card-overlay i {
  font-size: 2.5rem;
  color: #fff;
}

.feature-card-body {
  padding: 1.5rem;
}

.feature-card-body h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  color: #1a1510;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.feature-card-body p {
  font-size: 0.82rem;
  color: #5a5048;
  line-height: 1.6;
}

/* ===== APPLICATION SCENARIOS ===== */
.app-scenarios {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.app-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.app-card-reverse {
  direction: rtl;
}

.app-card-reverse > * {
  direction: ltr;
}

.app-card-img {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% 90%, 95% 100%, 0 100%);
}

.app-card-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.5s;
  filter: brightness(0.8) contrast(1.05);
}

.app-card:hover .app-card-img img {
  transform: scale(1.05);
}

.app-card-content {
  padding: 2rem;
}

.app-card-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  color: rgba(184, 146, 74, 0.2);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.app-card-content h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  color: #1a1510;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.app-card-content p {
  font-size: 0.9rem;
  color: #5a5048;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.app-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #b8924a;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
}

.app-card-link:hover {
  gap: 0.75rem;
  color: #9a7435;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
  /* Tablet adjustments */
  .section-title {
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  /* Mobile adjustments */
  .section-title {
    font-size: clamp(1.4rem, 4vw, 2rem);
  }

  .section-label {
    font-size: 0.65rem;
  }

  /* Product detail grid - stack on mobile */
  .grid.lg\:grid-cols-12 {
    gap: 2rem;
  }

  /* Features grid - single column on small mobile */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card-img {
    height: 180px;
  }

  .feature-card-body {
    padding: 1.25rem;
  }

  .feature-card-body h4 {
    font-size: 1.1rem;
  }

  .feature-card-body p {
    font-size: 0.8rem;
  }

  /* App scenarios */
  .app-card,
  .app-card-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 1.5rem;
  }

  .app-card-img img {
    height: 220px;
  }

  .app-card-content {
    padding: 0.5rem 0;
  }

  .app-card-num {
    font-size: 2.5rem;
  }

  .app-card-content h3 {
    font-size: 1.6rem;
  }

  .app-card-content p {
    font-size: 0.85rem;
  }

  /* Specs table */
  .specs-table td {
    padding: 0.875rem 1rem;
    font-size: 0.85rem;
  }

  /* CTA buttons */
  .cta-glow {
    padding: 10px 20px;
    font-size: 0.8rem;
  }

  /* Related products */
  .grid.sm\:grid-cols-2.lg\:grid-cols-3 {
    gap: 1rem;
  }

  .grid.sm\:grid-cols-2.lg\:grid-cols-3 > a > div:last-child {
    padding: 1.25rem;
  }

  .grid.sm\:grid-cols-2.lg\:grid-cols-3 h3 {
    font-size: 1.1rem;
  }

  .grid.sm\:grid-cols-2.lg\:grid-cols-3 p {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  /* Extra small mobile */
  .section-title {
    font-size: 1.5rem;
  }

  .features-grid {
    gap: 0.875rem;
  }

  .feature-card-img {
    height: 160px;
  }

  .feature-card-body {
    padding: 1rem;
  }

  .feature-card-body h4 {
    font-size: 1rem;
  }

  .app-card-img img {
    height: 180px;
  }

  .app-card-num {
    font-size: 2rem;
  }

  .app-card-content h3 {
    font-size: 1.3rem;
  }

  .specs-table td {
    padding: 0.75rem 0.875rem;
    font-size: 0.8rem;
  }

  /* Thumbnail gallery */
  .grid.grid-cols-2 img {
    height: 70px;
  }
}




