/*
 * chrisbmn.com — Subdomain Design System
 * Shared by all *.chrisbmn.com subdomains.
 * Complementary to but visually distinct from the main site.
 *
 * Key distinction: dark fixed header vs the main site's light/transparent nav.
 * The gradient stripe and brand mark root it to chrisbmn.com at a glance.
 */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Content / component colours — same names as main site for portability */
  --bg:           #f8fafc;
  --surface:      #ffffff;
  --surface-alt:  #f1f5f9;
  --border:       #e2e8f0;
  --border-light: #f1f5f9;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-faint:   #94a3b8;
  --accent:       #0ea5e9;
  --accent-hover: #0284c7;
  --accent-dim:   rgba(14,165,233,.12);
  --link:         #0ea5e9;
  --danger:       #ef4444;
  --success:      #22c55e;
  --warning:      #f59e0b;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg:    0 10px 30px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.05);
  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    16px;
  --transition:   0.18s ease;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Subdomain chrome */
  --subd-header-bg:   #0f172a;
  --subd-header-h:    54px;
  --subd-gradient:    linear-gradient(141deg, #0a02ff 0%, #12f12a 20%, rebeccapurple 40%, #e80000 70%, #860000 90%);
  --subd-stripe-h:    10px;
  --subd-max-w:       1200px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; line-height: 1.6; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; font-weight: 700; line-height: 1.25; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; border-style: none; }
ul, ol { padding-left: 1.5em; margin: 0 0 1em; }
li { margin-bottom: .25em; }
code { font-family: var(--font-mono); font-size: .875em; background: var(--surface-alt); padding: .15em .4em; border-radius: 4px; color: var(--accent); }
pre  { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25em; overflow-x: auto; }
pre code { background: none; padding: 0; color: var(--text); font-size: .875rem; }
a { color: var(--link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* ── Top gradient stripe ────────────────────────────────────── */
.subd-stripe {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--subd-stripe-h);
  z-index: 200;
  background: var(--subd-gradient);
}

/* ── Dark header ────────────────────────────────────────────── */
.subd-header {
  position: fixed;
  top: var(--subd-stripe-h);
  left: 0; right: 0;
  height: var(--subd-header-h);
  z-index: 100;
  background: var(--subd-header-bg);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.subd-header-inner {
  max-width: var(--subd-max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand mark — logo · CHRISBMN / SUBDOMAIN */
.subd-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: #f1f5f9;
  flex-shrink: 0;
}
.subd-brand:hover { opacity: .85; color: #f1f5f9; }

.subd-brand img {
  height: 26px;
  width: auto;
  flex-shrink: 0;
}

.subd-brand-wordmark {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #f1f5f9;
}

.subd-brand-div {
  color: rgba(255,255,255,.25);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1;
}

.subd-brand-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: .05em;
}

/* Right-side nav */
.subd-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.subd-back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  padding: .35rem .7rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.subd-back:hover { color: #f1f5f9; border-color: rgba(255,255,255,.25); }

/* ── Content area ───────────────────────────────────────────── */
.subd-main {
  padding-top: calc(var(--subd-stripe-h) + var(--subd-header-h));
  display: flex;
  flex-direction: column;
  flex: 1;
}

.subd-content {
  flex: 1;
  padding: 2rem 1.5rem 3rem;
  max-width: var(--subd-max-w);
  margin: 0 auto;
  width: 100%;
}

/* ── Footer ─────────────────────────────────────────────────── */
.subd-footer {
  background: var(--subd-header-bg);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: .875rem 1.5rem;
}

.subd-footer-inner {
  max-width: var(--subd-max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
}

.subd-footer-inner a { color: rgba(255,255,255,.35); transition: color var(--transition); }
.subd-footer-inner a:hover { color: rgba(255,255,255,.7); text-decoration: none; }

.subd-footer-links { display: flex; gap: 1.25rem; align-items: center; }

/* ── Shared components ──────────────────────────────────────── */

/* Page heading */
.subd-page-header {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.subd-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.subd-page-header h1 { font-size: 1.65rem; margin-bottom: .25rem; }
.subd-page-header p  { font-size: .9rem; color: var(--text-muted); margin: 0; }

/* Card */
.subd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* Btn */
.subd-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.subd-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.subd-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.subd-btn-ghost  { background: transparent; color: var(--text-muted); border-color: var(--border); }
.subd-btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

/* Badge */
.subd-badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .5rem;
  font-size: .72rem;
  font-weight: 500;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --subd-header-h: 48px; }
  .subd-brand-wordmark { display: none; }
  .subd-content { padding: 1.25rem 1rem 2.5rem; }
}

@media (max-width: 480px) {
  .subd-footer-links { display: none; }
}
