/**
 * Octagram - OS & System Telemetry Stylesheet
 * Subtle Status Indicator, Sleek Modal Drawer, & Technical Mode
 */

/* ========================================================
   1. Subtle Corner Status Pill Trigger
   ======================================================== */
.octagram-os-pill {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 23, 38, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 30px;
  padding: 8px 16px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 9998;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.octagram-os-pill:hover {
  background: rgba(17, 48, 77, 0.85);
  border-color: var(--accent-blue);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.2);
  transform: translateY(-2px);
}

.os-pulse-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: os-ping 2s infinite ease-in-out;
}

@keyframes os-ping {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.os-pill-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.os-pill-status {
  font-family: monospace;
  font-size: 0.65rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 6px;
  border-radius: 12px;
  letter-spacing: 0.06em;
}

/* ========================================================
   2. Sleek Unobtrusive HUD Modal Drawer
   ======================================================== */
.hud-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 18, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px;
}

.hud-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.hud-modal-dialog {
  width: 100%;
  max-width: 460px;
  background: rgba(8, 20, 34, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(56, 189, 248, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-modal-overlay.active .hud-modal-dialog {
  transform: scale(1) translateY(0);
}

.hud-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(6, 16, 28, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-pulse {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.hud-modal-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-blue);
  text-transform: uppercase;
}

.hud-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.hud-close-btn:hover {
  color: #ffffff;
}

/* ========================================================
   Client Concierge Modal Drawer & Channels
   ======================================================== */
.concierge-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Status & SLA Card */
.concierge-status-card {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.concierge-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: os-ping 2s infinite ease-in-out;
}

.status-live-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.02em;
}

.concierge-status-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Direct Channels Group */
.concierge-channels-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.concierge-group-label,
.concierge-theme-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.concierge-channel-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.concierge-channel-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.channel-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.concierge-channel-card:hover .channel-icon-circle {
  transform: scale(1.08);
}

.whatsapp-circle {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.whatsapp-card:hover {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.15);
}

.phone-circle {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.phone-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.15);
}

.email-circle {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.email-card:hover {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.15);
}

.channel-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.channel-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.channel-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.channel-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.2s ease, color 0.2s ease;
}

.concierge-channel-card:hover .channel-arrow {
  transform: translateX(3px);
  color: #ffffff;
}

/* Fast Scope Jump Box */
.concierge-jump-box {
  background: rgba(12, 32, 53, 0.7);
  border: 1px dashed rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.jump-box-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jump-box-text strong {
  font-size: 0.82rem;
  color: #ffffff;
}

.jump-box-text span {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.concierge-jump-btn {
  font-size: 0.78rem !important;
  padding: 8px 16px !important;
  white-space: nowrap;
}

/* Theme Section */
.concierge-theme-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Theme Switcher Row */
.hud-themes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hud-theme-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s;
}

.hud-theme-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.hud-theme-pill.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

/* Theme sweeping sweep laser line */
body.theme-sweeping::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  box-shadow: 0 0 12px var(--accent-blue), 0 0 24px var(--accent-blue);
  z-index: 10001;
  animation: body-laser-sweep 0.75s ease-out forwards;
}

@keyframes body-laser-sweep {
  0% { top: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}


/* ========================================================
   THEME BLUEPRINT OVERRIDES
   ======================================================== */
html.theme-blueprint,
body.theme-blueprint {
  --bg-primary: #071726;
  --bg-secondary: #091f34;
  --bg-tertiary: #0c263e;
  --border-color: rgba(56, 189, 248, 0.25);
  --accent-indigo: #0ea5e9; /* Shift to Cyan */
  background-attachment: fixed;
}

/* Blueprint grid overlay backing */
body.theme-blueprint::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Dashed outline borders on sections */
body.theme-blueprint section:not(#before-we-build):not(#process) {
  border-bottom: 1px dashed rgba(56, 189, 248, 0.25) !important;
}

body.theme-blueprint .service-card,
body.theme-blueprint .faq-item {
  border: 1px dashed rgba(56, 189, 248, 0.2) !important;
}


/* ========================================================
   THEME PAPER LIGHT OVERRIDES
   ======================================================== */
html.theme-light,
body.theme-light {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e1e7ec;
  --text-primary: #091726;
  --text-secondary: #3b4e63;
  --text-muted: #6b7c93;
  --border-color: rgba(9, 23, 38, 0.08);
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --accent-blue: #0284c7;
  --accent-indigo: #4f46e5;
  --accent-purple: #9333ea;
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(9, 23, 38, 0.06);
}

/* Light Mode Overrides for Specific Components */
body.theme-light header.site-header,
body.theme-light body > header {
  background: rgba(246, 248, 250, 0.85);
  border-color: rgba(9, 23, 38, 0.05);
}

body.theme-light header.site-header.scrolled,
body.theme-light body > header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(9, 23, 38, 0.04);
}

body.theme-light .header-social-link,
body.theme-light .social-icon-link {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #475569;
}

body.theme-light #nav-menu {
  background: #ffffff;
}

body.theme-light .btn-secondary {
  border-color: rgba(9, 23, 38, 0.12);
}

body.theme-light .btn-secondary:hover {
  background: #e1e7ec;
  border-color: var(--text-primary);
}

body.theme-light .service-card {
  box-shadow: 0 10px 30px rgba(9, 23, 38, 0.03);
}

body.theme-light .service-demo-panel {
  background: rgba(9, 23, 38, 0.02);
  border-color: rgba(9, 23, 38, 0.06);
}

body.theme-light .service-card:hover .service-demo-panel,
body.theme-light .service-card.in-view .service-demo-panel {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent-indigo);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.08);
}

body.theme-light .methodology-pipeline-section {
  background: radial-gradient(circle at 50% 15%, rgba(79, 70, 229, 0.04) 0%, transparent 60%);
  border-color: rgba(9, 23, 38, 0.08);
}

body.theme-light .stage-visual-card {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(9, 23, 38, 0.1);
  box-shadow: 0 15px 35px rgba(9, 23, 38, 0.06);
}

body.theme-light .visual-card-header,
body.theme-light .visual-card-footer {
  background: #f8fafc;
  border-color: rgba(9, 23, 38, 0.06);
}

body.theme-light .stage-node-point {
  background: #ffffff;
  border-color: rgba(9, 23, 38, 0.15);
  box-shadow: 0 0 0 6px #f1f5f9, 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.theme-light .pipeline-concept-ribbon,
body.theme-light .stage-deliverables-block {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(9, 23, 38, 0.08);
}

body.theme-light .deliv-chip {
  background: rgba(9, 23, 38, 0.04);
  border-color: rgba(9, 23, 38, 0.08);
  color: var(--text-secondary);
}

body.theme-light .pipeline-stage.is-active .deliv-chip {
  background: rgba(79, 70, 229, 0.08);
  border-color: rgba(79, 70, 229, 0.25);
  color: var(--text-primary);
}

body.theme-light .integration-system-nodes .system-node {
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(9, 23, 38, 0.05);
}

body.theme-light .faq-bridge-cta {
  background: rgba(9, 23, 38, 0.02);
  border-color: rgba(9, 23, 38, 0.08);
}

body.theme-light .faq-bridge-cta:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

body.theme-light .faq-bridge-cta:hover svg {
  stroke: var(--bg-primary);
}

body.theme-light .form-input,
body.theme-light .form-textarea {
  background: #ffffff;
  border-color: rgba(9, 23, 38, 0.08);
  color: var(--text-primary);
}

body.theme-light footer {
  background: #f1f3f5;
}

/* Circuits dimming in Light mode */
body.theme-light .circuit-bg {
  opacity: 0.12;
}

body.theme-light .bg-watermark {
  opacity: 0.015;
}

body.theme-light #octagram-hud {
  background: rgba(255, 255, 255, 0.65); /* Translucent in light theme too */
  border-color: rgba(9, 23, 38, 0.08);
  box-shadow: -10px 15px 40px rgba(9, 23, 38, 0.05);
}

body.theme-light .hud-handle {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(9, 23, 38, 0.08);
}

body.theme-light .hud-header {
  background: #f1f3f5;
  border-color: rgba(9, 23, 38, 0.06);
}

body.theme-light .hud-theme-btn {
  background: rgba(9, 23, 38, 0.01);
  border-color: rgba(9, 23, 38, 0.04);
}

body.theme-light .hud-theme-btn:hover {
  background: rgba(9, 23, 38, 0.04);
}

body.theme-light .hud-inspect-btn {
  background: rgba(9, 23, 38, 0.01);
  border-color: rgba(9, 23, 38, 0.04);
  color: var(--text-primary);
}

body.theme-light .hud-inspect-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
}

body.theme-light .hud-code-box {
  background: #f8fafc;
  border-color: rgba(9, 23, 38, 0.05);
  color: #3b4e63;
}

body.theme-light .telemetry-card {
  background: rgba(9, 23, 38, 0.01);
  border-color: rgba(9, 23, 38, 0.03);
}

/* Mobile Responsive Optimizations for HUD Console */
@media (max-width: 480px) {
  #octagram-hud {
    width: 280px;
    max-height: 80vh;
  }
  .hud-body {
    padding: 12px;
    gap: 12px;
    max-height: calc(80vh - 46px);
  }
  .hud-section-title {
    font-size: 0.62rem;
    margin-bottom: 6px;
  }
  .hud-theme-btn {
    font-size: 0.58rem;
    padding: 6px 2px;
  }
  .hud-inspect-btn {
    padding: 8px;
    font-size: 0.65rem;
  }
  .hud-code-box {
    max-height: 100px;
    font-size: 0.58rem;
    padding: 8px;
  }
  .telemetry-value {
    font-size: 0.88rem;
  }
  .telemetry-badge {
    font-size: 0.5rem;
    padding: 1px 4px;
  }
  .telemetry-card {
    padding: 8px;
  }
  .telemetry-recalc-btn {
    padding: 5px;
    font-size: 0.58rem;
  }
  .hud-handle {
    height: 100px;
    width: 32px;
    left: -32px;
  }
  .hud-handle-text {
    font-size: 0.55rem;
    letter-spacing: 0.15em;
  }
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(9, 23, 38, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#back-to-top:hover {
  background: rgba(9, 23, 38, 0.75);
  border-color: var(--accent-blue);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.25);
  color: var(--accent-blue);
}

/* Light mode overrides */
body.theme-light #back-to-top {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(9, 23, 38, 0.08);
  color: var(--text-primary);
}

body.theme-light #back-to-top:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 8px 20px rgba(9, 23, 38, 0.06);
}

/* Mobile phone layout adjustment */
@media (max-width: 480px) {
  #back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
  
  .octagram-os-pill {
    bottom: 16px;
    left: 16px;
    right: auto;
    padding: 6px 12px;
    font-size: 0.65rem;
  }
}

