:root {
  --bg-canvas: #3b0d1a;
  --bg-surface: #4e1525;
  --bg-surface-hover: #5a1b2d;
  --text-primary: #f7f0e6;
  --text-muted: #d9c8b4;
  --accent-primary: #e8d5a8;
  --accent-secondary: #c9ae77;
  --border-subtle: #682538;
  --scrim-dark: rgba(59, 13, 26, 0.78);
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius-card: 4px;
  --radius-pill: 999px;
  --space-unit: 8px;
  --ease-kinetic: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration: 280ms;
  --shadow-elevation: 0 8px 24px rgba(0, 0, 0, 0.18);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.03rem;
  line-height: 1.68;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-wrap: anywhere;
  hyphens: auto;
}

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

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.contrast-band a:focus-visible,
.contrast-band button:focus-visible {
  outline-color: var(--bg-canvas);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--accent-primary);
  color: var(--bg-canvas);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -0.015em; margin-bottom: 16px; }
h2 { font-size: clamp(1.45rem, 2.8vw, 2.05rem); margin-bottom: 14px; }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.38rem); margin-bottom: 10px; }

p {
  margin-top: 0;
  margin-bottom: 16px;
}

ul, ol {
  margin-top: 0;
  margin-bottom: 18px;
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: 70ch;
}

.prose-centered {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

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

.muted {
  color: var(--text-muted);
}

/* Header: static two-tier */
.site-header {
  position: static;
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.header-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  min-height: 44px;
}

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

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

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

.menu-toggle:hover {
  background-color: var(--bg-surface-hover);
}

.header-tier-nav {
  border-top: 1px solid var(--border-subtle);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
}

.nav-list li {
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-card);
  transition: background-color var(--duration) var(--ease-kinetic), color var(--duration) var(--ease-kinetic);
}

.nav-link:hover {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
}

.nav-link[aria-current="page"] {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
  font-weight: 600;
}

/* Buttons: solid champagne pill, deep burgundy text, zero border */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: var(--accent-primary);
  color: var(--bg-canvas);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--duration) var(--ease-kinetic), background-color var(--duration) var(--ease-kinetic);
}

.btn-pill:hover {
  background-color: var(--text-primary);
  color: var(--bg-canvas);
  transform: translateY(-2px);
}

.btn-pill-dark {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
}

.btn-pill-dark:hover {
  background-color: var(--bg-surface);
  color: var(--accent-primary);
}

/* Hero: full-viewport backdrop behind dark scrim */
.hero-studio {
  position: relative;
  min-height: 74vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 24px;
  background-color: var(--bg-surface);
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background-color: var(--scrim-dark);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
}

.hero-standfirst {
  font-size: clamp(1.06rem, 1.8vw, 1.24rem);
  line-height: 1.65;
  color: var(--text-primary);
  max-width: 62ch;
  margin: 0 auto 28px;
}

/* Inner Page Header */
.page-banner {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.breadcrumb li {
  margin: 0;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--accent-secondary);
}

/* Sections */
.section-band {
  padding: 56px 0;
}

.section-header {
  max-width: 70ch;
  margin-bottom: 28px;
}

/* Bold Champagne Contrast Band (at most one per page) */
.contrast-band {
  background-color: var(--accent-primary);
  color: var(--bg-canvas);
  padding: 56px 0;
}

.contrast-band h2,
.contrast-band h3,
.contrast-band p,
.contrast-band li,
.contrast-band .eyebrow,
.contrast-band td,
.contrast-band th {
  color: var(--bg-canvas);
}

.contrast-band .eyebrow {
  opacity: 0.85;
}

.contrast-band a {
  color: var(--bg-canvas);
  font-weight: 600;
}

.contrast-band a:hover {
  opacity: 0.8;
}

.contrast-band .btn-pill-dark,
.contrast-band .btn-pill-dark:hover {
  color: var(--text-primary);
  opacity: 1;
}

.contrast-panel {
  background-color: #f3e6c7;
  color: var(--bg-canvas);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(59, 13, 26, 0.12);
}

/* Acoustic Stat Strip */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-tile {
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-elevation);
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.stat-label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Cards & Grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card-panel {
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-elevation);
  transition: transform var(--duration) var(--ease-kinetic), background-color var(--duration) var(--ease-kinetic);
}

.card-panel:hover {
  transform: translateY(-2px);
  background-color: var(--bg-surface-hover);
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  align-items: start;
}

/* Media Figures */
.media-frame {
  margin: 0;
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-elevation);
}

.media-img-wrap {
  aspect-ratio: 4 / 3;
  background-color: #2f0914;
  overflow: hidden;
}

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

.media-caption {
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.diagram-panel {
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-elevation);
  margin: 24px 0;
}

.diagram-panel figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Tabs */
.tabs-shell {
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-elevation);
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
}

.tab-btn {
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease-kinetic), color var(--duration) var(--ease-kinetic);
}

.tab-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--accent-primary);
}

.tab-btn[aria-selected="true"] {
  background-color: var(--accent-primary);
  color: var(--bg-canvas);
}

.tab-panel[hidden] {
  display: none;
}

/* Accordions */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevation);
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--duration) var(--ease-kinetic);
}

.accordion-trigger:hover {
  background-color: var(--bg-surface-hover);
}

.accordion-icon {
  flex-shrink: 0;
  color: var(--accent-primary);
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
}

.accordion-panel {
  padding: 0 22px 20px;
  color: var(--text-primary);
}

.accordion-panel[hidden] {
  display: none;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevation);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.94rem;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.data-table th {
  font-family: var(--font-display);
  color: var(--accent-primary);
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.14);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

/* Contact Composer & Inputs */
.composer-panel {
  background-color: var(--bg-surface);
  border-radius: var(--radius-card);
  padding: 26px;
  box-shadow: var(--shadow-elevation);
}

.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent-primary);
  font-size: 0.92rem;
}

.field-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.98rem;
}

.preview-box {
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  color: var(--text-primary);
  margin: 16px 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.status-note {
  font-size: 0.92rem;
  color: var(--accent-primary);
  min-height: 1.4em;
  margin-top: 10px;
}

.notice-box {
  background-color: var(--bg-surface);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin: 24px 0;
}

/* Footer: multi-column burgundy surface */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 52px 0 36px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-col h2 {
  font-size: 1.05rem;
  color: var(--accent-primary);
  margin-bottom: 14px;
}

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

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  display: inline-block;
  padding: 4px 0;
  text-decoration: none;
  color: var(--text-primary);
}

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

.footer-meta {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms var(--ease-kinetic), transform 420ms var(--ease-kinetic);
}

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

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
  }

  .header-tier-nav {
    display: none;
  }

  .header-tier-nav.is-open {
    display: block;
    background-color: var(--bg-surface);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 14px;
    gap: 4px;
  }

  .nav-link {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .hero-studio {
    min-height: 62vh;
    padding: 56px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section-band,
  .contrast-band {
    padding: 40px 0;
  }

  .card-panel,
  .tabs-shell,
  .composer-panel {
    padding: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .reveal.reveal-visible,
  .card-panel,
  .btn-pill,
  a {
    transition: none;
    transform: none;
    opacity: 1;
  }
}