/*
Theme Name: NexusWH Blog
Theme URI: https://nexuswh.com/blog/
Author: Nexus Warehouse
Author URI: https://nexuswh.com/
Description: Child theme of Twenty Twenty-Five, styled to match the nexuswh.com main site: same palette (--bg #F2EDE4 / --accent #F58220 / --ink #0F0C08), same self-hosted Archivo, Archivo Black and Oswald fonts loaded from /assets/fonts/fonts.css, same header/footer treatment. Keeps the blog visually continuous with the static DC-framework site so /blog does not read as a bolted-on subsite.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexuswh-blog
*/

/* ============================================================
   Tokens — copied verbatim from Home.dc.html :root so the blog
   and the main site cannot drift apart.
   ============================================================ */
:root {
  --bg: #F2EDE4;
  --surface: #FFFFFF;
  --well: #E6DFD3;
  --ink: #0F0C08;
  --ink-soft: #484236;
  --line: #BFB6A3;
  --accent: #F58220;
  --accent-deep: #CC6810;
  --link: #9A4A00;
  --accent-text: #8A4300;
  --line-strong: #8C8271;
  --dark: #16130D;
  --dark-ink: #F5EFE2;
  --dark-soft: #A79F8E;
  --dark-line: #332E22;
}

/* ============================================================
   Base
   ============================================================ */
body,
.wp-site-blocks {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', 'Golos Text', sans-serif;
}

h1, h2, h3,
.wp-block-post-title,
.wp-block-heading {
  font-family: 'Archivo Black', 'Oswald', sans-serif;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h4, h5, h6 {
  font-family: 'Oswald', 'Archivo Black', sans-serif;
  color: var(--ink);
}

a {
  color: var(--link);
  text-underline-offset: 4px;
}

a:hover,
a:focus {
  color: var(--accent-text);
}

/* ============================================================
   Header / footer — mirror the main site's bar treatment
   ============================================================ */
.wp-block-template-part header,
header.wp-block-template-part {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.wp-block-template-part footer,
footer.wp-block-template-part {
  background: var(--dark);
  color: var(--dark-ink);
  border-top: 1px solid var(--dark-line);
}

footer.wp-block-template-part a,
.wp-block-template-part footer a {
  color: var(--dark-ink);
}

.wp-block-site-title a {
  font-family: 'Archivo Black', 'Oswald', sans-serif;
  color: var(--ink);
  text-decoration: none;
}

/* ============================================================
   Buttons — the site's orange call-to-action
   ============================================================ */
.wp-block-button__link,
.wp-element-button {
  background-color: var(--accent);
  color: var(--ink);
  border-radius: 4px;
  font-weight: 700;
  font-family: 'Archivo', 'Golos Text', sans-serif;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: var(--accent-deep);
  color: #FFFFFF;
}

/* ============================================================
   Content surfaces
   ============================================================ */
.wp-block-quote,
.wp-block-pullquote {
  border-left: 4px solid var(--accent);
  background: var(--well);
  padding: 1rem 1.25rem;
}

.wp-block-table table,
figure.wp-block-table table {
  border-collapse: collapse;
  background: var(--surface);
}

.wp-block-table th {
  background: var(--well);
  font-family: 'Oswald', 'Archivo Black', sans-serif;
  text-align: left;
}

.wp-block-table th,
.wp-block-table td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
}

.wp-block-code,
pre {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  background: var(--well);
  border: 1px solid var(--line);
}

hr.wp-block-separator {
  border-color: var(--line);
}

/* ============================================================
   Back-to-main-site strip. The blog lives under /blog, so every
   page needs an obvious, crawlable way back into the money pages.
   ============================================================ */
.nexuswh-backlink {
  display: block;
  background: var(--dark);
  color: var(--dark-ink);
  font-family: 'Archivo', 'Golos Text', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  text-align: center;
}

.nexuswh-backlink a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* === nexuswh: dark palette and hover parity === */
/* The main site ships a dark palette and switches on data-theme="dark".
   These are its exact values, so the blog flips with it rather than
   staying stubbornly light next to a dark marketing site. */
[data-theme="dark"] {
  --bg: #0B0B0C;
  --surface: #1C1C1E;
  --well: #141416;
  --ink: #F5F5F7;
  --ink-soft: #A1A1A6;
  --line: rgba(255,255,255,.12);
  --accent: #F58220;
  --accent-deep: #D96D0E;
  --link: #F58220;
  --accent-text: #F58220;
  --line-strong: #6E6E73;
  --dark: #000000;
  --dark-ink: #F5F5F7;
  --dark-soft: #A1A1A6;
  --dark-line: rgba(255,255,255,.12);
  --sun-d: inline-flex;
  --moon-d: none;
}

[data-theme="light"] { --sun-d: none; --moon-d: inline-flex; }

/* The copied markup carries style-hover="..." attributes, which are the
   DC framework's convention and mean nothing to a browser. These rules
   reproduce the same hover states in plain CSS. */
header nav a:hover, footer a:hover { color: var(--accent-text); }
header a[href="https://wh.nexuswh.com"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245,130,32,.35);
}
header button[onclick]:hover { border-color: var(--accent); color: var(--accent-text); }

/* Give the post content the same page gutter the marketing pages use. */
.wp-site-blocks > main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px,4vw,32px); }


/* === nexuswh: render fixes on top of Twenty Twenty-Five === */
/* WordPress wraps every template part in its own <header>/<footer>
   element, which boxes the copied markup and kills its sticky
   positioning. display:contents removes the wrapper from layout while
   leaving its children exactly where they are. */
header.wp-block-template-part,
footer.wp-block-template-part { display: contents; }

/* theme.json paints the page from a fixed preset colour, so the blog
   would stay light while the rest of the domain is in dark mode. Drive
   it from the same variables the site uses instead. */
body,
.wp-site-blocks { background-color: var(--bg); color: var(--ink); }

/* Twenty Twenty-Five underlines every link. The site underlines only the
   nav item for the current section, and that one carries the underline
   inline, so it still wins over this rule. */
header nav a,
footer a { text-decoration: none; }
