/*
Theme Name: Joseph Grimaldi
Theme URI: https://josephgrimaldi.com
Author: Jools Scott
Author URI: https://joolsscott.co.uk
Description: A Georgian theatre bill aesthetic for the life and legacy of Joseph Grimaldi (1778-1837), the father of modern clowning. Designed as a permanent historical resource.
Version: 1.0.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: joseph-grimaldi
Tags: one-column, two-columns, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES — THE GEORGIAN PALETTE
   ========================================================================== */

:root {
    /* Colours — drawn from Georgian theatre and Grimaldi's world */
    --color-rust:        #c8391b;   /* Clown's polka dots, dramatic warmth */
    --color-rust-light:  #d94e32;   /* Hover state */
    --color-rust-dark:   #a42e15;   /* Active/pressed */
    --color-teal:        #2d5a3d;   /* Velvet curtain green */
    --color-teal-light:  #3a7350;   /* Hover state */
    --color-teal-dark:   #1e3d29;   /* Deep curtain shadow */
    --color-cream:       #f5f0e8;   /* Aged playbill paper */
    --color-parchment:   #ede5d0;   /* Darker paper for sections */
    --color-ink:         #1c1410;   /* Warm black — printing ink */
    --color-charcoal:    #3a3028;   /* Secondary text */
    --color-gold:        #b8860b;   /* Gilded proscenium arch */
    --color-gold-light:  #d4a017;   /* Gold highlight */
    --color-red-deep:    #8b1a1a;   /* Stage curtain red */
    --color-white:       #faf8f4;   /* Near-white aged paper */

    /* Typography */
    --font-display:  'Alfa Slab One', 'Playfair Display', serif;
    --font-heading:  'Libre Baskerville', 'Georgia', serif;
    --font-body:     'Lora', 'Palatino Linotype', 'Palatino', serif;
    --font-ui:       'Josefin Sans', 'Gill Sans', sans-serif;

    /* Spacing — based on a musical/theatrical rhythm */
    --space-xs:   0.25rem;
    --space-sm:   0.5rem;
    --space-md:   1rem;
    --space-lg:   2rem;
    --space-xl:   3rem;
    --space-2xl:  5rem;
    --space-3xl:  8rem;

    /* Layout */
    --container-width:  1140px;
    --container-narrow: 760px;
    --header-height:    80px;

    /* Borders & Effects */
    --radius-sm:  2px;
    --radius-md:  4px;
    --shadow-soft:   0 2px 12px rgba(28, 20, 16, 0.08);
    --shadow-card:   0 4px 20px rgba(28, 20, 16, 0.12);
    --shadow-lifted: 0 8px 32px rgba(28, 20, 16, 0.16);

    /* Transitions */
    --transition-fast:  150ms ease;
    --transition-base:  250ms ease;
    --transition-slow:  400ms ease;
}


/* ==========================================================================
   RESET & BASE — SETTING THE STAGE
   ========================================================================== */

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-ink);
    background-color: var(--color-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Subtle paper texture on body via repeating noise pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

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

a {
    color: var(--color-rust);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-rust-light);
}

a:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

::selection {
    background-color: var(--color-rust);
    color: var(--color-white);
}


/* ==========================================================================
   TYPOGRAPHY — THE PLAYBILL HIERARCHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 400;
}

/* Display — the SLAPSTICK! level heading */
h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--color-rust);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-lg);
}

/* Section heading — THE CLOWN, THE PLAY level */
h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--color-rust);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-md);
}

/* Subsection — period serif elegance */
h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    color: var(--color-ink);
    margin-bottom: var(--space-md);
}

h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-charcoal);
    margin-bottom: var(--space-sm);
}

h5, h6 {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-charcoal);
    margin-bottom: var(--space-sm);
}

p {
    margin-bottom: var(--space-md);
}

blockquote {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--color-teal);
    border-left: 4px solid var(--color-gold);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-xl) 0;
    background: var(--color-parchment);
    position: relative;
}

blockquote::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--color-gold);
    position: absolute;
    top: -0.15em;
    left: 0.15em;
    line-height: 1;
    opacity: 0.4;
}

blockquote cite,
blockquote footer {
    display: block;
    font-family: var(--font-ui);
    font-style: normal;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-charcoal);
    margin-top: var(--space-sm);
}

/* Drop Cap — Georgian broadside touch */
.entry-content > p:first-of-type::first-letter,
.has-drop-cap > p:first-of-type::first-letter {
    font-family: var(--font-display);
    float: left;
    font-size: 4.2em;
    line-height: 0.8;
    padding-right: 0.08em;
    margin-top: 0.05em;
    color: var(--color-rust);
}


/* ==========================================================================
   THEATRICAL DIVIDERS & ORNAMENTS
   ========================================================================== */

/* Standard double-rule divider */
.divider,
hr {
    border: none;
    height: auto;
    margin: var(--space-xl) auto;
    max-width: 200px;
    text-align: center;
    position: relative;
}

.divider::before,
hr::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: var(--color-charcoal);
    opacity: 0.3;
}

.divider::after,
hr::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: var(--color-charcoal);
    opacity: 0.3;
    margin-top: 4px;
}

/* Ornamental divider with flourish */
.divider--ornament {
    max-width: 300px;
    margin: var(--space-2xl) auto;
}

.divider--ornament::before {
    content: '\2766';  /* ❦ floral heart */
    display: block;
    font-size: 1.4rem;
    color: var(--color-gold);
    border: none;
    height: auto;
    background: none;
    margin-bottom: 0;
}

.divider--ornament::after {
    display: none;
}

/* Section label — playbill style */
.section-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-label::before,
.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--color-charcoal),
        transparent
    );
    opacity: 0.25;
}


/* ==========================================================================
   LAYOUT — CONTAINER & GRID
   ========================================================================== */

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}


/* ==========================================================================
   HEADER — THE PROSCENIUM ARCH
   ========================================================================== */

.site-header {
    background: var(--color-ink);
    color: var(--color-cream);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--color-gold);
}

/* Decorative top edge — gilded trim */
.site-header::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(
        to right,
        var(--color-gold),
        var(--color-gold-light),
        var(--color-gold),
        var(--color-gold-light),
        var(--color-gold)
    );
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-lg);
    min-height: var(--header-height);
}

/* Site branding / logo — Georgian broadside wordmark */
.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--color-cream);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    margin: 0;
    padding: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: inline;
    font-weight: 400;
}

/* The <a> wraps the site-title span, so target it here */
.site-branding a {
    color: var(--color-cream);
}

.site-branding a:hover {
    color: var(--color-white);
}

/* "Joseph" in rust, "Grimaldi" inherits cream from the <a> */
.site-title__first {
    color: var(--color-rust);
}

.site-subtitle {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.65rem;
    color: var(--color-gold);
    letter-spacing: 0.08em;
    line-height: 1;
    margin-top: 4px;
    opacity: 0.85;
}

/* Thin gold rule beneath subtitle only */
.site-subtitle {
    border-bottom: 1px solid rgba(184, 134, 11, 0.25);
    padding-bottom: 3px;
}

/* Custom logo image */
.site-logo__img {
    max-height: 55px;
    width: auto;
}

/* Desktop Navigation — pipe-separated playbill style */
.nav-desktop {
    display: none;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: block;
    }
}

.nav-desktop__menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-desktop__menu > li {
    position: relative;
}

/* Pipe separator between nav items */
.nav-desktop__menu > li + li::before {
    content: '\2016';  /* ‖ double vertical line */
    color: var(--color-gold);
    opacity: 0.5;
    font-size: 0.85rem;
    padding: 0 0.6rem;
    display: inline-block;
    vertical-align: middle;
}

.nav-desktop__menu a {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-cream);
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.nav-desktop__menu a:hover,
.nav-desktop__menu .current-menu-item > a,
.nav-desktop__menu .current_page_item > a {
    color: var(--color-gold);
}

/* Submenu dropdown */
.nav-desktop__menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-ink);
    border: 1px solid rgba(184, 134, 11, 0.2);
    border-top: 2px solid var(--color-gold);
    padding: var(--space-sm) 0;
    min-width: 200px;
    list-style: none;
    z-index: 100;
    box-shadow: var(--shadow-card);
}

.nav-desktop__menu li:hover > .sub-menu {
    display: block;
}

.nav-desktop__menu .sub-menu li + li::before {
    display: none;
}

.nav-desktop__menu .sub-menu a {
    display: block;
    padding: var(--space-xs) var(--space-lg);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.nav-desktop__menu .sub-menu a:hover {
    background: rgba(184, 134, 11, 0.1);
}

/* Mobile menu toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-cream);
    transition: all var(--transition-base);
    transform-origin: center;
}

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

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

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

/* Mobile Navigation Drawer */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--color-ink);
    z-index: 2000;
    transition: right var(--transition-slow);
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--color-gold);
    overflow-y: auto;
}

.nav-mobile.is-open {
    right: 0;
}

.nav-mobile__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.nav-mobile__title {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-gold);
}

.nav-mobile__close {
    background: none;
    border: none;
    color: var(--color-cream);
    cursor: pointer;
    padding: var(--space-xs);
    line-height: 1;
}

.nav-mobile__close:hover {
    color: var(--color-gold);
}

.nav-mobile__body {
    padding: var(--space-lg);
    flex: 1;
}

.nav-mobile__menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-mobile__menu li {
    border-bottom: 1px solid rgba(184, 134, 11, 0.1);
}

.nav-mobile__menu a {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-cream);
    display: block;
    padding: var(--space-md) 0;
}

.nav-mobile__menu a:hover {
    color: var(--color-gold);
}

.nav-mobile__menu .sub-menu {
    list-style: none;
    padding-left: var(--space-lg);
}

.nav-mobile__menu .sub-menu a {
    font-size: 0.8rem;
    color: var(--color-charcoal);
    padding: var(--space-sm) 0;
}

.nav-mobile__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 20, 16, 0.7);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.nav-mobile__overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 768px) {
    .nav-mobile,
    .nav-mobile__overlay {
        display: none !important;
    }
}


/* ==========================================================================
   BUTTONS — RUST & TEAL THEATRICAL
   ========================================================================== */

.btn,
button[type="submit"],
input[type="submit"] {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.8em 2em;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    line-height: 1.4;
    text-align: center;
}

/* Primary — rust/burnt orange */
.btn--primary,
button[type="submit"],
input[type="submit"] {
    background: var(--color-rust);
    color: var(--color-white);
    border-color: var(--color-rust);
}

.btn--primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    background: var(--color-teal);
    border-color: var(--color-teal);
    color: var(--color-white);
}

/* Secondary — teal ghost */
.btn--secondary {
    background: transparent;
    color: var(--color-teal);
    border-color: var(--color-teal);
}

.btn--secondary:hover {
    background: var(--color-teal);
    color: var(--color-white);
}

/* Ghost — gold outline for dark backgrounds */
.btn--ghost {
    background: transparent;
    color: var(--color-gold);
    border-color: var(--color-gold);
}

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


/* ==========================================================================
   HERO SECTIONS — DRAMATIC FULL-BLEED
   ========================================================================== */

.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--color-ink);
}

.hero--full {
    min-height: 85vh;
}

.hero--compact {
    min-height: 40vh;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(28, 20, 16, 0.3) 0%,
        rgba(28, 20, 16, 0.7) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: var(--container-narrow);
    padding: var(--space-2xl) var(--space-lg);
}

.hero__label {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-gold);
    margin-bottom: var(--space-md);
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: var(--color-cream);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: var(--space-lg);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero__title span {
    color: var(--color-rust);
}

.hero__subtitle {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--color-parchment);
    line-height: 1.5;
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

.hero__divider {
    width: 60px;
    height: 2px;
    background: var(--color-gold);
    margin: 0 auto var(--space-lg);
}

.hero__dates {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--color-gold);
    letter-spacing: 0.15em;
    margin-bottom: var(--space-lg);
}


/* ==========================================================================
   HOMEPAGE SECTIONS
   ========================================================================== */

/* Section wrapper with alternating backgrounds */
.home-section {
    padding: var(--space-3xl) 0;
}

.home-section--cream {
    background: var(--color-cream);
}

.home-section--parchment {
    background: var(--color-parchment);
}

.home-section--dark {
    background: var(--color-ink);
    color: var(--color-cream);
}

.home-section--dark h2 {
    color: var(--color-cream);
}

.home-section--dark .section-label {
    color: var(--color-gold);
}

.home-section--dark .section-label::before,
.home-section--dark .section-label::after {
    background: linear-gradient(
        to right,
        transparent,
        var(--color-gold),
        transparent
    );
}

.home-section--teal {
    background: var(--color-teal);
    color: var(--color-cream);
}

.home-section--teal h2 {
    color: var(--color-cream);
}

.home-section--teal .section-label {
    color: var(--color-gold);
}

/* Section heading group */
.section-heading {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-heading h2 {
    margin-bottom: var(--space-sm);
}

.section-heading p {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-charcoal);
    max-width: 600px;
    margin: 0 auto;
}

.home-section--dark .section-heading p {
    color: var(--color-parchment);
}

/* Biography intro — two column with engraving */
.bio-intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

@media (min-width: 768px) {
    .bio-intro {
        grid-template-columns: 1fr 1fr;
    }
}

.bio-intro__image {
    position: relative;
}

.bio-intro__image img {
    border: 3px solid var(--color-gold);
    box-shadow: var(--shadow-card);
}

/* Decorative corner frame around image */
.bio-intro__image::before,
.bio-intro__image::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: var(--color-gold);
    border-style: solid;
    opacity: 0.6;
}

.bio-intro__image::before {
    top: -8px;
    left: -8px;
    border-width: 2px 0 0 2px;
}

.bio-intro__image::after {
    bottom: -8px;
    right: -8px;
    border-width: 0 2px 2px 0;
}

.bio-intro__text h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-rust);
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.bio-intro__dates {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--color-gold);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

/* Content cards grid */
.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--color-white);
    border: 1px solid rgba(28, 20, 16, 0.08);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-soft);
}

.card:hover {
    box-shadow: var(--shadow-lifted);
    transform: translateY(-3px);
}

.card__image {
    aspect-ratio: 3/2;
    overflow: hidden;
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card__image img {
    transform: scale(1.05);
}

.card__body {
    padding: var(--space-lg);
}

.card__category {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-teal);
    margin-bottom: var(--space-sm);
}

.card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--color-ink);
    margin-bottom: var(--space-sm);
    line-height: 1.35;
}

.card__title a {
    color: inherit;
}

.card__title a:hover {
    color: var(--color-rust);
}

.card__excerpt {
    font-size: 0.95rem;
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
}

.card__meta {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-charcoal);
    opacity: 0.7;
}

/* Dark section cards */
.home-section--dark .card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(184, 134, 11, 0.15);
}

.home-section--dark .card__title {
    color: var(--color-cream);
}

.home-section--dark .card__excerpt {
    color: var(--color-parchment);
}

/* Timeline feature */
.timeline {
    position: relative;
    padding-left: var(--space-2xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-gold);
    opacity: 0.4;
}

.timeline__item {
    position: relative;
    margin-bottom: var(--space-xl);
}

.timeline__item::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-2xl) + 6px);
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-rust);
    border: 3px solid var(--color-cream);
    box-shadow: 0 0 0 2px var(--color-gold);
}

.timeline__year {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: var(--space-xs);
}

.timeline__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-ink);
    margin-bottom: var(--space-xs);
}

.timeline__text {
    font-size: 0.95rem;
    color: var(--color-charcoal);
}

/* Pull quote — dramatic centred */
.pull-quote {
    background: var(--color-ink);
    color: var(--color-cream);
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
}

.pull-quote::before,
.pull-quote::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--color-gold);
    margin: 0 auto;
}

.pull-quote::before {
    margin-bottom: var(--space-xl);
}

.pull-quote::after {
    margin-top: var(--space-xl);
}

.pull-quote__text {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.3rem, 3vw, 2rem);
    line-height: 1.5;
    max-width: var(--container-narrow);
    margin: 0 auto var(--space-md);
    color: var(--color-cream);
}

.pull-quote__attribution {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-gold);
}


/* ==========================================================================
   BLOG / ARCHIVE
   ========================================================================== */

.archive-header {
    text-align: center;
    padding: var(--space-2xl) 0 var(--space-xl);
    border-bottom: 1px solid rgba(28, 20, 16, 0.1);
    margin-bottom: var(--space-2xl);
}

.archive-header h1 {
    margin-bottom: var(--space-sm);
}

.archive-header p {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-charcoal);
    font-size: 1.1rem;
}

/* Post list */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Featured post — full width */
.post-card--featured {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .post-card--featured {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .post-card--featured .card__image {
        aspect-ratio: auto;
        min-height: 300px;
    }
}

/* Pagination */
.pagination {
    text-align: center;
    padding: var(--space-xl) 0;
    border-top: 1px solid rgba(28, 20, 16, 0.1);
}

.pagination .page-numbers {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.5em 1em;
    color: var(--color-charcoal);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    color: var(--color-rust);
}

.pagination .page-numbers.current {
    font-weight: 700;
    border-bottom: 2px solid var(--color-rust);
}


/* ==========================================================================
   SINGLE POST / PAGE
   ========================================================================== */

.entry-header {
    text-align: center;
    padding: var(--space-2xl) 0;
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.entry-header .entry-category {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-teal);
    margin-bottom: var(--space-md);
}

.entry-header .entry-title {
    margin-bottom: var(--space-md);
}

.entry-meta {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-charcoal);
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.entry-meta span + span::before {
    content: '\2016';
    color: var(--color-gold);
    opacity: 0.5;
    margin-right: var(--space-md);
}

/* Featured image on single posts */
.entry-featured-image {
    max-width: var(--container-width);
    margin: 0 auto var(--space-2xl);
}

.entry-featured-image img {
    width: 100%;
    border-bottom: 3px solid var(--color-gold);
}

/* Entry content — rich article typography */
.entry-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-2xl);
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(28, 20, 16, 0.1);
}

.entry-content h3 {
    margin-top: var(--space-xl);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content figure {
    margin: var(--space-xl) 0;
}

.entry-content figcaption {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-charcoal);
    text-align: center;
    margin-top: var(--space-sm);
}

.entry-content a {
    text-decoration: underline;
    text-decoration-color: var(--color-gold);
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.entry-content a:hover {
    text-decoration-color: var(--color-rust);
}

/* Post navigation */
.post-navigation {
    max-width: var(--container-narrow);
    margin: 0 auto var(--space-2xl);
    padding: var(--space-xl) var(--space-lg);
    border-top: 2px solid var(--color-gold);
    border-bottom: 2px solid var(--color-gold);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.post-navigation .nav-label {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-charcoal);
    display: block;
    margin-bottom: var(--space-xs);
}

.post-navigation a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--color-ink);
    line-height: 1.4;
}

.post-navigation a:hover {
    color: var(--color-rust);
}

.post-navigation .nav-next {
    text-align: right;
}


/* ==========================================================================
   PAGE TEMPLATES
   ========================================================================== */

/* Biography page */
.page-section {
    padding: var(--space-2xl) 0;
}

.page-section + .page-section {
    border-top: 1px solid rgba(28, 20, 16, 0.08);
}

/* People CPT grid */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-lg);
}

.person-card {
    text-align: center;
}

.person-card__image {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-md);
    border: 3px solid var(--color-gold);
    filter: sepia(0.15);
    transition: filter var(--transition-base);
}

.person-card:hover .person-card__image {
    filter: sepia(0);
}

.person-card__name {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-ink);
    margin-bottom: var(--space-xs);
}

.person-card__role {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-charcoal);
}


/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-charcoal);
    padding: var(--space-md) 0;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.breadcrumbs a {
    color: var(--color-charcoal);
}

.breadcrumbs a:hover {
    color: var(--color-rust);
}

.breadcrumbs .sep {
    margin: 0 0.4em;
    opacity: 0.5;
}


/* ==========================================================================
   SEARCH
   ========================================================================== */

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-form .search-field {
    flex: 1;
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.75em 1em;
    border: 2px solid rgba(28, 20, 16, 0.15);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: var(--color-white);
    color: var(--color-ink);
}

.search-form .search-field:focus {
    outline: none;
    border-color: var(--color-gold);
}

.search-form .search-submit {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 0.75em 1.5em;
}


/* ==========================================================================
   404 PAGE
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.error-404__number {
    font-family: var(--font-display);
    font-size: clamp(5rem, 15vw, 12rem);
    color: var(--color-rust);
    line-height: 1;
    opacity: 0.15;
    margin-bottom: var(--space-md);
}

.error-404 h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: var(--space-md);
}

.error-404 p {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-charcoal);
    margin-bottom: var(--space-xl);
}


/* ==========================================================================
   FOOTER — THE CURTAIN CALL
   ========================================================================== */

.site-footer {
    background: var(--color-ink);
    color: var(--color-cream);
    border-top: 3px solid var(--color-gold);
    position: relative;
}

/* Decorative double gold line at top */
.site-footer::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--color-gold);
    opacity: 0.3;
    margin-top: 4px;
}

.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
}

.footer-branding {
    margin-bottom: var(--space-lg);
}

.footer-branding .site-title {
    font-size: 1.2rem;
}

.footer-nav {
    margin-bottom: var(--space-lg);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
}

.footer-nav li + li::before {
    content: '\2016';
    color: var(--color-gold);
    opacity: 0.3;
    margin: 0 0.8em;
    font-size: 0.8rem;
}

.footer-nav a {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-parchment);
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--color-gold);
}

/* Ornamental flourish before copyright */
.footer-ornament {
    font-size: 1.2rem;
    color: var(--color-gold);
    opacity: 0.4;
    margin-bottom: var(--space-md);
}

.site-info {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-charcoal);
    opacity: 0.6;
}

.site-info a {
    color: var(--color-gold);
    opacity: 0.8;
}


/* ==========================================================================
   FORMS
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.75em 1em;
    border: 2px solid rgba(28, 20, 16, 0.15);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-ink);
    width: 100%;
    transition: border-color var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.15);
}

label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-charcoal);
    display: block;
    margin-bottom: var(--space-xs);
}


/* ==========================================================================
   WIDGETS & SIDEBAR
   ========================================================================== */

.widget {
    margin-bottom: var(--space-xl);
}

.widget-title {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-charcoal);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-gold);
    margin-bottom: var(--space-md);
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid rgba(28, 20, 16, 0.06);
}

.widget a {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-ink);
}

.widget a:hover {
    color: var(--color-rust);
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-cream);
    border-radius: var(--radius-md);
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--color-ink);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.skip-link {
    background-color: var(--color-rust);
    color: var(--color-white);
    padding: 0.5em 1em;
}


/* ==========================================================================
   LAYOUT OPTIONS — from meta box
   ========================================================================== */

/* Full-width layout */
.layout-full-width .entry-content,
.layout-full-width .entry-header {
    max-width: var(--container-width);
}

/* No sidebar — already default, narrow content */
.layout-no-sidebar .entry-content {
    max-width: var(--container-narrow);
}

/* Hero hidden */
.layout-hero-hidden .hero {
    display: none;
}

/* Title hidden */
.layout-title-hidden .entry-header {
    display: none;
}


/* ==========================================================================
   ANIMATIONS — STAGE ENTRANCE
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered entrance for card grids */
.card-grid .card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.card-grid .card:nth-child(1) { transition-delay: 0s; }
.card-grid .card:nth-child(2) { transition-delay: 0.1s; }
.card-grid .card:nth-child(3) { transition-delay: 0.2s; }
.card-grid .card:nth-child(4) { transition-delay: 0.3s; }
.card-grid .card:nth-child(5) { transition-delay: 0.4s; }
.card-grid .card:nth-child(6) { transition-delay: 0.5s; }

/* Hero content entrance */
.hero__content {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero__label {
    animation: fadeIn 0.6s ease 0.4s both;
}

.hero__divider {
    animation: fadeIn 0.6s ease 0.6s both;
}


/* ==========================================================================
   RESEARCH-INSPIRED ENHANCEMENTS
   Georgian playbill conventions, Grimaldi's polka dots, Victorian broadside details
   ========================================================================== */

/* Reversed-out label — Victorian broadside convention: white text on dark strip */
.label-reversed {
    display: inline-block;
    background: var(--color-ink);
    color: var(--color-cream);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.25em 0.8em;
    margin-bottom: var(--space-md);
}

.label-reversed--rust {
    background: var(--color-rust);
    color: var(--color-white);
}

.label-reversed--teal {
    background: var(--color-teal);
    color: var(--color-white);
}

/* Grimaldi's polka dots — subtle CSS pattern for accent backgrounds */
.polka-dot-bg {
    background-color: var(--color-parchment);
    background-image: radial-gradient(
        circle,
        var(--color-rust) 6px,
        transparent 6px
    );
    background-size: 48px 48px;
    background-position: 0 0, 24px 24px;
}

/* Subtle polka dot — for pull quotes and feature sections */
.polka-dot-subtle {
    position: relative;
}

.polka-dot-subtle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    background-image: radial-gradient(
        circle,
        var(--color-rust) 5px,
        transparent 5px
    );
    background-size: 40px 40px;
}

/* Double rule divider — more period-authentic thick-thin rule */
.divider--double {
    max-width: 250px;
    margin: var(--space-2xl) auto;
}

.divider--double::before {
    height: 3px;
    opacity: 0.5;
}

.divider--double::after {
    height: 1px;
    opacity: 0.25;
    margin-top: 3px;
}

/* Inset page edges — aged document feel for content areas */
.page-feel {
    box-shadow:
        inset 0 0 80px rgba(28, 20, 16, 0.04),
        0 2px 20px rgba(28, 20, 16, 0.08);
    border: 1px solid rgba(28, 20, 16, 0.06);
}

/* Darkened-edge vignette for hero sections */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(28, 20, 16, 0.25) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Playbill-style centred title block with rules above and below */
.title-block {
    text-align: center;
    padding: var(--space-xl) 0;
    border-top: 3px solid var(--color-ink);
    border-bottom: 1px solid var(--color-ink);
    margin-bottom: var(--space-xl);
    position: relative;
}

.title-block::before {
    content: '';
    display: block;
    height: 1px;
    background: var(--color-ink);
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    opacity: 0.3;
}

/* Large year/date stamp — Fat Face style prominent numbers */
.year-stamp {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--color-rust);
    line-height: 1;
    letter-spacing: 0.05em;
    opacity: 0.12;
}

/* Small caps for metadata — period convention */
.small-caps {
    font-family: var(--font-heading);
    font-variant: small-caps;
    letter-spacing: 0.1em;
    font-size: 0.9em;
}

/* Scalloped border — evoking the clown's ruff/collar */
.ruff-border {
    border-bottom: 2px solid var(--color-gold);
    position: relative;
}

.ruff-border::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-conic-gradient(
        var(--color-gold) 0% 25%,
        transparent 0% 50%
    ) 0 0 / 12px 12px;
    opacity: 0.3;
}


/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    body::before,
    .site-header,
    .site-footer,
    .nav-mobile,
    .nav-mobile__overlay,
    .menu-toggle,
    .btn,
    .hero__overlay,
    .share-fab {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .entry-content {
        max-width: 100%;
    }
}
