/*
Theme Name:        Craig Courtney
Theme URI:         https://craigcourtney.com
Author:            Studio
Description:       Custom WordPress block theme for composer Craig Courtney. Deep navy, warm gold, and classical typography.
Version:           1.0.0
Requires at least: 6.4
Tested up to:      6.7
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       craig-courtney
*/

/* ─────────────────────────────────────────────────────────
   SELF-HOSTED FONTS
───────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/CormorantGaramond-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/CormorantGaramond-LightItalic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/CormorantGaramond-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/CormorantGaramond-Italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/CormorantGaramond-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/CormorantGaramond-SemiBoldItalic.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant SC';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/CormorantSC-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/CormorantSC-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant SC';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/CormorantSC-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/Jost-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/Jost-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/Jost-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/Jost-SemiBold.woff2') format('woff2');
}

/* ─────────────────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --cc-bg:        #06101e;
  --cc-bg2:       #0c1828;
  --cc-bg3:       #122030;
  --cc-bg4:       #1a2e44;
  --cc-bg-deeper: #040d18;

  /* Gold accents */
  --cc-gold:      #c9a84c;
  --cc-gold-lt:   #e8d8a0;
  --cc-gold-dk:   #7a5e1e;

  /* Cobalt */
  --cc-blue:      #8ab4f8;
  --cc-blue-mid:  #3a7bd5;
  --cc-blue-dk:   #1a3a6e;

  /* Text */
  --cc-text1:     #e8e0d0;
  --cc-text2:     #9a9080;
  --cc-text3:     #8c7568; /* lightened from #5a5448 — WCAG AA 4.85:1 on dark bg */

  /* Borders & overlays */
  --cc-border:           rgba(201,168,76,0.12);
  --cc-border-strong:    rgba(201,168,76,0.28);
  --cc-border-active:    rgba(201,168,76,0.4);
  --cc-border-blue:      rgba(138,180,248,0.2);
  --cc-border-blue-mid:  rgba(138,180,248,0.25);
  --cc-gold-bg-soft:     rgba(201,168,76,0.06);
  --cc-gold-bg-med:      rgba(201,168,76,0.08);
  --cc-gold-bg-hover:    rgba(201,168,76,0.12);
  --cc-blue-bg-soft:     rgba(138,180,248,0.06);
  --cc-bg-overlay:       rgba(6,16,30,0.96);

  /* Typography */
  --cc-font-serif-sc: 'Cormorant SC', Georgia, serif;
  --cc-font-serif:    'Cormorant Garamond', Georgia, serif;
  --cc-font-sans:     'Jost', system-ui, sans-serif;

  /* Layout */
  --cc-nav-height: 72px;
  --cc-section-x: 52px;
  --cc-max-width: 1360px;
}

/* ─────────────────────────────────────────────────────────
   BASE RESET & ROOT
───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  background-color: var(--cc-bg);
  color: var(--cc-gold-lt);
  font-family: var(--cc-font-serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─────────────────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--cc-font-serif-sc);
  font-weight: 800;
  color: var(--cc-gold);
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-wrap: pretty;
}

h1, h2 { font-weight: 600; }

p { text-wrap: pretty; margin-bottom: 1.6em; }
p:last-child { margin-bottom: 0; }
/* Empty paragraphs injected by wpautop on FSE template output (browser-parsed
   from stray </p> tags) inherit our margin and create phantom vertical space. */
p:empty { display: none; margin: 0; }
/* theme.json blockGap:0 generates a high-specificity WP rule that zeros
   margin-block-end on all flow-layout children, overriding the p rule above.
   Re-assert paragraph spacing inside post content. */
.wp-block-post-content p { margin-block-end: 1.6em !important; }
.wp-block-post-content p:last-child { margin-block-end: 0 !important; }
.wp-block-post-content p:empty { margin-block-end: 0 !important; }

a {
  color: var(--cc-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--cc-gold-lt); }

em, i { font-style: italic; }
strong, b { font-weight: 600; color: var(--cc-text1); }

blockquote {
  font-family: var(--cc-font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.2em;
  color: var(--cc-gold-lt);
  border-left: 2px solid var(--cc-gold-dk);
  padding: 0 0 0 1.25rem;
  margin: 1.5em 0;
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────────────────── */
.wp-block-group.alignfull,
.wp-block-cover.alignfull {
  width: 100%;
  max-width: none;
}

.is-layout-constrained > * {
  max-width: var(--wp--style--global--content-size, 1060px);
  margin-left: auto;
  margin-right: auto;
}

/* ─────────────────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────────────────── */
.wp-block-navigation {
  font-family: var(--cc-font-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wp-block-navigation a {
  color: var(--cc-text2);
  transition: color 0.2s;
}
.wp-block-navigation a:hover {
  color: var(--cc-gold-lt);
}
.wp-block-navigation .current-menu-item > a {
  color: var(--cc-gold);
}

/* Nav CTA — add class "nav-cta" to menu item */
.wp-block-navigation .nav-cta > a {
  padding: 7px 16px;
  border: 1px solid var(--cc-border-strong);
  border-radius: 3px;
  color: var(--cc-gold);
  transition: background 0.2s, border-color 0.2s;
}
.wp-block-navigation .nav-cta > a:hover {
  background: var(--cc-gold-bg-med);
  border-color: var(--cc-gold);
}

/* ─────────────────────────────────────────────────────────
   HEADER (fixed, scroll-aware)
───────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  width: 100%;
  padding: 0;
  height: var(--cc-nav-height);
  background: var(--cc-bg-overlay);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.35s ease;
}

.site-header > .wp-block-group {
  width: 100%;
  max-width: var(--cc-max-width);
  margin: 0 auto;
  padding: 0 150px 0 52px;
  height: var(--cc-nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 32px rgba(0,0,0,0.4);
}

.site-header.scrolled > .wp-block-group {
  border-bottom-color: var(--cc-border);
}

/* Offset the fixed header below the WP admin bar when logged in. */
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
@media screen and (max-width: 600px) {
  /* Admin bar becomes position:absolute below 600px, so scrolls away. */
  body.admin-bar .site-header { top: 0; }
}

/* ─────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────── */
.wp-block-button__link,
.wp-element-button {
  font-family: var(--cc-font-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 12px 28px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--cc-border-active);
  color: var(--cc-gold);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--cc-gold-bg-soft);
  border-color: var(--cc-gold);
}

.wp-block-button.is-style-ghost .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--cc-border-blue-mid);
  color: var(--cc-blue);
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
  background: var(--cc-blue-bg-soft);
  border-color: var(--cc-blue);
}

/* ─────────────────────────────────────────────────────────
   SECTION EYEBROW LABELS
───────────────────────────────────────────────────────── */
.section-eyebrow {
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cc-gold);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--cc-gold-dk);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 65% at 22% 28%,
      rgba(26,58,110,0.60) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 22% 28%,
      rgba(58,123,213,0.20) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-section > * { position: relative; z-index: 1; }

.hero-section > .wp-block-columns {
  max-width: var(--cc-max-width);
  margin-left: auto;
  margin-right: auto;
}

/* Hero text column — padding here so we can override responsively */
.hero-text-col {
  padding: 180px 52px 80px 96px;
}

/* Hero name — clamp size, allow the optional <br class="name-break"> to control stacking */
.hero-section .hero-name {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
}
.hero-section .hero-name .name-break { display: inline; }

/* Hero photo column — offset by nav height */
.hero-photo-col {
  padding-top: var(--cc-nav-height);
  overflow: hidden;
}
.hero-photo-col .wp-block-image {
  height: 680px;
  overflow: hidden;
}
.hero-photo-col .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ─────────────────────────────────────────────────────────
   STATS STRIP
───────────────────────────────────────────────────────── */
.stats-strip > .wp-block-columns {
  max-width: calc(var(--cc-max-width) - 2 * var(--cc-section-x));
  margin-left: auto;
  margin-right: auto;
}

.stats-strip .wp-block-column:not(:last-child) {
  border-right: 1px solid var(--cc-border);
}

.stats-strip .stat-number {
  font-family: var(--cc-font-serif);
  font-size: 36px;
  font-weight: 300;
  color: var(--cc-gold);
  line-height: 1;
}

.stats-strip .stat-label {
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cc-text2);
  margin-top: 6px;
}

/* ─────────────────────────────────────────────────────────
   FEATURED WORKS — homepage query
───────────────────────────────────────────────────────── */
.featured-works-section {
  padding: 88px 0 !important; /* override WP inline padding; x-axis handled per-child */
  max-width: var(--cc-max-width);
  margin: 0 auto;
}

.featured-works-section .works-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  padding: 0 var(--cc-section-x);
}

/* Featured works: horizontal slider (overrides WP grid layout) */
.featured-works-section .wp-block-query {
  position: relative;
  /* clip the cards so they appear to slide in/out of view */
}

.featured-works-section .wp-block-post-template,
.featured-works-section .wp-block-post-template.is-layout-grid,
.featured-works-section .wp-block-post-template.is-layout-flex {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 2px 8px; /* room for card hover-lift + focus rings */
  margin: 0 -2px;
}
.featured-works-section .wp-block-post-template::-webkit-scrollbar { display: none; }

.featured-works-section .wp-block-post-template > * {
  flex: 0 0 260px;
  scroll-snap-align: start;
  list-style: none;
}

@media (max-width: 900px) {
  .featured-works-section .wp-block-post-template > * { flex-basis: 240px; }
}

/* At narrow widths, restore side gutters so slider cards don't touch the edge.
   Zero out the header's own side padding since the section now provides it. */
@media (max-width: 768px) {
  .featured-works-section {
    padding-left: var(--cc-section-x) !important;
    padding-right: var(--cc-section-x) !important;
  }
  .featured-works-section .works-header {
    padding-left: 0;
    padding-right: 0;
  }
}

/* At ≤500px, show ~85% card width so the next card peeks in — the visual cue
   that the slider is scrollable. The 4px preserves the existing hover-lift room. */
@media (max-width: 500px) {
  .featured-works-section .wp-block-post-template > * { flex-basis: calc(85% - 4px); }
}

/* Slider arrows (injected by main.js) */
.featured-works-section .slider-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(6, 16, 30, 0.88);
  border: 1px solid var(--cc-border-active);
  color: var(--cc-gold);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.featured-works-section .slider-arrow:hover {
  background: var(--cc-bg4);
  color: var(--cc-gold-lt);
}
.featured-works-section .slider-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.featured-works-section .slider-prev { left: 6px; }
.featured-works-section .slider-next { right: 6px; }

/* On narrow mobile, shrink arrows slightly and keep them visible —
   JS already hides them via is-hidden when there's nothing to scroll. */
@media (max-width: 600px) {
  .featured-works-section .slider-arrow {
    width: 36px;
    height: 36px;
    font-size: 26px;
  }
}

/* ─────────────────────────────────────────────────────────
   MUSIC WORK CARDS
───────────────────────────────────────────────────────── */
.work-card {
  position: relative; /* anchor for stretched-link overlay */
  display: flex;
  flex-direction: column;
  background: var(--cc-bg2);
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.22s ease, transform 0.22s ease;
  cursor: pointer;
}
.work-card:hover {
  border-color: var(--cc-border-strong);
  transform: translateY(-3px);
}

/* Stretched link: make the whole card a click target by extending the title
   anchor over the entire card via a transparent ::after overlay.
   Interactive children (buy link) need position+z-index to sit above it. */
.work-card .work-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.work-card .work-buy,
.work-card .wp-block-post-terms a {
  position: relative;
  z-index: 2;
}

.work-card img {
  width: 100%;
  aspect-ratio: 24 / 25;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--cc-bg3);
}
.work-card img.default-cover,
.catalog-grid .work-card-thumb img.default-cover,
.single-work-media img.default-cover,
.wp-block-post-featured-image img.default-cover {
  object-fit: contain;
  object-position: center;
  padding: 18%;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(26,58,110,0.35) 0%, transparent 70%),
    var(--cc-bg3);
}

.work-card .card-body { flex: 1; display: flex; flex-direction: column; padding: 14px 14px 16px; }

.work-card .work-title {
  font-family: var(--cc-font-serif-sc);
  font-size: 16px;
  font-weight: 600;
  color: var(--cc-gold-lt);
  letter-spacing: 0.02em;
  line-height: 1.3;
  flex: 1;
  margin-bottom: 4px;
}

.work-card .work-meta {
  font-family: var(--cc-font-sans);
  font-size: 14px;
  color: var(--cc-text2);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.work-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--cc-border);
}

.work-card .work-voicing {
  font-family: var(--cc-font-sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cc-text2);
  text-transform: uppercase;
}

.work-card .work-buy {
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-gold);
}
.work-card .work-buy:hover { color: var(--cc-gold-lt); }

.work-audio {
  padding: 10px 14px;
  border-top: 1px solid rgba(201,168,76,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6,16,30,0.5);
}

.audio-play-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cc-gold-bg-hover);
  border: 1px solid var(--cc-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.audio-play-btn:hover { background: var(--cc-border-strong); }
.audio-play-btn svg { margin-left: 2px; }

/* ─────────────────────────────────────────────────────────
   COLLECTION CARDS
───────────────────────────────────────────────────────── */
.collection-card {
  background: var(--cc-bg2);
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.22s ease;
}
.collection-card:hover { border-color: var(--cc-border-strong); }
.collection-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--cc-gold-dk), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.collection-card:hover::before { opacity: 1; }

/* ─────────────────────────────────────────────────────────
   BIO TEASER
───────────────────────────────────────────────────────── */
.bio-teaser-section > .wp-block-columns {
  max-width: var(--cc-max-width);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  /* When columns stack, replace the generous 72px desktop padding with the standard gutter */
  .bio-teaser-section .wp-block-column[style*="padding:64px 72px"] {
    padding-left: var(--cc-section-x) !important;
    padding-right: var(--cc-section-x) !important;
  }
}

/* ─────────────────────────────────────────────────────────
   LARGE WORKS SECTION
───────────────────────────────────────────────────────── */
.large-works-section {
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(26,58,110,0.25) 0%, transparent 70%),
    var(--cc-bg);
  border-top: 1px solid var(--cc-border);
  border-bottom: 1px solid var(--cc-border);
  padding: 88px var(--cc-section-x);
}

.large-works-section .wp-block-columns {
  grid-template-columns: 2fr 1fr 1fr;
}

/* ─────────────────────────────────────────────────────────
   EVENTS LIST
───────────────────────────────────────────────────────── */
.events-section {
  background: var(--cc-bg2);
  border-top: 1px solid var(--cc-border);
}

.event-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  column-gap: 32px;
  row-gap: 2px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--cc-border);
  text-align: left;
}
.event-item:first-child { border-top: 1px solid var(--cc-border); }

.event-item > .event-month { grid-column: 1; }
.event-item > .event-day   { grid-column: 1; margin: 2px 0 4px; }
.event-item > .event-time  { grid-column: 1; }
.event-item > .event-info  { grid-column: 2; grid-row: 1 / span 3; text-align: left; }
.event-item > .event-info > * { text-align: left; }

.event-month {
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cc-gold);
  display: block;
}
.event-day {
  font-family: var(--cc-font-serif);
  font-size: 32px;
  font-weight: 300;
  color: var(--cc-gold-lt);
  line-height: 1;
  display: block;
}
.event-time {
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cc-text2);
  display: block;
}
/* Higher specificity beats WP's h2/h3 global styles */
h2.event-name,
h3.event-name,
h4.event-name,
.event-name {
  font-family: var(--cc-font-serif-sc);
  font-size: 24px;
  font-weight: 800;
  color: var(--cc-gold-lt);
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: left;
  margin: 0 0 6px 0;
}
.event-location-name {
  display: block;
  font-family: var(--cc-font-serif-sc);
  font-size: 16px;
  font-weight: 800;
  color: var(--cc-text1);
  letter-spacing: 0.02em;
  text-align: left;
}
.event-location {
  font-family: var(--cc-font-sans);
  font-size: 14px;
  font-weight: 800;
  color: var(--cc-text2);
  letter-spacing: 0.06em;
  margin-top: 3px;
  display: block;
  text-align: left;
}
.event-type-badge {
  font-family: var(--cc-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--cc-border-blue);
  color: var(--cc-blue);
  white-space: nowrap;
}
.events-empty {
  padding: 40px 0;
  font-family: var(--cc-font-serif);
  font-style: italic;
  color: var(--cc-text2);
  text-align: center;
}

/* ─────────────────────────────────────────────────────────
   CONTACT FORM
───────────────────────────────────────────────────────── */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  background: var(--cc-bg2);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 3px;
  color: var(--cc-gold-lt);
  font-family: var(--cc-font-serif);
  font-size: 16px;
  padding: 12px 16px;
  width: 100%;
  transition: border-color 0.2s;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  border-color: rgba(201,168,76,0.5);
  outline: none;
}

.wpcf7-form label {
  font-family: var(--cc-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cc-text2);
  display: block;
  margin-bottom: 6px;
}

.wpcf7-form .wpcf7-submit {
  appearance: none;
  font-family: var(--cc-font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 11px 32px;
  border: 1px solid var(--cc-border-active);
  border-radius: 3px;
  background: transparent;
  color: var(--cc-gold);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.wpcf7-form .wpcf7-submit:hover {
  background: var(--cc-gold-bg-med);
  border-color: var(--cc-gold);
}

/* ─────────────────────────────────────────────────────────
   AUDIO PLAYER
───────────────────────────────────────────────────────── */
audio {
  width: 100%;
  height: 36px;
  border-radius: 3px;
  accent-color: var(--cc-gold);
  background: var(--cc-bg2);
  margin-top: 10px;
}
audio::-webkit-media-controls-panel { background-color: var(--cc-bg2); }
audio::-webkit-media-controls-play-button {
  filter: invert(72%) sepia(40%) saturate(500%) hue-rotate(5deg);
}

/* ─────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────── */
.site-footer {
  background: var(--cc-bg-deeper);
  border-top: 1px solid var(--cc-border);
}

.site-footer > .wp-block-group {
  padding-left: var(--cc-section-x);
  padding-right: var(--cc-section-x);
}

.footer-col-title {
  font-family: var(--cc-font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cc-gold);
  margin-bottom: 16px;
}

.site-footer .wp-block-navigation a {
  font-family: var(--cc-font-sans);
  font-size: 13px;
  color: var(--cc-text2);
  letter-spacing: 0.02em;
  text-transform: none;
}
.site-footer .wp-block-navigation a:hover { color: var(--cc-gold-lt); }

/* ─────────────────────────────────────────────────────────
   SINGLE MUSIC WORK
───────────────────────────────────────────────────────── */
.single-music_work .site-header {
  background: var(--cc-bg-overlay);
  border-bottom-color: var(--cc-border);
}

.back-link-wrap {
  margin-bottom: 24px;
}
.back-link {
  font-family: var(--cc-font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cc-text2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.back-link:hover {
  color: var(--cc-gold);
}

.single-work-header {
  padding: 140px var(--cc-section-x) 80px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%,
      rgba(26,58,110,0.35) 0%, transparent 70%),
    var(--cc-bg);
}

.work-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}
.work-detail-badge,
.wp-block-post-terms.work-detail-meta a {
  display: inline-block;
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--cc-gold-bg-med);
  border: 1px solid rgba(201,168,76,0.2);
  color: var(--cc-gold);
  text-decoration: none;
  margin: 0 4px 4px 0;
}

/* Single work body: centered cover + audio + purchase; optional notes below */
.single-work-body {
  padding: 56px var(--cc-section-x) 88px;
}
.single-work-media {
  max-width: 480px;
  margin: 0 auto;
}
.single-work-media .single-work-cover,
.single-work-media .wp-post-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  margin-bottom: 24px;
}
.single-work-audio {
  width: 100%;
  display: block;
  margin-bottom: 24px;
}
.single-work-purchase {
  text-align: center;
}
.single-work-publisher-label {
  font-family: var(--cc-font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cc-text2);
  margin: 0 0 10px;
}
.single-work-purchase-btn {
  display: inline-block;
  min-width: 220px;
  text-align: center;
  white-space: nowrap;
  background: transparent;
  border: 1px solid var(--cc-border-active);
  color: var(--cc-gold);
  text-decoration: none;
}
.single-work-purchase-btn:hover {
  background: var(--cc-gold-bg-soft);
  border-color: var(--cc-gold);
  color: var(--cc-gold-lt);
}

.single-work-notes {
  max-width: 720px;
  margin: 64px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--cc-border);
}
.single-work-notes .section-eyebrow {
  text-align: center;
  margin-bottom: 20px;
}
.single-work-notes p {
  font-family: var(--cc-font-serif);
  font-size: 16px;
  line-height: 1.7;
  color: var(--cc-text1);
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .single-work-body { padding: 40px 20px 64px; }
  .single-work-notes { margin-top: 48px; padding-top: 36px; }
}

/* ─────────────────────────────────────────────────────────
   SINGLE EVENT PAGE
───────────────────────────────────────────────────────── */
.event-meta-card .event-month {
  font-size: 12px;
  letter-spacing: 0.2em;
  margin-bottom: 2px;
}
.event-meta-card .event-day {
  font-size: 48px;
  margin-bottom: 0;
}
.event-meta-card .event-location-name {
  font-size: 15px;
  margin-bottom: 4px;
}
.event-meta-card .event-location {
  font-size: 12px;
}

/* event_when shortcode output */
.event-when {
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cc-gold-lt);
  margin-top: 10px;
  display: block;
}

/* OpenStreetMap embed */
.event-map-wrap {
  margin-top: 24px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--cc-border);
}
.event-map-embed {
  display: block;
  width: 100%;
  height: 280px;
  border: none;
  filter: invert(0.9) hue-rotate(180deg) saturate(0.7); /* dark-mode map tint */
}
.event-map-link {
  display: block;
  padding: 8px 12px;
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cc-text2);
  background: var(--cc-bg2);
  text-align: right;
  transition: color 0.2s;
}
.event-map-link:hover { color: var(--cc-gold); }

/* No-description layout: hide the empty right column, center and widen the meta/map */
body.event-no-description .wp-block-columns {
  justify-content: center;
}
body.event-no-description .wp-block-columns > .wp-block-column:first-child {
  flex-basis: 600px !important;
  max-width: 600px;
}
body.event-no-description .wp-block-columns > .wp-block-column:last-child {
  display: none;
}
body.event-no-description .event-map-embed {
  height: 360px;
}

/* ─────────────────────────────────────────────────────────
   CATALOG ARCHIVE
───────────────────────────────────────────────────────── */
.catalog-controls {
  margin-bottom: 32px;
}

.catalog-search-wrap {
  margin-bottom: 18px;
}
.catalog-search {
  width: 100%;
  max-width: 480px;
  font-family: var(--cc-font-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 11px 16px;
  background: var(--cc-bg2);
  border: 1px solid var(--cc-border-active);
  border-radius: 3px;
  color: var(--cc-text1);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.catalog-search::placeholder { color: var(--cc-text3); }
.catalog-search:focus {
  border-color: var(--cc-gold);
  background: rgba(12, 24, 40, 0.85);
}

.catalog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.catalog-filters.voicing-filters {
  margin-bottom: 0;
}
.filter-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--cc-font-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 15px;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 3px;
  color: var(--cc-text2);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--cc-border-active);
  color: var(--cc-gold);
  background: var(--cc-gold-bg-soft);
}

.catalog-no-results {
  text-align: center;
  font-family: var(--cc-font-serif);
  font-style: italic;
  color: var(--cc-text2);
  padding: 48px 0;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
/* Match the homepage featured-works framing: 11/16 box + object-fit:cover.
   Real-image ratios (median 0.6822) are within 1% of the box (0.6875), so the
   tiny center-crop is imperceptible and there's no visible vertical gap. */
.catalog-grid .work-card-thumb {
  display: block;
  aspect-ratio: 11 / 16;
  overflow: hidden;
  background: var(--cc-bg3);
}
.catalog-grid .work-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.catalog-grid .work-card-thumb img.default-cover {
  object-fit: contain;
  padding: 16%;
}
.catalog-grid .work-title a {
  color: inherit;
  text-decoration: none;
}
.catalog-grid .work-title a:hover { color: var(--cc-gold); }
@media (max-width: 1024px) { .catalog-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .catalog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .catalog-grid { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────────────────────
   404 PAGE
───────────────────────────────────────────────────────── */
.error-404 {
  min-height: calc(100vh - var(--cc-nav-height));
  min-height: calc(100svh - var(--cc-nav-height));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px var(--cc-section-x) 80px;
}
.error-404 .error-code {
  font-family: var(--cc-font-serif-sc);
  font-size: clamp(80px, 14vw, 140px);
  color: var(--cc-gold);
  line-height: 1;
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .large-works-section .wp-block-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body { font-size: 24px; }

  :root {
    --cc-section-x: 24px;
  }

  .hero-section .wp-block-columns {
    flex-direction: column !important;
  }

  .hero-text-col {
    padding: 120px 24px 60px;
  }

  .hero-photo-col {
    padding-top: 0;
  }
  .hero-photo-col .wp-block-image {
    height: 50vh;
    height: 50svh;
  }

  .stats-strip .wp-block-column:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--cc-border);
  }

  .wp-block-navigation {
    font-size: 14px;
    letter-spacing: 0.1em;
  }

  .single-work-header {
    padding: 120px var(--cc-section-x) 60px;
  }
}

@media (max-width: 600px) {
  /* Force the hero name onto a single line by hiding the explicit <br> */
  .hero-section .hero-name {
    font-size: clamp(32px, 11vw, 56px);
  }
  .hero-section .hero-name .name-break {
    display: none;
  }

  .hero-text-col {
    padding: 110px 20px 48px;
  }

  .hero-photo-col {
    display: none;
  }

  .event-item {
    grid-template-columns: 60px 1fr;
    column-gap: 20px;
  }
}

/* ─────────────────────────────────────────────────────────
   TAXONOMY BADGES (single work + archive links)
───────────────────────────────────────────────────────── */
.work-detail-badge,
.wp-block-post-terms.work-detail-meta a {
  font-size: 13px;
  padding: 6px 14px;
}

/* ─────────────────────────────────────────────────────────
   QUERY PAGINATION
───────────────────────────────────────────────────────── */
.wp-block-query-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 56px;
  padding-bottom: 24px;
}

.wp-block-query-pagination-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wp-block-query-pagination-numbers .page-numbers,
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  font-family: var(--cc-font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: 1px solid var(--cc-border);
  border-radius: 3px;
  color: var(--cc-text2);
  background: transparent;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.wp-block-query-pagination-numbers .page-numbers.current,
.wp-block-query-pagination-numbers .page-numbers:hover,
.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
  border-color: var(--cc-border-active);
  color: var(--cc-gold);
  background: var(--cc-gold-bg-soft);
}

.wp-block-query-pagination-numbers .page-numbers.current {
  border-color: var(--cc-gold);
  color: var(--cc-gold-lt);
}

.wp-block-query-pagination-numbers .page-numbers.dots {
  border-color: transparent;
  pointer-events: none;
  color: var(--cc-text3);
}


/* ─────────────────────────────────────────────────────────
   HAS-DIM-COLOR CONTRAST FIX
   theme.json palette "dim" was #5a5448 (fails WCAG AA on dark bgs).
   The CSS var --cc-text3 was already lightened to #8c7568 (4.86:1).
   This override ensures the WordPress-generated class matches.
───────────────────────────────────────────────────────── */
.has-dim-color { color: #8c7568 !important; }

/* ─────────────────────────────────────────────────────────
   MOBILE NAV BAR + OVERLAY
───────────────────────────────────────────────────────── */

/* Always show a dark-blue bar on mobile so the header is visible at page top */
@media (max-width: 782px) {
  .site-header {
    background: var(--cc-bg4);
    border-bottom-color: var(--cc-border);
  }
  .site-header.scrolled {
    background: var(--cc-bg2);
  }
}

/* Hamburger / close button */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  color: var(--cc-gold-lt) !important;
  min-width: 44px;
  min-height: 44px;
}

/*
 * WordPress injects high-specificity inline styles:
 *   .wp-block-navigation:not(.has-background) .overlay.is-menu-open { background:#fff }
 *   .wp-block-navigation:not(.has-text-color) .overlay.is-menu-open { color:#000 }
 * We must beat those with !important and match or exceed their specificity.
 */
.wp-block-navigation__responsive-container.is-menu-open {
  background-color: var(--cc-bg3) !important;
  color: var(--cc-text1) !important;
  /* Top-drawer: fixed from top, ~half screen */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  min-height: 52vh !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  padding: var(--cc-nav-height) 32px 48px !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.55) !important;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* Override WP's items-justified-right which pins items to the top-right corner */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  --navigation-layout-justification-setting: center !important;
  width: 100%;
  max-width: 360px;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0 !important;
  padding-top: 0 !important;
}

/* Individual nav items — large, readable list */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid var(--cc-border);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:first-child {
  border-top: 1px solid var(--cc-border);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation-item__content {
  display: block !important;
  width: 100%;
  font-size: 20px !important;
  font-family: var(--cc-font-sans) !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  padding: 18px 8px !important;
  color: var(--cc-text1) !important;
  text-decoration: none !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a:hover {
  color: var(--cc-gold-lt) !important;
}

/* Close (×) button — pin to top-right */
.wp-block-navigation__responsive-container-close {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
}

/* ─────────────────────────────────────────────────────────
   FOOTER MOBILE LAYOUT
───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-footer .wp-block-columns { gap: 32px; }
  /* Logo/tagline column takes full width on mobile */
  .site-footer .wp-block-column[style*="flex-basis:35%"] { flex-basis: 100% !important; }
}

@media (max-width: 400px) {
  :root { --cc-section-x: 16px; }
}

/* ─────────────────────────────────────────────────────────
   PRINT
───────────────────────────────────────────────────────── */
@media print {
  body { background: #ffffff; color: #1a1410; }
  .site-header,
  .site-footer,
  .hero-section::before,
  .hero-section::after { display: none; }
  a { color: #96762a; }
  h1, h2, h3 { color: #96762a; }
}
