/* ============================================
   Sanhe Gongchuang - Corporate Website
   Tech Minimalist Style | Western Aesthetic
   ============================================ */

/* --- CSS Variables --- */
:root {
  --color-primary: #1a3a5c;      /* Deep navy blue */
  --color-accent: #2563eb;       /* Bright blue */
  --color-accent-red: #c41230;   /* Logo red */
  --color-accent-orange: #e8890d;/* Logo orange */
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fb;
  --color-bg-dark: #0f172a;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-white: #f1f5f9;
  --color-border: #e2e8f0;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.section { padding: 100px 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-bg-dark); color: var(--color-text-white); }

.section-header { text-align: center; margin-bottom: 64px; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-dark .section-desc { color: rgba(241,245,249,0.7); }

/* --- 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(255,255,255,0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-bg-dark);
  white-space: nowrap;
}
.nav-logo img { height: 36px; width: auto; }
.navbar.scrolled .nav-logo { color: var(--color-primary); }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  position: relative;
}
.navbar:not(.scrolled) .nav-links a:hover { color: #fff; }
.navbar.scrolled .nav-links a { color: var(--color-text-light); }
.navbar.scrolled .nav-links a:hover { color: var(--color-accent); }

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

.lang-switch {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  transition: var(--transition);
}
.lang-switch:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}
.navbar.scrolled .lang-switch {
  border-color: var(--color-border);
  color: var(--color-text-light);
}
.navbar.scrolled .lang-switch:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  transition: var(--transition);
}
.navbar:not(.scrolled) .hamburger span { background: #fff; }
.navbar.scrolled .hamburger span { background: var(--color-text); }

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-bg-dark);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: grayscale(30%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(15,23,42,0.92) 0%,
    rgba(26,58,92,0.85) 50%,
    rgba(15,23,42,0.9) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 720px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  background: rgba(37,99,235,0.12);
  border: 1px solid rgba(37,99,235,0.25);
  padding: 6px 16px;
  border-radius: 24px;
  margin-bottom: 28px;
  backdrop-filter: blur(4px);
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 24px;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.125rem;
  color: rgba(241,245,249,0.75);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 560px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-main);
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.4);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: rgba(241,245,249,0.55);
  margin-top: 4px;
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image img { width: 100%; height: 400px; object-fit: cover; transition: transform 0.6s ease; }
.about-image:hover img { transform: scale(1.03); }

.about-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-primary);
}
.about-content p {
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  transition: var(--transition);
}
.about-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.about-feature-icon {
  width: 40px; height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  color: #fff;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
}
.about-feature-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.about-feature-text p {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.5;
}

/* --- Services Section --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-orange));
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(232,137,13,0.08));
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-primary);
}
.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 18px;
}
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.service-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 10px;
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  border-radius: 4px;
}

/* --- Capabilities Section --- */
.capabilities-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.capability-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  transition: var(--transition);
}
.capability-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.capability-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-accent);
  min-width: 48px;
}
.capability-text h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.capability-text p {
  font-size: 0.82rem;
  color: rgba(241,245,249,0.55);
  margin: 0;
}

/* --- Design Cases Section (NEW) --- */
.design-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.design-case {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.design-case:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: translateY(-4px);
}
.design-case-img {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.design-case-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.design-case:hover .design-case-img img { transform: scale(1.04); }

/* Placeholder for missing case images */
.design-placeholder {
  background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(232,137,13,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255,255,255,0.12);
}
.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.placeholder-icon { font-size: 2.5rem; opacity: 0.4; }
.placeholder-text {
  font-size: 0.85rem;
  color: rgba(241,245,249,0.35);
  font-weight: 500;
}

.design-case-info { padding: 24px; }
.design-case-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.design-case-info p {
  font-size: 0.88rem;
  color: rgba(241,245,249,0.6);
  line-height: 1.6;
  margin-bottom: 14px;
}
.design-case-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  background: rgba(37,99,235,0.15);
  border-radius: 20px;
  color: var(--color-accent);
}
@media (max-width: 768px) { .design-cases-grid { grid-template-columns: 1fr; } }

/* --- Gallery / Products Section --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--color-bg-alt);
  aspect-ratio: 1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,0.5) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover::after { opacity: 1; }

/* Large gallery item (spans 2 cols + 2 rows) */
.gallery-large { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
/* Wide gallery item (spans 2 cols) */
.gallery-wide { grid-column: span 2; }

/* --- Industries Section --- */
.industries-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}
.industry-tag {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 22px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  color: rgba(241,245,249,0.8);
  transition: var(--transition);
}
.industry-tag:hover {
  background: rgba(37,99,235,0.15);
  border-color: var(--color-accent);
  color: #fff;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-info { }
.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-primary);
}
.contact-info > p {
  color: var(--color-text-light);
  margin-bottom: 32px;
  line-height: 1.8;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-icon {
  width: 44px; height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: 12px;
  font-size: 1.2rem;
}
.contact-detail h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.contact-detail p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.5;
}

.contact-form {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font-main);
  background: #fff;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* --- Footer --- */
.footer {
  background: var(--color-bg-dark);
  color: rgba(241,245,249,0.6);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand img { height: 32px; margin-bottom: 12px; }
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 300px;
}
.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.83rem;
  color: rgba(241,245,249,0.55);
  padding: 4px 0;
}
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.footer-bottom a { color: var(--color-accent); }

/* --- Scroll Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-large { grid-column: span 2; grid-row: span 2; }
  .gallery-wide { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 70px 0; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(15,23,42,0.98); backdrop-filter: blur(20px); flex-direction: column; padding: 24px; gap: 20px; }
  .nav-links.active { display: flex; }
  .nav-links a { color: rgba(241,245,249,0.85) !important; font-size: 1rem; }
  .hamburger { display: flex; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .capabilities-list { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-large { grid-column: span 2; grid-row: span 1; aspect-ratio: 2/1; }
  .gallery-wide { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero h1 { font-size: 2rem; }
  .about-features { grid-template-columns: 1fr; }
}
