/* ============================================================
   CAMPUS — Design System
   A community + learning platform.
   Palette grows out of the existing brand marks:
   orange #fe8e01 (energy / action) and deep green #073707 (growth / trust)
   ============================================================ */

:root {
  /* --- Brand --- */
  --orange: #fe8e01;
  --orange-dark: #d97600;
  --green: #073707;
  --green-light: #0f5c14;

  /* --- Neutrals (cool, slightly sage-tinted — not warm cream) --- */
  --paper: #f5f8f3;
  --paper-alt: #eef3ea;
  --card: #ffffff;
  --ink: #0f1f0d;
  --ink-soft: #43503f;
  --line: #dbe4d5;

  /* --- Accents --- */
  --gold-light: #ffd9a0;
  --sage: #e6efe0;

  /* --- Type --- */
  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* --- Radius / shadow --- */
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(7, 55, 7, 0.06);
  --shadow-md: 0 8px 28px rgba(7, 55, 7, 0.10);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--green);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--orange); }

.text-muted-soft { color: var(--ink-soft); }

/* --- Buttons --- */
.btn-brand {
  background: var(--orange);
  border: none;
  color: #1a0e00;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-brand:hover {
  background: var(--orange-dark);
  color: #1a0e00;
  transform: translateY(-1px);
}
.btn-outline-brand {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
  font-weight: 600;
  padding: 0.6rem 1.45rem;
  border-radius: 999px;
  transition: all 0.15s ease;
}
.btn-outline-brand:hover {
  background: var(--green);
  color: #fff;
}

/* --- Navbar --- */
.navbar-campus {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar-campus .brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar-campus .brand-mark .dot { color: var(--orange); }
.navbar-campus .nav-link {
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.5rem 0.9rem !important;
  border-radius: 999px;
}
.navbar-campus .nav-link.active,
.navbar-campus .nav-link:hover {
  color: var(--green);
  background: var(--sage);
}
.nav-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper-alt);
  color: var(--green);
  position: relative;
}
.nav-icon-btn .badge-dot {
  position: absolute; top: 2px; right: 2px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--orange); border: 2px solid var(--card);
}
.avatar-sm {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--line);
}

/* --- Hero --- */
.hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(254,142,1,0.10), transparent),
    var(--paper);
  overflow: hidden;
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: var(--gold-light);
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero p.lead-copy {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34rem;
}
.hero-stats {
  display: flex;
  gap: 2.25rem;
  margin-top: 2.5rem;
}
.hero-stats .stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--green);
}
.hero-stats .stat-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* --- Signature: growth path --- */
.growth-path { width: 100%; height: auto; }
.growth-path .path-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw-path 1.8s ease forwards 0.3s;
}
.growth-path .node-dot {
  fill: var(--orange);
  opacity: 0;
  animation: pop-in 0.4s ease forwards;
}
.growth-path .node-dot:nth-of-type(1) { animation-delay: 0.5s; }
.growth-path .node-dot:nth-of-type(2) { animation-delay: 1.1s; }
.growth-path .node-dot:nth-of-type(3) { animation-delay: 1.7s; }
.growth-path .node-label {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--ink-soft);
  opacity: 0;
  animation: pop-in 0.4s ease forwards;
}
.growth-path .node-label:nth-of-type(1) { animation-delay: 0.6s; }
@keyframes draw-path { to { stroke-dashoffset: 0; } }
@keyframes pop-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .growth-path .path-line, .growth-path .node-dot, .growth-path .node-label {
    animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important;
  }
}

/* --- Cards --- */
.card-campus {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-campus:hover { box-shadow: var(--shadow-md); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-dark);
  margin-bottom: 0.5rem;
  display: block;
}

/* --- Feature grid --- */
.feature-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  height: 100%;
}
.feature-card .icon-wrap {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--sage);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  margin-bottom: 1rem;
}

/* --- Course card --- */
.course-card { overflow: hidden; }
.course-card .thumb {
  height: 150px;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.course-card .level-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--green);
  background: var(--sage);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.progress-brand { height: 6px; border-radius: 999px; background: var(--paper-alt); }
.progress-brand .bar { height: 100%; border-radius: 999px; background: var(--orange); }

/* --- Post / feed --- */
.post-card { padding: 1.25rem; }
.post-card .post-head { display: flex; gap: 0.75rem; align-items: center; }
.post-actions button {
  background: none; border: none; color: var(--ink-soft);
  font-weight: 600; font-size: 0.85rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.post-actions button:hover { color: var(--orange); }

/* --- Footer --- */
.footer-campus {
  background: var(--green);
  color: #dce7d8;
  padding: 3.5rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-campus h5 { color: #fff; font-family: var(--font-display); }
.footer-campus a { color: #bcd0b6; }
.footer-campus a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: #9fb59a;
}

/* --- Auth pages --- */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(500px 260px at 10% 0%, rgba(254,142,1,0.08), transparent),
    var(--paper);
  padding: 2rem 1rem;
}
.auth-card {
  max-width: 420px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}
.form-control-campus {
  border-radius: 10px;
  border: 1.5px solid var(--line);
  padding: 0.65rem 0.9rem;
}
.form-control-campus:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(254,142,1,0.15);
}

/* --- Admin --- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px;
  background: var(--green);
  color: #dce7d8;
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}
.admin-sidebar .brand-mark { color: #fff; }
.admin-sidebar a {
  display: flex; align-items: center; gap: 0.6rem;
  color: #cfe0ca; padding: 0.6rem 0.8rem; border-radius: 8px;
  font-weight: 600; font-size: 0.92rem; margin-bottom: 0.2rem;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { flex: 1; padding: 2rem; background: var(--paper); }
.stat-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem;
}
.stat-card .num { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 700; color: var(--green); }

.js-reveal.is-visible { opacity: 1 !important; transform: translateY(0) !important; }
.js-like-btn.is-liked { color: var(--orange) !important; }

/* --- Focus visibility --- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* --- Responsive --- */
@media (max-width: 991px) {
  .admin-sidebar { position: fixed; left: -260px; top: 0; bottom: 0; z-index: 1050; transition: left 0.2s ease; }
  .admin-sidebar.open { left: 0; }
  .hero { padding: 3rem 0 2.5rem; text-align: center; }
  .hero-stats { justify-content: center; flex-wrap: wrap; }
}
