/* DArnTech Carbon-aligned tokens + components — shared across customer-hub
 * surfaces and (next) ops.darrenarney.com/repos. Self-contained, no Carbon
 * library dependency — just the visual identity (IBM Plex, blue accent,
 * hairline rules, 16px grid).
 *
 * 2026-06 (cycle-68 public-face hygiene pass): re-skinned to the elevated-dark
 * house brand. /brand/tokens.css is now the SINGLE palette source; the --c-*
 * names below are ALIASES onto its warm --* tokens, so every page that links
 * this file levels up to the home (darn-tech-home.html) reference in one edit —
 * no per-page color work. Literal fallbacks (after the comma) keep the file
 * standalone if tokens.css fails to load. Token NAMES are unchanged so all
 * consuming class rules + page-local <style> blocks keep working as-is.
 */
@import url("/brand/tokens.css");

:root {
  /* Surfaces / text / rules / action — aliased to the elevated-dark warm palette. */
  --c-bg:        var(--bg, #121311);
  --c-bg-2:      var(--bg-2, #16170f);
  --c-surface:   var(--surface, #1a1c17);
  --c-surface-2: var(--surface-2, #1f221b);
  --c-border:    var(--border, #2a2d24);
  --c-border-strong: var(--border-hi, #3a3e31);
  --c-text:      var(--text, #ececdf);
  --c-text-2:    var(--text-2, #b5b6a4);
  --c-text-3:    var(--text-3, #82836f);
  --c-text-on-blue: #ffffff;
  --c-blue:      var(--blue, #c2703f);
  --c-blue-hover:var(--blue-hi, #d98a55);
  --c-blue-soft: #5a2c12;
  --c-green:     var(--ok, #42be65);
  --c-green-soft:#022d0d;
  /* amber → brand yellow accent (logomark / chips / highlights) */
  --c-amber:     var(--accent, #F5DC28);
  --c-amber-soft:#352a00;
  /* Semantic accents with no elevated-dark equivalent — kept literal; already
     dark-surface-safe and legible on the warm near-black base. */
  --c-red:       #fa4d56;
  --c-red-soft:  #3a0c0e;
  --c-purple:    #be95ff;
  --c-purple-soft: #31135e;
  --c-magenta:   #ff7eb6;
  --c-magenta-soft: #510224;
  --c-teal:      #3ddbd9;
  --c-teal-soft: #022b30;
  /* DArnTech v3.0 olive — brand-mark accent only */
  --c-olive:     var(--darntech-olive-light, #a5a570);
  --c-olive-dark:var(--darntech-olive, #747438);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Top bar (48px, IBM black) ─────────────────────────────── */
.topbar {
  height: 48px;
  background: #161616; /* masthead stays dark independent of --c-text (which is now light in dark theme) */
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #393939;
}
.topbar a { color: inherit; text-decoration: none; }
.topbar-product { font-weight: 600; font-size: 14px; letter-spacing: 0.16px; display: inline-flex; align-items: center; gap: 8px; }
.topbar-product .accent { color: var(--c-amber); }
/* DArnTech logomark (single-source /brand/mark.svg via <use>). White ink +
   amber ghost to echo the topbar's accent. Rest state is visible (no draw). */
.topbar-mark { width: 20px; height: 20px; flex: none; --mark-ink: #ffffff; --mark-ghost: var(--c-amber); }
.topbar-divider { width: 1px; height: 24px; background: #393939; margin: 0 16px; }
.topbar-nav { display: flex; gap: 16px; font-size: 13px; }
.topbar-nav a { color: #c6c6c6; padding: 0 4px; transition: color 80ms; }
.topbar-nav a:hover, .topbar-nav a.active { color: #ffffff; }
.topbar-nav a.active { box-shadow: inset 0 -2px 0 var(--c-blue); }
.topbar-spacer { flex: 1; }
.topbar-customer { font-size: 14px; color: #c6c6c6; }
.topbar-customer strong { color: #ffffff; font-weight: 500; }
.topbar-meta { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: #c6c6c6; }

/* ── Page container + header strip ────────────────────────── */
.page { padding: 32px 48px; max-width: 1280px; margin: 0 auto; }
.page-header { margin-bottom: 32px; }
.page-crumb {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--c-text-3);
  text-transform: uppercase; letter-spacing: 0.32px;
  margin-bottom: 8px;
}
.page-crumb a { color: var(--c-blue); text-decoration: none; }
.page-crumb a:hover { text-decoration: underline; }
.page-title {
  font-family: 'IBM Plex Serif', serif;
  font-size: 32px; font-weight: 400; line-height: 1.2;
  color: var(--c-text);
}
.page-subtitle { color: var(--c-text-2); font-size: 14px; margin-top: 6px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center;
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--c-border-strong);
  background: var(--c-bg);
  color: var(--c-text);
  cursor: pointer; text-decoration: none;
  transition: background 80ms;
  border-radius: 0;
}
.btn:hover { background: var(--c-surface); }
.btn-primary { background: var(--c-blue); color: var(--c-text-on-blue); border-color: var(--c-blue); }
.btn-primary:hover { background: var(--c-blue-hover); }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { background: var(--c-surface); }
.btn .glyph { font-family: monospace; margin-right: 8px; opacity: 0.85; }

/* ── Tags + pills ───────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.32px; text-transform: uppercase;
  padding: 2px 8px;
}
.tag-blue   { background: var(--c-blue-soft);   color: var(--c-blue); }
.tag-green  { background: var(--c-green-soft);  color: var(--c-green); }
.tag-amber  { background: var(--c-amber-soft);  color: var(--c-amber); }
.tag-red    { background: var(--c-red-soft);    color: var(--c-red); }
.tag-purple { background: var(--c-purple-soft); color: var(--c-purple); }
.tag-gray   { background: var(--c-surface-2);   color: var(--c-text-2); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  /* Solid by default — customer-facing booking demo pages (14 of them) must NOT
     be see-through. Was a global 92% translucent standard; that bled the backdrop
     through the demo cards too, so transparency is now scoped to .has-backdrop
     (the 4 spine pages) below. */
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  padding: 24px;
  margin-bottom: 16px;
}
/* Backdrop pages only: let the themed logomark read faintly THROUGH the cards.
   Tag the spine <body class="has-backdrop">; demo pages stay solid. Tunable lives
   in tokens.css (--card-see-through). */
.has-backdrop .card {
  background: color-mix(in srgb, var(--c-bg) var(--card-see-through, 80%), transparent);
}
.card h3 {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.32px;
  color: var(--c-text-2);
  margin-bottom: 12px;
}
.card-customer {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px;
  padding: 24px; background: var(--c-surface);
  border: 1px solid var(--c-border); margin-bottom: 24px;
}
.card-customer h2 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 22px; font-weight: 500; line-height: 1.2;
  margin-bottom: 6px;
}

/* ── Customer index grid ────────────────────────────────── */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.customer-tile {
  display: block; text-decoration: none;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  padding: 24px;
  transition: border-color 120ms, box-shadow 120ms;
}
.customer-tile:hover {
  border-color: var(--c-blue);
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.08);
}
.customer-tile-name {
  font-family: 'IBM Plex Serif', serif;
  font-size: 22px; font-weight: 500;
  color: var(--c-text); margin-bottom: 6px;
}
.customer-tile-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--c-text-3);
  text-transform: uppercase; letter-spacing: 0.16px;
  margin-bottom: 12px;
}
.customer-tile-tags { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.customer-tile-summary { font-size: 13px; color: var(--c-text); line-height: 1.55; }

/* ── Meta grid (key-value pairs) ─────────────────────────── */
.meta-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px; row-gap: 6px;
  font-size: 13px;
}
.meta-key {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--c-text-2);
  text-transform: uppercase; letter-spacing: 0.16px;
}
.meta-val { color: var(--c-text); }
.meta-val a { color: var(--c-blue); text-decoration: none; }
.meta-val a:hover { text-decoration: underline; }
.meta-val strong { font-weight: 600; }

/* ── Section grid (two-col card layout) ─────────────────── */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

/* ── Activity / timeline list ───────────────────────────── */
.timeline { list-style: none; }
.timeline li {
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  font-size: 13px;
}
.timeline li:last-child { border-bottom: 0; }
.timeline-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--c-text-3);
  text-transform: uppercase; letter-spacing: 0.16px;
}
.timeline-event strong { font-weight: 600; }

/* ── Resource link list ─────────────────────────────────── */
.resource-list { list-style: none; }
.resource-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.resource-list li:last-child { border-bottom: 0; }
.resource-list a {
  color: var(--c-blue); text-decoration: none;
  font-size: 13px; font-weight: 500;
}
.resource-list a:hover { text-decoration: underline; }
.resource-list .res-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--c-text-3);
}

/* ── CTA strip ──────────────────────────────────────────── */
.cta-strip {
  background: var(--c-blue); color: var(--c-text-on-blue);
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.cta-strip-text strong { font-size: 16px; font-weight: 600; }
.cta-strip-text div { font-size: 13px; opacity: 0.9; margin-top: 2px; }
.cta-strip .btn {
  background: var(--c-bg); color: var(--c-text); border-color: var(--c-bg);
}
.cta-strip .btn:hover { background: var(--c-surface-2); }

/* ── Generic helpers ────────────────────────────────────── */
.muted { color: var(--c-text-2); }
.hr { border: none; border-top: 1px solid var(--c-border); margin: 24px 0; }

/* ── Loading + error states ────────────────────────────── */
.loading, .error {
  padding: 48px;
  color: var(--c-text-2);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
}
.error {
  color: var(--c-red);
  border-left: 3px solid var(--c-red);
  padding-left: 16px;
  background: var(--c-red-soft);
}

/* ── Prose / rendered MD ───────────────────────────────── */
/* Use on a container holding marked.js / server-rendered MD output. */
.prose h1 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 24px; font-weight: 500;
  margin: 24px 0 12px;
}
.prose h2 {
  font-family: 'IBM Plex Serif', serif;
  font-size: 20px; font-weight: 500;
  margin: 32px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-border);
}
.prose h3 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.prose h4 {
  font-size: 13px; font-weight: 600;
  margin: 16px 0 6px;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.32px;
}
.prose p { margin-bottom: 12px; }
.prose strong { font-weight: 600; }
.prose em { color: var(--c-text-2); }
.prose a { color: var(--c-blue); text-decoration: none; }
.prose a:hover { text-decoration: underline; }
.prose ul, .prose ol { margin: 8px 0 12px 24px; }
.prose li { margin-bottom: 4px; }
.prose code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  background: var(--c-surface);
  padding: 1px 6px;
}
.prose pre {
  background: var(--c-surface);
  border-left: 3px solid var(--c-blue);
  padding: 12px 16px;
  overflow-x: auto;
  margin: 12px 0;
}
.prose pre code { background: transparent; padding: 0; font-size: 12px; }
.prose blockquote {
  border-left: 3px solid var(--c-border-strong);
  padding: 4px 16px;
  color: var(--c-text-2);
  margin: 12px 0;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 13px;
}
.prose th {
  background: var(--c-surface);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--c-border-strong);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.32px;
}
.prose td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--c-border);
}

/* ── Mobile responsiveness ──────────────────────────────── */
@media (max-width: 768px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-divider { margin: 0 8px; }
  .topbar-nav { gap: 10px; font-size: 12px; }
  .topbar-meta { display: none; }
  .topbar-customer { display: none; }

  .page { padding: 20px 16px; }
  .page-title { font-size: 24px; }
  .page-subtitle { font-size: 13px; }

  .card { padding: 16px; }
  .card-customer {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .customer-grid { grid-template-columns: 1fr; gap: 12px; }
  .customer-tile { padding: 18px; }
  .customer-tile-name { font-size: 18px; }

  .section-grid { grid-template-columns: 1fr; gap: 12px; }

  .cta-strip {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
  }
  .cta-strip .btn { width: 100%; justify-content: center; }

  .meta-grid { column-gap: 12px; }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .timeline-date { font-size: 10px; }

  .resource-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .topbar-product { font-size: 13px; }
  .topbar-nav a { padding: 0 2px; }
  .page { padding: 16px 12px; }
  .page-title { font-size: 22px; }
  .card { padding: 14px; }
}
