/* ----- Base + layout ----- */

:root {
  --bg: #050818;
  --bg-alt: #0b0f23;
  --surface: #11152b;
  --surface-alt: #171c36;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text: #f7f7ff;
  --text-muted: #b5b8d8;
  --accent: #6b8bff;
  --accent-soft: rgba(107, 139, 255, 0.18);
  --accent-strong: #9f7bff;
  --error: #ff4f6a;
  --warn: #ffb44f;
  --ok: #35d06f;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.6);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --transition-fast: 160ms ease-out;
  --transition-med: 220ms ease-out;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #151a3a 0, #050818 55%, #020313 100%);
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Background orbs */

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: floatOrbs 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, #6b8bff, transparent);
  top: -140px;
  left: -80px;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #ff5faf, transparent);
  bottom: -120px;
  right: -60px;
  animation-delay: 3s;
}

.orb-3 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #35d06f, transparent);
  top: 40%;
  right: 25%;
  animation-delay: 6s;
}

@keyframes floatOrbs {
  from {
    transform: translateY(0) translateX(0);
  }
  to {
    transform: translateY(-40px) translateX(18px);
  }
}

/* Layout helpers */

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  padding: 4.5rem 0;
  background: radial-gradient(circle at top, #11152b 0, #050818 50%);
}

/* ----- Header ----- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(5, 8, 24, 0.88);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: conic-gradient(from 180deg, #6b8bff, #9f7bff, #35d06f, #6b8bff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(111, 141, 255, 0.7);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast),
    transform var(--transition-fast);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-cta-simple {
  margin-left: auto;
}

.header-link {
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--text-muted);
}

.header-link:hover {
  color: var(--text);
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.3rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

/* ----- Hero ----- */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 36rem;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.8rem 0 1.2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

.meta-item {
  font-size: 0.85rem;
}

.meta-label {
  display: block;
  color: var(--text-muted);
}

.meta-value {
  font-weight: 500;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  transition: background var(--transition-med), transform var(--transition-fast),
    box-shadow var(--transition-med), border-color var(--transition-med);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #6b8bff, #9f7bff);
  box-shadow: 0 14px 30px rgba(111, 141, 255, 0.6);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(111, 141, 255, 0.8);
}

.btn-outline {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(8, 11, 34, 0.75);
}

.btn-outline:hover {
  background: rgba(16, 21, 52, 0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

/* Hero visual */

.hero-visual {
  position: relative;
}

.hero-card {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, #1d2346, #11152b 55%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}

.hero-card-main {
  padding: 1rem 1.2rem 1.1rem;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-card-pill {
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.6rem;
  background: rgba(107, 139, 255, 0.16);
  color: var(--accent-strong);
  font-size: 0.76rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.status-ok {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(53, 208, 111, 0.8);
}

/* Facility cards */

.facility-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.facility-room {
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-lg);
  background: rgba(6, 10, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.room-header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.76rem;
  margin-bottom: 0.2rem;
}

.room-name {
  font-weight: 500;
}

.room-metric {
  color: var(--text-muted);
}

.room-alert {
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.room-alert-ok {
  color: var(--text-muted);
}

.room-alert-warn {
  color: var(--warn);
}

.room-alert-crit {
  color: var(--error);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-ok {
  background: rgba(53, 208, 111, 0.18);
  color: var(--ok);
}

.badge-warn {
  background: rgba(255, 180, 79, 0.18);
  color: var(--warn);
}

.badge-crit {
  background: rgba(255, 79, 106, 0.18);
  color: var(--error);
}

/* Hero footer */

.hero-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  gap: 0.75rem;
}

.channel-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.channel-chips {
  display: inline-flex;
  gap: 0.35rem;
  margin-left: 0.4rem;
}

.chip {
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.16rem 0.55rem;
  font-size: 0.7rem;
}

.status-pill {
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.6rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill-active {
  background: rgba(107, 139, 255, 0.2);
  color: var(--accent-strong);
}

/* Secondary card */

.hero-card-secondary {
  position: absolute;
  right: -10px;
  bottom: -18px;
  padding: 0.7rem 0.9rem;
  width: 90%;
  max-width: 280px;
  transform: translateY(0);
  animation: floatCard 6s ease-in-out infinite alternate;
}

@keyframes floatCard {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-9px);
  }
}

.hero-card-secondary-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.alert-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.alert-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
}

.alert-time {
  color: var(--text-muted);
}

/* Sections */

.section-header {
  text-align: left;
  margin-bottom: 1.75rem;
}

.section-header h2 {
  margin-bottom: 0.4rem;
  font-size: 1.7rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  max-width: 32rem;
}

.section-header.narrow {
  max-width: 32rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.card {
  padding: 1.2rem 1.2rem 1.1rem;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, #171c36, #10142a);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6);
  font-size: 0.92rem;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top, rgba(107, 139, 255, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-med);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.card p {
  margin-top: 0;
  color: var(--text-muted);
}

.checklist {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.checklist li + li {
  margin-top: 0.25rem;
}

/* Services */

.services-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.services-grid {
  display: contents;
}

.service-column h3 {
  margin-top: 0;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(107, 139, 255, 0.25);
  color: #fff;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.6rem;
}

.step-list li {
  display: flex;
  align-items: flex-start;
}

.step-list h4 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
}

.step-list p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill-list li {
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 34, 0.7);
  font-size: 0.8rem;
}

.callout {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, #171f48, #10142a);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
}

.callout h4 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

/* Heartbeat spotlight */

.heartbeat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.8rem;
}

.metric {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 0.82rem;
}

.metric-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.metric-value {
  font-weight: 500;
}

/* Heartbeat timeline */

.timeline {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, #171f46, #090d22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
  font-size: 0.85rem;
}

.timeline-item + timeline-item {
  margin-top: 0.6rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: flex-start;
}

.timeline-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* About */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.about-panel {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, #171f46, #10142a);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.contact-card {
  padding: 1rem;
  border-radius: var(--radius-xl);
  background: rgba(8, 11, 34, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
}

.contact-form {
  font-size: 0.9rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.7rem;
}

label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

input,
textarea {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  background: rgba(4, 7, 22, 0.9);
  color: var(--text);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(107, 139, 255, 0.4);
}

.contact-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 0 1.3rem;
  background: rgba(5, 8, 24, 0.95);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  gap: 0.75rem;
}

.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--text);
}

/* Bookmarklet page */

.bookmarklet-hero {
  padding-top: 3.5rem;
}

.bookmarklet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr);
  gap: 2.5rem;
  align-items: center;
}

.bookmarklet-steps {
  padding-left: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bookmarklet-button-wrapper {
  margin-top: 1rem;
}

.bookmarklet-link {
  cursor: move;
}

.bookmarklet-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Fake browser animation */

.browser-frame {
  border-radius: 22px;
  background: radial-gradient(circle at top left, #181e43, #090d20);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  font-size: 0.82rem;
}

.browser-topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  background: linear-gradient(to right, #161a30, #101428);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.dot-red {
  background: #ff5f57;
}

.dot-amber {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.browser-address-bar {
  flex: 1;
  display: flex;
  justify-content: center;
}

.bar-pill {
  border-radius: 999px;
  padding: 0.25rem 1.1rem;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.browser-bookmarks-bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  background: rgba(5, 8, 24, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pill {
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
}

.bookmark-ghost {
  position: relative;
  opacity: 0.25;
}

.browser-content {
  padding: 0.8rem 0.9rem 1.1rem;
}

.browser-title {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 0.9rem;
}

.drag-demo {
  position: relative;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

/* animated pill representing dragging */

.drag-source {
  position: absolute;
  bottom: 8px;
  left: 8px;
  animation: dragLoop 3.5s ease-in-out infinite;
  transform-origin: center;
}

.drag-arrow {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.drag-arrow-path {
  fill: none;
  stroke: rgba(107, 139, 255, 0.7);
  stroke-width: 2;
  stroke-dasharray: 4 5;
  animation: arrowDash 2.2s linear infinite;
}

@keyframes dragLoop {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  35% {
    transform: translate(15px, -48px) scale(1.02);
    opacity: 1;
  }
  55% {
    transform: translate(15px, -48px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
}

@keyframes arrowDash {
  to {
    stroke-dashoffset: -100;
  }
}

.bookmarklet-caption {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ----- Scroll animation ----- */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Responsive ----- */

@media (max-width: 960px) {
  .hero-grid,
  .services-layout,
  .heartbeat-layout,
  .about-layout,
  .contact-layout,
  .bookmarklet-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
  }

  .hero-card-secondary {
    position: relative;
    right: 0;
    bottom: 0;
    margin-top: 0.8rem;
    animation: none;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-inner {
    align-items: center;
  }

  .nav {
    position: fixed;
    inset: 3.2rem 0 auto;
    background: rgba(5, 8, 24, 0.98);
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    flex-direction: column;
    padding: 0.6rem 1rem 0.9rem;
    z-index: -1;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 3.3rem;
  }
}

@media (max-width: 720px) {
  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .container {
    width: min(100% - 1.75rem, 720px);
  }

  .hero-card-secondary {
    max-width: 100%;
  }
}
