/* 046 · Linkworks (نسيج الواجهات) — 1:1 Reference-Faithful Unified API Stylesheet */
:root {
  --lw-bg: #08111f;
  --lw-bg2: #0c1a2e;
  --lw-bg3: #101f36;
  --lw-fg: #f4f7fa;
  --lw-muted: #a9b6c6;
  --lw-line: rgba(203, 211, 220, 0.16);
  --lw-amber: #e58a3a;
  --lw-blue: #4f8be8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--lw-bg); color: var(--lw-fg); }

body {
  margin: 0;
  background: var(--lw-bg);
  color: var(--lw-fg);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  line-height: 1.68;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, a, button, span, select, input { letter-spacing: 0; }
[dir="ltr"] { font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace; }

/* Sticky Glass Top Bar */
.lw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  background: rgba(8, 17, 31, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--lw-line);
  display: flex;
  align-items: center;
  padding: 0 clamp(18px, 3.5vw, 48px);
}

.lw-nav {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.lw-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lw-fg);
  text-decoration: none;
  font-family: 'Readex Pro', sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
}

.lw-links { display: flex; align-items: center; gap: 20px; }
.lw-links a { color: var(--lw-muted); text-decoration: none; font-size: 0.85rem; white-space: nowrap; }
.lw-links a:hover { color: var(--lw-fg); }

.lw-pill-amber {
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  background: var(--lw-amber);
  color: #08111f;
  box-shadow: 0 10px 28px -12px rgba(229, 138, 58, 0.7);
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  cursor: pointer;
}

.lw-pill-ghost {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--lw-line);
  background: rgba(12, 26, 46, 0.72);
  color: var(--lw-fg);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
}

/* Section 1: Blueprint Orbital Hero */
.lw-hero {
  position: relative;
  min-height: calc(100dvh - 68px);
  padding: 48px clamp(20px, 4vw, 56px) 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-bottom: 1px solid var(--lw-line);
}

.lw-hero-bg { position: absolute; inset: 0; z-index: 0; }
.lw-hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.42; }

.lw-watermark {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-family: 'Readex Pro', sans-serif;
  font-weight: 800;
  font-size: 14vw;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(203, 211, 220, 0.12);
  pointer-events: none;
}

.lw-hero-grid {
  position: relative;
  z-index: 5;
  max-width: 1320px;
  width: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.lw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--lw-amber);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.lw-eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--lw-amber);
}

.lw-h1 {
  margin: 0 0 16px;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(2.4rem, 4.8vw, 4.3rem);
  font-weight: 600;
  line-height: 1.08;
}

.lw-serif-amber {
  font-family: 'Amiri', Georgia, serif;
  font-style: italic;
  color: var(--lw-amber);
  font-weight: 400;
}

/* Interactive Orbital Hub SVG */
.lw-orbit-box {
  display: flex;
  justify-content: center;
}

.lw-orbit-node {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.lw-hero-strip {
  position: relative;
  z-index: 5;
  max-width: 1320px;
  width: 100%;
  margin: 24px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--lw-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.76rem;
  color: var(--lw-muted);
}

/* Shared Section */
.lw-sec {
  scroll-margin-top: 72px;
  border-bottom: 1px solid var(--lw-line);
  padding: clamp(72px, 8vw, 104px) clamp(20px, 4vw, 56px);
}

.lw-wrap { max-width: 1320px; margin: 0 auto; }

.lw-h2 {
  margin: 0 0 14px;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(1.9rem, 3.3vw, 2.85rem);
  font-weight: 600;
  line-height: 1.15;
}

.lw-grid-3 {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.lw-card {
  background: linear-gradient(180deg, var(--lw-bg2), rgba(12, 26, 46, 0.55));
  border: 1px solid var(--lw-line);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* #build Interactive Flow Builder + JSON Terminal */
.lw-builder {
  margin-top: 34px;
  background: rgba(12, 26, 46, 0.55);
  border: 1px solid var(--lw-line);
  border-radius: 26px;
  padding: 24px;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 22px;
}

.lw-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--lw-line);
  background: var(--lw-bg);
  color: var(--lw-fg);
  font-family: inherit;
  margin-top: 6px;
}

.lw-json-card {
  background: #060d18;
  border: 1px solid var(--lw-line);
  border-radius: 18px;
  padding: 18px;
  font-size: 0.8rem;
  color: #8fb4f0;
  overflow-x: auto;
}

/* #connectors Filterable Grid */
.lw-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0;
}

.lw-fbtn {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--lw-line);
  background: var(--lw-bg2);
  color: var(--lw-muted);
  font-family: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.lw-fbtn.is-active {
  background: var(--lw-amber);
  border-color: var(--lw-amber);
  color: #08111f;
  font-weight: 700;
}

.lw-conn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lw-conn-item {
  background: var(--lw-bg2);
  border: 1px solid var(--lw-line);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lw-conn-item.is-hidden { display: none; }

/* #reliability Uptime Bars */
.lw-uptime-bars {
  height: 64px;
  display: grid;
  grid-template-columns: repeat(48, 1fr);
  gap: 3px;
  align-items: end;
  margin-top: 16px;
}

.lw-uptime-bars i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, #4f8be8, #2a5cb0);
}

.lw-uptime-bars i.is-warn {
  height: 76%;
  background: linear-gradient(180deg, #f29a4b, #c06a1f);
}

.lw-footer { padding: 38px clamp(20px, 4vw, 56px); background: #060d18; }

@media (max-width: 900px) {
  .lw-builder { grid-template-columns: 1fr; }
  .lw-conn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .lw-links { display: none; }
  .lw-hero-grid, .lw-grid-3, .lw-conn-grid { grid-template-columns: 1fr; }
}
