/*
Theme Name: RSJ Digital
Theme URI: https://rsjdigital.co
Author: RSJ Digital
Author URI: https://rsjdigital.co
Description: One-page brochure theme for RSJ Digital — Digital Design & Automation Solutions. A faithful WordPress port of the RSJ one-pager, with editable contact/CTA links in the Customizer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: rsj-digital
*/

:root{
  --paper:#EFF1EC;
  --paper-alt:#E3E7DF;
  --ink:#16233E;
  --ink-soft:#3E4E68;
  --accent:#E8A33D;
  --accent-soft:#F3C784;
  --teal:#2F6F76;
  --line:#C7CDC5;
  --white:#FBFAF7;
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--body);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{ font-family:var(--display); color:var(--ink); line-height:1.1; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
img,svg{ display:block; max-width:100%; }
section{ padding:96px 24px; }

a:focus-visible, button:focus-visible{
  outline:2px solid var(--teal);
  outline-offset:3px;
  border-radius:2px;
}

.eyebrow{
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:0.14em;
  color:var(--teal);
  text-transform:uppercase;
  margin-bottom:14px;
}
.eyebrow.center{ text-align:center; }
.eyebrow.on-dark{ color:var(--accent-soft); }

.btn{
  display:inline-block;
  font-family:var(--body);
  font-weight:600;
  font-size:15px;
  padding:13px 26px;
  border-radius:3px;
  transition:transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary{
  background:var(--accent);
  color:var(--ink);
}
.btn-primary:hover{ transform:translateY(-1px); box-shadow:0 4px 14px rgba(232,163,61,0.35); }
.btn-ghost{
  background:transparent;
  color:var(--white);
  border:1px solid rgba(251,250,247,0.4);
}
.btn-ghost:hover{ border-color:var(--white); }
.btn-ghost.on-light{
  color:var(--ink);
  border:1px solid var(--ink-soft);
}
.btn-ghost.on-light:hover{ border-color:var(--ink); }

/* ---------- Header ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(239,241,236,0.9);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:1120px;
  margin:0 auto;
  padding:18px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.logo{
  font-family:var(--display);
  font-weight:600;
  font-size:18px;
  letter-spacing:0.01em;
}
.logo-dot{ color:var(--accent); }
.header-inner .btn-primary{ padding:10px 20px; font-size:14px; }

/* ---------- Hero ---------- */
.hero{
  background:var(--ink);
  position:relative;
  overflow:hidden;
  padding:88px 24px 72px;
  background-image:
    repeating-linear-gradient(0deg, rgba(251,250,247,0.045) 0px, rgba(251,250,247,0.045) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(90deg, rgba(251,250,247,0.045) 0px, rgba(251,250,247,0.045) 1px, transparent 1px, transparent 40px);
}
.hero-inner{
  max-width:1120px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  gap:48px;
  align-items:center;
}
.hero-copy h1{
  font-size:clamp(34px, 5vw, 54px);
  color:var(--white);
  margin-bottom:20px;
}
.hero-sub{
  color:rgba(251,250,247,0.78);
  font-size:17px;
  max-width:46ch;
  margin-bottom:32px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.hero-diagram{ width:100%; }
.hero-diagram svg{ width:100%; height:auto; }

.node-circle{ fill:var(--white); }
.hub-circle{ fill:var(--accent); }
.node-label{
  font-family:var(--mono);
  font-size:13px;
  fill:rgba(251,250,247,0.75);
  text-anchor:middle;
  letter-spacing:0.05em;
}
.hub-label{
  font-family:var(--display);
  font-weight:700;
  font-size:22px;
  fill:var(--ink);
  text-anchor:middle;
  dominant-baseline:middle;
}
.wire{
  fill:none;
  stroke:rgba(251,250,247,0.55);
  stroke-width:2;
  stroke-dasharray:100;
  stroke-dashoffset:0;
}
.hub-ring{
  fill:none;
  stroke:var(--accent);
  stroke-width:1.5;
  opacity:0;
}

@media (prefers-reduced-motion: no-preference){
  .wire{ stroke-dashoffset:100; animation:draw-wire 1.1s ease forwards; }
  .wire-1{ animation-delay:0.15s; }
  .wire-2{ animation-delay:0.4s; }
  .wire-3{ animation-delay:0.65s; }
  .hub-circle, .hub-label{ opacity:0; animation:fade-in 0.5s ease forwards; animation-delay:1.0s; }
  .hub-ring{ animation:pulse-ring 2.6s ease-out infinite; animation-delay:1.4s; }
  @keyframes draw-wire{ to{ stroke-dashoffset:0; } }
  @keyframes fade-in{ to{ opacity:1; } }
  @keyframes pulse-ring{
    0%{ opacity:0.55; stroke-width:1.5; transform-origin:300px 260px; transform:scale(1); }
    100%{ opacity:0; stroke-width:0.5; transform-origin:300px 260px; transform:scale(1.5); }
  }
}

/* ---------- About strip ---------- */
.about-strip{
  max-width:760px;
  margin:0 auto;
  text-align:center;
  padding:64px 24px;
}
.about-strip p{
  font-family:var(--display);
  font-size:clamp(19px, 2.6vw, 24px);
  color:var(--ink-soft);
}

/* ---------- Services ---------- */
.services{ max-width:1120px; margin:0 auto; }
.services h2, .process h2{
  text-align:center;
  font-size:clamp(26px, 3.6vw, 36px);
  margin-bottom:52px;
}
.service-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:28px;
}
.service-card{
  position:relative;
  background:var(--paper-alt);
  padding:32px 26px 30px;
  border-radius:2px;
}
.service-card::before, .service-card::after,
.service-card .corner-tl, .service-card .corner-br{
  content:"";
  position:absolute;
  width:14px;
  height:14px;
}
.service-card::before{
  top:10px; left:10px;
  border-top:2px solid var(--teal);
  border-left:2px solid var(--teal);
}
.service-card::after{
  bottom:10px; right:10px;
  border-bottom:2px solid var(--teal);
  border-right:2px solid var(--teal);
}
.spec{
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:0.12em;
  color:var(--teal);
  margin-bottom:10px;
}
.service-card h3{ font-size:21px; margin-bottom:10px; }
.service-desc{ color:var(--ink-soft); font-size:14.5px; margin-bottom:18px; }
.service-card ul li{
  font-size:14.5px;
  color:var(--ink);
  padding:7px 0;
  border-top:1px solid var(--line);
}
.service-card ul li:first-child{ border-top:none; }

/* ---------- Flagship ---------- */
.flagship{ background:var(--ink); }
.flagship-inner{
  max-width:720px;
  margin:0 auto;
  text-align:center;
}
.flagship-inner .eyebrow{ justify-content:center; display:flex; }
.flagship-inner h2{ color:var(--white); font-size:clamp(26px,3.6vw,36px); margin-bottom:18px; }
.flagship-inner p{ color:rgba(251,250,247,0.78); margin-bottom:30px; font-size:16px; }

/* ---------- Process ---------- */
.process{ max-width:1120px; margin:0 auto; }
.process-row{
  display:grid;
  grid-template-columns:1fr auto 1fr auto 1fr;
  align-items:start;
  gap:8px;
}
.process-step{ text-align:center; padding:0 8px; }
.step-num{
  font-family:var(--mono);
  color:var(--accent);
  font-size:13px;
  letter-spacing:0.1em;
  margin-bottom:10px;
}
.process-step h3{ font-size:19px; margin-bottom:8px; }
.process-step p{ color:var(--ink-soft); font-size:14.5px; }
.process-connector{
  position:relative;
  height:2px;
  background:var(--line);
  margin-top:32px;
  width:60px;
}
.process-connector::before, .process-connector::after{
  content:"";
  position:absolute;
  top:-4px;
  width:2px;
  height:10px;
  background:var(--line);
}
.process-connector::before{ left:0; }
.process-connector::after{ right:0; }

/* ---------- Contact ---------- */
.contact{
  max-width:680px;
  margin:0 auto;
  text-align:center;
}
.contact h2{ font-size:clamp(26px,3.6vw,34px); margin-bottom:14px; }
.contact p{ color:var(--ink-soft); margin-bottom:30px; }
.contact-actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

/* ---------- Footer ---------- */
.site-footer{
  text-align:center;
  padding:32px 24px 40px;
  color:var(--ink-soft);
  font-size:13px;
}
.footer-year{ margin-top:6px; opacity:0.7; }

/* ---------- Responsive ---------- */
@media (max-width:880px){
  .hero-inner{ grid-template-columns:1fr; }
  .hero-diagram{ order:-1; max-width:420px; margin:0 auto 8px; }
  .service-grid{ grid-template-columns:1fr; }
  .process-row{ grid-template-columns:1fr; }
  .process-connector{
    width:2px;
    height:34px;
    margin:6px auto;
  }
  .process-connector::before, .process-connector::after{
    left:-4px; top:auto; width:10px; height:2px;
  }
  .process-connector::before{ top:0; }
  .process-connector::after{ bottom:0; top:auto; }
}
@media (max-width:520px){
  section{ padding:64px 20px; }
  .hero{ padding-top:64px; }
  .header-inner .btn-primary{ padding:9px 16px; font-size:13px; }
}

/* ---------- WP admin bar offset (logged-in only) ---------- */
body.admin-bar .site-header{ top:32px; }
@media screen and (max-width:782px){
  body.admin-bar .site-header{ top:46px; }
}

/* ============================================================
   BLOG / MULTI-PAGE  (added in v1.1)
   ============================================================ */

.screen-reader-text{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ---------- Header nav ---------- */
.header-right{ display:flex; align-items:center; gap:26px; }
.site-nav .menu{ display:flex; align-items:center; gap:22px; }
.site-nav a{
  font-family:var(--body);
  font-size:14.5px;
  font-weight:500;
  color:var(--ink-soft);
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a{ color:var(--ink); }

/* ---------- Section page header (dark band) ---------- */
.page-header{
  background:var(--ink);
  text-align:center;
  padding:72px 24px 60px;
}
.page-header h1,
.page-header .page-title{
  color:var(--white);
  font-size:clamp(28px, 4vw, 42px);
  max-width:22ch;
  margin:0 auto;
}
.archive-desc{
  color:rgba(251,250,247,0.72);
  font-size:15px;
  max-width:52ch;
  margin:16px auto 0;
}

/* ---------- Main content wrapper ---------- */
.site-main{
  max-width:1120px;
  margin:0 auto;
  padding:72px 24px 96px;
}

/* ---------- Post grid + cards ---------- */
.post-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:28px;
}
.post-card{
  display:flex;
  flex-direction:column;
  background:var(--paper-alt);
  border-radius:2px;
  overflow:hidden;
}
.post-card__thumb{ display:block; }
.post-card__thumb img{
  width:100%;
  height:200px;
  object-fit:cover;
}
.post-card__body{
  display:flex;
  flex-direction:column;
  flex:1;
  padding:24px 24px 26px;
}
.post-meta{
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:var(--teal);
  margin-bottom:12px;
}
.post-meta a{ color:var(--teal); }
.post-meta a:hover{ color:var(--ink); }
.post-card__body h3{
  font-size:21px;
  line-height:1.22;
  margin-bottom:10px;
}
.post-card__body h3 a:hover{ color:var(--teal); }
.post-card__excerpt{
  color:var(--ink-soft);
  font-size:14.5px;
  margin-bottom:18px;
}
.read-more{
  margin-top:auto;
  font-family:var(--body);
  font-weight:600;
  font-size:14px;
  color:var(--teal);
}
.read-more:hover{ color:var(--ink); }
.read-more .arrow{ transition:transform 0.15s ease; display:inline-block; }
.read-more:hover .arrow{ transform:translateX(3px); }

/* ---------- Single post / page ---------- */
.entry{ max-width:720px; margin:0 auto; }
.entry-header{ text-align:center; margin-bottom:34px; }
.entry-title{
  font-size:clamp(28px, 4vw, 44px);
  margin-top:12px;
}
.entry-featured{ margin:0 0 40px; }
.entry-featured img{ width:100%; border-radius:2px; }

.entry-content{ font-size:16.5px; }
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content figure,
.entry-content pre,
.entry-content blockquote,
.entry-content table{ margin-bottom:22px; }
.entry-content > *:last-child{ margin-bottom:0; }
.entry-content h2{ font-size:27px; margin-top:44px; margin-bottom:8px; }
.entry-content h3{ font-size:21px; margin-top:34px; margin-bottom:6px; }
.entry-content h4{ font-size:18px; margin-top:28px; margin-bottom:6px; }
.entry-content a{
  color:var(--teal);
  text-decoration:underline;
  text-underline-offset:2px;
}
.entry-content a:hover{ color:var(--ink); }
.entry-content ul{ list-style:disc; padding-left:22px; }
.entry-content ol{ list-style:decimal; padding-left:22px; }
.entry-content li{ margin-top:8px; }
.entry-content blockquote{
  border-left:3px solid var(--accent);
  padding:2px 0 2px 22px;
  font-family:var(--display);
  font-size:20px;
  line-height:1.4;
  color:var(--ink-soft);
}
.entry-content img{ border-radius:2px; height:auto; }
.entry-content figcaption{
  font-size:13px;
  color:var(--ink-soft);
  text-align:center;
  margin-top:8px;
}
.entry-content code{
  font-family:var(--mono);
  font-size:0.9em;
  background:var(--paper-alt);
  padding:2px 6px;
  border-radius:3px;
}
.entry-content pre{
  background:var(--ink);
  color:var(--white);
  padding:20px 22px;
  border-radius:3px;
  overflow:auto;
  font-family:var(--mono);
  font-size:14px;
  line-height:1.6;
}
.entry-content pre code{ background:none; padding:0; color:inherit; }
.entry-content hr{
  border:0;
  border-top:1px solid var(--line);
  margin:36px 0;
}
.entry-content table{ width:100%; border-collapse:collapse; font-size:15px; }
.entry-content th, .entry-content td{
  border:1px solid var(--line);
  padding:10px 12px;
  text-align:left;
}
.entry--page{ max-width:720px; margin:0 auto; }

.entry-footer{
  max-width:720px;
  margin:40px auto 0;
  padding-top:22px;
  border-top:1px solid var(--line);
}
.tag-list{
  font-family:var(--mono);
  font-size:12px;
  letter-spacing:0.06em;
}
.tag-list a{
  display:inline-block;
  color:var(--teal);
  border:1px solid var(--line);
  border-radius:3px;
  padding:5px 11px;
  margin:0 6px 6px 0;
}
.tag-list a:hover{ border-color:var(--teal); color:var(--ink); }

/* ---------- Prev / next ---------- */
.post-nav{
  max-width:720px;
  margin:48px auto 0;
  padding-top:28px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:20px;
}
.post-nav a{
  font-family:var(--body);
  font-weight:600;
  font-size:14.5px;
  color:var(--ink-soft);
}
.post-nav a:hover{ color:var(--ink); }
.post-nav .nav-next{ text-align:right; margin-left:auto; }

/* ---------- Pagination ---------- */
.pagination{ margin-top:56px; }
.pagination .nav-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  align-items:center;
}
.pagination .page-numbers{
  font-family:var(--mono);
  font-size:14px;
  padding:8px 13px;
  border:1px solid var(--line);
  border-radius:3px;
  color:var(--ink-soft);
}
.pagination a.page-numbers:hover{ border-color:var(--ink); color:var(--ink); }
.pagination .page-numbers.current{
  background:var(--ink);
  border-color:var(--ink);
  color:var(--white);
}

/* ---------- Search form ---------- */
.search-form{
  display:flex;
  gap:8px;
  max-width:440px;
}
.search-field{
  flex:1;
  padding:11px 14px;
  border:1px solid var(--line);
  border-radius:3px;
  background:var(--white);
  color:var(--ink);
  font-family:var(--body);
  font-size:15px;
}
.search-field:focus{ outline:2px solid var(--teal); outline-offset:1px; }
.search-submit{ cursor:pointer; border:none; }

/* ---------- No results / 404 ---------- */
.no-results,
.error-404{
  max-width:560px;
  margin:0 auto;
  text-align:center;
  color:var(--ink-soft);
}
.no-results .search-form,
.error-404 .search-form{ margin:24px auto 0; justify-content:center; }
.error-404__home{ margin-top:26px; }

/* ---------- Comments ---------- */
.comments-area{
  max-width:720px;
  margin:64px auto 0;
  padding-top:44px;
  border-top:1px solid var(--line);
}
.comments-title{ font-size:22px; margin-bottom:28px; }
.comment-list{ list-style:none; }
.comment-list ol.children{ list-style:none; margin-left:26px; }
.comment-list li{ margin-bottom:24px; }
.comment-body{
  background:var(--paper-alt);
  border-radius:2px;
  padding:18px 20px;
}
.comment-author{ font-family:var(--display); font-size:15px; }
.comment-author .fn{ font-weight:600; }
.comment-author .avatar{ border-radius:50%; margin-right:10px; vertical-align:middle; }
.comment-metadata{
  font-family:var(--mono);
  font-size:12px;
  color:var(--teal);
  margin:4px 0 10px;
}
.comment-metadata a{ color:var(--teal); }
.comment-content{ font-size:15px; color:var(--ink); }
.comment-content p{ margin-bottom:12px; }
.reply{ font-size:13px; font-weight:600; margin-top:8px; }
.reply a{ color:var(--teal); }
.reply a:hover{ color:var(--ink); }

.comment-respond{ margin-top:36px; }
.comment-reply-title{ font-size:20px; margin-bottom:16px; }
.comment-form label{
  display:block;
  font-size:13px;
  font-weight:600;
  color:var(--ink-soft);
  margin-bottom:6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea{
  width:100%;
  padding:11px 14px;
  border:1px solid var(--line);
  border-radius:3px;
  background:var(--white);
  color:var(--ink);
  font-family:var(--body);
  font-size:15px;
  margin-bottom:16px;
}
.comment-form input:focus,
.comment-form textarea:focus{ outline:2px solid var(--teal); outline-offset:1px; }
.comment-form .form-submit .submit{
  cursor:pointer;
  border:none;
  font-family:var(--body);
  font-weight:600;
  font-size:15px;
  padding:13px 26px;
  border-radius:3px;
  background:var(--accent);
  color:var(--ink);
}
.comment-form .form-submit .submit:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(232,163,61,0.35);
}
.no-comments{ color:var(--ink-soft); font-size:14px; }

.page-links{ font-family:var(--mono); font-size:13px; margin-top:20px; }
.page-links a, .page-links > span{
  display:inline-block;
  padding:4px 10px;
  border:1px solid var(--line);
  border-radius:3px;
  margin:0 4px;
}

/* ---------- Blog responsive ---------- */
@media (max-width:760px){
  .post-grid{ grid-template-columns:1fr; }
}
@media (max-width:700px){
  .header-inner{ flex-wrap:wrap; gap:10px 18px; }
  .header-right{ gap:16px; }
  .site-nav .menu{ gap:16px; }
  .site-main{ padding:56px 20px 72px; }
  .post-nav{ flex-direction:column; }
  .post-nav .nav-next{ text-align:left; margin-left:0; }
}
