/* ========================================
   KEMPSTON PILOTS — learn-style.css
   Shared styles for all tutorial/learn pages
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

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

:root {
  --gold:       #f59e0b;
  --gold-dim:   rgba(245,158,11,0.14);
  --gold-glow:  rgba(245,158,11,0.35);
  --dark:       #0a0f1e;
  --dark2:      #0f172a;
  --dark3:      #111827;
  --surface:    #1a2236;
  --surface2:   #1e2d44;
  --text:       #e2e8f0;
  --muted:      #94a3b8;
  --green:      #4ade80;
  --green-dim:  rgba(74,222,128,0.12);
  --blue:       #60a5fa;
  --blue-dim:   rgba(96,165,250,0.12);
  --red:        #f87171;
  --red-dim:    rgba(248,113,113,0.12);
  --radius:     14px;
  --mono:       'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-padding-top: 80px; scroll-behavior: smooth; }

body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed; width: 100%; top: 0;
  padding: 0 40px; height: 68px;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(10,15,30,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245,158,11,0.12);
  z-index: 1000;
}
.logo {
  font-family: 'Orbitron', sans-serif; font-weight: 700;
  font-size: 15px; letter-spacing: 2px; color: #fff;
  text-decoration: none; white-space: nowrap;
}
.nav-back {
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none;
  font-family: 'Rajdhani', sans-serif; font-weight: 600;
  font-size: 14px; letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 14px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.2s;
}
.nav-back:hover { color: var(--gold); border-color: rgba(245,158,11,0.4); background: var(--gold-dim); }
.nav-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Rajdhani', sans-serif; font-size: 13px;
  color: var(--muted); letter-spacing: 1px;
}
.nav-breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-breadcrumb a:hover { color: var(--gold); }
.nav-breadcrumb span { color: rgba(245,158,11,0.5); }
.nav-breadcrumb .current { color: var(--gold); }

/* ─── PAGE HERO ─── */
.page-hero {
  padding: 140px 40px 80px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(245,158,11,0.07) 0%, transparent 70%),
    var(--dark2);
  text-align: center;
  border-bottom: 1px solid rgba(245,158,11,0.08);
}
.page-hero .eyebrow {
  font-family: 'Orbitron', sans-serif; font-size: 11px;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px;
}
.page-hero .eyebrow::before, .page-hero .eyebrow::after {
  content: ''; display: inline-block; width: 30px; height: 1px;
  background: rgba(245,158,11,0.5);
}
.page-hero h1 {
  font-family: 'Orbitron', sans-serif; font-weight: 900;
  font-size: clamp(28px, 5vw, 52px);
  color: #fff; letter-spacing: 2px; margin-bottom: 20px; line-height: 1.2;
}
.page-hero h1 span { color: var(--gold); }
.page-hero .lead {
  max-width: 680px; margin: 0 auto 32px;
  color: var(--muted); font-size: 17px; line-height: 1.75;
}
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-tag {
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
}
.hero-tag.gold { background: var(--gold-dim); border-color: rgba(245,158,11,0.3); color: var(--gold); }
.hero-tag.green { background: var(--green-dim); border-color: rgba(74,222,128,0.3); color: var(--green); }
.hero-tag.blue  { background: var(--blue-dim);  border-color: rgba(96,165,250,0.3);  color: var(--blue); }

/* ─── LAYOUT ─── */
.learn-container {
  max-width: 900px; margin: 0 auto;
  padding: 80px 40px 120px;
}
.learn-container.wide { max-width: 1100px; }

/* ─── SECTION HEADERS ─── */
.learn-section { margin-bottom: 80px; }
.learn-section h2 {
  font-family: 'Orbitron', sans-serif; font-weight: 700;
  font-size: clamp(20px, 3vw, 26px);
  color: #fff; letter-spacing: 1.5px; margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(245,158,11,0.15);
  display: flex; align-items: center; gap: 14px;
}
.learn-section h2 .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: #000;
  font-size: 14px; font-weight: 900; flex-shrink: 0;
}
.learn-section h3 {
  font-family: 'Orbitron', sans-serif; font-size: 16px;
  color: var(--gold); letter-spacing: 1px; margin: 32px 0 14px;
}
.learn-section p {
  color: #b8c7d9; font-size: 16px; line-height: 1.8; margin-bottom: 16px;
}
.learn-section ul, .learn-section ol {
  color: #b8c7d9; font-size: 16px; line-height: 1.8;
  padding-left: 24px; margin-bottom: 16px;
}
.learn-section li { margin-bottom: 8px; }
.learn-section strong { color: var(--text); }

/* ─── CODE BLOCKS ─── */
.code-block {
  background: #060c1a; border: 1px solid rgba(245,158,11,0.15);
  border-radius: 10px; overflow: hidden; margin: 20px 0;
}
.code-block .code-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; background: rgba(245,158,11,0.07);
  border-bottom: 1px solid rgba(245,158,11,0.1);
}
.code-block .code-lang {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: var(--gold);
}
.code-block .code-file {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.code-block pre {
  padding: 22px 24px; overflow-x: auto; font-family: var(--mono);
  font-size: 13.5px; line-height: 1.7; color: #c9d8ef;
}
.code-block pre .c  { color: #5a6d8a; } /* comment */
.code-block pre .k  { color: #c792ea; } /* keyword */
.code-block pre .s  { color: #c3e88d; } /* string */
.code-block pre .n  { color: #82aaff; } /* name/var */
.code-block pre .f  { color: #89ddff; } /* function */
.code-block pre .num { color: #f78c6c; } /* number */

/* ─── INFO BOXES ─── */
.info-box {
  padding: 20px 24px; border-radius: 10px; margin: 24px 0;
  display: flex; gap: 16px; align-items: flex-start;
}
.info-box .ib-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.info-box .ib-body { flex: 1; }
.info-box .ib-title { font-family: 'Orbitron', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; }
.info-box .ib-text  { font-size: 15px; color: #b8c7d9; line-height: 1.7; margin: 0; }
.info-box.tip   { background: var(--green-dim); border: 1px solid rgba(74,222,128,0.2); }
.info-box.tip   .ib-title { color: var(--green); }
.info-box.warn  { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); }
.info-box.warn  .ib-title { color: var(--gold); }
.info-box.info  { background: var(--blue-dim); border: 1px solid rgba(96,165,250,0.2); }
.info-box.info  .ib-title { color: var(--blue); }

/* ─── STEP CARDS ─── */
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 24px 0; }
.step-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius); padding: 24px;
  transition: all 0.3s;
}
.step-card:hover { transform: translateY(-4px); border-color: rgba(245,158,11,0.25); }
.step-card .sc-num {
  font-family: 'Orbitron', sans-serif; font-size: 28px; font-weight: 900;
  color: rgba(245,158,11,0.2); margin-bottom: 12px; line-height: 1;
}
.step-card h4 { font-family: 'Orbitron', sans-serif; font-size: 14px; color: #fff; letter-spacing: 1px; margin-bottom: 10px; }
.step-card p  { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0; }

/* ─── FILE TREE ─── */
.file-tree {
  background: #060c1a; border: 1px solid rgba(245,158,11,0.15);
  border-radius: 10px; padding: 24px 28px; font-family: var(--mono);
  font-size: 14px; line-height: 2; color: #b8c7d9; margin: 20px 0;
}
.file-tree .ft-dir  { color: var(--blue); }
.file-tree .ft-file { color: #e2e8f0; }
.file-tree .ft-note { color: var(--muted); font-size: 12px; }
.file-tree .ft-gold { color: var(--gold); }

/* ─── DIAGRAM ─── */
.diagram-wrap {
  background: var(--surface); border: 1px solid rgba(245,158,11,0.12);
  border-radius: var(--radius); padding: 32px; margin: 28px 0;
  overflow-x: auto;
}
.diagram-wrap .diagram-title {
  font-family: 'Orbitron', sans-serif; font-size: 12px;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 28px; text-align: center;
}

/* ─── GAME EMBED ─── */
.game-embed-wrap {
  margin: 32px 0; border-radius: var(--radius); overflow: hidden;
  border: 2px solid rgba(245,158,11,0.25);
  box-shadow: 0 0 60px rgba(245,158,11,0.1);
}
.game-embed-header {
  background: rgba(245,158,11,0.08); padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(245,158,11,0.15);
}
.game-embed-header .dot { width: 10px; height: 10px; border-radius: 50%; }
.game-embed-header .dot.red  { background: #f87171; }
.game-embed-header .dot.gold { background: var(--gold); }
.game-embed-header .dot.grn  { background: #4ade80; }
.game-embed-header .label {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-left: 6px;
}
.game-embed-wrap iframe {
  width: 100%; height: 500px; border: none; display: block;
  background: #060c1a;
}

/* ─── TIMELINE ─── */
.timeline { position: relative; padding-left: 32px; margin: 24px 0; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--gold), transparent);
}
.tl-item { position: relative; margin-bottom: 32px; }
.tl-item::before {
  content: ''; position: absolute; left: -28px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--dark);
  box-shadow: 0 0 8px rgba(245,158,11,0.6);
}
.tl-item .tl-time {
  font-family: 'Orbitron', sans-serif; font-size: 11px;
  color: var(--gold); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 6px;
}
.tl-item h4 { font-family: 'Orbitron', sans-serif; font-size: 14px; color: #fff; margin-bottom: 6px; }
.tl-item p  { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.65; }

/* ─── FOOTER ─── */
.learn-footer {
  padding: 48px 40px; text-align: center;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.footer-logo { font-family: 'Orbitron', sans-serif; font-size: 14px; letter-spacing: 3px; color: rgba(255,255,255,0.25); }
.footer-copy  { color: #475569; font-size: 13px; }
.footer-links { display: flex; gap: 20px; margin-bottom: 4px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }

/* ─── NAV NEXT/PREV ─── */
.page-nav {
  display: flex; gap: 16px; margin-top: 64px; flex-wrap: wrap;
}
.page-nav a {
  flex: 1; min-width: 200px; padding: 20px 24px;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: all 0.3s; display: flex; align-items: center; gap: 14px;
}
.page-nav a:hover { border-color: rgba(245,158,11,0.35); background: var(--surface2); transform: translateY(-3px); }
.page-nav a .pn-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 4px; }
.page-nav a .pn-title { font-family: 'Orbitron', sans-serif; font-size: 14px; color: #fff; letter-spacing: 0.5px; }
.page-nav a.next { justify-content: flex-end; text-align: right; }
.page-nav .pn-arrow { font-size: 22px; color: var(--gold); flex-shrink: 0; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .page-hero { padding: 110px 20px 60px; }
  .learn-container { padding: 50px 20px 80px; }
  .code-block pre { font-size: 12px; padding: 16px; }
}
