/* ═══════════════════════════════════════════════════════
   KHANSTER.NET — LCARS AI CONSULTANCY STYLESHEET
   Star Trek: TNG Inspired Premium Dark Theme
═══════════════════════════════════════════════════════ */

/* ─────────────── DESIGN TOKENS ─────────────── */
:root {
  --amber:       #ff9f31;
  --amber-dim:   #c87020;
  --amber-glow:  rgba(255, 159, 49, 0.15);
  --amber-glow2: rgba(255, 159, 49, 0.35);
  --blue:        #5ba8ff;
  --blue-dim:    #2a6bc2;
  --blue-glow:   rgba(91, 168, 255, 0.15);
  --red:         #cc3333;
  --red-bright:  #ff5555;
  --red-glow:    rgba(204, 51, 51, 0.2);
  --bg-deep:     #04060e;
  --bg-panel:    #080d1a;
  --bg-card:     #0a1020;
  --bg-hover:    #0d1528;
  --text-primary: #e8eefc;
  --text-dim:    #7a8aaa;
  --text-bright: #ffffff;
  --border:      rgba(91, 168, 255, 0.15);
  --border-amber: rgba(255, 159, 49, 0.25);
  --lcars-h: 72px;
  --lcars-pill-w: 22px;
  --lcars-pill-r: 11px;
  --vbar-w: 80px;
  --font-display: 'Orbitron', monospace;
  --font-mono:    'Share Tech Mono', monospace;
  --font-ui:      'Rajdhani', sans-serif;
  --font-body:    'Inter', sans-serif;
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─────────────── RESET & BASE ─────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(91, 168, 255, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 159, 49, 0.04) 0%, transparent 55%);
}

img { max-width: 100%; }
a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--text-bright); }
button { cursor: pointer; }

/* ─────────────── SCROLLBAR ─────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--amber-dim); border-radius: 3px; }

/* ─────────────── LCARS HEADER ─────────────── */
.lcars-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(4, 6, 14, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-amber);
  height: var(--lcars-h);
}

.lcars-header-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
  max-width: 100%;
}

.lcars-pill {
  flex-shrink: 0;
  width: 60px;
  background: var(--amber);
  position: relative;
}

.lcars-pill.pill-amber { background: var(--amber); border-radius: 0 0 0 var(--lcars-h); }
.lcars-pill.pill-blue  { background: var(--blue); border-radius: 0 0 var(--lcars-h) 0; }
.lcars-pill.pill-right { border-radius: 0 0 var(--lcars-h) 0; }

.lcars-top-bar {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 32px;
  border-bottom: 3px solid var(--amber);
  position: relative;
}

.lcars-segments {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.seg {
  display: block;
  height: 20px;
  border-radius: 4px;
}
.seg-1 { width: 40px; background: var(--blue); }
.seg-2 { width: 20px; background: var(--red); }
.seg-3 { width: 30px; background: var(--amber-dim); }

.lcars-nav {
  display: flex;
  gap: 0;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  padding: 8px 20px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 50%; right: 50%;
  height: 2px;
  background: var(--amber);
  transition: all 0.25s var(--ease-out);
}

.nav-link:hover {
  color: var(--amber);
  border-color: var(--border-amber);
  background: var(--amber-glow);
}

.nav-link:hover::after {
  left: 0; right: 0;
}

.lcars-logo-area {
  flex-shrink: 0;
  text-align: right;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.05em;
  display: block;
  text-shadow: 0 0 20px var(--amber-glow2);
}

.logo-dot { color: var(--blue); }

.logo-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-top: 2px;
}

/* ─────────────── STAR FIELD ─────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--lcars-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.star-field {
  position: absolute;
  inset: 0;
  background: transparent;
}

.nebula-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(91, 168, 255, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 70% 60%, rgba(255, 159, 49, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 80%, rgba(51, 0, 100, 0.15) 0%, transparent 60%);
}

.neural-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

/* ─────────────── LCARS SIDE COLUMNS ─────────────── */
.lcars-left, .lcars-right {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: var(--vbar-w);
  flex-shrink: 0;
}

.lcars-corner {
  width: 100%;
  height: 48px;
  flex-shrink: 0;
}

.corner-tl { background: var(--amber); border-radius: 0 0 0 32px; margin-bottom: 6px; }
.corner-bl { background: var(--amber); border-radius: 0 32px 0 0; margin-top: 6px; }
.corner-tr { background: var(--blue); border-radius: 0 0 32px 0; margin-bottom: 6px; }
.corner-br { background: var(--blue); border-radius: 32px 0 0 0; margin-top: 6px; }

.lcars-vbar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.vbar-block {
  flex-shrink: 0;
  width: 100%;
  height: 48px;
  border-radius: 4px;
}
.vbar-block.vb-sm { height: 24px; }
.vb-amber { background: var(--amber); }
.vb-blue  { background: var(--blue); }
.vb-red   { background: var(--red); }

.status-display {
  flex: 1;
  padding: 12px 8px;
  background: rgba(8, 13, 26, 0.9);
  border: 1px solid var(--border-amber);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.status-line {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.status-value {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.status-ok { color: #4dffb4; }

.pulse-text {
  animation: pulseTxt 2s ease-in-out infinite;
}
@keyframes pulseTxt {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Right readout panel */
.readout-panel {
  flex: 1;
  padding: 12px 8px;
  background: rgba(8, 13, 26, 0.9);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.readout-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ro-label {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.ro-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.ro-fill {
  height: 100%;
  width: var(--w, 80%);
  background: var(--amber);
  border-radius: 3px;
  animation: barFill 2s var(--ease-out) forwards;
  transform-origin: left;
}

.ro-fill-blue { background: var(--blue); }

@keyframes barFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ─────────────── HERO CONTENT ─────────────── */
.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  min-height: calc(100vh - var(--lcars-h));
}

.hero-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

.tag-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  animation: tagPulse 2s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-display);
  line-height: 1.05;
  margin-bottom: 28px;
  position: relative;
}

.title-line-1 {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--blue);
  letter-spacing: 0.25em;
  text-shadow: 0 0 30px rgba(91, 168, 255, 0.4);
  animation: fadeSlideUp 0.8s var(--ease-out) 0.2s both;
}

.title-line-2 {
  display: block;
  font-size: clamp(2.2rem, 5.5vw, 4.8rem);
  font-weight: 900;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-shadow: 0 0 40px var(--amber-glow2), 0 0 80px rgba(255,159,49,0.15);
  animation: fadeSlideUp 0.8s var(--ease-out) 0.4s both;
}

.title-line-3 {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.35em;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.6s both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 44px;
  letter-spacing: 0.03em;
  line-height: 1.7;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.8s both;
}

.hero-cta-row {
  display: flex;
  gap: 16px;
  margin-bottom: 60px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeSlideUp 0.8s var(--ease-out) 1s both;
}

.cta-primary {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 16px 36px;
  background: var(--amber);
  color: #000;
  border-radius: 4px;
  border: none;
  transition: all 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.cta-primary:hover {
  background: #ffb740;
  color: #000;
  box-shadow: 0 0 30px var(--amber-glow2), 0 8px 32px rgba(255,159,49,0.3);
  transform: translateY(-2px);
}

.cta-primary:hover::before { transform: translateX(100%); }

.cta-secondary {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  padding: 15px 36px;
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 4px;
  transition: all 0.25s var(--ease-out);
}

.cta-secondary:hover {
  background: var(--blue-glow);
  box-shadow: 0 0 24px rgba(91,168,255,0.25);
  transform: translateY(-2px);
  color: var(--blue);
}

/* Metrics */
.hero-metrics {
  display: flex;
  align-items: center;
  gap: 40px;
  animation: fadeSlideUp 0.8s var(--ease-out) 1.2s both;
}

.metric {
  text-align: center;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--amber);
  text-shadow: 0 0 20px var(--amber-glow2);
}

.metric-unit {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--amber);
  vertical-align: super;
}

.metric-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-top: 4px;
}

.metric-sep {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--border-amber), transparent);
}

/* ─────────────── LCARS DIVIDER ─────────────── */
.lcars-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--vbar-w);
  margin: 0;
}

.div-pill {
  flex-shrink: 0;
  width: 16px;
  height: 32px;
  border-radius: 8px;
}
.div-pill-amber { background: var(--amber); }
.div-pill-blue  { background: var(--blue); }
.div-pill-red   { background: var(--red); }

.div-line {
  flex: 1;
  height: 2px;
}
.div-pill-amber + .div-line,
.div-line + .div-pill-blue + .div-line { background: linear-gradient(90deg, var(--amber), transparent); }
.div-line:last-of-type { background: linear-gradient(270deg, var(--blue), transparent); }

.div-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  white-space: nowrap;
  padding: 0 16px;
  background: var(--bg-deep);
}

/* ─────────────── SECTIONS ─────────────── */
.section {
  padding: 100px 0;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--vbar-w) + 40px);
}

.section-header {
  margin-bottom: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.sh-prefix {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.2em;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent);
}

/* ─────────────── ABOUT SECTION ─────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: start;
}

.about-lead {
  font-size: 1.2rem;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.about-text p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text strong {
  color: var(--amber);
  font-weight: 600;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.atag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  border: 1px solid var(--border-amber);
  padding: 6px 14px;
  border-radius: 3px;
  background: var(--amber-glow);
  transition: all 0.2s ease;
}

.atag:hover {
  background: var(--amber-glow2);
  box-shadow: 0 0 10px var(--amber-glow);
}

/* About Panel */
.panel-frame {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 36px;
  border-radius: 4px;
}

.panel-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--amber);
  border-style: solid;
}
.pc-tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.pc-tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.pc-bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.pc-br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.panel-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  animation: panelRotate 20s linear infinite;
}

@keyframes panelRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.panel-stat-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pstat {
  text-align: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-panel);
}

.pstat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--amber);
  text-shadow: 0 0 16px var(--amber-glow2);
}

.pstat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-top: 4px;
}

/* ─────────────── SERVICES SECTION ─────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--amber-glow) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.service-card:hover {
  border-color: var(--border-amber);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(255,159,49,0.1);
}

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

.sc-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.sc-accent-amber { background: var(--amber); }
.sc-accent-blue  { background: var(--blue); }
.sc-accent-red   { background: var(--red); }

.sc-num {
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
  opacity: 0.5;
}

.sc-icon {
  width: 40px;
  height: 40px;
  color: var(--amber);
  margin-bottom: 20px;
  transition: transform 0.35s var(--ease-out);
}

.service-card:hover .sc-icon { transform: scale(1.15); color: var(--amber); }

.sc-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  line-height: 1.4;
}

.sc-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 20px;
  flex: 1;
}

.sc-features {
  list-style: none;
  margin-bottom: 20px;
}

.sc-features li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-features li::before {
  content: '▸';
  color: var(--amber);
  opacity: 0.6;
}

.sc-footer { margin-top: auto; }

.sc-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--amber);
  border: 1px solid var(--amber-dim);
  padding: 4px 10px;
  border-radius: 2px;
  background: var(--amber-glow);
}

.sc-tag-blue { color: var(--blue); border-color: var(--blue-dim); background: var(--blue-glow); }
.sc-tag-red  { color: var(--red-bright); border-color: var(--red); background: var(--red-glow); }

/* ─────────────── CAPABILITIES SECTION ─────────────── */
.cap-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Terminal */
.cap-terminal {
  background: #020408;
  border: 1px solid rgba(91, 168, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
  box-shadow: 0 0 40px rgba(91, 168, 255, 0.1), inset 0 0 40px rgba(0,0,0,0.5);
}

.term-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(91, 168, 255, 0.06);
  border-bottom: 1px solid rgba(91, 168, 255, 0.15);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.td-red   { background: var(--red); }
.td-amber { background: var(--amber); }
.td-blue  { background: var(--blue); }

.term-title { flex: 1; text-align: center; }

.term-body {
  padding: 20px;
  min-height: 360px;
  background: linear-gradient(180deg, #020408 0%, #030610 100%);
}

.term-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.term-prompt {
  color: var(--blue);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.term-cmd {
  color: var(--amber);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.term-cursor {
  color: var(--amber);
  font-size: 0.85rem;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.term-output {
  font-size: 0.78rem;
  line-height: 1.9;
  color: #4dffb4;
}

.term-output .to-label { color: var(--blue); }
.term-output .to-val   { color: #4dffb4; }
.term-output .to-dim   { color: var(--text-dim); }
.term-output .to-warn  { color: var(--amber); }

/* Capability bars */
.cap-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 4px;
  transition: border-color 0.2s ease;
}

.cap-card:hover { border-color: var(--border-amber); }

.cap-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cap-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.cap-level {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--amber);
  letter-spacing: 0.15em;
  background: var(--amber-glow);
  border: 1px solid var(--border-amber);
  padding: 2px 8px;
  border-radius: 2px;
}

.cap-bar-outer {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.cap-bar-inner {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  border-radius: 3px;
  transition: width 1.5s var(--ease-out);
  box-shadow: 0 0 8px var(--amber-glow2);
}

.cap-bar-blue {
  background: linear-gradient(90deg, var(--blue-dim), var(--blue));
  box-shadow: 0 0 8px rgba(91,168,255,0.3);
}

.cap-bar-red {
  background: linear-gradient(90deg, var(--red), var(--red-bright));
  box-shadow: 0 0 8px rgba(204,51,51,0.4);
}

.cap-bar-inner.animated { width: var(--cap); }

/* ─────────────── CONTACT SECTION ─────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.contact-lead {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 36px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.ci-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ci-icon {
  font-size: 1.4rem;
  color: var(--amber);
  flex-shrink: 0;
  line-height: 1;
  text-shadow: 0 0 12px var(--amber-glow2);
}

.ci-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.ci-val {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.ci-val a {
  color: var(--amber);
  text-decoration: none;
}
.ci-val a:hover { color: var(--text-bright); text-decoration: underline; }

.mission-patch {
  width: 160px;
  margin: 0 auto;
  opacity: 0.8;
  animation: patchFloat 6s ease-in-out infinite;
}

@keyframes patchFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 36px;
  border-radius: 4px;
  position: relative;
}

.cf-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cf-indicator {
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  animation: tagPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 12px 16px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: rgba(122, 138, 170, 0.5); }

.form-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
  background: var(--bg-hover);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%23ff9f31' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-panel);
  color: var(--text-primary);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 28px;
  background: var(--amber);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.form-submit:hover {
  background: #ffb740;
  box-shadow: 0 0 30px var(--amber-glow2), 0 8px 24px rgba(255,159,49,0.3);
  transform: translateY(-2px);
}

.submit-icon { font-size: 0.8rem; }

.form-success {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(77, 255, 180, 0.08);
  border: 1px solid rgba(77, 255, 180, 0.3);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #4dffb4;
  letter-spacing: 0.1em;
  text-align: center;
}

/* ─────────────── FOOTER ─────────────── */
.lcars-footer {
  background: rgba(8, 13, 26, 0.95);
  border-top: 1px solid var(--border-amber);
  margin-top: 0;
}

.footer-inner {
  display: flex;
  align-items: stretch;
  height: 64px;
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
}

.footer-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.lcars-pill.pill-sm { width: 44px; }

.footer-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 16px;
  border-top: 2px solid var(--amber);
  align-self: stretch;
  justify-content: center;
}

.footer-bar-right { border-top-color: var(--blue); align-items: flex-end; }

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.1em;
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.footer-disclaimer {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: rgba(122, 138, 170, 0.5);
  letter-spacing: 0.15em;
  font-style: italic;
  margin-top: 2px;
}

.footer-stardate {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--blue);
  letter-spacing: 0.1em;
}

.footer-lcars-bot {
  display: flex;
  align-items: center;
  height: 16px;
  background: var(--bg-deep);
  padding: 0 4px;
}

.flb-pill {
  flex-shrink: 0;
  height: 14px;
  width: 44px;
  border-radius: 7px;
}
.flb-amber { background: var(--amber); }
.flb-blue  { background: var(--blue); }
.flb-red   { background: var(--red); }

.flb-line { flex: 1; height: 4px; background: rgba(255,159,49,0.2); }
.flb-short { flex: 0 0 80px; background: rgba(91,168,255,0.2); }

/* ─────────────── SCROLL TO TOP ─────────────── */
.scroll-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-amber);
  color: var(--amber);
  font-size: 0.8rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top:hover {
  background: var(--amber-glow);
  box-shadow: 0 0 16px var(--amber-glow2);
  transform: translateY(-2px);
}

/* ─────────────── ANIMATIONS: SCAN LINE ─────────────── */
.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,159,49,0.15) 50%, transparent 90%);
  animation: scanLine 8s linear infinite;
  pointer-events: none;
  z-index: 1;
  top: 0;
}

@keyframes scanLine {
  0%   { top: 0; opacity: 0; }
  2%   { opacity: 1; }
  98%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ─────────────── RESPONSIVE ─────────────── */
@media (max-width: 1100px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-panel { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --vbar-w: 0px; }

  /* ── Header: LCARS mobile ── */
  .lcars-header {
    height: auto;
    border-left: 6px solid var(--amber);   /* LCARS left-edge strip */
    border-bottom: none;
  }

  .lcars-header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  /* Hide the rounded side pills — replaced by left border strip */
  .lcars-header-inner > .lcars-pill { display: none; }

  .lcars-top-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 12px 0;
    gap: 0;
    border-bottom: 3px solid var(--amber);
  }

  /* Logo sits at top, full width */
  .lcars-logo-area {
    order: -2;
    text-align: left;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-amber);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .logo-text { font-size: 0.95rem; }
  .logo-sub  { font-size: 0.5rem; }

  /* Logo badge on the right side */
  .lcars-logo-area::after {
    content: '▶▶';
    font-size: 0.6rem;
    color: var(--blue);
    letter-spacing: -2px;
    opacity: 0.7;
  }

  /* LCARS coloured block strip — restored and restyled for mobile */
  .lcars-segments {
    display: flex;
    gap: 4px;
    order: -1;
    padding: 5px 0 7px;
  }
  .seg {
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
  }
  .seg-1 { width: 55%; background: var(--blue); }
  .seg-2 { width: 18%; background: var(--red); }
  .seg-3 { width: 27%; background: var(--amber-dim); }

  /* Nav: spread evenly across full width */
  .lcars-nav {
    display: flex;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    padding: 2px 0 6px;
    background: linear-gradient(to right, rgba(255,159,49,0.05), transparent);
  }

  .nav-link {
    flex: 1;
    text-align: center;
    padding: 7px 2px;
    font-size: 0.52rem;
    letter-spacing: 0.08em;
  }

  /* Hero: account for taller stacked header */
  .hero-content { padding: 40px 20px 60px; }
  .hero-metrics { gap: 20px; }
  .metric-val   { font-size: 1.5rem; }
  .metric-unit  { font-size: 1rem; }

  /* Sections */
  .lcars-left, .lcars-right { display: none; }
  .lcars-divider { padding: 0 16px; }
  .div-label { font-size: 0.5rem; letter-spacing: 0.08em; padding: 0 8px; }
  .section-inner { padding: 0 20px; }
  .section { padding: 60px 0; }

  /* LCARS left-edge strip on each section divider */
  .lcars-divider {
    border-left: 4px solid var(--amber);
    margin-left: 6px;
  }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .lcars-footer { border-left: 6px solid var(--blue); }
  .footer-inner { flex-wrap: wrap; height: auto; padding: 16px 0; }
  .footer-center { order: -1; width: 100%; padding: 10px; }
  .footer-left .lcars-pill,
  .footer-right .lcars-pill { width: 32px; }
}

