/*
Theme Name: Capital Sticks
Theme URI: https://capitalsticks.com/
Author: Sparked Studio
Description: "Kitchen-Table Capitol" papercraft theme for Capital Sticks, the paper-cutout political satire. Press-a-character Cast stage (Character post type), Episodes (Episode post type), Follow panel with editable social links, and an email signup with CSV export.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: capital-sticks
License: Proprietary
*/

/* The design system lives in assets/css/site.css (ported 1:1 from the static build).
   This file holds only the WordPress-era additions. */

/* cast page stage (was an inline <style> in cast.html) */
#cast-stage { padding-top: 8rem; --cast-cols: 4; --fig-h: clamp(165px, 44vw, 250px); }
@media (min-width: 640px) { #cast-stage { --cast-cols: 4; padding-top: 10.5rem; } }
@media (min-width: 1000px) { #cast-stage { --cast-cols: 4; --fig-h: 250px; } }
@media (min-width: 1200px) { #cast-stage { --cast-cols: 6; --fig-h: 240px; } }

/* 5th nav chip (News) */
.nav li:nth-child(5) a { --r: -1deg; }

/* ---------- Follow button ---------- */
.btn.follow { --r: 1.4deg; }
.btn.follow svg { width: 1.15em; height: 1.15em; }
.site-header .btn.follow { font-size: .95rem; padding: .62em 1em; min-height: 44px; margin-left: .4rem; }
.nav .nav-follow { display: flex; align-items: center; }
.header-right { display: flex; align-items: center; gap: .6rem .9rem; flex-wrap: wrap; justify-content: flex-end; }
.foot-follow { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* ---------- Follow panel (native dialog) ---------- */
.follow-panel {
  width: min(560px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto;
  padding: 0; border: 0; background: transparent; color: var(--ink);
}
.follow-panel::backdrop { background: rgba(34, 27, 21, .62); }
.follow-panel .sheet { padding: 2.4rem clamp(1.1rem, 4vw, 2.2rem) 2.2rem; position: relative; }
.follow-panel h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); padding-right: 2.6rem; }
.follow-panel .lede { font-size: 1.05rem; margin: .6rem 0 1.1rem; }
.follow-close {
  position: absolute; top: 1.4rem; right: 1rem; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--ink); color: var(--card); cursor: pointer; font: inherit;
}
.follow-close svg { width: 20px; height: 20px; }
.follow-close:focus-visible { outline: 3px solid var(--red-dark); outline-offset: 3px; }
.follow-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .7rem; }
.follow-list .btn { width: 100%; justify-content: flex-start; rotate: 0deg; font-size: 1rem; }
.follow-list li:nth-child(odd) .btn { --r: -.6deg; rotate: var(--r); }
.follow-list li:nth-child(even) .btn { --r: .6deg; rotate: var(--r); }
.follow-list .btn .sub { margin-left: auto; font-family: var(--typed); font-weight: 400; font-size: .85rem; opacity: .9; }
.follow-list .btn.ink { background: var(--ink); color: var(--card); }

/* ---------- Email signup ---------- */
.signup { display: grid; gap: .6rem; }
.signup h3 { margin: 0; }
.signup label { font-weight: 700; }
.signup .row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: stretch; }
.signup input[type="email"] {
  flex: 1 1 220px; min-height: 48px; padding: .6rem .8rem; font: inherit; color: var(--ink);
  background: #fffdf7; border: 2px solid var(--ink); border-radius: 3px 6px 4px 7px / 6px 3px 7px 4px;
}
.signup input[type="email"]:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.signup .btn { rotate: 0deg; }
.signup .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .msg { min-height: 1.4em; margin: 0; font-weight: 700; }
.signup .msg.ok { color: #1f5a2a; }
.signup .msg.err { color: var(--red-dark); }
.signup .fine { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.paper-navy .signup { justify-items: center; text-align: center; width: min(100%, 520px); margin-top: .6rem; }
.paper-navy .signup .row { justify-content: center; width: 100%; }
.paper-navy .signup .msg.ok, .paper-navy .signup .msg.err { color: #ffd76a; }
.paper-navy .signup .fine { color: var(--card); }
.paper-navy .signup input[type="email"] { border-color: var(--card); }
.paper-navy .signup input[type="email"]:focus-visible { outline-color: #ffd76a; }  /* a11y S2 */

/* ---------- blog (Shorts / News) ---------- */
.post-list { display: grid; gap: 2.2rem 1.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.post-list .cue h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 1.15rem + .6vw, 1.7rem); line-height: 1.1; margin: .2rem .2rem 0; }
.post-list .cue h2 a { color: var(--ink); text-decoration: none; }
.post-list .cue h2 a:hover { text-decoration: underline; }
.entry { max-width: 760px; margin-inline: auto; }
.entry .meta { font-family: var(--typed); color: var(--red-dark); margin: 0 0 1rem; }
.entry-content > * { max-width: 68ch; }
.entry-content img, .entry-content iframe { max-width: 100%; height: auto; }
.entry-content .wp-block-embed iframe, .yt-embed iframe { aspect-ratio: 16 / 9; width: 100%; height: auto; border: 0; }
.entry-content h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); line-height: 1.1; }
.entry-content blockquote { margin: 1.4rem 0; padding: .6rem 1rem; border-left: 4px solid var(--red); font-family: var(--typed); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }
.empty-note { font-family: var(--typed); }

/* single episode */
.ep-single .thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 8px solid #fff; box-shadow: 3px 7px 9px var(--shadow); rotate: -1deg; }
.ep-single .yt { font-family: var(--typed); color: var(--ink-soft); }
.ep-single .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.2rem; }

/* 404 */
.notfound { text-align: center; }
.notfound .wrap { display: grid; justify-items: center; gap: 1rem; }
.notfound img { height: clamp(220px, 40vw, 360px); width: auto; filter: drop-shadow(5px 9px 6px rgba(30,20,8,.4)); rotate: -3deg; }

@media (max-width: 520px) {
  .site-header .btn.follow { font-size: .88rem; padding: .5em .75em; margin-left: .2rem; }
}

/* signup button on navy paper: switch to red so it does not vanish */
.paper-navy .signup .btn.navy { background-color: var(--red); background-image: linear-gradient(rgba(80,8,12,.2), rgba(80,8,12,.2)), url("assets/img/tex/redpaper.webp"); background-size: auto, 512px; }

/* ---- design review round 1 (2026-10-07) ---- */
/* header Follow is navy so red only ever means "you are here" */
.site-header .btn.follow { background-color: var(--navy); background-image: url("assets/img/tex/navypaper.webp"); background-size: 512px; font-family: var(--display); font-weight: 400; letter-spacing: .02em; }
.site-header .btn.follow:hover { color: var(--card); }
@media (max-width: 520px) {
  .site-header .lbl-long { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Follow dialog on phones */
@media (max-width: 480px) {
  .follow-list .btn { flex-wrap: wrap; row-gap: .1rem; padding-block: .7em; }
  .follow-list .btn .sub { flex-basis: 100%; margin-left: calc(1.25em + .55em); font-size: .8rem; }
  .follow-panel .sheet { padding-top: 1.8rem; }
  .follow-list { gap: .55rem; margin-bottom: 1rem; }
  .signup .row .btn { flex: 1 1 100%; justify-content: center; }
}
.signup .msg:empty { min-height: 0; margin-top: -.6rem; }
/* post titles in the 760px column */
.page-head .entry h1.carve { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.8rem); }
.entry .actions, .ep-single .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
/* news cards: whole card clickable */
.post-list .cue { position: relative; }
.post-list .cue h2 a::after { content: ""; position: absolute; inset: 0; z-index: 4; }
.post-list .cue:hover { animation: jitter .5s steps(1, end) infinite; }
.post-list .cue:focus-within { outline: 3px solid var(--navy); outline-offset: 4px; }
.post-list .read { margin-top: auto; }
.ep-single .yt { font-size: .92rem; }

/* a11y round 1 */
.entry .meta, .entry .meta a { color: var(--ink); }  /* a11y S3: was 3.35:1 on kraft */

/* Season 2 main title: small text-button to swap in the Season 1 opening */
.linklike { font: inherit; font-weight: 700; color: var(--red-dark); background: none; border: 0; padding: .5rem 0; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: .08em; }
.linklike:hover { color: var(--red); }
.s1-open { margin: .4rem 0 0; font-size: .95rem; }
