/* ==========================================================================
   099 · HAPLO (هابْلو لطول العمر الصحي) — 1:1 Pinned 340vh 3D DNA Double-Helix Choreography
   Abyssal #060B14 -> #10284A · Pure #FFFFFF · Ice Cyan #8FC3E6 · Golden-Amber Collars #FFB02E
   ========================================================================== */

:root {
  --bg: #060B14;
  --bg2: #10284A;
  --ink: #FFFFFF;
  --ink-2: rgba(255, 255, 255, 0.72);
  --cyan: #8FC3E6;
  --amber: #FFB02E;
  --sans: 'IBM Plex Sans Arabic', 'Readex Pro', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; letter-spacing: 0; }
.bidi { unicode-bidi: isolate; font-family: var(--mono); }

/* ======================== FIXED VIEWPORT 3D DNA STAGE ======================== */
.hp-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 52% 46%, #10284A 0%, #0A1A31 38%, #060D19 72%, #04070D 100%);
  overflow: hidden;
}

.hp-stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-dna-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Fixed Minimal HUD Header */
.hp-hud {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 64px;
  z-index: 60;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.hp-monogram {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  background: #FFFFFF;
  color: #091423;
  display: inline-grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 800;
  font-size: 14px;
}

.hp-menu-btn {
  justify-self: end;
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Fullscreen Clip-Path Menu Overlay */
.hp-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(4, 8, 15, 0.95);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 48px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.hp-menu.open {
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
}

.hp-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  font-weight: 300;
}

.hp-menu-links button {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.hp-menu-links button:hover { color: var(--cyan); }

/* Left-Edge Progress Rail (.hud-side) */
.hp-side-rail {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
}

.hp-rail-line {
  width: 2px;
  height: 120px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
}

.hp-rail-fill {
  width: 100%;
  height: 25%;
  background: var(--amber);
  transition: height 0.25s ease;
}

.hp-stage-dots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-dot-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(143, 195, 230, 0.35);
  background: rgba(6, 11, 20, 0.7);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10px;
  cursor: pointer;
}

.hp-dot-btn.active {
  background: var(--amber);
  color: #060B14;
  border-color: var(--amber);
  font-weight: 800;
}

/* Floating 62px Frosted Watch Button */
.hp-watch {
  position: fixed;
  left: 16vw;
  top: 22vh;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  transition: opacity 0.35s ease;
}

.hp-watch-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
}

.hp-watch-disc {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #060B14;
  display: grid;
  place-items: center;
  font-size: 11px;
}

/* Choreographed Story Panels */
.hp-panel {
  position: fixed;
  z-index: 40;
  max-width: 470px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.hp-panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hp-panel-1 { right: 7.5vw; bottom: 13vh; }
.hp-panel-2 { left: 9vw; bottom: 13vh; }
.hp-panel-3 { right: 8vw; top: 24vh; }
.hp-panel-4 { right: 7.5vw; bottom: 12vh; max-width: 520px; }

.hp-h {
  font-size: clamp(1.65rem, 2.75vw, 2.65rem);
  font-weight: 500;
  line-height: 1.26;
  margin-bottom: 12px;
}

.hp-sub {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.hp-lnk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 14.5px;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}

/* Invisible 340vh Scroll Track */
.hp-track {
  position: relative;
  height: 340vh;
  z-index: 2;
  pointer-events: none;
}

/* Biomarker Modal */
.hp-modal {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(4, 8, 15, 0.88);
  backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.hp-modal.open { display: flex; }

/* Bottom Showcase Nav */
.hp-bottom-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 55;
  display: flex;
  gap: 10px;
  background: rgba(6, 11, 20, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(143, 195, 230, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .hp-watch, .hp-side-rail { display: none; }
  .hp-panel-1, .hp-panel-2, .hp-panel-3, .hp-panel-4 {
    right: 20px;
    left: 20px;
    bottom: 72px;
    top: auto;
  }
}
