/*
  CPP201 — Shared design theme
  Clean, light, technical/academic look for classroom projection.
  Palette derived from the iSTAR logo (blue + green).
*/

:root {
  /* Brand colors (from logo) */
  --color-blue-900: #0e2f5c;
  --color-blue-700: #1b4f9c;
  --color-blue-600: #2461c0;
  --color-blue-100: #e8f0fc;

  --color-green-700: #3f8f2f;
  --color-green-600: #5cae3c;
  --color-green-100: #eaf6e4;

  /* Neutrals */
  --color-bg: #f7f9fc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f4f9;
  --color-text: #16202e;
  --color-text-muted: #55606f;
  --color-border: #dbe2ec;

  /* Status */
  --color-success: #2e8b47;
  --color-success-bg: #e9f7ee;
  --color-error: #c0392b;
  --color-error-bg: #fdecea;
  --color-warning: #b9770e;
  --color-warning-bg: #fdf3e2;

  /* Terminal */
  --color-terminal-bg: #10151f;
  --color-terminal-text: #e3ecdf;
  --color-terminal-accent: #7fd66b;

  /* Typography */
  --font-ui: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(16, 32, 64, 0.08);
  --shadow-md: 0 6px 20px rgba(16, 32, 64, 0.10);
  --header-height: 76px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-blue-900);
  margin: 0 0 0.5em 0;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em 0; }

a {
  color: var(--color-blue-600);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code, pre, .mono {
  font-family: var(--font-mono);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--color-blue-700);
  color: #fff;
}
.btn-primary:hover { background: var(--color-blue-600); text-decoration: none; }

.btn-accent {
  background: var(--color-green-600);
  color: #fff;
}
.btn-accent:hover { background: var(--color-green-700); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--color-blue-700);
  border-color: var(--color-border);
}
.btn-ghost:hover { background: var(--color-surface-alt); text-decoration: none; }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.badge-live {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.badge-soon {
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ---------- Site header ---------- */
site-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 24px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 0;
}
.site-header .brand img {
  height: 48px;
  width: auto;
  display: block;
}
.site-header .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.site-header .brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-blue-900);
  white-space: nowrap;
}
.site-header .brand-sub {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover {
  background: var(--color-blue-100);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  background: var(--color-blue-700);
  color: #fff;
}
.site-nav a.is-disabled {
  color: var(--color-text-muted);
  cursor: default;
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 24px 40px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 24px 40px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  color: var(--color-green-700);
  background: var(--color-green-100);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero p.lead {
  max-width: 640px;
  margin: 0 auto 22px;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}
.hero .actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Flow diagram ---------- */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}
.flow-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-weight: 700;
  color: var(--color-blue-900);
  box-shadow: var(--shadow-sm);
}
.flow-arrow {
  color: var(--color-green-600);
  font-size: 1.4rem;
  font-weight: 700;
}

/* ---------- Section ---------- */
.section {
  padding: 40px 24px;
}
.section-title {
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}

/* ---------- Roadmap grid ---------- */
.roadmap-group {
  margin-bottom: 28px;
}
.roadmap-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-blue-900);
  margin-bottom: 12px;
}
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.roadmap-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.roadmap-card .name {
  font-weight: 700;
  color: var(--color-text);
}

/* ---------- Demo panel (shared shell) ---------- */
.demo-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.demo-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-alt);
}
.demo-panel .panel-header h3 {
  margin: 0;
  font-size: 1.05rem;
}
.demo-panel .panel-body {
  padding: 20px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
}

/* ---------- Two-column concept layout ---------- */
.concept-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 980px) {
  .concept-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .site-header .brand-sub { display: none; }
  .hero { padding: 40px 16px 28px; }
}
