/* ============================================================
   NEXMIO GLOBAL — Shared Styles v3  (Morandi Edition)
   All inner pages import this file
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300&family=Syne:wght@400;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* ── MORANDI PALETTE ─────────────────────────────────────────
   Philosophy: every colour is pulled back — greyed, dusted,
   warm-toned. No saturated primaries anywhere.
   ───────────────────────────────────────────────────────── */
:root {
  /* Neutrals */
  --white:      #F5F1EC;   /* warm parchment, not pure white  */
  --off:        #EAE5DC;   /* warm off-white                  */
  --border:     #D4CEC4;   /* warm stone border               */
  --muted:      #9E9288;   /* warm taupe grey                 */
  --ink:        #3A3430;   /* warm dark brown (not cold navy) */
  --ink-mid:    #6C6258;   /* warm medium brown               */

  /* Brand */
  --gold:       #B5975A;   /* muted brass                     */
  --brand-dark: #3A3430;   /* same warm dark, sidebar/footer  */

  /* Module accents — all Morandi (low saturation, dusted) */
  --auto:       #A87272;   /* dusty rose                      */
  --tools:      #8878A0;   /* dusty mauve                     */
  --enrg:       #A88A68;   /* dusty amber                     */
  --mfg:        #7090A0;   /* dusty steel blue                */
  --fmcg:       #689898;   /* dusty sage teal                 */

  /* Module backgrounds — very pale, chalky */
  --auto-bg:    #F0EAEA;   /* pale blush                      */
  --tools-bg:   #ECEAF2;   /* pale lavender                   */
  --enrg-bg:    #F0EAE2;   /* pale cream                      */
  --mfg-bg:     #E8EEF2;   /* pale steel                      */
  --fmcg-bg:    #E8EEEE;   /* pale teal                       */

  --ff-head: 'Syne', sans-serif;
  --ff-body: 'DM Sans', sans-serif;
  --ff-mono: 'DM Mono', monospace;

  --ease:     cubic-bezier(0.25,0.46,0.45,0.94);
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --radius:   10px;

  --sb-w:   260px;
  --sb-dur: 0.32s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-body);
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ── NAV ── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
  background: rgba(245,241,236,0.95);   /* warm parchment */
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s, left var(--sb-dur) var(--ease-out);
}
body:not(.sb-closed) .site-nav { left: var(--sb-w); }
.site-nav.shadow { box-shadow: 0 4px 20px rgba(58,52,48,0.08); }

.nav-logo {
  font-family: var(--ff-head);
  font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex; align-items: center; gap: 1.8rem;
}
.nav-links a {
  font-size: 0.8rem; font-weight: 500;
  color: var(--ink-mid); transition: color 0.2s;
  position: relative;
}
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gold); border-radius: 1px;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  font-family: var(--ff-head);
  font-size: 0.75rem; font-weight: 700;
  background: var(--brand-dark); color: var(--white) !important;
  padding: 0.55rem 1.3rem; border-radius: 6px;
  transition: opacity 0.2s, transform 0.15s;
}
.nav-cta:hover { opacity: 0.82; transform: translateY(-1px); }
.nav-cta::after { display: none !important; }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.68rem; letter-spacing: 0.08em;
  color: var(--muted);
  padding: 1rem 5vw;
  border-bottom: 1px solid var(--border);
  background: var(--off);
  margin-top: 64px;
}
.breadcrumb a { color: var(--muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--ink); }

/* ── PAGE HERO ── */
.page-hero {
  padding: 4rem 5vw 3.5rem;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px; opacity: 0.3;
}
.page-hero-content { position: relative; z-index: 1; max-width: 700px; }
.page-hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); background: var(--white);
  border: 1px solid var(--border); padding: 0.3rem 0.9rem;
  border-radius: 100px; margin-bottom: 1.2rem;
}
.page-hero-tag .dot { width: 7px; height: 7px; border-radius: 50%; }
.page-hero h1 {
  font-family: var(--ff-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  color: var(--ink);
}
.page-hero h1 em {
  font-style: normal;
  -webkit-text-stroke: 1.5px var(--ink);
  color: transparent;
}
.page-hero p {
  font-size: 0.95rem; font-weight: 300; line-height: 1.8;
  color: var(--ink-mid); max-width: 560px; margin-top: 1rem;
}

/* ── SECTION LABEL ── */
.sec-label {
  font-family: var(--ff-mono);
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.sec-label::before {
  content: ''; width: 1.5rem; height: 1px; background: var(--muted);
}

/* ── DESCRIPTION BOX ── */
.desc-box {
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 3rem;
  margin: 3rem 5vw;
}
.desc-box h2 {
  font-family: var(--ff-head);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 1rem;
}
.desc-box p {
  font-size: 0.92rem; font-weight: 300; line-height: 1.85;
  color: var(--ink-mid); max-width: 800px;
}
.desc-box .specs {
  display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem;
}
.desc-box .spec-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.8rem 1.2rem;
}
.spec-item .spec-label {
  font-family: var(--ff-mono);
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.2rem;
}
.spec-item .spec-val {
  font-family: var(--ff-head);
  font-size: 0.9rem; font-weight: 700; color: var(--ink);
}

/* ── IMAGE GRID ── */
.img-grid-wrap { padding: 0 5vw 5rem; }
.img-grid-wrap .grid-title {
  font-family: var(--ff-head);
  font-size: 1.1rem; font-weight: 700; color: var(--ink);
  margin-bottom: 1.2rem;
}
.img-grid { display: grid; gap: 1rem; }
.img-grid.col-4 { grid-template-columns: repeat(4, 1fr); }
.img-grid.col-5 { grid-template-columns: repeat(5, 1fr); }
.img-grid.col-3 { grid-template-columns: repeat(3, 1fr); }

.img-slot {
  aspect-ratio: 1/1;
  background: var(--off);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.5rem;
  overflow: hidden; position: relative;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.img-slot:hover { border-color: var(--muted); background: #E2DDD6; }
.img-slot img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
.img-slot-label {
  font-family: var(--ff-mono);
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-align: center; padding: 0.5rem;
  z-index: 1;
}
.img-slot-icon { font-size: 1.4rem; opacity: 0.18; z-index: 1; }

/* ── PRODUCT GRID ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 3rem 5vw 5rem;
}
.product-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.2s;
  cursor: pointer; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(58,52,48,0.1);
  border-color: var(--auto-bg);
}
.product-card-images {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; background: var(--border);
}
.product-card-img {
  aspect-ratio: 1/1;
  background: var(--auto-bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img-placeholder { font-size: 1.5rem; opacity: 0.18; }

/* Coming Soon placeholder */
.cs-zone {
  display: flex !important;
  align-items: center; justify-content: center;
  aspect-ratio: 1/1;
  background: var(--off);
  grid-column: unset;
}
.cs-label {
  font-family: var(--ff-mono);
  font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.product-card-info {
  padding: 1.2rem;
  flex: 1; display: flex; flex-direction: column; gap: 0.4rem;
}
.product-card-num {
  font-family: var(--ff-mono);
  font-size: 0.6rem; letter-spacing: 0.1em; color: var(--muted);
}
.product-card-name {
  font-family: var(--ff-head);
  font-size: 1rem; font-weight: 700; color: var(--ink);
}
.product-card-desc {
  font-size: 0.78rem; font-weight: 300; line-height: 1.6;
  color: var(--ink-mid); flex: 1;
}
.product-card-arrow {
  font-size: 0.75rem; color: var(--auto);
  margin-top: 0.8rem; font-weight: 700;
  transition: transform 0.2s;
}
.product-card:hover .product-card-arrow { transform: translateX(4px); }

/* ── MANUFACTURING SUB-GRID ── */
.mfg-sections { padding: 0 5vw 5rem; display: flex; flex-direction: column; gap: 5rem; }
.mfg-section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 2px solid var(--border); padding-bottom: 1rem; margin-bottom: 1.5rem;
}
.mfg-section-title {
  font-family: var(--ff-head);
  font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
}
.mfg-section-desc-box {
  background: var(--off);           /* 暖米色，中性，不抢戏 */
  border: 1px solid var(--border);
  border-left: 3px solid #B0C0CC;   /* 细钢蓝左边线，轻呼应模块色 */
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem; font-weight: 300; line-height: 1.8; color: var(--ink-mid);
}
.mfg-section-desc-box strong { color: var(--mfg); font-weight: 600; }

/* ── CO-DESIGN BANNER ── */
.codesign-banner {
  margin: 0 5vw 4rem;
  background: var(--brand-dark);
  border-radius: 14px;
  padding: 3.5rem 4rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
  position: relative; overflow: hidden;
}
.codesign-banner::before {
  content: 'CO-DESIGN';
  position: absolute; right: -1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--ff-head); font-size: 8rem; font-weight: 800;
  color: rgba(255,255,255,0.03); letter-spacing: -0.04em;
  pointer-events: none; white-space: nowrap;
}
.codesign-text .tag {
  font-family: var(--ff-mono);
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.codesign-text h2 {
  font-family: var(--ff-head);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800; color: var(--white);
  letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 1.2rem;
}
.codesign-text p {
  font-size: 0.88rem; font-weight: 300; line-height: 1.8;
  color: rgba(245,241,236,0.55); margin-bottom: 1.8rem;
}
.codesign-steps { display: flex; flex-direction: column; gap: 0.8rem; }
.codesign-step { display: flex; align-items: flex-start; gap: 1rem; }
.step-num {
  font-family: var(--ff-mono);
  font-size: 0.65rem; color: var(--gold); padding-top: 0.1rem;
  letter-spacing: 0.05em; min-width: 1.5rem;
}
.step-text {
  font-size: 0.82rem; font-weight: 300; color: rgba(245,241,236,0.6); line-height: 1.6;
}
.step-text strong { color: var(--white); font-weight: 500; display: block; }

.codesign-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.codesign-img-slot {
  aspect-ratio: 1/1; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; opacity: 1;
  overflow: hidden;
}
.codesign-img-slot img { width:100%; height:100%; object-fit:cover; opacity:1; }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sb-w); z-index: 600;
  background: var(--brand-dark);
  display: flex; flex-direction: column;
  transform: translateX(0);
  transition: transform var(--sb-dur) var(--ease-out);
  overflow: hidden;
}
body.sb-closed .sidebar { transform: translateX(-100%); }

.sb-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.35rem 1.35rem 1.05rem;
  border-bottom: 1px solid rgba(181,151,90,0.14);
  flex-shrink: 0;
}
.sb-logo {
  font-family: var(--ff-head); font-size: 1.05rem; font-weight: 800;
  letter-spacing: -0.01em; color: rgba(255,255,255,0.92);
}
.sb-logo span { color: var(--gold); }

.sb-close {
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.4); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.sb-close:hover { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9); }

.sb-nav {
  flex: 1; overflow-y: auto; padding: 0.85rem 0.75rem;
  scrollbar-width: thin; scrollbar-color: rgba(181,151,90,0.2) transparent;
}
.sb-section {
  font-family: var(--ff-mono); font-size: 0.57rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(181,151,90,0.45);
  padding: 0.8rem 0.8rem 0.4rem;
  margin-top: 0.3rem;
}
.sb-section:first-child { margin-top: 0; }

.sb-link {
  display: flex; align-items: center; gap: 0.72rem;
  padding: 0.62rem 0.88rem; border-radius: 7px;
  font-size: 0.82rem; font-weight: 400;
  color: rgba(255,255,255,0.52);
  transition: background 0.15s, color 0.15s;
  margin-bottom: 0.08rem;
}
.sb-link:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.88); }
.sb-link.active {
  background: rgba(181,151,90,0.14);
  color: var(--gold);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gold);
}
.sb-link .sb-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sb-link .sb-lbl { flex: 1; }
.sb-link .sb-tag {
  font-family: var(--ff-mono); font-size: 0.56rem;
  letter-spacing: 0.06em; color: rgba(255,255,255,0.2);
}

.sb-divider { height: 1px; background: rgba(181,151,90,0.12); margin: 0.65rem 0.8rem; }

.sb-foot {
  padding: 0.95rem 1.35rem;
  border-top: 1px solid rgba(181,151,90,0.12);
  font-size: 0.66rem; color: rgba(255,255,255,0.2);
  font-family: var(--ff-mono);
  flex-shrink: 0;
}

.sb-toggle {
  position: fixed; top: 1.1rem; left: 1.1rem;
  z-index: 700;
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--brand-dark);
  border: none; color: rgba(255,255,255,0.85); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  transition: left var(--sb-dur) var(--ease-out), transform 0.15s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
}
body:not(.sb-closed) .sb-toggle { left: calc(var(--sb-w) + 1.1rem); }
.sb-toggle:hover { transform: scale(1.05); }

.sb-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.45);
  opacity: 0; pointer-events: none;
  transition: opacity var(--sb-dur);
}

.main-wrap {
  margin-left: var(--sb-w);
  transition: margin-left var(--sb-dur) var(--ease-out);
  min-height: 100vh;
}
body.sb-closed .main-wrap { margin-left: 0; }

/* ── FOOTER ── */
.site-footer {
  background: var(--brand-dark);
  padding: 2rem 5vw;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(181,151,90,0.15);
}
.f-logo { font-family: var(--ff-head); font-size: 1.1rem; font-weight: 800; color: var(--white); }
.f-logo span { color: var(--gold); }
.f-copy { font-size: 0.72rem; color: rgba(245,241,236,0.3); }
.f-links { display: flex; gap: 1.5rem; }
.f-links a { font-size: 0.72rem; color: rgba(245,241,236,0.35); transition: color 0.2s; }
.f-links a:hover { color: var(--white); }

/* ── REVEAL ── */
.rev { opacity: 0; transform: translateY(18px); transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out); }
.rev.on { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; } .d2 { transition-delay: 0.16s; } .d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; } .d5 { transition-delay: 0.40s; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2,1fr); }
  .img-grid.col-4 { grid-template-columns: repeat(2,1fr); }
  .img-grid.col-5 { grid-template-columns: repeat(3,1fr); }
  .codesign-banner { grid-template-columns: 1fr; padding: 2.5rem; }
  .codesign-banner::before { display: none; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
  .img-grid.col-4, .img-grid.col-5, .img-grid.col-3 { grid-template-columns: repeat(2,1fr); }
  .nav-links { display: none; }
  .site-footer { flex-direction: column; text-align: center; }
  .desc-box { padding: 1.5rem; }
}
