:root {
  /* Background / panels */
  --bg: #07111f;
  --panel: #0f1c31;
  --panel-2: #132742;

  /* Brand palette (from logo) */
  --wood-primary: #A4511F; /* Primary Wood */
  --wood-dark: #8C3408; /* Dark Wood */
  --wood-highlight: #E1955E; /* Wood Highlight */
  --circuit-blue: #0C9CEA; /* Circuit Blue */
  --speaker-black: #0A0708; /* Speaker Black */
  --gunmetal: #575657; /* Gunmetal */
  --steel-gray: #9A999B; /* Steel Gray */
  --silver-highlight: #EFE9DF; /* Silver Highlight */

  --text: #f3f6fb;
  --muted: #aebed4;
  /* Use wood as the primary accent and circuit blue as secondary accent */
  --accent: var(--wood-primary);
  --accent-2: var(--circuit-blue);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg), #101f38 60%, #142b45);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(7, 17, 31, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-shaken {
  color: var(--silver-highlight);
}

.brand-labs {
  color: var(--circuit-blue);
}

.brand img {
  display: block;
  width: 128px;
  height: auto;
  max-height: 48px;
}

.catchphrase {
  margin-top: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catchphrase-footer {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-weight: 600;
  opacity: 0.95;
}

.footer-wood {
  color: var(--wood-primary);
}

.footer-gunmetal {
  color: var(--silver-highlight);
}

.footer-circuit {
  color: var(--circuit-blue);
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  transition: color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.2rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.hero {
  padding: 5.5rem 0 4rem;
  position: relative;
  background: linear-gradient(135deg, #07111f, #101f38);
}

.banner-section {
  padding: 2rem 0 3rem;
  min-height: 320px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(7,17,31,0.15), rgba(7,17,31,0.3)), url('/assets/branding/banner.png');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.28);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin: 0 0 1rem;
}

.hero-copy {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 650px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-block;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), #ffb04d);
  color: #08111d;
}

.button.secondary {
  background: linear-gradient(135deg, rgba(12, 156, 234, 0.18), rgba(12, 156, 234, 0.35), rgba(7, 17, 31, 0.95));
  border: 1px solid rgba(12, 156, 234, 0.45);
  color: #f3f6fb;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: linear-gradient(135deg, rgba(12, 156, 234, 0.25), rgba(12, 156, 234, 0.45), rgba(7, 17, 31, 1));
}

.hero-card,
.card,
.contact-card {
  background: rgba(15, 28, 49, 0.9);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.5rem;
}

.hero-card ul,
.card ul {
  padding-left: 1rem;
  color: var(--muted);
}

.section {
  padding: 2.6rem 0;
}

.alt-section {
  background: rgba(255, 255, 255, 0.03);
}

.section-heading {
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  padding: 1.2rem;
}

.card h3 {
  margin-top: 0;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.project-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
}

.project-card-image[src*="comm-plaque"],
.modal-gallery img[src*="comm-plaque"] {
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem;
}

.project-card h3 {
  margin: 0;
}

.project-card .button {
  margin-top: auto;
}

.project-card p,
.plan-card p {
  color: var(--muted);
}

/* Layout for plans seasons + episodes: 3 columns like projects */
.plans-grid .season {
  display: block;
}

.plans-grid .season .episodes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.6rem;
}

.plan-episode h4 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

@media (max-width: 800px) {
  .plans-grid .season .episodes {
    grid-template-columns: 1fr;
  }
}

.projects-controls {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.plans-controls {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.filter-bar {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.filter-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.filter-button:hover { color: var(--text); transform: translateY(-2px); }

.filter-button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07111f;
  border-color: transparent;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 1.2rem;
  align-items: center;
}

.contact-card {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 50;
}

.modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  position: relative;
  width: min(640px, 100%);
  max-height: min(90vh, 820px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.modal-content {
  position: relative;
  padding: 2rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.modal-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.modal-gallery img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
}

.modal-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-description p {
  margin: 0 0 0.85rem;
}

.modal-description p:last-child {
  margin-bottom: 0;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-tag {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.85rem;
}

.modal-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08111d;
  font-weight: 700;
  text-decoration: none;
}

.modal-button.hidden {
  display: none;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.catchphrase-footer {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  opacity: 0.95;
}

@media (max-width: 800px) {
  .hero-grid,
  .contact-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 1rem;
    flex-direction: column;
    background: rgba(7, 17, 31, 0.98);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 0.8rem 1rem;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }
}
