/* ============================================================
   Xianwei Technologies — site stylesheet
   Palette: near-black ink, white paper, restrained gold accent
   ============================================================ */

:root {
  --ink: #0b0f14;
  --ink-soft: #161c24;
  --paper: #ffffff;
  --surface: #f5f6f8;
  --border: #e4e7eb;
  --text: #1f2630;
  --muted: #5b6470;
  --accent: #b98a2e;
  --accent-dark: #97701f;
  --on-ink-muted: #9aa3ae;
  --radius: 10px;
  --maxw: 1180px;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  color: var(--ink);
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.125rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.9rem;
}

.section-intro {
  max-width: 38rem;
  color: var(--muted);
  margin-top: 0.9rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.78rem 1.5rem;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #232c38; }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--surface); }

.btn-outline { border-color: var(--border); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); }

.btn-outline-light { border-color: rgba(255,255,255,0.35); color: #fff; background: transparent; }
.btn-outline-light:hover { border-color: #fff; }

.btn-whatsapp { background: #128c4b; color: #fff; }
.btn-whatsapp:hover { background: #0e7a40; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 700;
}

.brand small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.nav-links a:hover { color: var(--accent-dark); }

.nav-links a.nav-cta {
  background: var(--ink);
  color: #fff;
  padding: 0.55rem 1.15rem;
  border-radius: 7px;
}

.nav-links a.nav-cta:hover { background: #232c38; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.38;
}

.hero-inner {
  position: relative;
  padding: 6.5rem 0 5.5rem;
  max-width: 44rem;
}

.hero h1 { color: #fff; margin: 0.4rem 0 1.2rem; }

.hero p.lead {
  font-size: 1.08rem;
  color: #c8cfd8;
  max-width: 36rem;
  margin-bottom: 2.1rem;
}

.hero .eyebrow { color: var(--accent); }

.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 1.6rem 0 2.2rem;
}

.hero-stats div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
}

.hero-stats div span { font-size: 0.85rem; color: var(--on-ink-muted); }

/* ---------- Sections ---------- */

.section { padding: 5.5rem 0; }
.section.alt { background: var(--surface); }

.section-head { margin-bottom: 3rem; }

/* ---------- Service cards ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover { border-color: #c9ced6; transform: translateY(-3px); }

.service-card .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}

.service-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card .body { padding: 1.35rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }

.service-card h3 { margin-bottom: 0.5rem; }

.service-card p { font-size: 0.92rem; color: var(--muted); flex: 1; }

.service-card .link {
  margin-top: 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.service-card .link:hover { color: var(--ink); }

/* ---------- Starlink ---------- */

.starlink { background: var(--ink); color: #fff; }

.starlink .eyebrow { color: var(--accent); }

.starlink h2 { color: #fff; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split .photo {
  border-radius: var(--radius);
  overflow: hidden;
}

.split .photo img { width: 100%; height: 100%; object-fit: cover; }

.starlink p { color: #c8cfd8; }

.spec-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.8rem 0;
}

.spec-row div {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  padding: 0.9rem 0.6rem;
  text-align: center;
}

.spec-row strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.spec-row span { font-size: 0.75rem; color: var(--on-ink-muted); }

.checklist { list-style: none; margin: 1.4rem 0 2rem; }

.checklist li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
  color: #d6dce3;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.95rem;
  height: 0.5rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.section.light .checklist li { color: var(--text); }

/* ---------- About ---------- */

.about-values {
  list-style: none;
  margin-top: 1.8rem;
  display: grid;
  gap: 1.1rem;
}

.about-values li { display: flex; gap: 0.9rem; align-items: flex-start; }

.about-values .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.55rem;
}

.about-values strong { display: block; color: var(--ink); font-size: 0.97rem; }

.about-values span { font-size: 0.9rem; color: var(--muted); }

/* ---------- Partners ---------- */

.partner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 2.6rem;
  align-items: center;
}

.partner-row span {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #aab2bc;
  letter-spacing: 0.01em;
}

/* ---------- Careers ---------- */

.jobs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.job-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}

.job-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
  margin-bottom: 0.7rem;
}

.tag.fulltime { background: #eef4ee; color: #2f6b3a; }
.tag.intern { background: #f0f1f7; color: #44508f; }

.job-card h3 { margin-bottom: 0.3rem; }

.job-card .meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.7rem; }

.job-card p { font-size: 0.9rem; color: var(--muted); }

.job-card .link {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.job-card .link:hover { color: var(--ink); }

.apply-note {
  margin-top: 2.2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.apply-note p { font-size: 0.93rem; color: var(--muted); max-width: 34rem; }

.apply-note strong { color: var(--ink); }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-list { list-style: none; display: grid; gap: 1.15rem; margin-top: 1.6rem; }

.contact-list li { display: flex; gap: 1rem; align-items: flex-start; }

.contact-list svg {
  flex: none;
  width: 20px;
  height: 20px;
  stroke: var(--accent-dark);
  margin-top: 0.2rem;
}

.contact-list strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.contact-list a:hover { color: var(--accent-dark); }

.map-embed {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-embed iframe { display: block; width: 100%; height: 230px; border: 0; }

/* ---------- Forms ---------- */

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-grid .full { grid-column: 1 / -1; }

label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink); margin-bottom: 0.35rem; }

input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.7rem 0.85rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

textarea { resize: vertical; min-height: 110px; }

.form-foot { margin-top: 1.3rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.form-foot small { color: var(--muted); }

/* ---------- Shop ---------- */

.page-head {
  background: var(--ink);
  color: #fff;
  padding: 4rem 0 3.2rem;
}

.page-head h1 { color: #fff; font-size: clamp(1.9rem, 3.5vw, 2.6rem); }

.page-head p { color: #c8cfd8; max-width: 36rem; margin-top: 0.8rem; }

.filter-bar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.filter-bar button {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1.05rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-bar button:hover { border-color: var(--ink); }

.filter-bar button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.3rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.product-card:hover { border-color: #c9ced6; transform: translateY(-2px); }

.product-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}

.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-card .body { padding: 1.05rem 1.15rem 1.25rem; flex: 1; display: flex; flex-direction: column; }

.product-card .cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.3rem;
}

.product-card h3 { font-size: 0.97rem; margin-bottom: 0.35rem; }

.product-card p { font-size: 0.82rem; color: var(--muted); flex: 1; }

.product-card .price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.95rem;
}

.product-card .price { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink); }

.product-card .add-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 7px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}

.product-card .add-btn:hover { background: #232c38; }

.product-card .add-btn.added { background: #2f6b3a; border-color: #2f6b3a; }

/* ---------- Cart ---------- */

.cart-fab {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 70;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}

.cart-fab svg { width: 23px; height: 23px; stroke: #fff; }

.cart-fab .count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 21px;
  height: 21px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(400px, 100vw);
  height: 100vh;
  background: #fff;
  z-index: 80;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: right 0.28s ease;
}

.cart-drawer.open { right: 0; }

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
}

.cart-head h3 { font-size: 1.05rem; }

.cart-head button { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }

.cart-items { flex: 1; overflow-y: auto; padding: 1.1rem 1.4rem; }

.cart-empty { text-align: center; color: var(--muted); padding: 3rem 0; font-size: 0.92rem; }

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--surface);
  font-size: 0.88rem;
}

.cart-item .qty-controls { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.3rem; }

.cart-item .qty-controls button {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}

.cart-item .remove { background: none; border: none; color: #b4232a; font-size: 0.75rem; cursor: pointer; padding: 0; margin-top: 0.35rem; }

.cart-item .line-price { font-weight: 600; white-space: nowrap; }

.cart-foot { border-top: 1px solid var(--border); padding: 1.2rem 1.4rem 1.5rem; }

.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-family: var(--font-display); margin-bottom: 1rem; }

.cart-foot .btn { width: 100%; justify-content: center; }

.cart-foot small { display: block; text-align: center; color: var(--muted); margin-top: 0.6rem; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,14,20,0.45);
  z-index: 75;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.cart-overlay.show { opacity: 1; pointer-events: auto; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--ink); color: #fff; padding: 4rem 0; }

.cta-band .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-band h2 { color: #fff; }

.cta-band p { color: var(--on-ink-muted); margin-top: 0.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: #07090d;
  color: var(--on-ink-muted);
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.site-footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 1rem; }

.site-footer ul { list-style: none; display: grid; gap: 0.55rem; }

.site-footer a:hover { color: #fff; }

.footer-brand p { margin-top: 0.9rem; max-width: 21rem; font-size: 0.88rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
    padding: 0.6rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 0.65rem 1.5rem; }
  .nav-links a.nav-cta { display: inline-block; }
  .nav-toggle { display: block; }
  .services-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .jobs-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 1fr 1fr; }
  .hero-inner { padding: 4.5rem 0 4rem; }
  .section { padding: 4rem 0; }
}

@media (max-width: 460px) {
  .products-grid { grid-template-columns: 1fr; }
}
