/* HomeLab Monitor — modern dev-tool aesthetic.
   Dialed-back amber: used only as a sparkle on the satellite glyph, the
   tail of a gradient, and tiny status dots. Everything else is dark slate
   with subtle gradients, glass surfaces, and quiet borders. */

:root {
  --hl-bg:        #0a0c11;
  --hl-bg-2:      #0f1218;
  --hl-card:      #11141b;
  --hl-card-2:    #161a23;
  --hl-bd:        #1d212c;
  --hl-bd-2:      #2a2f3c;
  --hl-tx:        #e6edf3;
  --hl-tx-mut:    #7d8590;
  --hl-tx-dim:    #4e5666;
  --hl-amber:     #d29922;
  --hl-amber-soft:#d2992233;
  --hl-cyan:      #58a6ff;
  --hl-violet:    #a371f7;
  --hl-pink:      #ec6cb9;
}

/* ── Material theme overrides (dark) ──────────────────────────────────────── */
[data-md-color-scheme="slate"] {
  --md-default-bg-color:        var(--hl-bg);
  --md-default-fg-color:        var(--hl-tx);
  --md-default-fg-color--light: var(--hl-tx-mut);
  --md-code-bg-color:           var(--hl-card);
  --md-code-fg-color:           var(--hl-tx);
  --md-typeset-a-color:         var(--hl-cyan);
  --md-accent-fg-color:         var(--hl-cyan);
}
[data-md-color-scheme="slate"] body { background: var(--hl-bg); }
[data-md-color-scheme="slate"] .md-header,
[data-md-color-scheme="slate"] .md-tabs {
  background-color: rgba(15, 18, 24, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hl-bd);
}

/* Tighten Material's slightly chunky default body */
.md-typeset { font-size: 0.86rem; line-height: 1.62; }
.md-typeset h2 { letter-spacing: -0.01em; }

/* Custom scrollbar for the slate aesthetic */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--hl-bd-2);
  border-radius: 5px;
}
*::-webkit-scrollbar-thumb:hover { background: #3a4151; }

/* ── Landing hero ─────────────────────────────────────────────────────────── */
.hl-hero {
  position: relative;
  padding: 96px 16px 56px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: none;
}

/* Aurora behind the hero — subtle, animated */
.hl-hero::before,
.hl-hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: hl-drift 24s ease-in-out infinite;
}
.hl-hero::before {
  top: -20%; left: 20%;
  width: 720px; height: 480px;
  background: radial-gradient(ellipse, rgba(88, 166, 255, 0.28), transparent 65%);
}
.hl-hero::after {
  top: -10%; right: 10%;
  width: 600px; height: 420px;
  background: radial-gradient(ellipse, rgba(163, 113, 247, 0.24), transparent 65%);
  animation-delay: -8s;
}
@keyframes hl-drift {
  0%, 100% { transform: translate(0,  0)   scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.08); }
  66%      { transform: translate(-30px, 40px) scale(0.94); }
}

/* Gradient title — white that fades to amber at the tail */
.hl-hero .hl-title {
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0 0 18px;
  background: linear-gradient(120deg, #ffffff 10%, #e6edf3 45%, var(--hl-amber) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Let it wrap on a word boundary if narrow, but never break mid-word. */
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.hl-hero .hl-title .em { color: inherit; }
.hl-hero .hl-tag {
  font-size: 1.12rem;
  color: var(--hl-tx-mut);
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.hl-hero .hl-tag strong { color: var(--hl-tx); font-weight: 600; }

/* Buttons — subtle, modern */
.hl-cta {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin: 22px 0 36px;
}
.hl-cta .md-button {
  position: relative;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
  overflow: hidden;
}
.hl-cta .md-button--primary {
  background: linear-gradient(180deg, #1b1e29 0%, #14171f 100%);
  border: 1px solid var(--hl-bd-2);
  color: var(--hl-tx);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px -10px rgba(88, 166, 255, 0.35);
}
.hl-cta .md-button--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s ease;
}
.hl-cta .md-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 14px 30px -12px rgba(88, 166, 255, 0.45);
  color: var(--hl-tx);
  background: linear-gradient(180deg, #1d212d 0%, #161a23 100%);
}
.hl-cta .md-button--primary:hover::after { transform: translateX(110%); }
.hl-cta .md-button:not(.md-button--primary) {
  background: transparent;
  border: 1px solid var(--hl-bd-2);
  color: var(--hl-tx-mut);
}
.hl-cta .md-button:not(.md-button--primary):hover {
  color: var(--hl-tx);
  border-color: var(--hl-tx-mut);
  transform: translateY(-1px);
}

/* Hero GIF — bigger, with shadow + a clearly-visible outline. The dashboard
   itself is very dark; without a real border the screenshot just bleeds into
   the page bg. */
.hl-hero .hl-gif {
  max-width: 920px; width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  display: block; margin: 8px auto 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 8px 20px -8px rgba(88, 166, 255, 0.18);
}

/* YouTube demo embed — same framed look as .hl-gif, responsive 16:9 */
.hl-hero .hl-video {
  max-width: 920px; width: 100%;
  margin: 8px auto 0;
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 8px 20px -8px rgba(88, 166, 255, 0.18);
}
.hl-hero .hl-video iframe { width: 100%; height: 100%; border: 0; display: block; }

.hl-hero .hl-badges {
  margin-top: 22px;
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  color: var(--hl-tx-dim); font-size: 0.78rem;
}
.hl-hero .hl-badges span {
  background: var(--hl-card);
  border: 1px solid var(--hl-bd);
  border-radius: 999px;
  padding: 4px 12px;
}
.hl-hero .hl-badges code {
  background: transparent; border: 0; padding: 0;
  color: var(--hl-tx-mut); font-size: 0.78rem;
}

/* ── Section titles on landing ────────────────────────────────────────────── */
.hl-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--hl-tx-dim);
  font-weight: 600;
  margin: 64px 0 22px;
  text-align: center;
  position: relative;
}
.hl-section-title::before,
.hl-section-title::after {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--hl-bd-2);
  vertical-align: middle;
  margin: 0 12px;
}

/* ── Feature grid — glass + hover-revealed gradient border ────────────────── */
.hl-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 0 0 24px;
}
.hl-feature {
  position: relative;
  background: linear-gradient(180deg, rgba(17, 20, 27, 0.7), rgba(11, 14, 19, 0.7));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hl-bd);
  border-radius: 14px;
  padding: 22px 24px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s,
              box-shadow 0.3s;
  overflow: hidden;
}
/* Animated gradient border (mask trick) */
.hl-feature::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  background: linear-gradient(135deg,
    transparent 20%,
    rgba(88, 166, 255, 0.55) 45%,
    rgba(163, 113, 247, 0.55) 60%,
    transparent 85%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
/* Subtle inner glow on hover */
.hl-feature::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(88, 166, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.hl-feature:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 24px 60px -22px rgba(0, 0, 0, 0.65);
}
.hl-feature:hover::before,
.hl-feature:hover::after { opacity: 1; }

.hl-feature h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--hl-tx);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.005em;
}
.hl-feature h3 .ico {
  font-size: 1.3rem; line-height: 1;
  filter: grayscale(0.15);
}
.hl-feature p {
  margin: 0;
  color: var(--hl-tx-mut);
  font-size: 0.88rem;
  line-height: 1.6;
}
.hl-feature a { color: var(--hl-cyan); text-decoration: none; }
.hl-feature a:hover { text-decoration: underline; }

/* ── Screenshot grid ──────────────────────────────────────────────────────── */
.hl-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin: 0 0 48px;
}
.hl-shots a {
  display: block; border-radius: 14px; overflow: hidden;
  /* Clearly-visible outline so each dark screenshot reads as a distinct
     card. The dashboard is near-black, so a soft white border is needed for
     real separation against a near-black page. */
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: var(--hl-card);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
}
.hl-shots a:hover {
  transform: translateY(-3px);
  border-color: rgba(88, 166, 255, 0.6);
  box-shadow: 0 24px 50px -22px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(88, 166, 255, 0.35),
              0 0 28px -4px rgba(88, 166, 255, 0.28);
}
.hl-shots img {
  display: block; width: 100%; height: auto;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hl-shots a:hover img { transform: scale(1.02); }
.hl-shots .lbl {
  display: block; padding: 11px 14px;
  color: var(--hl-tx-mut); font-size: 0.8rem;
  border-top: 1px solid var(--hl-bd);
  background: var(--hl-card-2);
}

/* ── Images inside content pages (multi-host architecture diagram, etc.) ──
   Same dark-on-dark issue as the screenshot grid; same fix. */
.md-typeset img {
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ── Quick install card ───────────────────────────────────────────────────── */
.hl-install {
  max-width: 760px; margin: 0 auto 56px;
  border: 1px solid var(--hl-bd);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(17, 20, 27, 0.7), rgba(11, 14, 19, 0.7));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 22px 26px;
}
.hl-install h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hl-tx);
  letter-spacing: -0.005em;
}
.hl-install .md-typeset pre { margin: 0 0 14px; }

/* ── Scroll reveal — JS adds .hl-in on intersect ──────────────────────────── */
.hl-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.hl-reveal.hl-in { opacity: 1; transform: translateY(0); }
.hl-reveal.delay-1 { transition-delay: 0.08s; }
.hl-reveal.delay-2 { transition-delay: 0.16s; }
.hl-reveal.delay-3 { transition-delay: 0.24s; }
.hl-reveal.delay-4 { transition-delay: 0.32s; }
.hl-reveal.delay-5 { transition-delay: 0.40s; }
.hl-reveal.delay-6 { transition-delay: 0.48s; }

/* Honour users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
  .hl-reveal, .hl-reveal.hl-in { opacity: 1; transform: none; transition: none; }
  .hl-hero::before, .hl-hero::after { animation: none; }
  .hl-shots img, .hl-feature, .hl-cta .md-button { transition: none; }
}

/* ── Mobile (phone-portrait) ──────────────────────────────────────────────
   Tighter hero, full-width stacked CTAs, smaller aurora blobs (cheaper to
   blur on phones), tighter section spacing. Cards + screenshots already
   reflow to a single column via auto-fit minmax. */
@media (max-width: 640px) {
  .hl-hero {
    padding: 56px 14px 28px;
  }
  .hl-hero .hl-tag {
    font-size: 1rem;
    margin-bottom: 22px;
  }
  /* Stack CTAs full-width so they're tappable and don't half-wrap. */
  .hl-cta { gap: 8px; }
  .hl-cta .md-button {
    width: 100%;
    padding: 14px 18px;        /* taller for thumbs */
    font-size: 0.95rem;
  }
  .hl-hero .hl-gif,
  .hl-hero .hl-video {
    border-radius: 10px;
    border-width: 1px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06),
      0 16px 40px -14px rgba(0, 0, 0, 0.65);
  }
  .hl-hero .hl-badges {
    font-size: 0.74rem;
    gap: 6px;
  }
  .hl-hero .hl-badges span { padding: 3px 10px; }

  .hl-hero::before { width: 540px; height: 360px; }
  .hl-hero::after  { width: 460px; height: 320px; }

  .hl-section-title {
    margin: 44px 0 16px;
    letter-spacing: 0.15em;
    font-size: 0.7rem;
  }
  .hl-section-title::before,
  .hl-section-title::after { width: 18px; margin: 0 8px; }

  .hl-feature { padding: 18px 18px; border-radius: 12px; }
  .hl-feature h3 { font-size: 0.98rem; }
  .hl-feature p  { font-size: 0.86rem; }

  .hl-shots { gap: 12px; }
  .hl-shots a { border-radius: 10px; }
  .hl-shots .lbl { padding: 9px 12px; font-size: 0.76rem; }

  .hl-install {
    padding: 16px 18px;
    margin-bottom: 36px;
    border-radius: 12px;
  }
  .hl-install h3 { font-size: 0.92rem; }
}

/* Very small phones — squeeze a bit more */
@media (max-width: 400px) {
  .hl-hero { padding: 44px 12px 22px; }
  .hl-hero .hl-title { font-size: 1.95rem; }
  .hl-hero .hl-tag { font-size: 0.94rem; }
  .hl-hero .hl-badges { display: none; }   /* badge row gets noisy at 360-400px */
}

/* ── Tiny status dot for the badges row ───────────────────────────────────── */
.hl-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--hl-amber);
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--hl-amber-soft);
}

/* ── MCP / AI-agent band ──────────────────────────────────────────────────── */
.hl-mcp {
  max-width: 880px;
  margin: 0 auto 48px;
  padding: 28px 26px 24px;
  border: 1px solid var(--hl-bd-2);
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(88, 166, 255, 0.08), transparent 60%),
    var(--hl-card);
  text-align: center;
}
.hl-mcp-pitch {
  margin: 0 auto 18px;
  max-width: 720px;
  color: var(--hl-tx-mut);
  font-size: 0.95rem;
  line-height: 1.65;
}
.hl-mcp-pitch strong { color: var(--hl-tx); font-weight: 600; }
.hl-mcp-diagram {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin: 4px auto 10px;
}
.hl-mcp-cap {
  margin: 0 auto 18px;
  max-width: 640px;
  color: var(--hl-tx-dim);
  font-size: 0.8rem;
  line-height: 1.55;
}
.hl-mcp pre {
  text-align: left;
  max-width: 720px;
  margin: 0 auto 16px;
}
.hl-mcp-prompts {
  margin: 4px auto 6px;
  color: var(--hl-tx-mut);
  font-size: 0.9rem;
  font-weight: 600;
}
.hl-mcp ul {
  text-align: left;
  max-width: 720px;
  margin: 0 auto 20px;
  color: var(--hl-tx-mut);
  font-size: 0.88rem;
  line-height: 1.6;
}
.hl-mcp .md-button { margin-top: 4px; }
