/* ═══════════════════════════════════════
   CLARKCORE — SYSTEMS STYLESHEET
   ═══════════════════════════════════════ */

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

:root {
  /* Lumon-ified palette — muted, clinical, slightly wrong */
  --bg:          #07080a;
  --bg-raised:   #0c0e11;
  --panel:       rgba(255,255,255,0.025);
  --panel-hover: rgba(255,255,255,0.04);
  --border:      rgba(255,255,255,0.06);
  --border-dim:  rgba(255,255,255,0.04);
  --text:        #c8ccd4;
  --muted:       #4a5060;
  --muted-mid:   #6b7280;

  /* Accent — desaturated teal/sage, not neon */
  --accent:      #4a9e8e;
  --accent-dim:  #2d6b5e;
  --accent-glow: rgba(74,158,142,0.12);

  /* Warning amber — used sparingly */
  --warn:        #8a7040;
  --warn-dim:    rgba(138,112,64,0.15);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* ── TEXTURE OVERLAYS ── */
.noise {
  position: fixed; inset: 0;
  opacity: 0.025;
  background-image: url('https://grainy-gradients.vercel.app/noise.svg');
  pointer-events: none; z-index: 999;
}
.scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015),
    rgba(255,255,255,0.015) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.06; pointer-events: none; z-index: 998;
}

/* ── TYPE ── */
.mono {
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── SYSTEM BAR ── */
.system-bar {
  position: fixed; bottom: 0; width: 100%;
  display: flex; justify-content: space-between;
  padding: 8px 20px;
  background: rgba(0,0,0,0.85);
  border-top: 1px solid var(--border-dim);
  font-size: 0.65rem; color: var(--muted);
  z-index: 1000;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 6%;
  backdrop-filter: blur(16px);
  background: rgba(7,8,10,0.7);
  border-bottom: 1px solid var(--border-dim);
  z-index: 1000;
  gap: 1rem;
}
.nav-left {
  display: flex; align-items: center; gap: 14px;
}
.logo {
  width: 40px; height: 40px; object-fit: contain;
  filter: saturate(0.45) brightness(0.75);
}
.nav-left h2 {
  font-size: 0.9rem; letter-spacing: 0.3em;
  color: var(--text); font-weight: 500;
}
.nav-right {
  color: var(--muted); font-size: 0.7rem;
  flex: 1; text-align: center;
}

/* Employee access button in nav */
.btn-login {
  font-size: 0.65rem; color: var(--muted-mid);
  text-decoration: none; letter-spacing: 0.1em;
  border: 1px solid var(--border);
  padding: 7px 14px;
  transition: 0.25s ease;
  white-space: nowrap;
}
.btn-login:hover {
  color: var(--accent); border-color: var(--accent-dim);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 80px;
  padding: 0 8%; position: relative;
}
.hero::before {
  content: "";
  position: absolute; width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none;
}
.hero-tag {
  color: var(--accent); margin-bottom: 28px; font-size: 0.72rem;
}
.hero h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.95; font-weight: 900; margin-bottom: 28px;
}
.hero h1 span {
  color: var(--accent);
  text-shadow: 0 0 30px rgba(74,158,142,0.2);
}
.hero p {
  max-width: 580px; color: var(--muted-mid);
  font-size: 1.1rem; line-height: 1.75;
}
.hero-buttons {
  display: flex; gap: 16px; margin-top: 44px;
}
.hero-image img {
  width: 100%; border-radius: 4px;
  border: 1px solid var(--border-dim);
  opacity: 0.6; filter: saturate(0.4) brightness(0.7);
}

/* ── BUTTONS ── */
.btn-primary {
  padding: 13px 26px; text-decoration: none;
  background: var(--accent-dim); color: var(--text);
  font-size: 0.85rem; font-weight: 500;
  transition: 0.25s ease; border: 1px solid var(--accent-dim);
  letter-spacing: 0.03em;
}
.btn-primary:hover {
  background: var(--accent); color: #07080a;
  box-shadow: 0 0 30px rgba(74,158,142,0.2);
}
.btn-secondary {
  padding: 13px 26px; text-decoration: none;
  border: 1px solid var(--border); color: var(--muted-mid);
  font-size: 0.85rem; transition: 0.25s ease;
}
.btn-secondary:hover {
  border-color: var(--accent-dim); color: var(--text);
}

/* ── SECTIONS ── */
.metrics-section, .projects, .about-section, .page-section {
  padding: 110px 8%;
}
.section-label {
  color: var(--accent); margin-bottom: 40px; font-size: 0.72rem;
}

/* ── METRIC CARDS ── */
.metrics-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; border: 1px solid var(--border-dim);
  background: var(--border-dim);
}
.metric-card {
  background: var(--bg-raised);
  padding: 40px; transition: 0.25s ease;
  opacity: 0; transform: translateY(12px);
}
.metric-card.visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.metric-card:hover { background: var(--panel-hover); }
.metric-card h2 {
  font-size: 2.8rem; margin-bottom: 12px;
  color: var(--text); font-weight: 700;
}
.metric-card p { color: var(--muted-mid); line-height: 1.65; font-size: 0.9rem; }

/* ── PROJECT CARDS ── */
.project-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px; border: 1px solid var(--border-dim);
  background: var(--border-dim);
}
.project-card {
  background: var(--bg-raised); text-decoration: none; color: var(--text);
  padding: 36px; position: relative; overflow: hidden;
  transition: 0.25s ease;
  opacity: 0; transform: translateY(12px);
}
.project-card.visible {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.project-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
  opacity: 0; transition: 0.3s ease;
}
.project-card:hover { background: var(--panel-hover); }
.project-card:hover::before { opacity: 1; }
.project-status {
  color: var(--accent); font-size: 0.65rem; margin-bottom: 18px;
}
.project-card h3 { font-size: 1.6rem; margin-bottom: 14px; font-weight: 700; }
.project-card p  { color: var(--muted-mid); line-height: 1.65; font-size: 0.88rem; }

/* ── ABOUT BOX ── */
.about-box {
  background: var(--panel); border: 1px solid var(--border-dim);
  padding: 56px; max-width: 900px;
}
.about-box p {
  font-size: 1.05rem; line-height: 1.9; margin-bottom: 28px;
  color: var(--muted-mid);
}
.subtle { color: var(--muted); font-size: 0.75rem; }

/* ── FOOTER ── */
footer {
  display: flex; justify-content: space-between;
  padding: 32px 8% 80px;
  border-top: 1px solid var(--border-dim);
  color: var(--muted); font-size: 0.7rem;
}

/* ═══════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════ */
body.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 80px 1rem;
}
.login-wrap {
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.login-logo { text-align: center; }
.login-card {
  width: 100%; background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 2.5rem;
}
.login-header {
  font-size: 0.7rem; color: var(--accent); letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
}
.login-sub {
  font-size: 0.78rem; color: var(--muted); line-height: 1.6;
  margin-bottom: 2rem;
}
.field-group {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.field-group label {
  font-size: 0.6rem; color: var(--muted); letter-spacing: 0.12em;
}
.field-group input {
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 0.7rem 0.9rem;
  font-family: 'IBM Plex Mono', monospace; font-size: 0.85rem;
  outline: none; transition: border-color 0.2s;
  width: 100%; border-radius: 0;
  -webkit-appearance: none;
}
.field-group input:focus { border-color: var(--accent-dim); }
.field-group input::placeholder { color: var(--muted); }
.login-error {
  font-size: 0.62rem; color: var(--warn);
  border: 1px solid var(--warn-dim); background: var(--warn-dim);
  padding: 0.6rem 0.8rem; margin-bottom: 1rem;
  letter-spacing: 0.08em;
}
.login-submit {
  width: 100%; padding: 0.85rem;
  background: var(--accent-dim); border: 1px solid var(--accent-dim);
  color: var(--text); font-size: 0.7rem; cursor: pointer;
  transition: 0.25s ease; letter-spacing: 0.12em;
}
.login-submit:hover:not(:disabled) {
  background: var(--accent); color: var(--bg);
}
.login-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.login-footer {
  display: flex; justify-content: space-between;
  margin-top: 1.5rem; font-size: 0.6rem; color: var(--muted);
}
.login-footer a { color: var(--muted); text-decoration: none; }
.login-footer a:hover { color: var(--accent); }
.login-notice {
  font-size: 0.58rem; color: var(--muted); text-align: center;
  line-height: 1.7; max-width: 360px; letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════
   DASHBOARD PAGE
   ═══════════════════════════════════════ */
.dashboard-wrap {
  max-width: 1100px; margin: 0 auto;
  padding: 140px 6% 120px;
}
.dashboard-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-dim);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; background: var(--border-dim);
  border: 1px solid var(--border-dim);
}
.dash-card {
  background: var(--bg-raised);
  padding: 2rem; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: 0.2s ease; position: relative;
}
.dash-card:hover { background: var(--panel-hover); }
.dash-card-locked { cursor: default; }
.dash-card-locked:hover { background: var(--bg-raised); }
.dash-card-icon { font-size: 1.8rem; margin-bottom: 0.3rem; }
.dash-card-label {
  font-size: 0.68rem; color: var(--accent); letter-spacing: 0.12em;
}
.dash-card-desc { font-size: 0.82rem; color: var(--muted-mid); line-height: 1.6; flex: 1; }
.dash-card-status {
  font-size: 0.6rem; color: var(--muted);
  display: flex; align-items: center; gap: 0.4rem;
  margin-top: 0.5rem;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.status-dot.active  { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.status-dot.offline { background: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; }
  .hero-image { display: none; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 3rem; }
  .hero-buttons { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; }
  .system-bar, footer, .navbar { flex-direction: column; gap: 8px; text-align: center; }
  .metrics-grid, .project-grid { grid-template-columns: 1fr; }
  .about-box { padding: 32px; }
  .navbar { padding: 16px 5%; }
  .nav-right { display: none; }
}
