/* ═══════════════════ BLOG ARTICLE — single post (single.php) ═══════════════════
   Enqueued after custom.css (depends on smudgechild-custom).

   - `.crumb` is the shared one in custom.css; only its width is narrowed
     here (.crumb.art-crumb).
   - Byline: "Reviewed by / Written by" lines; the mark is the theme's
     images/favicon.png shown as-is.
   - Pull quote: the Classic Editor's Blockquote button
     (`.art-body blockquote`) gets the .art-pull look; .art-pull itself is
     kept for any hand-written markup.
   - Share: a <button> for Copy link + a status line for "Link copied".

   Layout: each section is a direct child of .site-container, and
   footer.css only paints the page background on a section's own box (that
   is what keeps the sticky footer hidden). So sections are full width,
   with the column width made by side padding and outer spacing as padding
   — otherwise the dark footer shows at the sides and in the gaps. The
   share row's top rule sits on .art-share__inner so it stays column-wide.
   Every rule is class-scoped: style.css/custom.css carry bare
   p/ul/h2/a/blockquote rules and body weight 300, so the body resets
   size/colour/weight on its own elements. */

.art-crumb,
.art-head,
.art-cover,
.art-main,
.art-share { font-weight: 400; }

/* ───────────── Reveal-on-scroll ─────────────
   article-sections.js observes with threshold 0 — the body is often far
   taller than the viewport, so a fraction-based threshold would never fire. */
.art-head.reveal,
.art-cover.reveal,
.art-body.reveal,
.art-share.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.art-head.reveal.in,
.art-cover.reveal.in,
.art-body.reveal.in,
.art-share.reveal.in { opacity: 1; transform: none; }
.art-cover.reveal-d1 { transition-delay: 0.08s; }
.art-body.reveal-d2 { transition-delay: 0.16s; }

/* ═══════════════════ READING PROGRESS (rendered on wp_footer) ═══════════════════ */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: 3px; background: transparent; pointer-events: none;
}
.read-progress__bar { height: 100%; width: 0%; background: var(--accent); transition: width 0.1s linear; }
/* sit under the WordPress admin bar when logged in */
.admin-bar .read-progress { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .read-progress { top: 46px; } }

/* ═══════════════════ BREADCRUMB ═══════════════════
   Shared .crumb (custom.css) — the article column is narrower. */
.crumb.art-crumb { width: auto; padding-left: max(4vw, calc((100% - 760px) / 2)); padding-right: max(4vw, calc((100% - 760px) / 2)); }

/* ═══════════════════ ARTICLE HEADER ═══════════════════ */
.art-head { padding: clamp(20px, 3vh, 32px) max(4vw, calc((100% - 760px) / 2)) 0; }
.art-head__tag {
  display: inline-flex; align-items: center; font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.art-head__title {
  font-family: var(--sans); font-weight: 500; font-size: clamp(30px, 4vw, 48px); line-height: 1.1;
  letter-spacing: -0.02em; color: var(--ink); margin: 0; text-wrap: balance;
}
.art-head__dek {
  font-family: var(--sans); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: var(--ink-soft);
  margin: 18px 0 0; text-wrap: pretty;
}
.art-byline {
  display: flex; align-items: center; gap: 14px;
  margin-top: clamp(26px, 3.4vh, 36px); padding-top: clamp(22px, 3vh, 30px); border-top: 1px solid var(--line);
}
.art-byline__mark {
  flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.art-byline__mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-byline__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.art-byline__line { font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.art-byline__name { font-weight: 600; color: var(--ink); }
.art-byline__meta { font-family: var(--sans); font-size: 13px; line-height: 1.45; color: var(--ink-faint); }
.art-byline__meta .sep { margin: 0 6px; opacity: 0.7; }

/* ═══════════════════ COVER IMAGE ═══════════════════ */
.art-cover { padding: clamp(32px, 4.4vh, 48px) max(3vw, calc((100% - 1000px) / 2)) 0; }
.art-cover img {
  width: 100%; height: auto; display: block; border-radius: 18px; aspect-ratio: 16 / 8; object-fit: cover;
  box-shadow: 0 30px 64px -46px rgba(12, 12, 13, 0.35);
}

/* ═══════════════════ ARTICLE BODY (post content) ═══════════════════ */
.art-body {
  width: min(700px, 92vw); margin: 0 auto; padding: clamp(44px, 6vh, 68px) 0 clamp(48px, 7vh, 76px);
  font-family: var(--sans); font-size: clamp(16px, 1.05vw, 18px); line-height: 1.75; color: var(--ink);
}
.art-body > :first-child { margin-top: 0; }
/* style.css gives bare <p>/<li> a fixed 16px size + line-height — inherit the body's instead */
.art-body p { margin: 0 0 24px; font-size: inherit; line-height: inherit; color: inherit; text-wrap: pretty; }
.art-body h2 {
  font-family: var(--sans); font-weight: 600; font-size: clamp(22px, 2vw, 28px); line-height: 1.25;
  letter-spacing: -0.01em; color: var(--ink); margin: clamp(40px, 5vh, 56px) 0 18px; text-wrap: balance;
}
.art-body h3 {
  font-family: var(--sans); font-weight: 600; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.3;
  letter-spacing: -0.005em; color: var(--ink); margin: clamp(32px, 4vh, 44px) 0 14px;
}
.art-body ul,
.art-body ol { margin: 0 0 24px; padding: 0 0 0 22px; }
.art-body li { margin-bottom: 10px; line-height: 1.6; color: var(--ink); }
.art-body strong,
.art-body b { font-weight: 600; }
.art-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.art-body a:hover { color: var(--accent-hover); }
.art-body hr { margin: clamp(36px, 5vh, 52px) 0; }

/* images from the Classic Editor (Add Media) */
.art-body img { max-width: 100%; height: auto; border-radius: 14px; }
.art-body .wp-caption { max-width: 100%; margin: clamp(32px, 4.4vh, 44px) 0; }
.art-body .wp-caption img { margin: 0; }
.art-body .wp-caption-text { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.art-body .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.art-body .alignleft { float: left; margin: 6px 24px 16px 0; }
.art-body .alignright { float: right; margin: 6px 0 16px 24px; }
.art-body::after { content: ""; display: table; clear: both; }

/* Pull quote — the editor's Blockquote button, styled as .art-pull */
.art-body blockquote,
.art-pull {
  margin: clamp(36px, 5vh, 52px) 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent);
  font-family: var(--sans); font-style: normal; font-weight: 500; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.4;
  letter-spacing: -0.01em; color: var(--ink); text-wrap: balance;
}
.art-body blockquote p { margin: 0; font: inherit; letter-spacing: inherit; color: inherit; }
.art-body blockquote p + p { margin-top: 12px; }

/* Callout — [callout label="…"]…[/callout] (inc/blog-content.php). The label
   is a <p class="art-callout__label"> (wpautop-safe), so its rule needs the
   extra class to beat the callout's own `p` rule below. */
.art-callout {
  margin: clamp(36px, 5vh, 52px) 0; padding: clamp(20px, 2.6vw, 28px); border-radius: 14px;
  background: #f4f2ed; border: 1px solid var(--line);
}
.art-body .art-callout p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.art-body .art-callout p + p { margin-top: 12px; }
.art-body .art-callout .art-callout__label {
  display: block; font-family: var(--mono); font-size: 10.5px; font-weight: 500; line-height: 1.4; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 10px;
}
.art-body .art-callout .art-callout__label + p { margin-top: 0; }
.art-body .art-callout ul,
.art-body .art-callout ol { margin: 12px 0 0; }
.art-body .art-callout li { font-size: 15px; color: var(--ink-soft); }

/* ═══════════════════ SHARE ═══════════════════ */
.art-share { padding: 0 max(4vw, calc((100% - 700px) / 2)) clamp(48px, 7vh, 76px); }
.art-share__inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: clamp(28px, 3.6vh, 40px); border-top: 1px solid var(--line);
}
.art-share__label { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.art-share__icons { display: flex; flex-wrap: wrap; gap: 10px; }
/* .social-ic is footer.css's round icon (white-on-dark there) */
.art-share .social-ic { color: var(--ink-soft); border-color: var(--line); }
.art-share .social-ic:hover { color: var(--ink); }
.art-share button.social-ic { background: none; padding: 0; font: inherit; }
.art-share button.social-ic:hover { background: rgba(239, 108, 35, 0.16); }
.art-share__status { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

@media (max-width: 620px) {
  .art-cover img { aspect-ratio: 4 / 3; }
  .art-body .alignleft,
  .art-body .alignright { float: none; margin: 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .art-head.reveal,
  .art-cover.reveal,
  .art-body.reveal,
  .art-share.reveal { opacity: 1; transform: none; transition: none; }
}

/* Comparison tables in Notion articles (dev/blog-notion-build.py). */
.art-body .art-table { width: 100%; border-collapse: collapse; margin: 28px 0 36px; font-size: 15px; line-height: 1.4; }
.art-body .art-table th, .art-body .art-table td { padding: 12px 12px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line, rgba(0,0,0,0.1)); }
.art-body .art-table th { font-weight: 600; color: var(--ink, #111); }
.art-body .art-table td:first-child { font-weight: 500; color: var(--ink, #111); }
.art-body .art-table td:not(:first-child) { color: var(--ink-soft, #555); }
@media (max-width: 640px) {
  .art-body .art-table { font-size: 13.5px; }
  .art-body .art-table th, .art-body .art-table td { padding: 10px 8px 10px 0; }
}
