/* ============================================================
   Starlight Solutions — night-sky theme
   ============================================================ */

:root {
  --bg: #070b1a;
  --bg-soft: #0c1226;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --text: #e8ecf8;
  --text-dim: #9aa5c4;
  --accent: #7fd4ff;          /* starlight blue */
  --accent-strong: #bfe9ff;
  --accent-warm: #ffd479;     /* warm star gold */
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* ---------- Starfield canvas ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(64, 90, 160, 0.35), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 110%, rgba(90, 60, 140, 0.25), transparent 70%),
    linear-gradient(180deg, #070b1a 0%, #0a1024 60%, #0d1430 100%);
}

/* ---------- Typography ---------- */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }

h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 700; }

h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 650; }

.glow {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(7, 11, 26, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-accent { color: var(--accent); }

.brand-mark { color: var(--accent-warm); font-size: 1.2rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent) !important;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 7rem 0 4rem;
}

.hero-lede {
  max-width: 42rem;
  margin: 1.4rem auto 0;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--text-dim);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

.hero-tags {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin-top: 2.8rem;
}

.hero-tags li {
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: var(--bg-card);
}

.scroll-hint {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 1.4rem;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
}

.btn-primary {
  background: linear-gradient(90deg, #4aa8e8, #7fd4ff);
  color: #06101f;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(127, 212, 255, 0.25);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }

.section-alt {
  background: rgba(12, 18, 38, 0.55);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 3rem;
}

.section-head p { color: var(--text-dim); margin-top: 0.8rem; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: rgba(127, 212, 255, 0.35);
}

.card-icon { font-size: 1.8rem; display: block; margin-bottom: 0.9rem; }

.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.card p { color: var(--text-dim); font-size: 0.95rem; }

.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Split layout ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }

.split-text p:not(.eyebrow) { color: var(--text-dim); margin-top: 1rem; }

.split-text h2 { margin-bottom: 0.3rem; }

.checklist {
  list-style: none;
  margin-top: 1.6rem;
  display: grid;
  gap: 0.8rem;
}

.checklist li {
  padding-left: 1.9rem;
  position: relative;
  color: var(--text-dim);
  font-size: 0.97rem;
}

.checklist li strong { color: var(--text); font-weight: 600; }

.checklist li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--accent-warm);
  font-size: 0.85rem;
}

/* ---------- Orbit diagram (Azure) ---------- */
.orbit-diagram {
  position: relative;
  aspect-ratio: 1;
  max-width: 380px;
  margin-inline: auto;
}

.orbit-core {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
  background: radial-gradient(circle at 30% 30%, #1c2c55, #0e1730);
  border: 1px solid rgba(127, 212, 255, 0.4);
  box-shadow: 0 0 40px rgba(127, 212, 255, 0.2);
}

.orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  animation: spin 60s linear infinite;
}

.orbit span {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--accent);
  animation: spin 60s linear infinite reverse;
}

.orbit-1 { inset: 8%;  animation-duration: 28s; }
.orbit-1 span { animation-duration: 28s; color: var(--accent-warm); border-color: rgba(255, 212, 121, 0.3); }
.orbit-2 { inset: 20%; }
.orbit-3 { inset: 32%; animation-duration: 44s; }
.orbit-3 span { animation-duration: 44s; }
.orbit-4 { inset: 0;   animation-duration: 72s; }
.orbit-4 span { animation-duration: 72s; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Code card (Development) ---------- */
.code-card {
  background: #0a0f22;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 0.88rem;
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--line);
}

.code-bar span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.code-bar em {
  margin-left: auto;
  font-style: normal;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.code-card pre {
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
}

.code-card code { line-height: 1.7; }

.c-kw { color: #c792ea; }
.c-fn { color: #7fd4ff; }
.c-cm { color: #5f6b8f; font-style: italic; }

/* ---------- Meters (Data) ---------- */
.meter-stack {
  max-width: 380px;
  margin-inline: auto;
  display: grid;
  gap: 1.2rem;
}

.meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.meter-head b { color: var(--text); font-variant-numeric: tabular-nums; }

.meter-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8737f, #ffb36b);
  transition: width 1s ease;
}

.meter-fill.meter-good {
  background: linear-gradient(90deg, #4aa8e8, #7fd4ff);
}

.meter-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
}

/* ---------- Contact ---------- */
.contact { text-align: center; }

.contact-inner { max-width: 44rem; }

.contact-lede { color: var(--text-dim); margin-top: 0.9rem; }

.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-note {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  opacity: 0.7;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  background: rgba(7, 11, 26, 0.8);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .orbit, .orbit span, .scroll-hint { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split-reverse { direction: ltr; }
  .split-visual { order: -1; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
  }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(7, 11, 26, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 0.9rem 4%; }
  .nav-cta { border: none; text-align: center; border-radius: 0; }
}
