/* ============================================================
   NIMBUS / JUNARAKAR SAT-1  —  Mission Interface Design System
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Space */
  --void:        #04060e;
  --void-2:      #070b17;
  --panel:       rgba(14, 19, 33, 0.55);
  --panel-solid: #0b1120;
  --hairline:    rgba(255, 255, 255, 0.08);
  --hairline-2:  rgba(255, 255, 255, 0.14);

  /* Signal */
  --cyan:    #35e6ff;
  --cyan-dk: #0891b2;
  --violet:  #a78bfa;
  --violet-dk:#7c3aed;
  --magenta: #f472b6;
  --amber:   #fbbf24;
  --green:   #34e78d;
  --red:     #ff5470;

  /* Ink */
  --ink:      #f2f6ff;
  --ink-2:    #b3c0d9;
  --ink-3:    #6e7d99;
  --ink-4:    #465166;

  /* Type */
  --f-display: 'Orbitron', 'Space Grotesk', system-ui, sans-serif;
  --f-body:    'Space Grotesk', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', 'Roboto Mono', ui-monospace, monospace;

  /* Rhythm */
  --nav-h: 76px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-deep: 0 24px 70px -20px rgba(0, 0, 0, 0.85);
  --glow-cyan:   0 0 30px rgba(53, 230, 255, 0.35);
  --glow-violet: 0 0 30px rgba(167, 139, 250, 0.35);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* reveal animations translate elements in from the sides; clip rather than
     letting that flash a horizontal scrollbar */
  overflow-x: clip;
}

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

::selection { background: rgba(53, 230, 255, 0.28); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #05070f; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan-dk), var(--violet-dk));
  border-radius: 99px;
  border: 2px solid #05070f;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--cyan), var(--violet)); }

/* ---------- 3. Ambient backdrop ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 700px at 50% -10%,  rgba(80, 60, 190, 0.20), transparent 62%),
    radial-gradient(900px 600px at 105% 20%,   rgba(20, 130, 180, 0.16), transparent 60%),
    radial-gradient(800px 800px at -10% 85%,   rgba(120, 40, 160, 0.14), transparent 62%),
    linear-gradient(180deg, #04060e 0%, #050813 45%, #04060e 100%);
}
.sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 40%, #000 20%, transparent 75%);
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.75;
}

/* Faint CRT texture */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  background-image: repeating-linear-gradient(
    0deg, rgba(255,255,255,0.9) 0 1px, transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

/* ---------- 4. Layout ---------- */
.shell { width: min(1240px, 100% - 3rem); margin-inline: auto; }
.shell-wide { width: min(1520px, 100% - 3rem); margin-inline: auto; }

section { position: relative; }
.band { padding: clamp(4.5rem, 10vw, 8.5rem) 0; }
.band-sm { padding: clamp(3rem, 6vw, 5rem) 0; }

.grid { display: grid; gap: 1.5rem; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* ---------- 5. Typography ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

h1.display { font-size: clamp(2.6rem, 8.5vw, 7.5rem); }
h2.display { font-size: clamp(1.9rem, 4.6vw, 3.6rem); }
h3.display { font-size: clamp(1.15rem, 2vw, 1.55rem); letter-spacing: 0.01em; }

.metallic {
  background: linear-gradient(178deg, #ffffff 0%, #dce7ff 32%, #8fa6c9 62%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 32px rgba(120, 180, 255, 0.35));
}

.aurora-text {
  background: linear-gradient(100deg, var(--cyan), #8bd4ff 30%, var(--violet) 62%, var(--magenta) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: aurora-slide 9s ease-in-out infinite alternate;
}
@keyframes aurora-slide { to { background-position: 100% 0; } }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.lede {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--ink-2);
  max-width: 62ch;
  line-height: 1.75;
}
.muted { color: var(--ink-3); }
.mono  { font-family: var(--f-mono); }
.tiny  { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---------- 6. Chrome / navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  display: flex;
  align-items: center;
  transition: background 0.45s var(--ease), backdrop-filter 0.45s var(--ease), border-color 0.45s;
  border-bottom: 1px solid transparent;
}
.nav.stuck {
  background: rgba(5, 8, 18, 0.72);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-bottom-color: var(--hairline);
}
.nav-inner {
  width: min(1520px, 100% - 3rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-mark {
  position: relative;
  width: 42px; height: 42px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--hairline-2);
  background: #060a15;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark::after {
  content: '';
  position: absolute; inset: -40%;
  background: conic-gradient(from 0deg, transparent 0 62%, rgba(53,230,255,0.75) 78%, transparent 92%);
  animation: spin 5.5s linear infinite;
  mix-blend-mode: screen;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand-txt strong {
  display: block;
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  line-height: 1.1;
}
.brand-txt span {
  font-family: var(--f-mono);
  font-size: 0.56rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 99px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);
}
.nav-links a {
  position: relative;
  padding: 0.5rem 1.05rem;
  border-radius: 99px;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.3s, background 0.3s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-links a.active {
  color: #001018;
  background: linear-gradient(120deg, var(--cyan), #7dd3fc);
  font-weight: 700;
  box-shadow: 0 0 22px rgba(53,230,255,0.4);
}

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

.burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(255,255,255,0.04);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.burger i { display: block; width: 17px; height: 1.5px; background: var(--ink); transition: 0.3s var(--ease); }
.burger.open i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.open i:nth-child(2) { opacity: 0; }
.burger.open i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.drawer {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: 899;
  background: rgba(5, 8, 18, 0.96);
  backdrop-filter: blur(26px);
  border-bottom: 1px solid var(--hairline);
  padding: 1.25rem 1.5rem 2rem;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
}
.drawer.open { display: flex; animation: drop 0.4s var(--ease); }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
.drawer a {
  padding: 0.95rem 1rem;
  border-radius: var(--r-sm);
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.drawer a:hover, .drawer a.active {
  background: rgba(53,230,255,0.08);
  border-color: rgba(53,230,255,0.25);
  color: var(--cyan);
}

/* ---------- 7. Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.82rem 1.5rem;
  border-radius: 99px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--hairline-2);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s, color 0.35s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(53,230,255,0.5); color: #fff; }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  border-color: transparent;
  color: #00131c;
  background: linear-gradient(115deg, var(--cyan) 0%, #6ee7ff 45%, var(--violet) 100%);
  background-size: 200% 100%;
  box-shadow: 0 8px 30px -8px rgba(53,230,255,0.65);
}
.btn-primary:hover {
  color: #00131c;
  background-position: 100% 0;
  box-shadow: 0 12px 40px -8px rgba(120,160,255,0.8);
}

.btn-ghost { background: transparent; }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.64rem; }

/* ---------- 8. Panels ---------- */
.panel {
  position: relative;
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255,255,255,0.22), transparent 34%, transparent 66%, rgba(53,230,255,0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.panel-pad { padding: clamp(1.4rem, 3vw, 2.25rem); }

.panel-hover { transition: transform 0.5s var(--ease), border-color 0.5s, box-shadow 0.5s; }
.panel-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(53,230,255,0.28);
  box-shadow: var(--shadow-deep), 0 0 44px -14px rgba(53,230,255,0.5);
}

/* Corner ticks — HUD framing */
.ticks::after,
.ticks::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid rgba(53,230,255,0.5);
  pointer-events: none;
}
.ticks::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.ticks::after  { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

/* ---------- 9. Section headers ---------- */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.sec-head h2 { margin-top: 0.9rem; }
.rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(53,230,255,0.55), rgba(167,139,250,0.28), transparent);
}

/* ---------- 10. Data readouts ---------- */
.stat { display: flex; flex-direction: column; gap: 0.35rem; }
.stat-k {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stat-v {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-u { font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-3); margin-left: 0.3rem; }

.readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--f-mono);
  font-size: 0.78rem;
}
.readout:last-child { border-bottom: 0; }
.readout .k { color: var(--ink-3); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.readout .v { font-weight: 500; font-variant-numeric: tabular-nums; }

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--hairline-2);
  background: rgba(255,255,255,0.03);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.pill.ok    { color: var(--green);  border-color: rgba(52,231,141,0.35); background: rgba(52,231,141,0.08); }
.pill.warn  { color: var(--amber);  border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.08); }
.pill.bad   { color: var(--red);    border-color: rgba(255,84,112,0.35);  background: rgba(255,84,112,0.08); }
.pill.info  { color: var(--cyan);   border-color: rgba(53,230,255,0.35);  background: rgba(53,230,255,0.08); }

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: blip 2s ease-in-out infinite;
}
@keyframes blip { 50% { opacity: 0.25; transform: scale(0.75); } }

/* ---------- 11. Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
[data-reveal].seen { opacity: 1; transform: none; }

[data-reveal='scale'] { transform: translateY(26px) scale(0.97); }
[data-reveal='left']  { transform: translateX(-32px); }
[data-reveal='right'] { transform: translateX(32px); }

/* ---------- 12. Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--hairline);
  padding: 0.9rem 0;
  background: rgba(255,255,255,0.015);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: slide-left 42s linear infinite;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.marquee-track span { display: inline-flex; align-items: center; gap: 3.5rem; white-space: nowrap; }
.marquee-track span::after { content: '◆'; color: var(--cyan); font-size: 0.5rem; }
@keyframes slide-left { to { transform: translateX(-50%); } }

/* ---------- 13. Footer ---------- */
.foot {
  border-top: 1px solid var(--hairline);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
  margin-top: 3rem;
  background: linear-gradient(180deg, transparent, rgba(6, 10, 22, 0.75));
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.foot h4 {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.1rem;
}
.foot-links { display: flex; flex-direction: column; gap: 0.6rem; }
.foot-links a {
  font-size: 0.86rem;
  color: var(--ink-2);
  transition: color 0.3s, transform 0.3s var(--ease);
  width: fit-content;
}
.foot-links a:hover { color: var(--cyan); transform: translateX(4px); }
.foot-base {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ---------- 14. Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  z-index: 1000;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--magenta));
  box-shadow: 0 0 14px rgba(53,230,255,0.7);
  transition: width 0.1s linear;
}

/* ---------- 15. Preloader ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--void);
  display: grid;
  place-items: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-in { text-align: center; width: min(340px, 78vw); }
.boot-ring {
  width: 78px; height: 78px;
  margin: 0 auto 1.6rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  border-top-color: var(--cyan);
  border-right-color: var(--violet);
  animation: spin 1.1s linear infinite;
}
.boot-txt {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1rem;
}
.boot-bar { height: 2px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.boot-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.3s var(--ease);
}

/* ---------- 16. Utilities ---------- */
.flex   { display: flex; }
.center { align-items: center; }
.between{ justify-content: space-between; }
.wrap   { flex-wrap: wrap; }
.col    { flex-direction: column; }
.gap-xs { gap: 0.5rem; }
.gap-sm { gap: 0.85rem; }
.gap-md { gap: 1.5rem; }
.gap-lg { gap: 2.5rem; }
.mt-sm  { margin-top: 1rem; }
.mt-md  { margin-top: 2rem; }
.mt-lg  { margin-top: 3.5rem; }
.tc     { text-align: center; }
.rel    { position: relative; }
.full   { width: 100%; }
.hide   { display: none !important; }

/* ---------- 17. Responsive ---------- */
@media (max-width: 1080px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --nav-h: 66px; }
  .shell, .shell-wide { width: min(100% - 2rem, 100%); }
  .nav-inner { width: calc(100% - 2rem); }
  .nav-links, .nav-tools .btn:not(.btn-primary) { display: none; }
  .burger { display: flex; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .g-12 { grid-template-columns: 1fr; }
  .sec-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
  /* brand + CTA + burger stop fitting; the drawer already carries every link */
  .nav-tools .btn { display: none; }
  .brand-txt strong { font-size: 0.8rem; letter-spacing: 0.13em; }
  .brand-mark { width: 36px; height: 36px; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
  .brand-txt span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
