/* ═══════════════════════════════════════════════════════════
   PhantomFreight CTF — Global Stylesheet
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --navy:      #0e1528;
  --navy-mid:  #162038;
  --navy-lite: #1e2d50;
  --orange:    #ff9800;
  --orange-dk: #e68a00;
  --teal:      #26c6da;
  --text:      #cdd6e4;
  --text-dim:  #8892a4;
  --white:     #f0f4fc;
  --danger:    #f44336;
  --success:   #4caf50;
  --radius:    8px;
  --shadow:    0 4px 24px rgba(0,0,0,.35);
  --mono:      'Courier New', Courier, monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: var(--orange); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal); }

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

/* ── Layout helpers ─────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.flex { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  background: rgba(14,21,40,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,152,0,.15);
  padding: .85rem 0;
  position: sticky; top: 0; z-index: 100;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand {
  font-size: 1.25rem; font-weight: 700; color: var(--orange);
  letter-spacing: .5px;
}
.nav-brand span { color: var(--white); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; }
.nav-links a { color: var(--text-dim); font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--orange); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 6rem 1rem 4rem;
  background: linear-gradient(170deg, var(--navy) 40%, var(--navy-mid) 100%);
  border-bottom: 2px solid rgba(255,152,0,.12);
}
.hero h1 {
  font-size: 3rem; color: var(--white); margin-bottom: .5rem;
  letter-spacing: -1px;
}
.hero h1 .accent { color: var(--orange); }
.hero .tagline {
  font-size: 1.2rem; color: var(--text-dim); max-width: 600px; margin: 0 auto;
  font-style: italic;
}
.hero .motto {
  margin-top: 1.5rem; padding: .6rem 1.5rem;
  display: inline-block; border: 1px solid var(--orange);
  border-radius: var(--radius); color: var(--orange);
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  font-size: .85rem;
}

.corporate-motto::after {
  content: "\201C Through storms we deliver\201D";
}

/* ── Section ────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-title {
  font-size: 1.8rem; color: var(--white); margin-bottom: .4rem;
}
.section-sub { color: var(--text-dim); margin-bottom: 2rem; }
.section-alt { background: var(--navy-mid); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { color: var(--white); margin-bottom: .4rem; }
.card p { color: var(--text-dim); font-size: .95rem; }

/* ── Team card ──────────────────────────────────────────── */
.team-card {
  text-align: center;
  flex: 1 1 280px;
  max-width: 340px;
}
.team-card img {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 6px;
  object-fit: cover; margin: 0 auto 1rem;
  border: 3px solid var(--orange);
}
.team-card .role { color: var(--orange); font-size: .85rem; font-weight: 600; }
.team-card .status {
  display: inline-block; margin-top: .5rem; padding: .2rem .8rem;
  border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.team-card .status.active   { background: rgba(76,175,80,.15); color: var(--success); }
.team-card .status.inactive { background: rgba(244,67,54,.15); color: var(--danger); }

/* ── Blog ───────────────────────────────────────────────── */
.blog-article {
  max-width: 740px; margin: 3rem auto; padding: 2.5rem;
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
}
.blog-meta { color: var(--text-dim); font-size: .85rem; margin-bottom: 1.5rem; }
.blog-article h1 { color: var(--white); font-size: 2rem; margin-bottom: .5rem; }
.blog-article p { margin-bottom: 1rem; }
.blog-article .highlight {
  color: var(--orange); font-weight: 600;
}

/* ── Archive banner ─────────────────────────────────────── */
.archive-banner {
  background: #2a2000; border: 2px dashed #b8860b;
  border-radius: var(--radius); padding: 1rem 1.5rem;
  margin-bottom: 2rem; text-align: center;
  color: #daa520; font-size: .9rem;
}
.memo-box {
  max-width: 700px; margin: 2rem auto; padding: 2rem;
  background: var(--navy-mid); border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--mono);
}
.memo-box .label { color: var(--orange); font-weight: 700; margin-bottom: .5rem; }
.memo-box p { margin-bottom: .6rem; font-size: .92rem; }
.memo-box .path-ref { color: var(--teal); font-weight: 700; font-size: 1.05rem; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  text-align: center; padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
  color: var(--text-dim); font-size: .82rem;
}

/* ═════════════════════════════════════════════════════════
   STAGING PORTAL styles
   ═════════════════════════════════════════════════════════ */

.staging-banner {
  background: linear-gradient(90deg, #b71c1c, #d32f2f);
  color: #fff; text-align: center; padding: .45rem;
  font-size: .8rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
}

/* ── Auth forms ─────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 32px);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, #0b0f1a 100%);
}
.auth-box {
  width: 100%; max-width: 440px; padding: 2.5rem;
  background: var(--navy-mid);
  border: 1px solid rgba(255,152,0,.12);
  border-radius: 12px; box-shadow: var(--shadow);
}
.auth-box h1 {
  color: var(--orange); font-size: 1.5rem; margin-bottom: .3rem;
}
.auth-box .subtitle {
  color: var(--text-dim); font-size: .88rem; margin-bottom: 1.8rem;
}

.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block; margin-bottom: .35rem;
  font-size: .85rem; color: var(--text-dim); font-weight: 600;
}
.form-group input, .form-group select {
  width: 100%; padding: .7rem .9rem;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px; color: var(--white);
  font-size: .95rem; transition: border-color .2s;
}
.form-group input:focus {
  outline: none; border-color: var(--orange);
}

.btn {
  display: inline-block; padding: .75rem 1.8rem;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: .95rem; font-weight: 600; transition: all .2s;
}
.btn-primary {
  background: var(--orange); color: #000; width: 100%;
}
.btn-primary:hover { background: var(--orange-dk); }

.form-footer {
  text-align: center; margin-top: 1rem;
  font-size: .85rem; color: var(--text-dim);
}

.alert-error {
  background: rgba(244,67,54,.12); border: 1px solid rgba(244,67,54,.3);
  color: #ef9a9a; padding: .7rem 1rem; border-radius: 6px;
  margin-bottom: 1.2rem; font-size: .88rem;
}

/* ── Dashboard / Admin ──────────────────────────────────── */
.dash-nav {
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .7rem 0;
}
.dash-nav .container { display: flex; align-items: center; justify-content: space-between; }
.dash-nav .brand { color: var(--orange); font-weight: 700; }
.dash-nav .user-info { color: var(--text-dim); font-size: .85rem; }
.dash-nav .user-info .role-badge {
  display: inline-block; padding: .15rem .6rem;
  border-radius: 20px; font-size: .72rem; font-weight: 700;
  margin-left: .5rem; text-transform: uppercase;
}
.dash-nav .role-badge.user  { background: rgba(38,198,218,.15); color: var(--teal); }
.dash-nav .role-badge.admin { background: rgba(255,152,0,.15); color: var(--orange); }

.dash-content { padding: 3rem 0; }
.dash-content h1 { color: var(--white); margin-bottom: 1rem; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem; margin-top: 1.5rem;
}
.tool-card {
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color .2s;
}
.tool-card:hover { border-color: var(--orange); }
.tool-card h3 { color: var(--white); font-size: 1rem; margin-bottom: .3rem; }
.tool-card p { color: var(--text-dim); font-size: .85rem; }
.tool-card .icon { font-size: 1.6rem; margin-bottom: .6rem; }
.tool-card.locked { opacity: .5; pointer-events: none; }
.tool-card.locked::after {
  content: '🔒 ADMIN ONLY';
  display: block; margin-top: .6rem;
  color: var(--danger); font-size: .75rem; font-weight: 700;
}

/* Admin-specific */
.export-section {
  background: var(--navy);
  border: 1px solid rgba(255,152,0,.15);
  border-radius: var(--radius); padding: 2rem;
  margin-top: 1.5rem;
}
.export-section h2 { color: var(--orange); margin-bottom: 1rem; }
.export-btn {
  background: var(--orange); color: #000; border: none;
  padding: .8rem 2rem; border-radius: 6px; font-weight: 700;
  font-size: 1rem; cursor: pointer; transition: background .2s;
}
.export-btn:hover { background: var(--orange-dk); }

pre.export-output {
  background: #0a0e16; color: var(--teal);
  padding: 1.2rem; border-radius: 6px; margin-top: 1rem;
  overflow-x: auto; font-size: .82rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all;
  max-height: 500px;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 700px) {
  .hero h1 { font-size: 2rem; }
  .nav-links { gap: 1rem; }
  .auth-box { margin: 1rem; padding: 1.5rem; }
}
