/* ============================================================
   UEE CITIZEN SABAAN — mobiGlas / ship-terminal theme
   ============================================================ */

:root {
  --bg: #05080f;
  --bg-2: #090e1a;
  --panel: rgba(13, 22, 38, 0.72);
  --panel-solid: #0d1626;
  --line: rgba(80, 200, 255, 0.28);
  --line-strong: rgba(80, 200, 255, 0.55);
  --cyan: #4fd3ff;
  --cyan-dim: #2a8fb8;
  --amber: #ffb454;
  --red: #ff5c5c;
  --green: #4dff9d;
  --text: #c9d8e8;
  --text-dim: #7d93ab;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

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

html { scroll-behavior: smooth; }

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

/* starfield canvas + scanlines */
#starfield {
  position: fixed; inset: 0; z-index: -2;
  background: radial-gradient(ellipse at 30% 10%, #0a1526 0%, var(--bg) 60%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
}

::selection { background: rgba(79, 211, 255, 0.35); }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-shadow: 0 0 8px rgba(79, 211, 255, 0.8); }

img { max-width: 100%; display: block; }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }

/* ---------- nav ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(5,8,15,0.95) 0%, rgba(5,8,15,0.82) 100%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 64px;
}
.brand {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 3px;
  color: #fff; white-space: nowrap;
}
.brand .tag { color: var(--cyan); }
.brand:hover { text-shadow: 0 0 12px rgba(79,211,255,0.9); }
nav ul { display: flex; gap: 4px; list-style: none; }
nav ul a {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 1.5px;
  color: var(--text-dim); padding: 8px 14px; display: block;
  border: 1px solid transparent; transition: all 0.2s;
}
nav ul a:hover { color: var(--cyan); border-color: var(--line); text-shadow: none; }
nav ul a.active {
  color: var(--cyan); border-color: var(--line-strong);
  background: rgba(79,211,255,0.07);
  box-shadow: inset 0 0 12px rgba(79,211,255,0.08);
}
#nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--cyan);
  font-family: var(--font-mono); font-size: 18px; padding: 4px 12px; cursor: pointer; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  padding: 140px 0 80px; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,8,15,0.92) 0%, rgba(5,8,15,0.55) 55%, rgba(5,8,15,0.75) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.hero .sys-line {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px;
  color: var(--green); margin-bottom: 18px;
}
.hero .sys-line::before { content: '▮ '; animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(34px, 6vw, 64px);
  letter-spacing: 6px; color: #fff; line-height: 1.15;
  text-shadow: 0 0 24px rgba(79,211,255,0.45);
}
.hero h1 .accent { color: var(--cyan); }
.hero .tagline {
  font-family: var(--font-mono); font-size: clamp(15px, 2.2vw, 20px);
  color: var(--amber); letter-spacing: 2px; margin: 22px 0 36px; min-height: 1.6em;
}
.hero .tagline .cursor { display: inline-block; width: 10px; background: var(--amber);
  animation: blink 0.9s steps(1) infinite; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 2.5px;
  padding: 14px 30px; border: 1px solid var(--line-strong); color: var(--cyan);
  background: rgba(79,211,255,0.06); cursor: pointer; transition: all 0.25s;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.btn:hover {
  background: rgba(79,211,255,0.18); text-shadow: 0 0 10px rgba(79,211,255,0.9);
  box-shadow: 0 0 24px rgba(79,211,255,0.25);
}
.btn.alt { border-color: rgba(255,180,84,0.5); color: var(--amber); background: rgba(255,180,84,0.05); }
.btn.alt:hover { background: rgba(255,180,84,0.15); text-shadow: 0 0 10px rgba(255,180,84,0.9);
  box-shadow: 0 0 24px rgba(255,180,84,0.2); }

/* ---------- section headings ---------- */
.sec-head { display: flex; align-items: center; gap: 18px; margin-bottom: 42px; }
.sec-head .idx { font-family: var(--font-mono); color: var(--cyan-dim); font-size: 14px; }
.sec-head h2 {
  font-family: var(--font-display); font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 4px; color: #fff; white-space: nowrap;
}
.sec-head .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

/* ---------- panels ---------- */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  padding: 30px; backdrop-filter: blur(4px);
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
.panel::before {
  content: ''; position: absolute; top: 0; left: 0; width: 46px; height: 2px; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.panel h3 {
  font-family: var(--font-display); font-size: 16px; letter-spacing: 2.5px;
  color: var(--cyan); margin-bottom: 14px;
}
.panel p + p { margin-top: 12px; }
.panel .mono-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; color: var(--text-dim); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------- dossier / stats ---------- */
.dossier { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.stat-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); }
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid rgba(80,200,255,0.12);
  background: rgba(13,22,38,0.5);
}
.stat-row:last-child { border-bottom: none; }
.stat-row .k { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; color: var(--text-dim); }
.stat-row .v { font-family: var(--font-display); font-size: 14px; letter-spacing: 1.5px; color: #fff; }
.stat-row .v.ok { color: var(--green); }
.stat-row .v.warn { color: var(--amber); }

.meter { height: 6px; background: rgba(80,200,255,0.1); margin-top: 8px; position: relative; }
.meter i {
  position: absolute; inset: 0 auto 0 0; display: block;
  background: linear-gradient(90deg, var(--cyan-dim), var(--cyan));
  box-shadow: 0 0 10px rgba(79,211,255,0.5);
}

/* ---------- cards ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); padding: 24px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.card:hover {
  border-color: var(--line-strong); transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(79,211,255,0.08);
}
.card h4 { font-family: var(--font-display); font-size: 15px; letter-spacing: 2px; color: #fff; margin-bottom: 8px; }
.card .sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--cyan-dim);
  margin-bottom: 12px; text-transform: uppercase; }
.card p { font-size: 16px; color: var(--text-dim); }
.card .go { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 2px; }

/* ---------- gallery ---------- */
.g-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.g-item {
  position: relative; overflow: hidden; border: 1px solid var(--line); cursor: pointer;
  aspect-ratio: 16/9; background: var(--bg-2);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s, filter 0.4s; }
.g-item:hover img { transform: scale(1.05); filter: brightness(1.15); }
.g-item::after {
  content: attr(data-cap); position: absolute; left: 0; right: 0; bottom: 0;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--cyan);
  background: linear-gradient(0deg, rgba(5,8,15,0.9), transparent); padding: 18px 12px 8px;
  opacity: 0; transition: opacity 0.3s;
}
.g-item:hover::after { opacity: 1; }

/* lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(3,5,10,0.94);
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 82vh; border: 1px solid var(--line-strong);
  box-shadow: 0 0 60px rgba(79,211,255,0.15); }
#lightbox .lb-cap { font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; color: var(--text-dim); }
#lightbox .lb-nav { display: flex; gap: 12px; }
#lightbox button {
  background: rgba(79,211,255,0.08); border: 1px solid var(--line-strong); color: var(--cyan);
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 2px; padding: 8px 22px; cursor: pointer;
}
#lightbox button:hover { background: rgba(79,211,255,0.2); }

/* ---------- captain's log ---------- */
.log-entry {
  position: relative; border-left: 2px solid var(--line-strong);
  padding: 6px 0 34px 32px; margin-left: 8px;
}
.log-entry::before {
  content: ''; position: absolute; left: -7px; top: 10px; width: 12px; height: 12px;
  background: var(--bg); border: 2px solid var(--cyan); transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(79,211,255,0.6);
}
.log-entry .stamp { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; color: var(--amber); }
.log-entry h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: 2px; color: #fff; margin: 8px 0 10px; }
.log-entry p { color: var(--text-dim); max-width: 72ch; }
.log-entry p + p { margin-top: 10px; }

/* ---------- streamers ---------- */
.streamer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ---------- page hero (subpages) ---------- */
.page-hero { position: relative; padding: 150px 0 60px; overflow: hidden; }
.page-hero .crumbs { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; color: var(--cyan-dim); margin-bottom: 14px; }
.page-hero h1 {
  font-family: var(--font-display); font-size: clamp(26px, 4.5vw, 44px);
  letter-spacing: 5px; color: #fff; text-shadow: 0 0 20px rgba(79,211,255,0.4);
}
.page-hero .lede { max-width: 70ch; margin-top: 18px; color: var(--text-dim); font-size: 19px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0 34px; margin-top: 40px; background: rgba(9,14,26,0.6); }
footer .foot-grid { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
footer .f-brand { font-family: var(--font-display); font-size: 14px; letter-spacing: 3px; color: #fff; margin-bottom: 8px; }
footer p { font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--text-dim); max-width: 62ch; }
footer .illogical { color: var(--cyan-dim); margin-top: 10px; }
footer nav ul { flex-direction: column; gap: 2px; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.vis { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .dossier, .streamer-grid { grid-template-columns: 1fr; }
  .g-grid { grid-template-columns: repeat(2, 1fr); }
  nav ul {
    position: fixed; top: 64px; right: 0; left: 0; flex-direction: column;
    background: rgba(5,8,15,0.98); border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px; display: none;
  }
  nav ul.open { display: flex; }
  #nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .g-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
