/*
Theme Name: RFD Blog
Template: twentytwentyfive
Version: 0.1.0
Author: Robert Dugger
Description: Child theme carrying the RFD Arcade token system onto the blog:
dark surface, electric-cyan primary, glass header, mono nav, and
lane-coloured post cards.
*/

/* Tokens — the arcade palette (games.rfditservices.com), sourced verbatim
   from RFD_IT_Services_Site/tailwind.config.js `colors` and
   themes/portfolio/assets/css/input.css `.glass-panel` / `.glow-primary`.
   Dark is the DEFAULT and ONLY mode: the arcade itself has no light
   variant (nothing in tailwind.config.js or input.css defines one), so
   "closer to the arcade" means staying dark-only rather than inventing a
   light theme the source of truth doesn't have. --lane-building is the
   arcade's own primary (cyan) — the arcade IS the building lane.
   --lane-consulting takes the arcade's tertiary (Royal Blue, #bccbff) per
   Robert's brief ("secondary/tertiary accent if defined"): secondary
   (#4edea3, Emerald) is already spoken for as --result's success/positive
   semantic, so tertiary keeps lane-consulting visually distinct from
   lane-building's cyan while staying inside the arcade's own palette. */
:root {
  --bg:#0b1326; --surface:#171f33; --surface-high:#222a3e; --text:#dbe2fd; --muted:#bdc8d1; --line:#3e484f;
  --accent:#8ed5ff; --accent-strong:#38bdf8; --accent-soft:rgba(142,213,255,0.12); --result:#4edea3;
  --lane-consulting:#bccbff; --lane-building:#8ed5ff;
  color-scheme: dark;
}

/* Self-hosted fonts — same three families and mechanism as the arcade's
   input.css font-face block, paths relative to this stylesheet. Only the
   weights the arcade itself loads are self-hosted (Sora 700, Hanken
   Grotesk 400, JetBrains Mono 400); headings use 700 throughout so the
   browser never has to fake-bold a missing weight. */
@font-face { font-family: "Sora"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }

/* Type scale — widths/sizes unchanged from the previous pass; only the
   families change (display: Sora, body: Hanken Grotesk). */
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3, h4, h5, h6 {
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
@media (min-width: 768px) {
  body { font-size: 17px; }
  h1 { font-size: 44px; }
}

/* Content widths — same as the office: 720px reading column, 1080px index. */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* Buttons and chips */
.btn-primary {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #00354a !important; /* arcade's on-primary; not in the requested token list, so hardcoded */
  text-decoration: none;
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--accent-strong); opacity: 1; }
.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-high);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.chip:hover { color: var(--accent); border-color: var(--accent); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 28px; }
.pill-row .cat-item a, .pill-row a {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-high);
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.pill-row .cat-item a:hover, .pill-row a:hover { border-color: var(--accent); color: var(--accent); }

/* Card — the arcade's .arcade-card base pattern, now with the arcade's own
   hover glow (RFD_IT_Services_Site input.css .glow-primary: 0 0 15px
   rgba(142,213,255,0.2)) instead of a plain border change. */
.arcade-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line, #3e484f);
  border-top: 4px solid var(--game-color, var(--accent, #8ed5ff)); border-radius: 10px;
  background: var(--surface, #171f33); color: var(--text, #dbe2fd); text-decoration: none; }
.arcade-card:hover, .arcade-card:focus-visible {
  border-color: var(--game-color, var(--accent, #8ed5ff));
  box-shadow: 0 0 15px 0px rgba(142, 213, 255, 0.2);
}

/* Lane edges — set the 4px top edge from the lane token instead of --game-color. */
.lane-consulting { border-top-color: var(--lane-consulting); }
.lane-building { border-top-color: var(--lane-building); }
/* The block editor's post-template puts the lane class (from post_class) on the
   <li> while the card styles below sit on the same element — and these
   descendant forms cover templates that nest an .arcade-card inside. */
.lane-consulting .arcade-card { border-top-color: var(--lane-consulting); }
.lane-building .arcade-card { border-top-color: var(--lane-building); }

/* Post cards in the query grid: each .wp-block-post <li> is the card, so the
   lane class from post_class() lands on the card itself. */
.wp-block-post-template .wp-block-post,
.card-grid .wp-block-post {
  display: flex; flex-direction: column; gap: 6px; padding: 12px;
  border: 1px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: 10px; background: var(--surface); color: var(--text);
}
.wp-block-post-template .wp-block-post:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px 0px rgba(142, 213, 255, 0.2);
}
.wp-block-post-template .wp-block-post.lane-consulting:hover { border-color: var(--lane-consulting); }
.wp-block-post-template .wp-block-post.lane-building:hover { border-color: var(--lane-building); }

/* Card grid: three across at 1080px, one across on phones. */
.card-grid .wp-block-post-template,
.wp-block-post-template.card-grid-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) {
  .card-grid .wp-block-post-template,
  .wp-block-post-template.card-grid-inner { grid-template-columns: repeat(3, 1fr); }
}
.card-grid .wp-block-post-featured-image img,
.wp-block-post .wp-block-post-featured-image img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}
.card-grid .wp-block-post-title a { color: var(--text); text-decoration: none; font-size: 20px; font-weight: 700; }
.card-grid .wp-block-post-excerpt__excerpt { color: var(--muted); margin-bottom: 0; }
.card-grid .wp-block-post-date { color: var(--muted); font-size: 14px; }

/* Code blocks — surface-high with outline-variant (--line) borders, per the
   arcade's elevated-surface treatment for chrome that sits above cards. */
pre, code {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
pre {
  background: var(--surface-high);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 14px;
}
code { background: var(--surface-high); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 0.92em; }
pre code { border: none; padding: 0; background: none; }

/* Callouts — surface-high with outline-variant borders; --result (arcade
   secondary, Emerald) for the "what changed" variant. */
.proof, .note {
  background: var(--surface-high);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 20px 0;
}
.note.what-changed, .proof.what-changed { border-left-color: var(--result); }
.note.what-changed strong, .proof.what-changed strong { color: var(--result); }

/* Post page chrome */
.standfirst { font-size: 20px; color: var(--muted); }
.dek { font-size: 19px; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 14px; }
.byline .photo img, .byline .wp-block-avatar img { border-radius: 999px; }
.author-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px; margin-top: 40px;
}
.author-box .wp-block-avatar img { border-radius: 999px; }

/* Lane CTA blocks: shown only when body carries the matching lane class. */
.lane-cta { display: none; }
body.lane-consulting .lane-cta-consulting,
body.lane-building .lane-cta-building { display: block; }
.lane-cta-consulting > .wp-block-group,
.lane-cta-building > .wp-block-group,
.lane-cta-inner {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 20px;
}
body.lane-consulting .lane-cta-inner { border-left-color: var(--lane-consulting); }
body.lane-building .lane-cta-inner { border-left-color: var(--lane-building); }

/* Header / footer chrome */
.site-brand a { font-family: "Sora", system-ui, sans-serif; color: var(--accent); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; text-decoration: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 19, 38, 0.72); /* --bg tinted translucent — the arcade's .glass-panel effect */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.wp-block-navigation a {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.wp-block-navigation a:hover { color: var(--accent); }
.wp-block-navigation .current-menu-item a,
.wp-block-navigation a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.site-footer { border-top: 1px solid var(--line); margin-top: 60px; color: var(--muted); font-size: 14px; }
.site-footer h3, .site-footer .wp-block-heading {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
