/* 039 · Haloglass (هالة الصوت) — 1:1 Reference-Faithful Bespoke Stylesheet */
:root {
  --hg-bg: #050507;
  --hg-panel: #0a0a0f;
  --hg-fg: #f2f2f2;
  --hg-muted: #9a9ba3;
  --hg-cyan: #8fd0ff;
  --hg-fringe: #e052c0;
  --hg-flare: #ffb22e;
  --hg-line: rgba(255, 255, 255, 0.1);
  --hg-line-strong: rgba(255, 255, 255, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--hg-bg);
  color: var(--hg-fg);
}

body {
  margin: 0;
  background: var(--hg-bg);
  color: var(--hg-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, input {
  letter-spacing: 0;
}

[dir="ltr"] {
  font-family: 'JetBrains Mono', monospace;
}

/* 3-Stop Spectral Chromatic Gradient Span */
.hg-spectral {
  background: linear-gradient(95deg, #8fd0ff 0%, #e052c0 50%, #ffb22e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hg-bracket-tag {
  display: inline-block;
  color: var(--hg-cyan);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Fixed Architectural Top Bar (0px Sharp Radius) */
.hg-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  height: 72px;
  background: rgba(5, 5, 7, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 22px;
}

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

.hg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hg-fg);
  text-decoration: none;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.hg-nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.hg-nav-links a {
  color: var(--hg-muted);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.hg-nav-links a:hover {
  color: var(--hg-fg);
}

/* Sharp Corner-Bracketed CTA Button */
.hg-join-btn {
  position: relative;
  height: 40px;
  padding: 0 20px;
  background: #0b0b10;
  border: 1px solid var(--hg-line-strong);
  color: var(--hg-fg);
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hg-join-btn::before,
.hg-join-btn::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: var(--hg-cyan);
  border-style: solid;
  pointer-events: none;
}

.hg-join-btn::before {
  top: -1px;
  left: -1px;
  border-width: 1.5px 0 0 1.5px;
}

.hg-join-btn::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 1.5px 1.5px 0;
}

.hg-join-btn:hover {
  background: rgba(143, 208, 255, 0.1);
  border-color: var(--hg-cyan);
}

/* Section 1: 100vh Split Hero + Real-Time Chromatic Torus Canvas + Horizon Flare */
.hg-hero {
  position: relative;
  min-height: 100dvh;
  padding-top: 72px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-bottom: 1px solid var(--hg-line);
}

.hg-torus-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hg-horizon-flare {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(42% 28% at 78% 94%, rgba(255, 178, 46, 0.26) 0%, rgba(224, 82, 192, 0.08) 45%, transparent 78%),
    linear-gradient(to left, rgba(5, 5, 7, 0.88) 0%, rgba(5, 5, 7, 0.56) 48%, rgba(5, 5, 7, 0.08) 100%);
}

.hg-hero-grid {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 1380px;
  margin: auto;
  padding: 48px clamp(20px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.hg-hero-copy h1 {
  margin: 0 0 18px;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: clamp(2.4rem, 4.8vw, 4.1rem);
  font-weight: 400;
  line-height: 1.12;
}

.hg-hero-lead {
  margin: 0 0 26px;
  max-width: 520px;
  color: var(--hg-muted);
  font-size: 1.02rem;
}

/* Flush Sharp Email Capture Row */
.hg-capture-row {
  display: flex;
  max-width: 470px;
  margin-bottom: 14px;
}

.hg-capture-row input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  background: rgba(9, 9, 12, 0.85);
  border: 1px solid var(--hg-line-strong);
  border-inline-end: 0;
  color: var(--hg-fg);
  font-family: inherit;
  font-size: 0.9rem;
}

.hg-capture-row input:focus {
  outline: none;
  border-color: var(--hg-cyan);
}

.hg-submit-white {
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--hg-fg);
  background: var(--hg-fg);
  color: #050507;
  font-family: 'Readex Pro', 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hg-submit-white:hover {
  background: var(--hg-cyan);
  border-color: var(--hg-cyan);
}

.hg-ghost-rect {
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--hg-line-strong);
  background: rgba(9, 9, 12, 0.65);
  color: var(--hg-fg);
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.hg-ghost-rect:hover {
  border-color: var(--hg-cyan);
}

/* Bottom 3-Slot Hairline KPI Strip */
.hg-hero-strip {
  position: relative;
  z-index: 5;
  border-top: 1px solid var(--hg-line);
  background: rgba(5, 5, 7, 0.82);
  backdrop-filter: blur(10px);
}

.hg-strip-inner {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hg-strip-cell {
  padding: 18px clamp(18px, 3vw, 40px);
  border-inline-end: 1px solid var(--hg-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
}

.hg-strip-cell:last-child {
  border-inline-end: 0;
}

.hg-strip-cell span {
  color: var(--hg-muted);
}

.hg-strip-cell strong {
  color: var(--hg-fg);
}

/* Shared Architectural Section */
.hg-sec {
  scroll-margin-top: 72px;
  border-bottom: 1px solid var(--hg-line);
  padding: clamp(76px, 8.5vw, 118px) clamp(20px, 4vw, 56px);
}

.hg-container {
  max-width: 1320px;
  margin: 0 auto;
}

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

/* Section 2: [ 01 / WHY IT HOLDS ] 3-Column Metric Trio */
.hg-trio {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.hg-metric-card {
  background: var(--hg-panel);
  border: 1px solid var(--hg-line);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hg-big-stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.3rem, 3.6vw, 3.2rem);
  font-weight: 400;
  color: var(--hg-fg);
  line-height: 1;
}

.hg-viz-box {
  height: 86px;
  border-block: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hg-metric-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--hg-fg);
}

.hg-metric-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--hg-muted);
}

/* Section 3: [ 02 / DEVELOPERS ] 42% / 58% SDK Split + Live Typewriter Code Window */
.hg-dev-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 4.5vw, 56px);
  align-items: center;
}

.hg-dash-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--hg-fg);
}

.hg-dash-list li::before {
  content: "— ";
  color: var(--hg-cyan);
}

.hg-code-win {
  position: relative;
  background: #08080c;
  border: 1px solid var(--hg-line-strong);
  box-shadow: 0 24px 70px rgba(143, 208, 255, 0.08);
}

.hg-code-bar {
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hg-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hg-win-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--hg-muted);
}

.hg-win-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hg-code-tabs {
  display: flex;
  gap: 4px;
}

.hg-code-tab {
  height: 28px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--hg-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  cursor: pointer;
}

.hg-code-tab.is-active {
  border-color: var(--hg-cyan);
  color: var(--hg-cyan);
  background: rgba(143, 208, 255, 0.08);
}

.hg-code-pre {
  margin: 0;
  padding: 24px;
  min-height: 240px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.83rem;
  line-height: 1.7;
  color: #dbeafe;
  overflow-x: auto;
  white-space: pre-wrap;
}

.hg-caret {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--hg-cyan);
  vertical-align: middle;
  animation: hgBlink 0.9s steps(1) infinite;
}

@keyframes hgBlink {
  50% { opacity: 0; }
}

/* Section 4: [ 03 / SECURITY ] 6-Column Joined Compliance Strip */
.hg-sec-head-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
}

.hg-comp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--hg-line);
  background: var(--hg-panel);
}

.hg-comp-cell {
  padding: 24px 18px;
  border-inline-end: 1px solid var(--hg-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hg-comp-cell:last-child {
  border-inline-end: 0;
}

.hg-comp-icon {
  color: var(--hg-cyan);
  font-size: 1.05rem;
}

.hg-comp-cell strong {
  font-size: 0.84rem;
  color: var(--hg-fg);
}

.hg-comp-cell span {
  font-size: 0.78rem;
  color: var(--hg-muted);
}

/* Section 5: [ INVITE KEY ] Early-Access Card */
.hg-invite-card {
  background: var(--hg-panel);
  border: 1px solid var(--hg-line-strong);
  padding: clamp(28px, 4.5vw, 54px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hg-key-box {
  border: 1px dashed rgba(143, 208, 255, 0.42);
  background: #060609;
  padding: 28px;
  text-align: center;
}

.hg-key-val {
  display: block;
  margin: 12px 0 16px;
  font-size: 1.55rem;
  letter-spacing: 0.16em;
  color: var(--hg-fg);
}

.hg-key-bar {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hg-key-bar i {
  display: block;
  height: 100%;
  width: 28%;
  background: linear-gradient(90deg, #8fd0ff, #e052c0, #ffb22e);
  transition: width 0.5s ease;
}

/* Footer */
.hg-footer {
  padding: 40px clamp(20px, 4vw, 56px);
  background: #040406;
}

.hg-foot-top,
.hg-foot-bot {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hg-foot-bot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  color: var(--hg-muted);
}

@media (max-width: 960px) {
  .hg-comp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hg-nav-links {
    display: none;
  }
  .hg-hero-grid,
  .hg-strip-inner,
  .hg-trio,
  .hg-dev-grid,
  .hg-invite-card {
    grid-template-columns: 1fr;
  }
  .hg-comp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
