/* ══════════════════════════════════════════════════
   DISPATCH DOSSIER — Single Post Stylesheet
   ──────────────────────────────────────────────────
   Enqueue via functions.php on single posts only.
   Requires sitewide CSS providing --ss-* vars.
   No !important needed — we own the markup.
══════════════════════════════════════════════════ */

:root {
  --ss-orange-dim: rgba(255, 111, 0, 0.15);
}


/* ── Reading progress ── */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: var(--ss-orange);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(255,111,0,0.4);
}


/* ══════════════════════════════════════════════════
   POST HERO
══════════════════════════════════════════════════ */
.post-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 80px);
  background: var(--ss-bg);
}

/* Blurred featured image background */
.post-hero__bg {
  position: absolute;
  inset: -20px; /* bleed past edges to hide blur fringe */
  z-index: 0;
}

.post-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px);
  transform: scale(1.05); /* extra coverage for blur edges */
}

/* Dark overlay */
.post-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0.7) 0%,
    rgba(34, 34, 34, 0.85) 100%
  );
}

/* Subtle radial glow — only on posts without an image */
.post-hero:not(.post-hero--has-image)::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 80%; height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center,
    rgba(255,111,0,0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.post-hero__inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Corner brackets */
.post-hero__corner {
  position: absolute;
  width: 28px; height: 28px;
  pointer-events: none; z-index: 3;
}

.post-hero__corner--tl {
  top: 16px; left: 16px;
  border-top: 1.5px solid rgba(255,111,0,0.25);
  border-left: 1.5px solid rgba(255,111,0,0.25);
}

.post-hero__corner--br {
  bottom: 16px; right: 16px;
  border-bottom: 1.5px solid rgba(255,111,0,0.25);
  border-right: 1.5px solid rgba(255,111,0,0.25);
}

/* Meta row */
.post-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.post-hero__tag {
  background: rgba(40,180,40,0.12);
  border: 1px solid rgba(80,255,80,0.15);
  padding: 4px 14px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(80,255,80,0.6);
  text-decoration: none;
  transition: color 0.3s, border-color 0.3s;
}

.post-hero__tag:hover {
  color: rgba(80,255,80,0.8);
  border-color: rgba(80,255,80,0.3);
}

.post-hero__date {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ss-dim);
}

.post-hero__stamp {
  font-family: 'Special Elite', cursive;
  font-size: 10px;
  color: rgba(220,60,60,0.5);
  border: 1px solid rgba(220,60,60,0.25);
  padding: 2px 10px;
  transform: rotate(2deg);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: auto;
  display: inline-block;
}

/* Title */
.post-hero__title {
  font-size: clamp(26px, 4.5vw, 48px);
  line-height: 1.1;
  color: var(--ss-text);
  letter-spacing: 0.01em;
  margin: 0;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}


/* ══════════════════════════════════════════════════
   DOCUMENT FRAME
══════════════════════════════════════════════════ */
.post-frame {
  background: var(--ss-bg-deep);
  position: relative;
}

.post-frame__wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 80px);
  position: relative;
}

.post-frame__wrap--bar {
  padding-bottom: 0;
}

/* Faint left margin rule */
.post-frame__wrap::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: clamp(16px, 4vw, 48px);
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,111,0,0.06) 10%,
    rgba(255,111,0,0.06) 90%,
    transparent
  );
  pointer-events: none;
}

/* Only show the margin rule on the main content wrap */
.post-frame__wrap--bar::before {
  display: none;
}

/* Classification bar */
.post-frame__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--ss-orange-dim);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ss-dim);
  max-width: 680px;
  margin: 0 auto;
}

.post-frame__bar-id {
  color: var(--ss-orange);
  opacity: 0.5;
}


/* ══════════════════════════════════════════════════
   POST BODY
══════════════════════════════════════════════════ */
.post-body {
  max-width: 680px;
  margin: 0 auto;
}

/* Paragraphs */
.post-body p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--ss-muted);
  margin-bottom: 28px;
}

.post-body p strong {
  color: var(--ss-text);
  font-weight: normal;
}

.post-body p em {
  color: var(--ss-text);
}

/* Drop cap */
.post-body > p:first-of-type::first-letter {
  font-size: 4.2em;
  float: left;
  line-height: 0.75;
  margin: 6px 14px 0 0;
  color: var(--ss-orange);
}

/* H2 */
.post-body h2 {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.1;
  margin: 56px 0 20px;
  position: relative;
  padding-left: 24px;
}

.post-body h2::before {
  content: '';
  position: absolute;
  top: 4px; left: 0;
  width: 3px; height: calc(100% - 8px);
  background: var(--ss-orange);
}

.post-body h2::after {
  content: '';
  position: absolute;
  top: 4px; left: 7px;
  width: 1px; height: calc(100% - 8px);
  background: var(--ss-orange-dim);
}

/* H3 */
.post-body h3 {
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 44px 0 16px;
}

/* Blockquote */
.post-body blockquote {
  position: relative;
  padding: 28px 0 28px 32px;
  margin: 40px 0;
  font-family: 'Special Elite', cursive;
  font-size: clamp(18px, 2.6vw, 24px);
  line-height: 1.55;
  color: var(--ss-text);
  border: none;
}

.post-body blockquote::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--ss-orange);
}

.post-body blockquote::after {
  content: '';
  position: absolute; top: 0; left: 8px;
  width: 1px; height: 100%;
  background: var(--ss-orange-dim);
}

.post-body blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ss-dim);
  font-style: normal;
}

/* Lists — diamond bullets */
.post-body ul,
.post-body ol {
  margin: 20px 0 28px 0;
  padding-left: 0;
  list-style: none;
}

.post-body li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ss-muted);
}

.post-body ul li::before {
  content: '';
  position: absolute;
  top: 9px; left: 4px;
  width: 6px; height: 6px;
  border: 1px solid var(--ss-orange);
  transform: rotate(45deg);
}

.post-body ol {
  counter-reset: ss-counter;
}

.post-body ol li {
  counter-increment: ss-counter;
}

.post-body ol li::before {
  content: counter(ss-counter, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-size: 11px;
  color: var(--ss-orange);
  letter-spacing: 0.05em;
}

/* Inline code */
.post-body code {
  background: rgba(255,111,0,0.06);
  border: 1px solid rgba(255,111,0,0.1);
  padding: 2px 8px;
  font-size: 13px;
  color: var(--ss-orange);
}

/* Code blocks */
.post-body pre {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--ss-border);
  padding: 20px 24px;
  margin: 28px 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--ss-text);
}

/* Images in content */
.post-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 32px 0;
  border: 1px solid var(--ss-border);
}

/* WordPress image classes */
.post-body .wp-block-image {
  margin: 32px 0;
}

.post-body .wp-block-image figcaption {
  font-size: 11px;
  color: var(--ss-dim);
  letter-spacing: 0.08em;
  margin-top: 8px;
  text-align: center;
}

/* HR — deco diamond */
.post-body hr,
.post-body .wp-block-separator {
  border: none;
  height: 0;
  margin: 48px 0;
  position: relative;
  background: none;
}

.post-body hr::before,
.post-body .wp-block-separator::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ss-orange-dim), transparent);
}

.post-body hr::after,
.post-body .wp-block-separator::after {
  content: '';
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  border: 1px solid rgba(255,111,0,0.25);
  transform: translateX(-50%) rotate(45deg);
  background: var(--ss-bg-deep);
}

/* WordPress embed blocks */
.post-body .wp-block-embed {
  margin: 32px 0;
}

.post-body .wp-block-embed__wrapper {
  position: relative;
  padding-top: 56.25%;
}

.post-body .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 1px solid var(--ss-border);
}


/* ══════════════════════════════════════════════════
   POST FOOTER (tags + author)
══════════════════════════════════════════════════ */
.post-footer {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 20px;
}

/* Tags */
.post-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.post-tags__label {
  font-family: 'Special Elite', cursive;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ss-dim);
}

.post-tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ss-dim);
  border: 1px solid var(--ss-border);
  text-decoration: none;
  transition: color 0.3s, border-color 0.3s;
}

.post-tag:hover {
  color: var(--ss-orange);
  border-color: rgba(255,111,0,0.35);
}

/* Author card */
.post-author-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.post-author {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--ss-orange-dim);
  padding: 28px;
  position: relative;
}

.post-author::before,
.post-author::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  pointer-events: none;
}

.post-author::before {
  top: -1px; left: -1px;
  border-top: 1.5px solid var(--ss-orange);
  border-left: 1.5px solid var(--ss-orange);
}

.post-author::after {
  bottom: -1px; right: -1px;
  border-bottom: 1.5px solid var(--ss-orange);
  border-right: 1.5px solid var(--ss-orange);
}

.post-author__avatar {
  width: 64px; height: 64px;
  min-width: 64px;
  flex-shrink: 0;
  border: 1px solid var(--ss-border);
  overflow: hidden;
}

.post-author__avatar img,
.post-author__avatar-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.post-author__eyebrow {
  font-family: 'Special Elite', cursive;
  font-size: 10px;
  color: var(--ss-dim);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.post-author__name {
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.1;
  margin-bottom: 10px;
}

.post-author__bio {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ss-muted);
}


/* ══════════════════════════════════════════════════
   POST NAVIGATION
══════════════════════════════════════════════════ */
.post-nav {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px) clamp(48px, 6vw, 80px);
}

.post-nav__rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ss-orange-dim), transparent);
  margin-bottom: 40px;
}

.post-nav__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.post-nav__link {
  display: block;
  padding: 20px 24px;
  border: 1px solid var(--ss-border);
  background: rgba(0,0,0,0.1);
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s;
}

.post-nav__link:hover {
  border-color: rgba(255,111,0,0.3);
  transform: translateY(-2px);
}

.post-nav__link--next {
  text-align: right;
}

.post-nav__direction {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Special Elite', cursive;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ss-dim);
  margin-bottom: 8px;
}

.post-nav__link--next .post-nav__direction {
  justify-content: flex-end;
}

.post-nav__title {
  font-size: 16px;
  line-height: 1.25;
  color: var(--ss-text);
  transition: color 0.3s;
}

.post-nav__link:hover .post-nav__title {
  color: var(--ss-orange);
}


/* ── Back link ── */
.post-back {
  text-align: center;
  padding-bottom: clamp(48px, 6vw, 80px);
}

.post-back a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ss-dim);
  padding: 14px 36px;
  border: 1px solid var(--ss-border);
  transition: color 0.3s, border-color 0.3s;
  text-decoration: none;
}

.post-back a:hover {
  color: var(--ss-orange);
  border-color: rgba(255,111,0,0.35);
}


/* ══════════════════════════════════════════════════
   COMMENTS
══════════════════════════════════════════════════ */
.post-comments-section {
  background: var(--ss-bg-deep);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 80px);
}

.post-comments {
  max-width: 680px;
  margin: 0 auto;
}

.post-comments .comment-respond {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--ss-orange-dim);
  padding: 28px;
}

.post-comments .comment-reply-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ss-dim);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ss-orange-dim);
}

.post-comments label {
  font-family: 'Special Elite', cursive;
  font-size: 10px;
  color: var(--ss-dim);
  letter-spacing: 0.08em;
}

.post-comments input[type="text"],
.post-comments input[type="email"],
.post-comments input[type="url"],
.post-comments textarea {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--ss-border);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ss-text);
  font-family: 'Share Tech Mono', monospace;
  transition: border-color 0.3s;
  width: 100%;
}

.post-comments input:focus,
.post-comments textarea:focus {
  border-color: rgba(255,111,0,0.4);
  outline: none;
}

.post-comments .submit,
.post-comments input[type="submit"] {
  background: var(--ss-orange);
  color: var(--ss-bg-deep);
  border: 1px solid var(--ss-orange);
  padding: 12px 28px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}

.post-comments .submit:hover,
.post-comments input[type="submit"]:hover {
  background: var(--ss-orange-h);
  box-shadow: 0 0 24px rgba(255,111,0,0.25);
}

.post-comments .comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.post-comments .comment-list .comment {
  padding: 24px;
  margin-bottom: 16px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,111,0,0.06);
  border-left: 3px solid var(--ss-orange-dim);
  list-style: none;
}

.post-comments .comment-list .children {
  list-style: none;
  padding-left: 0;
}

.post-comments .comment-list .children .comment {
  margin-left: 32px;
  border-left-color: rgba(255,111,0,0.08);
}

.post-comments .comment-author {
  font-size: 13px;
}

.post-comments .comment-metadata {
  font-family: 'Special Elite', cursive;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ss-dim);
}

.post-comments .reply a {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}


/* ══════════════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .post-hero__corner { width: 18px; height: 18px; }
  .post-hero__corner--tl { top: 10px; left: 10px; }
  .post-hero__corner--br { bottom: 10px; right: 10px; }

  .post-author { flex-direction: column; gap: 16px; }

  .post-nav__grid { grid-template-columns: 1fr; }
  .post-nav__link--next { text-align: left; }
  .post-nav__link--next .post-nav__direction { justify-content: flex-start; }
}