:root {
  --bg: #050505;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f7f7f7;
  --muted: rgba(247, 247, 247, 0.68);
  --soft: rgba(247, 247, 247, 0.42);
  --glow: rgba(255, 255, 255, 0.32);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 5%, rgba(255, 255, 255, 0.11), transparent 28rem),
    radial-gradient(circle at 10% 45%, rgba(255, 255, 255, 0.06), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.lang-zh {
  font-family: "Noto Sans SC", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mix-blend-mode: overlay;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.62);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #f8f8f8;
  color: #050505;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.3);
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.main-nav a {
  transition: color 180ms ease;
}

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

.language-toggle {
  position: relative;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.language-toggle span {
  min-width: 44px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  transition: 220ms ease;
}

.language-toggle .active {
  background: #f5f5f5;
  color: #080808;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.24);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 150px 24px 80px;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.66);
  transform: scale(1.04);
  animation: cinematicDrift 16s ease-in-out infinite alternate;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.26) 48%, rgba(0, 0, 0, 0.78)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.68), transparent 42%, #050505 96%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lang-zh .eyebrow {
  letter-spacing: 0.08em;
}

.hero-title {
  display: grid;
  gap: 4px;
  max-width: 1050px;
  margin: 0;
  font-size: clamp(3.7rem, 10vw, 9.8rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-title span {
  display: block;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.64));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.16));
  animation: titleReveal 900ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.hero-title span:nth-child(2) {
  animation-delay: 110ms;
}

.hero-copy {
  max-width: 690px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  line-height: 1.7;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: #f7f7f7;
  color: #050505;
  box-shadow: 0 0 38px rgba(255, 255, 255, 0.2);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
  color: #f7f7f7;
}

.button.secondary:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 1px;
  height: 64px;
  background: rgba(255, 255, 255, 0.16);
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 20px;
  background: #fff;
  animation: scrollCue 1.8s ease-in-out infinite;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 112px 0;
}

.section-heading {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading h2,
.factory-copy h2,
.about-copy h2,
.contact-panel h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
}

.section-heading p:last-child,
.factory-copy p,
.about-text p,
.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

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

.service-card {
  min-height: 252px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.032)),
    rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
  transition: transform 280ms ease, border-color 280ms ease, background 280ms ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.04);
}

.service-card span,
.portfolio-item span {
  color: var(--soft);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-card h3 {
  margin: 54px 0 14px;
  font-size: 1.35rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.factory {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 48px;
  align-items: center;
}

.factory-visual,
.portfolio-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: #111;
  box-shadow: var(--shadow);
}

.factory-visual {
  aspect-ratio: 4 / 5;
}

.factory-visual::after,
.portfolio-item::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.7));
}

.factory-visual img,
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: transform 700ms ease;
}

.factory-visual:hover img,
.portfolio-item:hover img {
  transform: scale(1.06);
}

.factory-copy {
  display: grid;
  gap: 24px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.stats div {
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stats strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.55rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  grid-auto-rows: 300px;
  gap: 14px;
}

.portfolio-item.large {
  grid-row: span 2;
}

.portfolio-item div {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  z-index: 2;
}

.portfolio-item h3 {
  margin: 8px 0 0;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.about {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: start;
}

.about-text {
  display: grid;
  gap: 22px;
  padding-top: 10px;
}

.contact {
  padding-bottom: 140px;
}

.contact-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 7vw, 76px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    #090909;
  box-shadow: var(--shadow);
}

.contact-panel::before {
  position: absolute;
  top: -160px;
  right: -80px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 100px rgba(255, 255, 255, 0.12);
  content: "";
}

.contact-panel > * {
  position: relative;
}

.contact-panel p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 22px;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 42;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: #f7f7f7;
  color: #050505;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: 0 0 36px rgba(255, 255, 255, 0.26);
  transition: transform 220ms ease;
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.03);
}

[data-reveal],
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 760ms ease, transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].is-visible,
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cinematicDrift {
  from {
    transform: scale(1.04) translate3d(-1%, -1%, 0);
  }
  to {
    transform: scale(1.09) translate3d(1%, 1%, 0);
  }
}

@keyframes scrollCue {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  35%,
  70% {
    opacity: 1;
  }
  100% {
    transform: translateY(44px);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
    border-radius: 24px;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 2px 4px 4px;
  }

  .hero {
    align-items: end;
  }

  .service-grid,
  .factory,
  .about {
    grid-template-columns: 1fr;
  }

  .factory-visual {
    aspect-ratio: 16 / 11;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 310px;
  }

  .portfolio-item.large {
    grid-row: span 1;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 10px;
  }

  .brand {
    font-size: 0.7rem;
  }

  .language-toggle span {
    min-width: 38px;
    padding: 7px 8px;
  }

  .hero {
    padding: 180px 18px 72px;
  }

  .hero-title {
    font-size: clamp(3.15rem, 17vw, 5rem);
  }

  .hero-actions,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 78px 0;
  }

  .service-card {
    min-height: 220px;
  }

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

  .contact {
    padding-bottom: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
