/*
Theme Name: JN Marketing Ops (Block)
Theme URI: https://jerymiah.com
Author: Jerymiah Novales
Description: Block theme (Site Editor compatible) — Marketing Operations personal brand. Dark, systems-driven, monochrome. Visual editing for content; animated system card preserved as a coded pattern.
Version: 2.0.2
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jn-ops
*/

/* ==========================================================
   Tokens not covered by theme.json
   ========================================================== */
:root {
  --ink: #0a0a0a;
  --ink-2: #111113;
  --paper: #f5f5f2;
  --text-on-dark: #f4f4f4;
  --muted-on-dark: #9a9a9a;
  --muted-on-light: #6b6b6b;
  --line-dark: #232326;
  --line-light: #e3e3df;
  --yes: #4ade80;
  --no: #f87171;
  --r-card: 12px;
}
body { -webkit-font-smoothing: antialiased; }
img { height: auto; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.section--light :focus-visible { outline-color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ==========================================================
   Shared components (used inside patterns)
   ========================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px !important; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted-on-dark);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.section--light .eyebrow, .section--light.eyebrow { color: var(--muted-on-light); }

.section--light { background: var(--paper); color: #111; }
.section--light h1, .section--light h2, .section--light h3 { color: #111; }
.section--light p { color: inherit; }
.text-muted-dark { color: var(--muted-on-dark) !important; }
.text-muted-light { color: var(--muted-on-light) !important; }

/* Buttons: ghost variant via class on core button */
.is-style-ghost .wp-block-button__link,
.btn--ghost {
  background: transparent !important;
  color: var(--text-on-dark) !important;
  border: 1px solid var(--line-dark) !important;
}
.section--light .is-style-ghost .wp-block-button__link {
  color: #111 !important; border-color: var(--line-light) !important;
}
.is-style-dark .wp-block-button__link {
  background: var(--ink) !important; color: #fff !important;
}
.wp-block-button__link { transition: transform 0.15s ease, opacity 0.15s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); opacity: 0.92; }

/* Header / brand */
.site-header {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.brand-mark {
  width: 40px; height: 40px;
  border: 1px solid #3a3a3d; border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff;
  letter-spacing: -0.02em; text-decoration: none;
}
.wp-block-navigation a:hover { color: #fff !important; }

/* Footer */
.site-footer { border-top: 1px solid var(--line-dark); }
.site-footer a { color: var(--muted-on-dark); font-size: 13.5px; }
.site-footer a:hover { color: #fff; }

/* ==========================================================
   Hero system card (flowchart + metrics) — coded pattern
   ========================================================== */
.syscard { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.panel {
  background: var(--ink-2); border: 1px solid var(--line-dark);
  border-radius: var(--r-card); padding: 18px;
}
.flow { display: flex; flex-direction: column; align-items: center; }
.flow__node {
  background: #18181b; border: 1px solid #2c2c30; border-radius: 8px;
  padding: 10px 16px; text-align: center;
  font-size: 12.5px; font-weight: 600; min-width: 150px;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}
.flow__node small { display: block; font-weight: 400; color: var(--muted-on-dark); font-size: 11px; margin-top: 2px; }
.flow__line { width: 1px; height: 18px; background: #333; position: relative; }
.flow__split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.flow__split .flow { width: 100%; }
.flow__split .flow__node { min-width: 0; width: 100%; }
.flow__diamond {
  width: 64px; height: 64px; background: #18181b; border: 1px solid #2c2c30;
  transform: rotate(45deg); display: grid; place-items: center;
  margin: 6px 0; border-radius: 6px;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.flow__diamond span { transform: rotate(-45deg); font-size: 10.5px; font-weight: 600; }
.flow__branch-labels { display: flex; justify-content: space-between; width: 70%; font-size: 11px; font-weight: 700; margin: 2px 0 6px; }
.flow__branch-labels .yes { color: var(--yes); }
.flow__branch-labels .no { color: var(--no); }

.metrics { display: flex; flex-direction: column; gap: 14px; }
.metric__label { font-size: 11px; color: var(--muted-on-dark); letter-spacing: 0.04em; margin-bottom: 6px; }
.metric__big { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: #fff; }
.metric__delta { font-size: 11px; color: var(--yes); margin-left: 6px; font-weight: 600; }
.channel { display: flex; align-items: center; gap: 10px; font-size: 11.5px; margin-top: 8px; }
.channel__name { width: 88px; color: var(--muted-on-dark); }
.channel__bar { flex: 1; height: 4px; background: #232326; border-radius: 2px; overflow: hidden; }
.channel__bar i { display: block; height: 100%; background: #d4d4d8; border-radius: 2px; }
.channel__val { width: 34px; text-align: right; font-weight: 600; }
.spark, .bars { width: 100%; height: 56px; margin-top: 8px; }
.bars { display: flex; align-items: flex-end; gap: 5px; }
.bars i { flex: 1; background: #3f3f46; border-radius: 2px 2px 0 0; }

/* ==========================================================
   Section components used by patterns
   ========================================================== */
/* Services 6-up: column dividers */
.services-grid { border-right: 1px solid var(--line-dark); }
.services-grid .wp-block-column { border-left: 1px solid var(--line-dark); padding: 28px 22px; }
.services-grid svg { width: 30px; height: 30px; stroke: #fff; margin-bottom: 56px; }
.services-grid h3 { font-size: 15.5px; margin: 0 0 12px; }
.services-grid p { font-size: 13.5px; color: var(--muted-on-dark); line-height: 1.55; margin: 0; }

/* Framework / post cards */
.fw-card {
  background: #fff; border: 1px solid var(--line-light);
  border-radius: var(--r-card); padding: 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fw-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.fw-card h3 { font-size: 17px; margin: 0 0 18px; }
.fw-card__diagram {
  border: 1px solid var(--line-light); border-radius: 8px; background: #fbfbfa;
  display: grid; place-items: center; min-height: 200px;
  padding: 16px; margin-bottom: 18px; overflow: hidden;
}

.post-card, .wp-block-post-template .wp-block-post {
  background: var(--ink-2); border: 1px solid var(--line-dark);
  border-radius: var(--r-card); overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.wp-block-post-template .wp-block-post:hover { transform: translateY(-3px); border-color: #38383c; }
.wp-block-post-template .wp-block-post-featured-image { aspect-ratio: 16 / 11; margin: 0; border-bottom: 1px solid var(--line-dark); }
.wp-block-post-template .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.wp-block-post-template .wp-block-post-title { font-size: 17px; line-height: 1.35; padding: 20px 20px 0; margin: 0 0 14px; }
.wp-block-post-template .wp-block-post-title a { color: #fff; }
.wp-block-post-template .wp-block-post-date {
  padding: 0 20px 20px; display: block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-on-dark);
}
/* Light-section query loops (frameworks) */
.section--light .wp-block-post-template .wp-block-post { background: #fff; border-color: var(--line-light); }
.section--light .wp-block-post-template .wp-block-post-title a { color: #111; }

/* CTA card */
.cta-card { background: var(--paper); color: #111; border-radius: 16px; }
.cta-card h2, .cta-card h3 { color: #111; }
.cta-card .sig-name { font-family: var(--wp--preset--font-family--script); font-size: clamp(34px, 3.4vw, 46px); line-height: 1; }
.cta-card .sig-role {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted-on-light);
}
.cta-card a { font-weight: 600; }
.cta-card svg { width: 20px; height: 20px; stroke: #111; vertical-align: -4px; margin-right: 10px; }

/* Logo bar */
.logobar { border-block: 1px solid var(--line-light); }
.logobar__viewport { overflow: hidden; }
.logobar__row { display: flex; align-items: center; gap: 72px !important; }
.logo-text { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; opacity: 0.85; white-space: nowrap; margin: 0 !important; }

/* Single / entry content */
.single-content { font-size: 17px; line-height: 1.75; color: #d8d8d8; }
.single-content a { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================
   MOTION LAYER (identical behavior to classic build)
   ========================================================== */
.js .reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-group > .reveal:nth-child(2), .js .reveal-group > * > .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .reveal-group > .reveal:nth-child(3), .js .reveal-group > * > .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .reveal-group > .reveal:nth-child(4), .js .reveal-group > * > .reveal:nth-child(4) { transition-delay: 0.24s; }
.js .reveal-group > .reveal:nth-child(5), .js .reveal-group > * > .reveal:nth-child(5) { transition-delay: 0.32s; }
.js .reveal-group > .reveal:nth-child(6), .js .reveal-group > * > .reveal:nth-child(6) { transition-delay: 0.40s; }

@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.js .hero-entrance > * { animation: heroUp 0.8s cubic-bezier(0.22,1,0.36,1) both; }
.js .hero-entrance > *:nth-child(2) { animation-delay: 0.08s; }
.js .hero-entrance > *:nth-child(3) { animation-delay: 0.18s; }
.js .hero-entrance > *:nth-child(4) { animation-delay: 0.26s; }
.js .hero-entrance > *:nth-child(5) { animation-delay: 0.34s; }
.js .syscard { animation: heroUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.3s both; }

.flow__node.is-active { border-color: #6b6b72; background: #1f1f23; box-shadow: 0 0 0 1px #3a3a40, 0 0 24px rgba(255,255,255,0.06); }
.flow__node.is-active--yes { border-color: rgba(74,222,128,0.55); box-shadow: 0 0 18px rgba(74,222,128,0.12); }
.flow__node.is-active--no { border-color: rgba(248,113,113,0.5); box-shadow: 0 0 18px rgba(248,113,113,0.10); }
.flow__diamond.is-active { border-color: #6b6b72; box-shadow: 0 0 20px rgba(255,255,255,0.07); }
.js .flow__line::after {
  content: ""; position: absolute; left: 50%; top: 0;
  width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: #e4e4e7; opacity: 0;
}
.js .flow__line.is-active::after { animation: dotTravel 0.45s linear both; }
@keyframes dotTravel { 0% { opacity: 1; transform: translateY(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.js .spark polyline { stroke-dasharray: 400; stroke-dashoffset: 400; }
.js .syscard.is-visible .spark polyline { animation: sparkDraw 1.6s ease-out 0.3s forwards; }
@keyframes sparkDraw { to { stroke-dashoffset: 0; } }
.js .channel__bar i { width: 0 !important; transition: width 1s cubic-bezier(0.22,1,0.36,1); }
.js .syscard.is-visible .channel__bar i { width: var(--w) !important; }
.js .channel:nth-child(2) i { transition-delay: 0.15s; }
.js .channel:nth-child(3) i { transition-delay: 0.25s; }
.js .channel:nth-child(4) i { transition-delay: 0.35s; }
.js .channel:nth-child(5) i { transition-delay: 0.45s; }
.js .bars i { height: 0 !important; transition: height 0.8s cubic-bezier(0.22,1,0.36,1); }
.js .syscard.is-visible .bars i { height: var(--h) !important; }
.js .bars i:nth-child(1){transition-delay:.05s}.js .bars i:nth-child(2){transition-delay:.1s}.js .bars i:nth-child(3){transition-delay:.15s}.js .bars i:nth-child(4){transition-delay:.2s}.js .bars i:nth-child(5){transition-delay:.25s}.js .bars i:nth-child(6){transition-delay:.3s}.js .bars i:nth-child(7){transition-delay:.35s}.js .bars i:nth-child(8){transition-delay:.4s}.js .bars i:nth-child(9){transition-delay:.45s}

.js .logobar__row { flex-wrap: nowrap; width: max-content; animation: marquee 28s linear infinite; }
.js .logobar__row:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .js .hero-entrance > *, .js .syscard { animation: none; opacity: 1; }
  .js .spark polyline { stroke-dashoffset: 0; animation: none; }
  .js .channel__bar i { width: var(--w) !important; }
  .js .bars i { height: var(--h) !important; }
  .js .logobar__row { animation: none; width: auto; flex-wrap: wrap; }
}

/* ==========================================================
   Responsive for coded components
   ========================================================== */
@media (max-width: 1080px) {
  .services-grid .wp-block-column { border-top: 1px solid var(--line-dark); }
}
@media (max-width: 640px) {
  .syscard { grid-template-columns: 1fr; }
}

/* ==========================================================
   Validation-safe layout classes (replaces block style attrs)
   ========================================================== */
.section-pad { padding-block: clamp(72px, 9vw, 128px); }
.section-pad--bottom { padding-bottom: clamp(72px, 9vw, 128px); }
.site-header { position: sticky; top: 0; z-index: 50; padding-block: 16px; }
.site-footer { padding-block: 36px; }
.logobar { padding-block: 48px; }
.cta-card { padding: clamp(36px, 5vw, 64px); }

.hero-h1 { font-size: clamp(44px, 5.6vw, 76px); font-weight: 650; color: #fff; margin: 0; }
.hero-lede { font-size: 18px; color: var(--muted-on-dark); max-width: 46ch; }
.hero-tags {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-on-dark);
}
.hero-cta { margin-top: 40px; }
.hero-cta .wp-block-button { margin-right: 14px; }

.section-h2 { font-size: clamp(28px, 3.2vw, 44px); margin: 0; }
.intro-copy { color: var(--muted-on-dark); font-size: 15.5px; }
.section--light .intro-copy { color: var(--muted-on-light); }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; }
.mt-56 { margin-top: 56px; }

.footer-copy { font-size: 13px; color: var(--muted-on-dark); margin: 0; }
.cta-contact { margin: 0 0 18px; font-weight: 600; }
.cta-contact:last-child { margin-bottom: 0; }

.single-title { font-size: clamp(32px, 4vw, 48px); }
.post-meta-date { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-on-dark); }
