/* delyx · constellation theme · v1 */

:root {
  --c-ink:    #06080d;
  --c-ink-2:  #0a0e16;
  --c-ink-3:  #0e1320;
  --c-fg:     #e8ecf2;
  --c-fg-2:   #cdd3df;
  --c-dim:    #8a93a4;
  --c-mute:   #5a6275;
  --c-line:   rgba(255,255,255,0.08);
  --c-line-2: rgba(255,255,255,0.04);
  --c-cyan:   #7bd9ff;
  --c-amber:  #ffb976;
  --c-mag:    #ff9ad6;
  --c-green:  #7be4b3;
  --c-red:    #ff8e8e;
  --c-mono:   "JetBrains Mono", ui-monospace, monospace;
  --c-sans:   "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

img, svg, video, canvas { max-width: 100%; }

html, body {
  margin: 0; padding: 0;
  background: var(--c-ink);
  color: var(--c-fg);
  font-family: var(--c-sans);
  min-height: 100vh;
}
body {
  background:
    radial-gradient(ellipse 1400px 900px at 20% 10%, rgba(43,55,99,0.45), transparent 60%),
    radial-gradient(ellipse 1200px 800px at 90% 60%, rgba(89,33,79,0.30), transparent 60%),
    var(--c-ink);
  background-attachment: fixed;
  overflow-x: hidden;
}

::selection { background: rgba(123,217,255,0.30); color: #fff; }

a { color: inherit; }

/* ─── scroll ─── */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(123,217,255,0.35); }

/* ─── starfield + animation primitives ─── */
@keyframes pulseGreen { 0%,100% { opacity: 1 } 50% { opacity: 0.3 } }
@keyframes dashflow   { to { stroke-dashoffset: -40 } }
@keyframes dashflow2  { to { stroke-dashoffset: -80 } }
@keyframes nodepulse  { 0%,100% { r: 5; opacity: 1 } 50% { r: 7; opacity: 0.85 } }
@keyframes nodepulseSmall { 0%,100% { r: 3 } 50% { r: 4 } }
@keyframes float1     { 0%,100% { transform: translate(0,0) } 50% { transform: translate(4px,-3px) } }
@keyframes spin       { from { transform: rotate(0) } to { transform: rotate(360deg) } }
@keyframes scanline   { 0% { transform: translateY(-20px) } 100% { transform: translateY(420px) } }
@keyframes blink      { 50% { opacity: 0.25 } }
@keyframes glowPulse  { 0%,100% { box-shadow: 0 0 0 0 rgba(123,217,255,0.3) } 50% { box-shadow: 0 0 0 12px rgba(123,217,255,0) } }
@keyframes fadeUp     { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }

/* ─── chrome ─── */
.c-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 56px;
  position: relative;
  z-index: 2;
}

.c-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(6,8,13,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-line);
}
.c-nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.c-brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--c-fg);
}
.c-brand .c-name { font-size: 18px; font-weight: 500; letter-spacing: -0.3px; }
.c-brand .c-ver  { font-size: 11px; color: var(--c-mute); font-family: var(--c-mono); margin-left: 6px; }
.c-nav-links { display: flex; gap: 26px; align-items: center; font-size: 13.5px; color: var(--c-dim); }
.c-nav-links a { color: var(--c-dim); text-decoration: none; transition: color .15s; cursor: pointer; }
.c-nav-links a:hover, .c-nav-links a.active { color: var(--c-fg); }
.c-nav-links a.active::after {
  content: ""; display: block; height: 2px; margin-top: 4px;
  background: var(--c-cyan); border-radius: 1px;
  box-shadow: 0 0 8px var(--c-cyan);
}
.c-cta {
  background: rgba(123,217,255,0.12);
  color: var(--c-cyan);
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(123,217,255,0.35);
  text-decoration: none; font-size: 13px; font-weight: 500;
  transition: background .15s, transform .15s;
}
.c-cta:hover { background: rgba(123,217,255,0.20); }
.c-cta-primary {
  background: var(--c-fg); color: var(--c-ink);
  padding: 14px 22px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: 0.2px;
  display: inline-flex; align-items: center; gap: 8px;
}
.c-cta-primary:hover { transform: translateY(-1px); }
.c-cta-secondary {
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--c-fg);
  padding: 14px 22px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.c-cta-secondary:hover { border-color: rgba(255,255,255,0.4); }

/* ─── section header ─── */
.c-section-h {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--c-mono);
  font-size: 11px; color: var(--c-mute); letter-spacing: 2px;
  margin-bottom: 12px;
}
.c-section-h .c-rule { flex: 1; height: 1px; background: var(--c-line); }
.c-section-h .c-eyebrow { color: var(--c-cyan); text-transform: uppercase; }
.c-section-title {
  font-size: 44px; line-height: 1.05; margin: 0 0 44px;
  font-weight: 400; letter-spacing: -1.2px;
}

/* ─── cards & rails ─── */
.c-card {
  background: var(--c-ink-2);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  padding: 24px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.c-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--c-line);
  padding: 6px 12px; border-radius: 999px;
  font-size: 11.5px; color: var(--c-dim); letter-spacing: 1px;
  font-family: var(--c-mono);
}
.c-pill .c-dot {
  width: 6px; height: 6px; border-radius: 3px; background: var(--c-green);
  animation: pulseGreen 1.8s infinite;
}

.c-mono { font-family: var(--c-mono); }
.c-code {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--c-mono);
  font-size: 12.5px; line-height: 1.7;
  color: var(--c-fg-2);
  overflow-x: auto;
  max-width: 100%;
}
.c-code .c-prompt { color: var(--c-cyan); }
.c-code .c-cmt    { color: var(--c-mute); }
.c-code .c-key    { color: var(--c-mag); }

.c-link { color: var(--c-cyan); text-decoration: none; border-bottom: 1px dotted rgba(123,217,255,0.5); }
.c-link:hover { border-bottom-style: solid; }

/* ─── footer ─── */
.c-footer {
  margin-top: 40px;
  padding: 32px 56px 28px;
  border-top: 1px solid var(--c-line);
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-family: var(--c-mono); font-size: 11.5px;
  color: var(--c-mute); letter-spacing: 1px;
  position: relative; z-index: 2;
}
.c-footer .c-foot-mid { text-align: center; }
.c-footer .c-foot-end { text-align: right; }
.c-footer a { color: var(--c-dim); text-decoration: none; margin-left: 16px; }
.c-footer a:hover { color: var(--c-cyan); }

/* ─── form ─── */
.c-input, .c-textarea {
  width: 100%;
  background: var(--c-ink-2);
  border: 1px solid var(--c-line);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--c-fg);
  font-family: var(--c-mono);
  font-size: 13px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.c-textarea { resize: vertical; line-height: 1.55; min-height: 130px; }
.c-input:focus, .c-textarea:focus {
  border-color: rgba(123,217,255,0.55);
  background: rgba(123,217,255,0.04);
}
.c-input::placeholder, .c-textarea::placeholder { color: var(--c-mute); }
.c-label {
  display: block; font-size: 10.5px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--c-mute);
  margin-bottom: 6px; font-family: var(--c-mono);
}
.c-chip {
  padding: 6px 11px; border-radius: 999px;
  font-family: var(--c-mono); font-size: 11.5px;
  cursor: pointer; border: 1px solid var(--c-line);
  background: transparent; color: var(--c-dim);
  transition: all .15s;
}
.c-chip:hover { color: var(--c-fg); border-color: rgba(255,255,255,0.2); }
.c-chip.active {
  color: var(--c-cyan);
  border-color: rgba(123,217,255,0.55);
  background: rgba(123,217,255,0.10);
}

/* docs */
.c-docs-grid { display: grid; grid-template-columns: 250px 1fr; gap: 60px; align-items: start; }
.c-docs-side {
  position: sticky; top: 90px;
  font-family: var(--c-mono); font-size: 12.5px;
  padding-right: 18px; max-height: calc(100vh - 110px); overflow-y: auto;
}
.c-docs-group { margin-bottom: 22px; }
.c-docs-group-h {
  font-size: 10.5px; color: var(--c-mute); letter-spacing: 2px;
  text-transform: uppercase; margin: 0 0 8px; padding-left: 12px;
}
.c-docs-side a {
  display: block; padding: 5px 12px;
  color: var(--c-dim); text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.c-docs-side a:hover { color: var(--c-fg); }
.c-docs-side a.active {
  color: var(--c-fg);
  border-left-color: var(--c-cyan);
  background: rgba(123,217,255,0.05);
}
.c-doc-section { padding: 36px 0; scroll-margin-top: 100px; }
.c-doc-section + .c-doc-section { border-top: 1px solid var(--c-line); }
.c-doc-section h2 {
  font-family: var(--c-sans); font-size: 30px; font-weight: 400;
  margin: 0 0 6px; letter-spacing: -0.6px; line-height: 1.15;
}
.c-doc-section h2 .c-hash { color: var(--c-cyan); margin-right: 14px; font-weight: 500; }
.c-doc-section .c-sub {
  font-family: var(--c-mono); font-size: 12px; color: var(--c-dim);
  letter-spacing: 0.5px; margin: 0 0 22px;
}
.c-doc-section h3 {
  font-family: var(--c-sans); font-size: 17px; font-weight: 500;
  margin: 22px 0 10px; color: var(--c-fg);
}
.c-doc-section p, .c-doc-section li { font-size: 14.5px; line-height: 1.65; color: var(--c-fg-2); }
.c-doc-section ul, .c-doc-section ol { padding-left: 22px; }
.c-doc-section code {
  font-family: var(--c-mono); font-size: 0.92em;
  background: rgba(123,217,255,0.08);
  color: var(--c-cyan);
  padding: 1px 6px; border-radius: 4px;
  border: 1px solid var(--c-line);
}
.c-callout {
  margin: 18px 0; padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-cyan);
  border-radius: 8px;
  font-size: 13.5px; color: var(--c-fg-2); line-height: 1.6;
}
.c-callout-warn { border-left-color: var(--c-amber); }
.c-callout-bad  { border-left-color: var(--c-red); }
.c-callout .c-ckind {
  color: var(--c-cyan); font-family: var(--c-mono);
  font-size: 10.5px; letter-spacing: 1.5px;
  text-transform: uppercase; margin-right: 10px;
}
.c-callout-warn .c-ckind { color: var(--c-amber); }
.c-callout-bad  .c-ckind { color: var(--c-red); }

.c-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; font-family: var(--c-mono); }
.c-table td {
  padding: 9px 12px;
  border-top: 1px solid var(--c-line);
  vertical-align: top;
  line-height: 1.55;
}
.c-table td:first-child {
  color: var(--c-cyan);
  width: 220px;
  white-space: nowrap;
}
.c-table td:last-child { color: var(--c-fg-2); }

/* utility */
.c-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.c-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* responsive page hooks */
.home-hero-grid,
.trace-grid,
.providers-grid,
.status-pulse-grid,
.capabilities-grid,
.contact-grid,
.contact-status-strip,
.form-two,
.repo-card-grid,
.follow-source-card,
.status-grid {
  min-width: 0;
}

.home-hero-grid > *,
.trace-grid > *,
.providers-grid > *,
.contact-grid > *,
.repo-card-grid > *,
.follow-source-card > *,
.status-grid > * {
  min-width: 0;
}

.status-pulse-card,
.channel-row,
.release-block,
.release-detail,
.release-change {
  min-width: 0;
}

@media (max-width: 1080px) {
  .home-hero-grid,
  .trace-grid,
  .providers-grid,
  .contact-grid,
  .follow-source-card {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .capabilities-grid,
  .status-pulse-grid,
  .contact-status-strip,
  .status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-hero-graph {
    max-width: 620px;
    width: 100%;
    height: 500px !important;
    margin: 0 auto;
  }

  .trace-diagram,
  .providers-orbit {
    height: 480px !important;
  }
}

@media (max-width: 920px) {
  .c-grid-3, .c-grid-2 { grid-template-columns: 1fr; }
  .c-docs-grid { grid-template-columns: 1fr; }
  .c-docs-side {
    position: static;
    max-height: none;
    padding: 14px;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    background: rgba(10,14,22,0.72);
    overflow: hidden;
  }
  .c-docs-group { margin-bottom: 14px; }
  .c-docs-side a {
    display: inline-flex;
    margin: 3px 4px 3px 0;
    border-left: 0;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    padding: 7px 10px;
  }
  .c-docs-side a.active { border-color: rgba(123,217,255,0.55); }
  .c-page, .c-nav-inner { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .c-page { padding-left: 18px; padding-right: 18px; }
  .c-nav-inner {
    gap: 12px;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 12px;
  }
  .c-brand .c-ver { display: none; }
  .c-nav-links {
    width: 100%;
    gap: 10px;
    font-size: 12.5px;
    flex: 0 0 auto;
    justify-content: space-between;
  }
  .c-nav-links a:not(.c-cta) { padding: 7px 0; }
  .c-cta { display: none; }
  .c-page > section { padding-top: 42px !important; padding-bottom: 58px !important; }
  .c-section-h { gap: 10px; font-size: 10px; letter-spacing: 1.5px; }
  .c-section-title { font-size: 34px; letter-spacing: 0; margin-bottom: 26px; }
  .c-page-hero { padding-top: 46px !important; padding-bottom: 32px !important; }
  .c-hero-title,
  .home-hero-title {
    font-size: clamp(38px, 12vw, 50px) !important;
    line-height: 1.02 !important;
    letter-spacing: 0 !important;
  }
  .c-hero-sub,
  .home-hero-copy { font-size: 15.5px !important; }
  .c-pill {
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
    align-items: flex-start;
  }
  .c-cta-primary,
  .c-cta-secondary {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }
  .home-hero-actions,
  .form-actions { width: 100%; }
  .home-command-row {
    gap: 10px !important;
    line-height: 1.65;
  }
  .home-command-row span { max-width: 100%; overflow-wrap: anywhere; }
  .home-hero-graph { height: 360px !important; margin-top: 8px; }
  .trace-diagram,
  .providers-orbit { height: 350px !important; }
  .capabilities-grid,
  .status-pulse-grid,
  .contact-status-strip,
  .status-grid,
  .form-two,
  .repo-card-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-grid,
  .trace-grid,
  .providers-grid,
  .home-hero-grid { gap: 28px !important; }
  .channel-row {
    grid-template-columns: 38px 1fr !important;
    align-items: start !important;
  }
  .channel-row > a,
  .channel-row > span {
    grid-column: 2;
    justify-self: start;
    white-space: normal !important;
    margin-top: 4px;
  }
  .trace-step {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }
  .contact-status-strip > div {
    border-right: 0 !important;
    border-top: 1px solid var(--c-line);
  }
  .contact-status-strip > div:first-child { border-top: 0; }
  .form-actions {
    flex-direction: column;
    align-items: stretch !important;
  }
  .repo-card-grid { gap: 16px !important; }
  .repo-card-grid > div:first-child {
    width: 72px !important;
    height: 72px !important;
  }
  .follow-source-card { align-items: stretch !important; }
  .release-block { padding: 22px 0 !important; }
  .timeline-list .release-detail { margin-left: 42px !important; }
  .release-change {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }
  .release-change > span:first-child { margin-right: 0 !important; }
  .release-change > span:last-child,
  .c-doc-section code,
  .c-code,
  pre { overflow-wrap: anywhere; }
  .c-table,
  .c-table tbody,
  .c-table tr,
  .c-table td { display: block; width: 100% !important; }
  .c-table tr { border-top: 1px solid var(--c-line); padding: 10px 0; }
  .c-table td {
    border-top: 0;
    padding: 3px 0;
    white-space: normal !important;
  }
  .c-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
    padding: 28px 18px;
  }
  .c-footer .c-foot-end { text-align: center; }
  .c-footer a { margin: 0 7px; display: inline-flex; padding: 4px 0; }
}

@media (max-width: 430px) {
  .c-page { padding-left: 14px; padding-right: 14px; }
  .c-nav-inner { padding-left: 14px; padding-right: 14px; }
  .c-nav-links { gap: 8px; font-size: 12px; }
  .c-section-title { font-size: 31px; }
  .c-hero-title,
  .home-hero-title { font-size: clamp(36px, 12vw, 44px) !important; }
  .c-card { padding: 18px; border-radius: 10px; }
  .home-hero-graph { height: 318px !important; }
  .trace-diagram,
  .providers-orbit { height: 310px !important; }
}
