/* ══════════════════════════════════════════════════════════════
   ROCK OR BUST AI — blog theme
   Design system ported from the rockorbustai.com homepage.
   ══════════════════════════════════════════════════════════════ */

/* ════════ TOKENS ════════ */
:root {
  --paper:  #FBF4E7;
  --paper-2:#F3E9D4;
  --ink:    #16130F;
  --rock:   #17C964;
  --rock-d: #0FA850;
  --bust:   #FF4E3E;
  --grape:  #6C3BFF;
  --grape-d:#5A28F0;
  --sun:    #FFC83A;
  --grey:   #A49E90;
  --muted:  #3a352d;
  --soft:   #6b665b;
  --sh:     5px 5px 0 var(--ink);
  --sh-lg:  8px 8px 0 var(--ink);
  --bd:     2.5px solid var(--ink);
  /* Ghost custom-font settings (admin) fall back to the Rock Or Bust brand fonts */
  --font-body: var(--gh-font-body, 'Inter', sans-serif);
  --font-head: var(--gh-font-heading, 'Bricolage Grotesque', sans-serif);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--sun); color: var(--ink); }

/* dotted paper texture */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--ink) 0.9px, transparent 0.9px);
  background-size: 26px 26px; opacity: 0.05;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap--narrow { max-width: 760px; }

/* ════════ TYPE ════════ */
.display { font-family: var(--font-head); font-weight: 800; line-height: 0.98; letter-spacing: -0.02em; }
.mono { font-family: 'Space Mono', monospace; }
.eyebrow {
  font-family: 'Space Mono', monospace; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--grape);
}

/* highlighter marks */
.mark { position: relative; white-space: nowrap; z-index: 0; }
.mark::before {
  content: ""; position: absolute; left: -5px; right: -5px; bottom: 4%; height: 40%;
  background: var(--sun); z-index: -1; transform: rotate(-1.5deg); transform-origin: left center;
}
.mark--lime::before { background: var(--rock); }
.mark--coral::before { background: var(--bust); opacity: 0.9; }
.mark--grape::before { background: var(--grape); height: 34%; }
.mark--grape { color: var(--paper); }

/* ════════ BUTTONS ════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.02rem;
  padding: 14px 24px; border: var(--bd); border-radius: 14px;
  background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: var(--sh); transition: transform .08s ease, box-shadow .08s ease, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-1px,-1px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(3px,3px); box-shadow: 2px 2px 0 var(--ink); }
.btn--rock { background: var(--rock); }
.btn--grape { background: var(--grape); color: var(--paper); }
.btn--sun { background: var(--sun); }
.btn--sm { padding: 10px 18px; font-size: 0.9rem; border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
.btn--sm:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn .k { transition: transform .15s; }
.btn:hover .k { transform: translateX(3px); }

/* sticker / chip */
.sticker {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Space Mono', monospace; font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper); box-shadow: 3px 3px 0 var(--ink);
}
.sticker--rock { background: var(--rock); }
.sticker--sun { background: var(--sun); }
.sticker--grape { background: var(--grape); color: var(--paper); }

/* ════════ NAV ════════ */
.nav { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: var(--bd); }
.nav-in { max-width: 1120px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 24px; }
.logo { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; }
.logo .ai { background: var(--grape); color: var(--paper); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 7px; box-shadow: 2px 2px 0 var(--ink); transform: rotate(-3deg); }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links a.nl { font-weight: 600; font-size: 0.95rem; transition: color .15s; }
.nav-links a.nl:hover { color: var(--grape); }
.nav-links a.nl.is-active { color: var(--grape); }
.burger { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; line-height: 1; }
.burger::before { content: "\2630"; }
.burger[aria-expanded="true"]::before { content: "\2715"; }

/* ════════ PAGE SCAFFOLD ════════ */
.viewport { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1 0 auto; }
.sec { padding: 64px 0; }

/* ════════ BLOG HERO (home/archive header) ════════ */
.blog-hero { padding: 68px 0 34px; }
.blog-hero .eyebrow { margin-bottom: 16px; display: block; }
.blog-hero h1 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 0.98; letter-spacing: -0.03em;
}
.blog-hero p { font-size: 1.16rem; color: var(--muted); max-width: 54ch; margin-top: 18px; }
.blog-hero .sticker-row { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }

.archive-hero { padding: 60px 0 20px; }
.archive-hero .kicker { font-family: 'Space Mono', monospace; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grape); margin-bottom: 12px; }
.archive-hero h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.025em; line-height: 1; }
.archive-hero .lead { font-size: 1.1rem; color: var(--muted); max-width: 56ch; margin-top: 16px; }
.archive-hero .author-photo { width: 92px; height: 92px; border-radius: 16px; border: var(--bd); box-shadow: var(--sh); object-fit: cover; margin-bottom: 20px; transform: rotate(-2deg); }

/* ════════ POST GRID + CARDS ════════ */
.feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feed.is-featured { grid-template-columns: 2fr 1fr; }

.card {
  display: flex; flex-direction: column;
  border: var(--bd); border-radius: 18px; background: #fff; box-shadow: var(--sh);
  overflow: hidden; transition: transform .14s ease, box-shadow .14s ease;
  height: 100%;
}
.card:hover { transform: translate(-3px,-3px); box-shadow: var(--sh-lg); }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.card-img { position: relative; border-bottom: var(--bd); background: var(--paper-2); aspect-ratio: 16/9; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-tag {
  align-self: flex-start; font-family: 'Space Mono', monospace; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 10px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--sun);
}
.card:nth-child(3n+2) .card-tag { background: var(--rock); }
.card:nth-child(3n) .card-tag { background: var(--grape); color: var(--paper); }
.card-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.32rem; line-height: 1.12; letter-spacing: -0.01em; }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.card-excerpt { color: var(--muted); font-size: 0.98rem; line-height: 1.5; }
.card-meta { margin-top: auto; padding-top: 10px; font-family: 'Space Mono', monospace; font-size: 0.76rem; color: var(--soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-meta .bull { color: var(--grape); }
.card.no-image .card-img { display: none; }

/* Featured (first card larger) */
.feed.is-featured .card.is-lead { grid-row: span 1; }
.feed.is-featured .card.is-lead .card-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.feed.is-featured .card.is-lead .card-excerpt { font-size: 1.06rem; }

/* ════════ PAGINATION ════════ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 56px 0 8px; }
.pagination .page-info { font-family: 'Space Mono', monospace; font-size: 0.86rem; color: var(--soft); }

/* ════════ ARTICLE ════════ */
.article { padding: 52px 0 0; }
.article-head { max-width: 760px; margin: 0 auto; text-align: center; }
.article-tag {
  display: inline-flex; font-family: 'Space Mono', monospace; font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; padding: 6px 14px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--sun); box-shadow: 3px 3px 0 var(--ink); margin-bottom: 22px;
}
.article-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.03; letter-spacing: -0.03em; }
.article-excerpt { font-size: 1.24rem; line-height: 1.5; color: var(--muted); max-width: 40ch; margin: 22px auto 0; }
.article-meta { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; }
.article-meta .avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; background: var(--sun); }
.article-meta .avatar svg { width: 100%; height: 100%; }
.article-meta .m-txt { text-align: left; }
.article-meta .m-author { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.98rem; }
.article-meta .m-sub { font-family: 'Space Mono', monospace; font-size: 0.78rem; color: var(--soft); }

.article-feature { max-width: 1000px; margin: 44px auto 0; }
.article-feature figure { border: var(--bd); border-radius: 20px; overflow: hidden; box-shadow: var(--sh-lg); background: var(--paper-2); }
.article-feature img { width: 100%; }
.article-feature figcaption { font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--soft); text-align: center; padding: 12px 16px 0; }

/* ════════ ARTICLE CONTENT (Ghost / Koenig) ════════ */
.gh-content { max-width: 760px; margin: 48px auto 0; font-size: 1.12rem; line-height: 1.75; color: #211d18; }
.gh-content > * { margin-bottom: 1.5em; }
.gh-content > *:first-child { margin-top: 0; }

.gh-content h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.1; letter-spacing: -0.02em; margin-top: 1.9em; margin-bottom: 0.55em; scroll-margin-top: 90px; }
.gh-content h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.15; letter-spacing: -0.01em; margin-top: 1.6em; margin-bottom: 0.5em; scroll-margin-top: 90px; }
.gh-content h4 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.2rem; margin-top: 1.4em; margin-bottom: 0.5em; scroll-margin-top: 90px; }
.gh-content p { margin-bottom: 1.5em; }
.gh-content a { color: var(--grape-d); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; text-decoration-color: rgba(108,59,255,0.35); transition: text-decoration-color .15s; }
.gh-content a:hover { text-decoration-color: var(--grape); }
.gh-content strong { font-weight: 700; color: var(--ink); }
.gh-content em { font-style: italic; }

.gh-content ul, .gh-content ol { padding-left: 1.3em; margin-bottom: 1.5em; }
.gh-content li { margin-bottom: 0.5em; padding-left: 0.3em; }
.gh-content ul > li::marker { color: var(--rock-d); }
.gh-content ol > li::marker { color: var(--grape); font-family: 'Space Mono', monospace; font-weight: 700; }

.gh-content blockquote {
  border-left: 5px solid var(--grape); background: var(--paper-2);
  padding: 18px 24px; border-radius: 0 12px 12px 0; margin: 1.8em 0;
  font-size: 1.16rem; font-style: italic; color: var(--muted);
}
.gh-content blockquote p:last-child { margin-bottom: 0; }

.gh-content :not(pre) > code {
  font-family: 'Space Mono', monospace; font-size: 0.86em;
  background: var(--paper-2); border: 1.5px solid rgba(22,19,15,0.15);
  border-radius: 6px; padding: 2px 6px; color: var(--grape-d);
}
.gh-content pre {
  font-family: 'Space Mono', monospace; font-size: 0.92rem; line-height: 1.5;
  background: var(--ink); color: #EAFBF0; border: var(--bd); border-radius: 14px;
  box-shadow: var(--sh); padding: 20px 22px; overflow-x: auto; margin: 1.8em 0;
}
.gh-content pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

.gh-content hr { border: none; border-top: var(--bd); margin: 2.4em 0; }

/* Koenig image cards + figures */
.gh-content figure { margin: 2em 0; }
.gh-content img, .gh-content .kg-image { width: 100%; border: var(--bd); border-radius: 16px; box-shadow: var(--sh); background: var(--paper-2); }
.gh-content figcaption { font-family: 'Space Mono', monospace; font-size: 0.8rem; color: var(--soft); text-align: center; padding-top: 12px; }
.gh-content figcaption a { color: var(--soft); }

/* Koenig width breakouts */
.gh-content .kg-width-wide { max-width: 1000px; margin-left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full { max-width: 1200px; margin-left: 50%; transform: translateX(-50%); }
.gh-content .kg-width-full img { border-radius: 18px; }

/* Koenig callout / button / bookmark inherit reasonable defaults; brand the callout */
.gh-content .kg-callout-card { border: var(--bd); border-radius: 14px; box-shadow: var(--sh); padding: 18px 20px; }
.gh-content .kg-button-card a.kg-btn { background: var(--grape); color: var(--paper); border: var(--bd); border-radius: 12px; box-shadow: var(--sh); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; }

/* Drop cap off by default; keep readable */

/* ════════ IN-ARTICLE CTA ════════ */
.post-cta { max-width: 760px; margin: 56px auto 0; }
.post-cta-card { border: var(--bd); border-radius: 20px; background: var(--rock); box-shadow: var(--sh-lg); padding: 40px 36px; text-align: center; }
.post-cta-card h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 12px; }
.post-cta-card p { color: #0c3d22; font-weight: 500; max-width: 44ch; margin: 0 auto 26px; }
.post-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* author box */
.post-author { max-width: 760px; margin: 44px auto 0; display: flex; gap: 18px; align-items: center; border-top: var(--bd); padding-top: 32px; }
.post-author img, .post-author .avatar { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; background: var(--sun); flex-shrink: 0; }
.post-author .pa-name { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.1rem; }
.post-author .pa-bio { color: var(--muted); font-size: 0.96rem; }

/* read more */
.readmore { padding: 72px 0 8px; border-top: var(--bd); margin-top: 72px; }
.readmore .rm-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.8rem; letter-spacing: -0.02em; margin-bottom: 28px; }

/* ════════ NEWSLETTER BLOCK ════════ */
.news { border-top: var(--bd); border-bottom: var(--bd); background: var(--sun); }
.news-in { max-width: 760px; margin: 0 auto; padding: 64px 32px; }
.news .eyebrow { color: var(--ink); }
.news h2 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.025em; line-height: 1.02; margin: 12px 0 12px; }
.news p.sub { font-size: 1.1rem; color: #43391b; max-width: 52ch; margin-bottom: 22px; }
.news ul { list-style: none; margin: 0 0 24px; padding: 0; max-width: 56ch; }
.news ul li { padding: 9px 0; border-bottom: 2px solid rgba(22,19,15,0.14); font-weight: 500; }
.news ul li::before { content: "→ "; font-family: 'Space Mono', monospace; font-weight: 700; color: var(--grape); }
.news .form-label { display: block; font-family: 'Space Mono', monospace; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #43391b; margin-bottom: 14px; }
.news .form-note { font-family: 'Space Mono', monospace; font-size: 0.76rem; color: #6b5c2e; margin-top: 12px; }

/* AWeber form — brand overrides */
#af-form-2075163171 { max-width: 480px; }
#af-form-2075163171 .af-body input[type="text"],
#af-form-2075163171 .af-body input[type="email"] {
  font-family: 'Inter', sans-serif !important; font-size: 1rem !important;
  background: #fff !important; border: var(--bd) !important; border-radius: 12px !important;
  padding: 13px 16px !important; color: var(--ink) !important; width: 100% !important;
  outline: none !important; box-shadow: 3px 3px 0 var(--ink) !important; margin-bottom: 10px !important;
}
#af-form-2075163171 input[type="submit"],
#af-form-2075163171 .af-submit button {
  background: var(--grape) !important; color: var(--paper) !important;
  font-family: 'Bricolage Grotesque', sans-serif !important; font-size: 1rem !important; font-weight: 700 !important;
  border: var(--bd) !important; border-radius: 12px !important; padding: 13px 26px !important;
  cursor: pointer !important; box-shadow: var(--sh) !important; transition: transform .1s, box-shadow .1s !important; margin-top: 4px !important;
}
#af-form-2075163171 input[type="submit"]:hover,
#af-form-2075163171 .af-submit button:hover { transform: translate(-1px,-1px) !important; box-shadow: 7px 7px 0 var(--ink) !important; }
#af-form-2075163171 .af-header, #af-form-2075163171 .af-privacy { display: none !important; }

/* ════════ FOOTER ════════ */
.footer { border-top: var(--bd); background: var(--ink); color: var(--paper); padding: 54px 0 40px; }
.footer a { color: var(--paper); }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 40px; }
.footer-logo { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 1.3rem; }
.footer-logo .ai { background: var(--grape); border: 2px solid var(--paper); border-radius: 8px; padding: 1px 7px; }
.footer-tag { font-family: 'Space Mono', monospace; font-size: 0.86rem; color: #bdb6a6; margin-top: 12px; max-width: 34ch; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 0.92rem; color: #d9d2c2; transition: color .15s; }
.footer-links a:hover { color: var(--sun); }
.footer-legal { border-top: 1px solid #33302a; padding-top: 22px; font-family: 'Space Mono', monospace; font-size: 0.78rem; color: #8f897c; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ════════ ERROR ════════ */
.err { text-align: center; padding: 120px 0; }
.err h1 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: clamp(3rem, 10vw, 7rem); line-height: 0.9; letter-spacing: -0.04em; }
.err .bust { color: var(--bust); }
.err p { font-size: 1.15rem; color: var(--muted); margin: 18px 0 30px; }

/* ════════ LIGHTBOX ════════ */
.robx-lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(22,19,15,0.9); padding: 32px; cursor: zoom-out; }
.robx-lightbox.open { display: flex; }
.robx-lightbox img { max-width: 94vw; max-height: 90vh; width: auto; border: var(--bd); border-radius: 14px; box-shadow: var(--sh-lg); background: var(--paper); }

/* ════════ RESPONSIVE ════════ */
@media (max-width: 900px) {
  .feed { grid-template-columns: repeat(2, 1fr); }
  .feed.is-featured { grid-template-columns: 1fr; }
  .gh-content .kg-width-wide, .gh-content .kg-width-full { max-width: 100%; margin-left: 0; transform: none; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: var(--bd); padding: 8px 32px 20px; }
  .nav-links.open { display: flex; }
  .nav-links a.nl { padding: 14px 0; border-bottom: 2px solid var(--paper-2); }
  .nav-links .btn { margin-top: 14px; }
  .burger { display: inline-flex; margin-left: auto; }
  .feed { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .post-cta-row .btn { width: 100%; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 20px; } .nav-in { padding: 12px 20px; } .news-in { padding: 48px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
