/*
Theme Name: Paul Mason 2026
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ==========================================================================
   Author site — editorial look: bold sans headlines, black/white, red accent
   ========================================================================== */

:root {
    --ink: #141414;
    --paper: #ffffff;
    --white: #ffffff;
    --accent: #d0342c;
    --accent-dark: #a82820;
    --gray: #6b6b6b;
    --line: #e5e5e5;
    --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", serif;
    --container: 1120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .btn, .kicker, .wordmark {
    font-family: var(--font-sans);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--ink);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Shared pieces
   -------------------------------------------------------------------------- */

/* Decorative backdrops (::before/::after on each section) sit behind content */
main section {
    position: relative;
    overflow: hidden;
}

main section > .container {
    position: relative;
    z-index: 1;
}

.kicker {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-head {
    max-width: 640px;
    margin-bottom: 3rem;
}

.section-head h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    text-transform: uppercase;
}

.section-head h2::before {
    content: "";
    display: block;
    width: 64px;
    height: 6px;
    background: var(--accent);
    margin-bottom: 1.1rem;
}

.section-head p {
    margin-top: 0.75rem;
    color: var(--gray);
}

.section-foot {
    margin-top: 3rem;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid var(--ink);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--ink);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--ink);
    color: var(--white);
}

/* Variants for use on dark backgrounds */
.btn-light {
    background: var(--white);
    color: var(--ink);
    border-color: var(--white);
}

.btn-light:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.btn-ghost-light {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-ghost-light:hover {
    background: var(--white);
    color: var(--ink);
}

/* Image placeholders — swap for real <img> tags later */
.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        repeating-linear-gradient(45deg,
            transparent, transparent 12px,
            rgba(20, 20, 20, 0.045) 12px, rgba(20, 20, 20, 0.045) 24px),
        #efefef;
    border: 2px dashed #c6c6c6;
    color: #9b9b9b;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.7;
}

.portrait {
    aspect-ratio: 4 / 5;
    width: 100%;
    background-color: #f3e9e6; /* subtle blush tint drawn from the accent red */
    border: 2px solid var(--ink);
    overflow: hidden;
}

/* Anchor the crop to the top of the frame so the whole head stays visible */
.portrait img {
    object-position: 50% 0;
}

.cover-large {
    aspect-ratio: 2 / 3;
    width: 100%;
    max-width: 360px;
}

.cover-small {
    aspect-ratio: 2 / 3;
    width: 100%;
    margin-bottom: 1rem;
}

/* Real images dropped into the placeholder boxes fill them edge to edge */
.portrait img,
.cover-large img,
.cover-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-credit {
    margin-top: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--gray);
}

/* --------------------------------------------------------------------------
   Announcement bar
   -------------------------------------------------------------------------- */

.announce {
    background: var(--accent);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    padding: 0.55rem 0;
    text-align: center;
}

.announce a {
    color: var(--white);
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    /* Transparent at the top of the page so the hero portrait can peek into
       the menu band; turns solid once the page scrolls. The bottom rule is
       drawn by .social-bar so the portrait can sit in front of it. */
    background: transparent;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: var(--paper);
    box-shadow: 0 4px 18px rgba(20, 20, 20, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    transition: padding 0.3s ease;
}

/* The menu compacts once the page scrolls */
.site-header.is-scrolled .header-inner {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.wordmark {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

/* Header wordmark is hidden while the hero portrait is in view — main.js
   toggles .is-hidden (no-JS fallback: always visible). Footer unaffected. */
.site-header .wordmark {
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.site-header .wordmark.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
}

.site-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.site-nav a {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: none;
    border: 2px solid var(--ink);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--ink);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Social icon bar — top right, under the header rule
   -------------------------------------------------------------------------- */

/* Carries the rule under the menu — as page content (not part of the sticky
   header) it paints behind the overlapping hero portrait */
.social-bar {
    border-top: 1px solid var(--line);
}

.social-bar-inner {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding-top: 1.1rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--ink);
    transition: background 0.2s ease, color 0.2s ease;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-btn:hover,
.social-btn:focus-visible {
    background: var(--accent);
    color: var(--white);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    padding: 3.5rem 0 6rem;
    overflow: visible; /* lets the portrait overlap up into the menu band */
}

.hero-inner {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

/* Dot grid fading in from the top-left corner, behind the portrait */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: min(48vw, 560px);
    height: 100%;
    background-image: radial-gradient(rgba(20, 20, 20, 0.16) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse at 20% 20%, #000 15%, transparent 70%);
    mask-image: radial-gradient(ellipse at 20% 20%, #000 15%, transparent 70%);
    pointer-events: none;
}


.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 0.95;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.lede {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 34em;
    margin-bottom: 2.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Portrait on the left, pulled up past the social bar so its top tucks in
   behind the menu rule — tune the margin to taste */
.hero-portrait {
    order: -1;
    align-self: start;
    margin-top: -8.5rem;
    position: relative;
}

.hero-portrait .portrait {
    position: relative;
    box-shadow: 16px 16px 0 var(--ink);
}


/* --------------------------------------------------------------------------
   Latest book (dark feature band)
   -------------------------------------------------------------------------- */

.latest-book {
    background-color: var(--ink);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    color: var(--white);
    padding: 6rem 0;
}

/* Concentric rings drifting off the top-left corner */
.latest-book::before,
.latest-book::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.latest-book::before {
    top: -140px;
    left: -140px;
    width: 460px;
    height: 460px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.latest-book::after {
    top: -60px;
    left: -60px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.book-feature {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.book-cover {
    display: flex;
    justify-content: center;
}

.latest-book .cover-large {
    box-shadow: 20px 20px 0 var(--accent);
}

.latest-book .img-placeholder {
    background:
        repeating-linear-gradient(45deg,
            transparent, transparent 12px,
            rgba(255, 255, 255, 0.06) 12px, rgba(255, 255, 255, 0.06) 24px),
        #262626;
    border-color: #555;
    color: #999;
}

.book-details h2 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.book-subtitle {
    font-size: 1.25rem;
    font-style: italic;
    color: #cfcfcf;
    margin-bottom: 1rem;
}

.book-meta {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.book-blurb {
    max-width: 36em;
    color: #dedede;
    margin-bottom: 2.25rem;
}

.book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Books grid
   -------------------------------------------------------------------------- */

.books {
    padding: 6rem 0;
}

/* Oversized ghost icon of a book stack behind the section */
.books::before {
    content: "";
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: clamp(220px, 30vw, 380px);
    aspect-ratio: 1;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23141414" fill-opacity="0.08"><rect x="3" y="17" width="18" height="3.4" rx="0.5"/><rect x="4.6" y="13.2" width="15.2" height="3.4" rx="0.5"/><rect x="3.6" y="9.4" width="16.8" height="3.4" rx="0.5"/><rect x="5.2" y="5" width="13.6" height="3.4" rx="0.5" transform="rotate(-5 12 6.7)"/></svg>') no-repeat center / contain;
    pointer-events: none;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.book-card-link {
    display: block;
    text-decoration: none;
}

.book-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.25;
    transition: color 0.2s ease;
}

.book-card-link:hover h3 {
    color: var(--accent);
}

.book-card-link:hover .img-placeholder {
    border-color: var(--accent);
}

.book-card-meta {
    margin-top: 0.35rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: var(--gray);
}

/* --------------------------------------------------------------------------
   Journalism
   -------------------------------------------------------------------------- */

.journalism {
    background: #fafafa;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 6rem 0;
}

/* Giant editorial quote mark */
.journalism::before {
    content: "\201C";
    position: absolute;
    top: -0.08em;
    right: 2vw;
    font-family: var(--font-serif);
    font-size: clamp(18rem, 32vw, 30rem);
    line-height: 1;
    color: rgba(20, 20, 20, 0.05);
    pointer-events: none;
    user-select: none;
}

.article-list {
    display: flex;
    flex-direction: column;
}

.article-item {
    padding: 2.5rem 0;
    border-top: 1px solid var(--line);
}

.article-item:last-child {
    border-bottom: 1px solid var(--line);
}

.article-meta {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.article-source {
    font-weight: 700;
    color: var(--accent);
    margin-right: 1rem;
}

.article-date {
    color: var(--gray);
}

.article-item h3 {
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    max-width: 30em;
}

.article-item h3 a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-item h3 a:hover {
    color: var(--accent);
}

.article-excerpt {
    max-width: 40em;
    color: #3d3d3d;
    margin-bottom: 1rem;
}

.read-more {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.15rem;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   Events
   -------------------------------------------------------------------------- */

.events {
    padding: 6rem 0;
}

/* Dot grid rising from the bottom-left corner */
.events::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: min(44vw, 480px);
    height: 320px;
    background-image: radial-gradient(rgba(20, 20, 20, 0.14) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse at 15% 90%, #000 15%, transparent 70%);
    mask-image: radial-gradient(ellipse at 15% 90%, #000 15%, transparent 70%);
    pointer-events: none;
}

.event-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--white);
    border: 1px solid var(--line);
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 30px rgba(20, 20, 20, 0.06);
}

.event-date {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: var(--ink);
    color: var(--white);
    font-family: var(--font-sans);
}

.event-day {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.event-month {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.event-info {
    flex: 1;
}

.event-info h3 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
}

.event-info p {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.event-link {
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Newsletter
   -------------------------------------------------------------------------- */

.newsletter {
    background: var(--accent);
    color: var(--white);
    padding: 5rem 0;
}

/* Thick rings bleeding off opposite corners */
.newsletter::before,
.newsletter::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.newsletter::before {
    top: -180px;
    left: -160px;
    width: 440px;
    height: 440px;
    border: 56px solid rgba(255, 255, 255, 0.09);
}

.newsletter::after {
    bottom: -140px;
    right: -120px;
    width: 340px;
    height: 340px;
    border: 40px solid rgba(0, 0, 0, 0.08);
}

.newsletter-inner {
    max-width: 720px;
    text-align: center;
}

.newsletter h2 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.newsletter-text p {
    margin-bottom: 2rem;
    color: #ffe3e0;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
    flex: 1 1 320px;
    max-width: 420px;
    padding: 0.8rem 1.1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 2px solid var(--white);
    background: var(--white);
    color: var(--ink);
}

.newsletter-form input[type="email"]:focus {
    outline: 3px solid var(--ink);
    outline-offset: 1px;
}

.newsletter .btn-primary {
    background: var(--ink);
    border-color: var(--ink);
}

.newsletter .btn-primary:hover {
    background: var(--white);
    color: var(--ink);
    border-color: var(--white);
}

.form-message {
    margin-top: 1.25rem;
    font-family: var(--font-sans);
    font-weight: 700;
}

.form-message.is-success {
    color: var(--white);
}

.form-message.is-error {
    color: #ffd9d6;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
    background: var(--ink);
    color: #cfcfcf;
    padding: 4.5rem 0 2rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #333;
}

.wordmark-footer {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-note {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-note a {
    color: var(--white);
}

.footer-col h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: #cfcfcf;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 2rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: #8f8f8f;
}

.footer-bottom a {
    color: #8f8f8f;
}

/* --------------------------------------------------------------------------
   Reveal-on-scroll animation (opt-out for reduced motion)
   -------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
    .hero-inner,
    .book-feature {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero {
        padding: 3.5rem 0 4.5rem;
    }

    .hero-portrait {
        order: 0;       /* text first when stacked */
        margin-top: 0;  /* no menu overlap on small screens */
        max-width: 420px;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 720px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 12px 24px rgba(20, 20, 20, 0.12);
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 0;
        /* Top padding clears the social-bar row (54px close button + its
           padding), which the open panel slides underneath */
        padding: 4.5rem 1.5rem 1.25rem;
    }

    .site-nav li {
        border-top: 1px solid var(--line);
    }

    .site-nav a {
        display: block;
        padding: 0.9rem 0;
        border-bottom: none;
    }

    .event-item {
        flex-wrap: wrap;
        gap: 1.25rem;
    }

    .event-info {
        flex: 1 1 60%;
    }

    .event-link {
        margin-left: calc(72px + 1.25rem);
    }
}

@media (max-width: 480px) {
    .books-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Nav dropdown (Work → Articles, Books, Plays, Films)
   ========================================================================== */

.site-nav li {
    position: relative;
}

.menu-item-has-children > a::after {
    content: " ▾";
    font-size: 1.1em;
    line-height: 1;
}

.site-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    gap: 0;
    min-width: 9rem;
    padding: 0.5rem 0;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(20, 20, 20, 0.12);
    z-index: 30;
}

.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu {
    display: flex;
}

.site-nav .sub-menu a {
    display: block;
    padding: 0.5rem 1.25rem;
    border-bottom: none;
    white-space: nowrap;
}

@media (max-width: 720px) {
    /* In the collapsed menu the submenu is always visible, indented */
    .site-nav .sub-menu {
        display: block;
        position: static;
        transform: none;
        min-width: 0;
        padding: 0 0 0.5rem 1.25rem;
        border: none;
        box-shadow: none;
    }

    .site-nav .sub-menu li {
        border-top: none;
    }

    .site-nav .sub-menu a {
        padding: 0.55rem 0;
    }
}

/* ==========================================================================
   Events page — brief past-events list
   ========================================================================== */

.past-events .event-list-past {
    list-style: none;
    border-top: 1px solid var(--line);
}

.event-item-past {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.event-item-past .event-past-date {
    flex: 0 0 7.5rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray);
    white-space: nowrap;
}

.event-item-past h3 {
    font-size: 1.05rem;
    line-height: 1.4;
}

.event-item-past h3 a {
    text-decoration: none;
    color: inherit;
}

.event-item-past h3 a:hover {
    color: var(--accent);
}

.event-item-past .event-past-venue {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: var(--gray);
}

.events-empty {
    font-family: var(--font-serif);
    color: var(--gray);
}

@media (max-width: 720px) {
    .event-item-past {
        flex-wrap: wrap;
        gap: 0.35rem 1rem;
    }
}

/* ==========================================================================
   Contact form (Ninja Forms) — bordered panel, labels left on desktop
   ========================================================================== */

.nf-form-cont {
    max-width: 680px;
    margin: 2rem 0 2.5rem;
    background: var(--paper);
}

.nf-form-cont .nf-field-container {
    margin-bottom: 1.5rem;
}

.nf-form-cont .nf-field-label label {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}

.nf-form-cont .ninja-forms-req-symbol {
    color: var(--accent);
}

.nf-form-cont input[type="text"],
.nf-form-cont input[type="email"],
.nf-form-cont input[type="tel"],
.nf-form-cont select,
.nf-form-cont textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
}

.nf-form-cont input:focus,
.nf-form-cont select:focus,
.nf-form-cont textarea:focus {
    outline: 3px solid var(--accent);
    outline-offset: 1px;
}

.nf-form-cont textarea {
    min-height: 160px;
    resize: vertical;
}

/* Submit button — match the theme's .btn-primary */
.nf-form-cont input[type="button"],
.nf-form-cont input[type="submit"] {
    width: auto;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--white);
    border: 2px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.nf-form-cont input[type="button"]:hover,
.nf-form-cont input[type="submit"]:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* Labels sit in a left column on desktop */
@media (min-width: 721px) {
    .nf-form-cont .field-wrap {
        display: grid !important;
        grid-template-columns: 9.5rem 1fr;
        gap: 0 1.5rem;
        align-items: start;
    }

    .nf-form-cont .nf-field-label {
        text-align: right;
        padding-top: 0.8rem;
        margin: 0;
        order: 0;
    }

    .nf-form-cont .nf-field-element {
        grid-column: 2;
    }

    /* Submit has no visible label — keep the button in the input column */
    .nf-form-cont .submit-wrap .nf-field-label {
        display: none;
    }
}

/* ==========================================================================
   Readable measure — cap long-form text lines on very wide screens.
   Applies to page/post content (rendered in .article-item); images,
   embeds and the event lists stay full width.
   ========================================================================== */

.article-item p,
.article-item ul,
.article-item ol,
.article-item dl,
.article-item blockquote,
.article-item h2,
.article-item h3,
.article-item h4 {
    max-width: 70ch;
}

/* ==========================================================================
   Pagination (/articles)
   ========================================================================== */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.55rem 0.9rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
    border: 2px solid transparent;
}

.pagination a.page-numbers:hover {
    color: var(--accent);
}

.pagination .page-numbers.current {
    border-color: var(--ink);
}

.pagination .page-numbers.dots {
    color: var(--gray);
}

/* ==========================================================================
   Long-form content spacing — the global reset removes all margins, so
   restore them for page/post body text (.page-content wraps the_content()).
   ========================================================================== */

.page-content p,
.page-content ul,
.page-content ol,
.page-content blockquote,
.page-content figure,
.page-content table {
    margin-bottom: 1.25em;
}

.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5 {
    margin: 1.6em 0 0.6em;
}

.page-content > h2:first-child,
.page-content > h3:first-child,
.page-content > h4:first-child {
    margin-top: 0;
}

.page-content ul,
.page-content ol {
    padding-left: 1.5em;
}

.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }

.page-content li {
    margin-bottom: 0.4em;
}

.page-content blockquote {
    padding-left: 1.25em;
    border-left: 3px solid var(--accent);
    color: var(--gray);
}

/* ==========================================================================
   Work media list (Plays, Films) — featured image beside the text
   ========================================================================== */

.work-media-item {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.work-media-thumb {
    flex: 0 0 240px;
}

.work-media-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.work-media-body {
    flex: 1 1 auto;
}

@media (max-width: 720px) {
    .work-media-item {
        flex-direction: column;
        gap: 1.25rem;
    }

    .work-media-thumb {
        flex-basis: auto;
        width: 100%;
        max-width: 420px;
    }
}

/* ==========================================================================
   Mobile menu toggle — lives at the left end of the social-icon row,
   borderless and larger than the old header button. The social bar only
   exists for it on non-front pages, so hide that bar on desktop.
   ========================================================================== */

@media (min-width: 721px) {
    .social-bar-nav-only {
        display: none;
    }
}

@media (max-width: 720px) {
    .nav-toggle {
        margin-right: auto;   /* hamburger left, icons pushed right */
        width: 54px;
        height: 54px;
        padding: 12px 10px;
        gap: 7px;
        border: none;
        /* Stays clickable above the nav panel, which drops from the
           sticky header and overlays this row when open */
        position: relative;
        z-index: 120;
    }

    .nav-toggle span {
        height: 3px;
    }

    /* X offsets for the larger bar spacing (3px bars, 7px gap) */
    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .social-bar-inner {
        align-items: center;
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }
}

/* Contact form: hide the form title and the required-fields note */
.nf-form-cont .nf-form-title,
.nf-form-cont .nf-form-fields-required {
    display: none;
}

/* Books listing: thumbs keep the 2:3 book-cover shape */
.work-media-thumb--cover {
    flex-basis: 160px;
}

.work-media-thumb--cover img {
    aspect-ratio: 2 / 3;
}

/* Books & Plays: text runs full but inline images are hidden (the
   featured-image thumbnail already provides the imagery) */
.hide-content-images img,
.hide-content-images figure {
    display: none;
}

/* WP content alignment classes for inline images elsewhere */
.page-content .alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.page-content .alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.page-content .aligncenter {
    display: block;
    margin: 0 auto 1rem;
}

.pagination {
    margin-bottom: 3rem;
}

/* ==========================================================================
   Social feeds (front page) — native X cards + themed TikTok embed
   ========================================================================== */

/* X cards in a two-up grid, TikTok full-width below */
.x-feed {
    margin-bottom: 3.5rem;
}

.x-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.x-cards .x-card {
    margin-bottom: 0;
}

.social-feed-title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.x-card {
    border: 1px solid var(--line);
    border-left: 3px solid var(--ink);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s ease;
}

.x-card:hover {
    border-left-color: var(--accent);
}

.x-card-text {
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
}

.x-card-text a {
    color: var(--accent);
    text-decoration: none;
}

.x-card-text a:hover {
    text-decoration: underline;
}

.x-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
}

.x-card-meta a {
    color: var(--ink);
    text-decoration: none;
}

.x-card-meta a:hover {
    color: var(--accent);
}

.tiktok-frame {
    display: flex;
    justify-content: center;
}

.tiktok-frame .tiktok-embed {
    margin: 0 !important;
    min-width: 0 !important;
    width: 100%;
}

@media (max-width: 900px) {
    .x-cards {
        grid-template-columns: 1fr;
    }
}

/* Second heading block in a footer column (the Work sub-menu) */
.footer-col ul + h3 {
    margin-top: 2rem;
}

/* Embedded video in content scales to its column */
.page-content iframe {
    max-width: 100%;
}


/* Footer follow column — small white icon beside each label */
.footer-follow a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-follow svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    flex-shrink: 0;
}



/* X card header — avatar, name, handle */
.x-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    text-decoration: none;
}

.x-card-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.x-card-name {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 700;
}

.x-card-handle {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: var(--gray);
}

.x-card-head:hover .x-card-name {
    color: var(--accent);
}

/* Social section: same vertical rhythm as the other sections, which also
   keeps a margin between the TikTok frame and the footer */
.social-feeds {
    padding: 6rem 0;
}


/* Plain padded section — single posts and the category listing pages */
.page-section {
    padding: 4rem 0 6rem;
}

/* Films: text in a wide left column, YouTube embeds stacked at right */
.film-item {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.film-embeds {
    display: grid;
    gap: 1rem;
}

.film-embeds iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

@media (max-width: 720px) {
    .film-item {
        grid-template-columns: 1fr;
    }
}

/* Snapshots page: every photo runs at the same width */
.page-id-2209 .page-content img {
    width: 100%;
    max-width: 680px;
    height: auto;
}


/* Every subpage: the first section keeps the same headline distance from
   the header, whatever section type the template uses */
body:not(.home) main > section:first-child {
    padding-top: 2.5rem;
}

/* Substack signup embed in the newsletter band */
.substack-embed {
    width: 100%;
    max-width: 480px;
    height: 320px;
    border: 0;
    border-radius: 12px;
    background: var(--white);
}

/* Anchored book/play targets land clear of the sticky header */
.work-media-item[id] {
    scroll-margin-top: 90px;
}
