/* ==========================================================================
   YIWU JUNLE ELECTRIC EQUIPMENT CO.,LIMITED - Landing Page (Mintify Style)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO SECTION
   -------------------------------------------------------------------------- */
.hero-section {
  --hero-pointer-x: 50%;
  --hero-pointer-y: 42%;
  position: relative;
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 5rem;
  background:
    radial-gradient(circle at var(--hero-pointer-x) var(--hero-pointer-y), var(--hero-glow), transparent 28rem),
    linear-gradient(135deg, var(--xamei-cream) 0%, var(--hero-gradient-middle) 48%, var(--hero-gradient-end) 100%);
  overflow: hidden;
  isolation: isolate;
}

.hero-ambient,
.hero-grid-mesh,
.hero-orb {
  position: absolute;
  pointer-events: none;
}

.hero-ambient {
  inset: 0;
  z-index: -1;
}

.hero-grid-mesh {
  inset: 0;
  opacity: 0.42;
  background-image:
    linear-gradient(var(--hero-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 92%);
  transform: perspective(600px) rotateX(58deg) scale(1.45) translateY(12%);
  transform-origin: center bottom;
}

.hero-orb {
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.6;
  will-change: transform;
}

.hero-orb-one {
  width: clamp(16rem, 31vw, 31rem);
  aspect-ratio: 1;
  top: 7%;
  right: -10%;
  background: radial-gradient(circle at 32% 32%, rgba(142, 219, 85, 0.5), rgba(142, 219, 85, 0.06) 55%, transparent 72%);
  animation: heroOrbDrift 11s ease-in-out infinite alternate;
}

.hero-orb-two {
  width: clamp(10rem, 20vw, 20rem);
  aspect-ratio: 1;
  left: -7%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(48, 125, 82, 0.18), transparent 68%);
  animation: heroOrbDrift 14s ease-in-out -4s infinite alternate-reverse;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--spacing-2xl);
}

.hero-content > * {
  opacity: 0;
  transform: translateY(18px);
  animation: heroReveal 0.72s cubic-bezier(0.2, 0.75, 0.3, 1) forwards;
}

.hero-content > :nth-child(1) { animation-delay: 0.08s; }
.hero-content > :nth-child(2) { animation-delay: 0.17s; }
.hero-content > :nth-child(3) { animation-delay: 0.26s; }
.hero-content > :nth-child(4) { animation-delay: 0.35s; }

@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3.5rem;
  }

  .hero-content,
  .hero-visual-shell,
  .hero-visual-frame { width: 100%; min-width: 0; }
}

.hero-title {
  color: var(--xamei-text);
  margin-bottom: var(--spacing-lg);
}

.hero-title span {
  color: var(--xamei-accent-text);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--xamei-muted);
  max-width: 620px;
  margin-bottom: var(--spacing-xl);
  line-height: 1.5;
}

@media (max-width: 991px) {
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding-top: calc(var(--header-height) + 2.25rem);
    padding-bottom: 3.25rem;
  }

  .hero-title,
  .hero-subtitle {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-subtitle { font-size: 1.05rem; line-height: 1.55; }
  .hero-actions { width: 100%; gap: .75rem; }
  .hero-actions .btn-xamei { width: 100%; }
  .hero-visual-frame { min-height: 0; padding: 1.5rem; border-radius: var(--radius-lg); text-align: left; }
  .hero-card-grid { grid-template-columns: minmax(0, 1fr); }
  .floating-card { min-width: 0; }
  .workflow-card { padding: 1.5rem; }
  .tab-matrix-nav { display: grid; grid-template-columns: 1fr; }
  .tab-matrix-btn { width: 100%; }
  .cta-banner-xamei { padding: 3rem 1rem; border-radius: var(--radius-lg); }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

@media (max-width: 991px) {
  .hero-actions {
    justify-content: center;
  }
}

/* Hero Visual Box Frame */
.hero-visual-shell {
  width: 100%;
  perspective: 1100px;
  opacity: 0;
  transform: translateY(22px) scale(0.985);
  animation: heroReveal 0.85s 0.22s cubic-bezier(0.2, 0.75, 0.3, 1) forwards;
}

.hero-visual-frame {
  --hero-tilt-x: 0deg;
  --hero-tilt-y: 0deg;
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  position: relative;
  background:
    radial-gradient(circle at 78% 15%, rgba(142, 219, 85, 0.17), transparent 30%),
    linear-gradient(145deg, #15231b 0%, var(--xamei-dark) 56%, #0d1611 100%);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  color: var(--xamei-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 70px rgba(17, 24, 20, 0.22), 0 8px 24px rgba(17, 24, 20, 0.14);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transform: rotateX(var(--hero-tilt-x)) rotateY(var(--hero-tilt-y)) translate3d(var(--hero-shift-x), var(--hero-shift-y), 0);
  transform-style: preserve-3d;
  transition: transform 180ms ease-out, box-shadow 300ms ease;
  will-change: transform;
}

.hero-visual-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 28%, rgba(255, 255, 255, 0.09) 46%, transparent 62%);
  transform: translateX(-120%);
  animation: heroSheen 7s 1.2s ease-in-out infinite;
}

.hero-frame-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-frame-glow {
  position: absolute;
  width: 17rem;
  aspect-ratio: 1;
  right: -5rem;
  top: -6rem;
  border-radius: 50%;
  background: rgba(142, 219, 85, 0.16);
  filter: blur(30px);
  animation: heroPulse 5s ease-in-out infinite;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(142, 219, 85, 0.18);
  border-radius: 50%;
  animation: heroOrbitSpin 17s linear infinite;
}

.hero-orbit-one {
  width: 260px;
  height: 260px;
  top: -96px;
  right: -56px;
}

.hero-orbit-two {
  width: 180px;
  height: 180px;
  right: 13%;
  top: 8%;
  animation-duration: 12s;
  animation-direction: reverse;
}

.hero-orbit i {
  position: absolute;
  width: 7px;
  height: 7px;
  left: 50%;
  top: -4px;
  border-radius: 50%;
  background: var(--xamei-green);
  box-shadow: 0 0 16px rgba(142, 219, 85, 0.85);
}

.hero-company-lockup,
.hero-card-grid {
  position: relative;
  z-index: 2;
  transform: translateZ(28px);
}

.hero-company-kicker {
  margin-bottom: 4px;
  color: var(--xamei-green);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero-company-name {
  color: var(--xamei-on-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.floating-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  color: var(--xamei-on-dark);
  transition: transform 250ms ease, background-color 250ms ease, border-color 250ms ease;
}

.floating-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(142, 219, 85, 0.48);
  transform: translateY(-4px);
}

.floating-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--xamei-green);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.floating-card-val {
  font-size: 1.1rem;
  font-weight: 700;
}

@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroOrbDrift {
  to { transform: translate3d(-22px, 18px, 0) scale(1.07); }
}

@keyframes heroOrbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes heroPulse {
  50% { opacity: 0.58; transform: scale(1.13); }
}

@keyframes heroSheen {
  0%, 66%, 100% { transform: translateX(-120%); }
  78% { transform: translateX(120%); }
}

@media (hover: none), (pointer: coarse) {
  .hero-visual-frame { transform: none; }
  .floating-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content > *,
  .hero-visual-shell {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero-orb,
  .hero-orbit,
  .hero-frame-glow,
  .hero-visual-frame::after {
    animation: none;
  }

  .hero-visual-frame {
    transform: none;
    transition: none;
  }
}

@media (max-width: 576px) {
  .hero-visual-frame {
    min-height: 0;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: left;
  }

  .hero-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-orbit-one {
    right: -110px;
  }
}

/* --------------------------------------------------------------------------
   2. MARQUEE STRIP
   -------------------------------------------------------------------------- */
.marquee-wrapper {
  background-color: var(--xamei-dark);
  color: var(--xamei-on-dark);
  padding: 1.25rem 0;
  overflow: hidden;
  contain: inline-size paint;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: marquee 25s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #D1D8D3;
}

.marquee-item .dot {
  width: 8px;
  height: 8px;
  background-color: var(--xamei-green);
  border-radius: 50%;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   3. BENTO GRID ARCHITECTURE
   -------------------------------------------------------------------------- */
.bento-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-lg);
}

@media (max-width: 991px) {
  .bento-row-3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   4. NUMBERED WORKFLOW CARDS
   -------------------------------------------------------------------------- */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

@media (max-width: 991px) {
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .workflow-grid { grid-template-columns: 1fr; }
}

.workflow-card {
  background-color: var(--xamei-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--xamei-border);
  padding: var(--spacing-xl);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.workflow-card h4 { margin-bottom: .75rem; }
.workflow-card p { margin-bottom: 0; }

@media (max-width: 576px) {
  .workflow-card { padding: 1.5rem; }
}

.workflow-number {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--xamei-accent-text);
  line-height: 1;
  margin-bottom: var(--spacing-md);
}

/* --------------------------------------------------------------------------
   5. TABBED USE-CASE MATRIX
   -------------------------------------------------------------------------- */
.tab-matrix-nav {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

.tab-matrix-btn {
  background-color: var(--xamei-surface-light);
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--xamei-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-matrix-btn.active, .tab-matrix-btn:hover {
  background-color: var(--xamei-dark);
  color: var(--xamei-green);
}

/* --------------------------------------------------------------------------
   6. OVERSIZED FINAL CTA BANNER
   -------------------------------------------------------------------------- */
.cta-banner-xamei {
  background-color: var(--xamei-dark);
  color: var(--xamei-on-dark);
  border-radius: var(--radius-xl);
  padding: var(--spacing-2xl) var(--spacing-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner-xamei h2 {
  color: var(--xamei-on-dark);
  max-width: 800px;
  margin: 0 auto var(--spacing-md) auto;
}

.cta-banner-xamei p {
  color: #A0ABA2;
  max-width: 620px;
  margin: 0 auto var(--spacing-xl) auto;
  font-size: 1.2rem;
}

/* Dark Mode Overrides for Landing Sections */
[data-theme="dark"] .hero-title {
  color: #FFFFFF;
}

[data-theme="dark"] .hero-subtitle {
  color: #AEB9B1;
}

[data-theme="dark"] .workflow-number {
  color: var(--xamei-green);
}

[data-theme="dark"] .workflow-card h4 {
  color: #FFFFFF;
}

[data-theme="dark"] .workflow-card p {
  color: #AEB9B1;
}
.home-services-title {
  white-space: nowrap;
  font-size: clamp(1.75rem, 4.6vw, 4.5rem);
  letter-spacing: -0.045em;
}

@media (max-width: 768px) {
  .home-services-title { white-space: normal; overflow-wrap: anywhere; }
}
