/* ============================================================
   X Series — shared design system
   Dark "hard-tech" system extracted from the BP (see brand-spec.md).
   Tokens live in :root; edit there to re-skin every page at once.
   ============================================================ */

:root {
  /* color tokens — authoritative hex from the BP slide XML */
  --bg-deep:  #06121F;
  --bg:       #0C1A2A;
  --surface:  #10243A;
  --surface-2:#1A3349;
  --fg:       #F4FBFE;
  --muted:    #8595A6;
  --muted-2:  #5A6B7E;
  --border:   #1F3A52;
  --border-2: rgba(133, 149, 166, 0.18);
  --accent:   #22D3EE;
  --accent-2: #06B6D4;
  --accent-3: #0891B2;
  --glow:     rgba(34, 211, 238, 0.16);
  --ok:       #34D399;
  --warn:     #FBBF24;

  /* type */
  --font-display: 'Space Grotesk', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body:    'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* geometry */
  --radius: 12px;
  --radius-lg: 18px;
  --container: 1200px;
  --nav-h: 68px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(1100px 560px at 82% -8%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(8, 145, 178, 0.08), transparent 55%),
    linear-gradient(rgba(133, 149, 166, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 149, 166, 0.045) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; font-weight: 700; }
p { margin: 0; }
::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

/* ---------- layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 104px 0; position: relative; }
.section--tight { padding: 72px 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }

.display {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--fg);
}
.display .accent { color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.18rem); max-width: 62ch; margin-top: 20px; }
.lead strong { color: var(--fg); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #03121c; }
.btn-primary:hover { background: #5ce0f4; box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.16), 0 12px 30px rgba(34, 211, 238, 0.25); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-block { width: 100%; }

/* ---------- pills / tags ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid var(--border-2);
  color: var(--muted);
  background: rgba(16, 36, 58, 0.5);
}
.pill--accent { color: var(--accent); border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.08); }
.pill--ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.pill--warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(6, 18, 31, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-2);
}
.nav__inner { display: flex; align-items: center; gap: 28px; width: 100%; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand .sub { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: color .16s, background .16s;
}
.nav__links a:hover { color: var(--fg); }
.nav__links a.active { color: var(--accent); background: rgba(34, 211, 238, 0.08); }
.nav__actions { display: flex; align-items: center; gap: 14px; }

/* language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(16, 36, 58, 0.5);
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 13px;
  border-radius: 999px;
  transition: color .16s, background .16s;
}
.lang-switch button.active { background: var(--accent); color: #03121c; font-weight: 600; }

/* hamburger */
.burger { display: none; flex-direction: column; gap: 5px; background: transparent; border: 0; padding: 10px; }
.burger span { width: 22px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 80px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero__copy .display { font-size: clamp(2.3rem, 5vw, 4rem); }
.hero__statline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__visual { position: relative; }
.hero__visual::before {
  content: ""; position: absolute; inset: 8% 6%;
  background: radial-gradient(closest-side, rgba(34, 211, 238, 0.22), transparent 70%);
  filter: blur(30px); z-index: 0;
}
.hero__visual img { position: relative; z-index: 1; border-radius: var(--radius-lg); border: 1px solid var(--border-2); box-shadow: 0 40px 80px rgba(0,0,0,0.45); width: 100%; height: auto; object-fit: cover; }

/* stat strip */
.stats { border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); background: rgba(16, 36, 58, 0.35); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 26px; border-left: 1px solid var(--border-2); }
.stat:first-child { border-left: 0; }
.stat .num { font-family: var(--font-mono); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; color: var(--accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .num .unit { font-size: 0.55em; color: var(--muted); margin-left: 3px; }
.stat .label { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ---------- cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  transition: transform .18s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.4); box-shadow: 0 18px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(34,211,238,0.08); }
.card .card__tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--accent); text-transform: uppercase; }
.card h3 { font-size: 1.22rem; margin: 14px 0 10px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .card__num { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--fg); margin-top: 18px; font-variant-numeric: tabular-nums; }
.card .card__num .unit { font-size: 0.5em; color: var(--muted); }

/* product card (homepage) */
.pcard { overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.pcard__img { aspect-ratio: 4/3; background: var(--surface-2); display: grid; place-items: center; padding: 26px; border-bottom: 1px solid var(--border-2); }
.pcard__img img { max-height: 100%; object-fit: contain; border-radius: 8px; }
.pcard__body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.pcard__body .card__tag { color: var(--accent); }
.pcard__body h3 { font-size: 1.4rem; margin: 10px 0 8px; }
.pcard__body p { color: var(--muted); font-size: 14.5px; flex: 1; }
.pcard__specs { list-style: none; margin: 18px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border-2); display: grid; gap: 8px; }
.pcard__specs li { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.pcard__specs b { font-family: var(--font-mono); color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.pcard__cta { margin-top: 22px; }
.pcard--muted { opacity: 0.68; border-style: dashed; }
.pcard--muted:hover { opacity: 0.92; }

/* ---------- pillars ---------- */
.pillar { padding: 30px; }
.pillar .pillar__idx { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.pillar h3 { font-size: 1.28rem; margin: 14px 0 10px; }
.pillar p { color: var(--muted); font-size: 14.5px; }
.pillar ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; }
.pillar ul li { color: var(--muted); font-size: 13.5px; padding-left: 18px; position: relative; }
.pillar ul li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border: 1.5px solid var(--accent); border-radius: 2px; }

/* ---------- architecture L1-L4 ---------- */
.arch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.layer { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 24px; position: relative; transition: border-color .2s, transform .18s; }
.layer:hover { border-color: rgba(34,211,238,0.4); transform: translateY(-3px); }
.layer .layer__idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--accent); }
.layer h4 { font-size: 1.05rem; margin: 12px 0 8px; }
.layer p { color: var(--muted); font-size: 13.5px; }
.layer .layer__metric { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 700; color: var(--fg); margin-top: 16px; font-variant-numeric: tabular-nums; }
.layer .layer__metric .unit { font-size: 0.5em; color: var(--muted); }

/* ---------- spec table ---------- */
.spec { border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.spec__row { display: grid; grid-template-columns: 240px 1fr; border-top: 1px solid var(--border-2); }
.spec__row:first-child { border-top: 0; }
.spec__row > dt, .spec__row > dd { margin: 0; padding: 16px 22px; font-size: 14.5px; }
.spec__row > dt { color: var(--muted); background: rgba(16, 36, 58, 0.4); font-weight: 500; }
.spec__row > dd { color: var(--fg); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.spec__row > dd .muted { color: var(--muted); }

/* ---------- comparison before/after ---------- */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.cmp__side { border: 1px solid var(--border-2); border-radius: var(--radius); padding: 30px; background: var(--surface); }
.cmp__side--dim { opacity: 0.6; }
.cmp__side--win { border-color: rgba(34, 211, 238, 0.55); background: linear-gradient(180deg, rgba(34,211,238,0.07), transparent 55%), var(--surface); }
.cmp__head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.cmp__head .pill { margin-left: auto; }
.cmp h3 { font-size: 1.15rem; }
.cmp__rows { display: grid; gap: 0; }
.cmp__row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-top: 1px solid var(--border-2); font-size: 14px; }
.cmp__row span:first-child { color: var(--muted); }
.cmp__row b { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: rgba(16, 36, 58, 0.55);
  color: var(--fg);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .16s, box-shadow .16s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34,211,238,0.14); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 5px; }
.form__note { font-size: 13px; color: var(--ok); min-height: 20px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border-2); background: rgba(6, 18, 31, 0.6); padding: 72px 0 34px; margin-top: 60px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand .brand { margin-bottom: 14px; }
.footer__brand p { color: var(--muted); font-size: 14px; max-width: 34ch; }
.footer h4 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--muted); font-size: 14px; transition: color .16s; }
.footer ul a:hover { color: var(--accent); }
.footer__bottom { border-top: 1px solid var(--border-2); margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; color: var(--muted-2); font-size: 13px; }
.footer__bottom a { color: var(--muted); }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: 88px 0 56px; }
.page-hero .crumb { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 20px; text-transform: uppercase; }
.page-hero .crumb a:hover { color: var(--accent); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- accordion (docs / faq) ---------- */
.acc { border: 1px solid var(--border-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.acc__item { border-top: 1px solid var(--border-2); }
.acc__item:first-child { border-top: 0; }
.acc__head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; background: transparent; border: 0; color: var(--fg); font-size: 15.5px; font-weight: 600; text-align: left; }
.acc__head .ico { font-family: var(--font-mono); color: var(--accent); font-size: 18px; transition: transform .2s; }
.acc__item.open .acc__head .ico { transform: rotate(45deg); }
.acc__body { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.acc__body-inner { padding: 0 24px 22px; color: var(--muted); font-size: 14.5px; }

/* ---------- coming soon ---------- */
.cs { text-align: center; padding: 140px 0; }
.cs .cs__mark { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.4em; color: var(--accent); text-transform: uppercase; }
.cs .display { font-size: clamp(2.4rem, 6vw, 4.6rem); margin-top: 22px; }
.cs .lead { margin-left: auto; margin-right: auto; }
.cs__form { max-width: 460px; margin: 40px auto 0; display: flex; gap: 12px; }
.cs__form input { flex: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: -1; max-width: 560px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .arch { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border-2); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .section { padding: 72px 0; }
  .nav__links { display: none; }
  .burger { display: flex; }
  .nav__actions .btn { display: none; }
  .grid-2, .grid-3, .grid-4, .cmp { grid-template-columns: 1fr; }
  .arch { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .spec__row { grid-template-columns: 1fr; }
  .spec__row > dt { border-top: 0; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .cs__form { flex-direction: column; }
}

/* mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  background: rgba(6, 18, 31, 0.5); opacity: 0; transition: opacity .25s;
}
.drawer.open { opacity: 1; pointer-events: auto; }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(320px, 84vw);
  background: var(--bg); border-left: 1px solid var(--border-2);
  padding: 24px; transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.7,.3,1);
  display: flex; flex-direction: column; gap: 6px;
}
.drawer.open .drawer__panel { transform: none; }
.drawer__panel a { padding: 14px 12px; border-radius: 10px; color: var(--fg); font-size: 17px; font-weight: 500; }
.drawer__panel a:hover { background: var(--surface); }
.drawer__panel a.active { color: var(--accent); }
.drawer__close { align-self: flex-end; background: transparent; border: 0; color: var(--muted); font-size: 24px; }
