:root {
  --bg-canvas: #1c1f24;
  --bg-surface: #272c31;
  --bg-surface-hover: #2f353c;
  --text-primary: #e5e7eb;
  --text-muted: #a6b0ba;
  --accent-primary: #14b8a6;
  --accent-secondary: #0f766e;
  --accent-ink: #11161a;
  --border-subtle: #384048;
  --border-strong: #4b5563;
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-offset: 4px 4px 0 #14b8a6;
  --shadow-offset-light: 4px 4px 0 #e5e7eb;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-site: 1200px;
  --measure: 70ch;
}

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

html {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 100%;
  line-height: 1.7;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease-kinetic), background-color 0.2s var(--ease-kinetic);
}

a:hover {
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-primary);
  color: var(--accent-ink);
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header: non-sticky, brand far left */
.site-header {
  position: relative;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.brand-link:hover {
  color: var(--accent-primary);
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.desktop-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.menu-toggle {
  display: none;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  background-color: var(--accent-primary);
  color: var(--accent-ink);
  border-color: var(--accent-primary);
}

.mobile-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 2px solid var(--accent-primary);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer nav {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0.75rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.mobile-drawer a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 1rem;
  font-weight: 500;
}

.mobile-drawer a:last-child {
  border-bottom: none;
}

.mobile-drawer a[aria-current="page"],
.mobile-drawer a:hover {
  color: var(--accent-primary);
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.22;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.68;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Main layout & reading column */
.site-main {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 1.5rem 4.5rem;
}

.reading-column {
  max-width: var(--measure);
  margin: 0 auto;
}

.content-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.content-section:first-of-type {
  border-top: none;
}

.chapter-opener {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.75rem;
}

.chapter-illustration {
  width: 76px;
  height: 76px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem;
  flex-shrink: 0;
}

/* Hero (Home) */
.festival-hero {
  position: relative;
  margin: 2rem 0 3.5rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.hero-art-stage {
  position: relative;
  background-color: var(--bg-canvas);
  border-bottom: 2px solid var(--accent-primary);
  padding: 2rem 1.5rem 6rem;
}

.hero-art-svg {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  height: auto;
}

.hero-floating-panel {
  position: relative;
  margin: -4.75rem auto 0;
  max-width: 960px;
  background-color: var(--bg-surface);
  border: 1px solid var(--accent-primary);
  padding: 2.25rem 2.5rem;
  z-index: 2;
}

.hero-intro {
  max-width: var(--measure);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  margin-bottom: 2.25rem;
}

.hero-facts {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.fact-item {
  border-left: 3px solid var(--accent-primary);
  padding-left: 1rem;
}

.fact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.3rem;
}

.fact-text {
  font-size: 0.94rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.55;
}

/* Page Banner (Subpages) */
.page-header-band {
  margin: 2rem 0 2.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 5px solid var(--accent-primary);
  padding: 2.25rem 2rem;
}

.page-header-grid {
  max-width: var(--measure);
  margin: 0 auto;
}

.page-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding-top: 1rem;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Buttons: solid blocks with 4px hard offset shadow closing on hover */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 1.45rem;
  border: 1px solid var(--accent-primary);
  cursor: pointer;
  transition: transform 0.18s var(--ease-kinetic), box-shadow 0.18s var(--ease-kinetic), background-color 0.18s var(--ease-kinetic);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--accent-ink);
  box-shadow: var(--shadow-offset-light);
}

.btn-primary:hover {
  color: var(--accent-ink);
  background-color: var(--accent-primary);
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--text-primary);
}

.btn-secondary {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: var(--shadow-offset);
}

.btn-secondary:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--accent-primary);
}

/* Programme rows: icon-led rows separated by fine rules (no card grids) */
.programme-list {
  list-style: none;
  margin: 1.75rem 0;
  padding: 0;
  border-top: 1px solid var(--border-subtle);
}

.programme-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 1.25rem;
  align-items: start;
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s var(--ease-kinetic);
}

.programme-row:hover {
  background-color: var(--bg-surface);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.row-icon {
  width: 44px;
  height: 44px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.row-body h3 {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.row-body p {
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.row-meta {
  font-size: 0.84rem;
  color: var(--accent-primary);
  font-weight: 600;
}

.row-action {
  align-self: center;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Pull Quote */
.pull-quote {
  margin: 2.25rem 0;
  padding: 1.5rem 1.75rem;
  background-color: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
}

.pull-quote p {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.pull-quote cite {
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* Wide Image Breakouts & Figures */
.wide-breakout {
  margin: 2.5rem calc(50% - min(50vw - 1.5rem, 480px));
}

.media-figure {
  margin: 2rem 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.media-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-canvas);
  overflow: hidden;
}

.media-frame-4x3 {
  aspect-ratio: 4 / 3;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-figure figcaption {
  padding: 0.9rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

/* Definition Lists for Programme Responsibilities */
.responsibility-list {
  margin: 1.75rem 0;
  border-top: 1px solid var(--border-subtle);
}

.responsibility-item {
  display: grid;
  grid-template-columns: minmax(170px, 230px) 1fr;
  gap: 1rem 1.75rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.responsibility-item dt {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.02rem;
}

.responsibility-item dd {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.96rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-surface);
  text-align: left;
  font-size: 0.94rem;
}

th,
td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

th {
  background-color: var(--bg-canvas);
  color: var(--accent-primary);
  font-family: var(--font-serif);
  font-weight: 700;
  border-bottom: 2px solid var(--accent-primary);
}

/* FAQ Accordion Rows */
.faq-list {
  border-top: 1px solid var(--border-subtle);
  margin: 2rem 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent-primary);
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 0 1.35rem;
  color: var(--text-muted);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Contact Editorial Worksheet */
.worksheet-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  margin: 2rem 0;
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.field-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-control {
  width: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.98rem;
}

.form-control:focus {
  border-color: var(--accent-primary);
  outline: 2px solid var(--accent-primary);
  outline-offset: 0;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.preview-box {
  background-color: var(--bg-canvas);
  border: 1px solid var(--accent-primary);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.preview-box pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.status-note {
  min-height: 1.5rem;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Inline Lists & Callouts */
.editorial-list {
  padding-left: 1.35rem;
  margin: 0 0 1.5rem;
}

.editorial-list li {
  margin-bottom: 0.6rem;
}

.notice-band {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--accent-primary);
  padding: 1.5rem;
  margin: 2rem 0;
}

.notice-band h3 {
  margin-bottom: 0.5rem;
}

.notice-band p:last-child {
  margin-bottom: 0;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 2px solid var(--accent-primary);
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 3.25rem 1.5rem 2.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-col h2 {
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  color: var(--accent-primary);
  margin-bottom: 0.9rem;
}

.footer-col p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.footer-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.93rem;
}

.footer-links a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-legal-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-legal-links a:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-floating-panel {
    margin: -3.5rem 1rem 0;
    padding: 1.75rem;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .programme-row {
    grid-template-columns: 40px 1fr;
  }

  .row-action {
    grid-column: 2;
    margin-top: 0.35rem;
  }

  .responsibility-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .chapter-opener {
    grid-template-columns: 1fr;
  }

  .wide-breakout {
    margin: 2rem 0;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 1rem;
  }

  .site-main {
    padding: 0 1rem 3rem;
  }

  .hero-art-stage {
    padding: 1.25rem 1rem 4rem;
  }

  .hero-floating-panel {
    margin: -2.5rem 0 0;
    padding: 1.35rem;
    border-left: none;
    border-right: none;
  }

  .page-header-band,
  .worksheet-panel {
    padding: 1.35rem;
  }
}