/* ---------- Design tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-alt: #121212;
  --bg-alt-2: #181818;
  --fg: #f5f5f5;
  --fg-muted: #9a9a9a;
  --fg-faint: #5c5c5c;
  --border: #262626;

  --red: #e2262b;
  --red-dim: #7a1418;
  --on-red: #ffffff;
  --green: #3d9153;
  --gold: #e2a83c;
  --blue: #3f74c9;

  --font-ui: 'Inter', sans-serif;
  --font-serif: 'Instrument Serif', serif;

  --sidebar-w: 240px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html, body {
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3 { font-weight: 600; margin: 0 0 var(--space-2); line-height: 1.2; }
p { margin: 0 0 var(--space-2); color: var(--fg-muted); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: var(--on-red);
  padding: 12px 20px;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- Background artwork (fan-palm engraving watermark) ---------- */
.bg-art {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0.07;
}
.bg-art-svg { width: min(58vw, 560px); height: auto; }

/* Re-center against the full viewport, not just the space right of the sidebar. */
@media (min-width: 901px) {
  .bg-art-svg,
  .hero-caption-group {
    transform: translateX(calc(var(--sidebar-w) / -2));
  }
}
.bg-art-line {
  fill: none;
  stroke: #f5f5f5;
  stroke-width: 1;
  stroke-linecap: round;
}

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Sidebar (desktop) ---------- */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 40;
}
.side-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.side-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  transition: color 200ms var(--ease);
  cursor: pointer;
}
.side-links a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}
.side-links a.active::before { opacity: 1; transform: scale(1); }
.side-links a:hover { color: var(--red); }
.side-links a.active { color: var(--red); }

.side-bottom { display: flex; flex-direction: column; gap: var(--space-3); }
.side-copy { font-size: 11px; color: var(--fg-faint); margin: 0; }

/* ---------- Corner brand (desktop) ---------- */
.corner-brand {
  position: fixed;
  top: 48px;
  right: 56px;
  z-index: 40;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.corner-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.corner-tagline {
  font-size: 12px;
  color: var(--fg-faint);
}

/* ---------- Mobile bar (brand + menu toggle; full-screen overlay for nav) ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: rgba(10, 10, 9, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}
.mobile-mark { width: 22px; height: auto; filter: invert(1); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--fg);
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  padding: 90px 20px 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav nav { display: flex; flex-direction: column; }
.mobile-nav nav a {
  font-size: 28px;
  font-weight: 600;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(10px);
  transition: color 200ms var(--ease), opacity 320ms var(--ease), transform 320ms var(--ease);
}
.mobile-nav.is-open nav a {
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav nav a:nth-child(1) { transition-delay: 60ms; }
.mobile-nav nav a:nth-child(2) { transition-delay: 100ms; }
.mobile-nav nav a:nth-child(3) { transition-delay: 140ms; }
.mobile-nav nav a:nth-child(4) { transition-delay: 180ms; }
.mobile-nav nav a:nth-child(5) { transition-delay: 220ms; }
.mobile-nav nav a:nth-child(6) { transition-delay: 260ms; }
.mobile-nav nav a:nth-child(7) { transition-delay: 300ms; }
.mobile-nav nav a.active { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav nav a {
    transition: none;
    transition-delay: 0ms;
  }
}

/* ---------- Main layout (panel shell) ---------- */
main {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: var(--sidebar-w);
  overflow: hidden;
}
.panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
  pointer-events: none;
}
.panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.panel[hidden] { display: none; }

.section-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}

.eyebrow {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  margin-bottom: var(--space-2);
}
h2 { font-size: clamp(26px, 3.4vw, 36px); }
.body-lg { font-size: 17px; max-width: 52ch; }

.text-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
  margin-top: var(--space-3);
  transition: color 200ms var(--ease);
}
.text-link:hover { color: var(--red); }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.hero-caption-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-caption {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: center;
  max-width: 420px;
  margin: 0;
}
.hero-translation {
  font-family: var(--font-ui);
  font-size: 7px;
  letter-spacing: 0.02em;
  color: var(--fg-faint);
  text-align: center;
  max-width: 380px;
  margin: 0;
}

.t-line  { fill: none; stroke-width: 1.4; }
.t-red   { fill: var(--red); }
.t-green { fill: var(--green); }
.t-gold  { fill: var(--gold); }

/* ---------- Tembe divider (section rule) ---------- */
.tembe-rule {
  width: 120px;
  height: 12px;
  margin: 2px 0 var(--space-2);
  display: block;
}
.tembe-rule .t-line { stroke: var(--fg-faint); }

/* ---------- Empty state ---------- */
.empty-state {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.empty-state p { margin: 0; color: var(--fg-faint); }

/* ---------- Music (Spotify / SoundCloud / YouTube embeds) ---------- */
.embed-group { margin-top: var(--space-4); }
.embed-group + .embed-group { margin-top: var(--space-5); }
.embed-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  margin: 0 0 var(--space-2);
}
.embed-stack { display: flex; flex-direction: column; gap: var(--space-2); }
.spotify-embed, .soundcloud-embed { display: block; border: none; border-radius: 10px; }

.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ---------- Social Media ---------- */
.social-page-list {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.social-page-list li { border-bottom: 1px solid var(--border); }
.social-page-list li:first-child { border-top: 1px solid var(--border); }
.social-page-list a {
  display: block;
  padding: 20px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  transition: color 200ms var(--ease);
}
.social-page-list a:hover { color: var(--red); }

/* ---------- Events ---------- */
.event-list { display: flex; flex-direction: column; margin-top: var(--space-4); }
.event-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.event-row:first-child { border-top: 1px solid var(--border); }

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  border: 1px solid var(--border);
}
.event-date .day { font-size: 18px; font-weight: 700; color: var(--fg); line-height: 1; }
.event-date .mon { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-muted); margin-top: 2px; }

.event-info h3 { font-size: 15.5px; margin-bottom: 2px; font-weight: 600; }
.event-info p { margin: 0; font-size: 13px; }

.event-status {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 14px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-open { background: var(--red); color: var(--on-red); }
.status-closed { background: transparent; color: var(--fg-faint); border-color: var(--border); }
.status-info { background: transparent; color: var(--fg-muted); border-color: var(--border); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.gallery-tile {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: var(--space-2);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}
.gallery-photo img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-tile span {
  position: relative;
  z-index: 2;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg);
}
.gallery-tile::before {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.85) 100%);
}
/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
.contact-email {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
}
.contact-email:hover { color: var(--red); }

.contact-form {
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}
.form-field { margin-bottom: var(--space-2); display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--fg-muted);
}
.form-field input,
.form-field textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 12px 14px;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 15px;
  resize: vertical;
  transition: border-color 180ms var(--ease);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--red);
  outline: none;
}

.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  background: var(--red);
  color: var(--on-red);
  border: none;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms var(--ease), transform 180ms var(--ease);
}
.btn-solid:hover { background: #ff3a40; transform: translateY(-1px); }

.form-note { min-height: 20px; font-size: 13px; color: var(--fg-muted); margin: 10px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .side-nav, .corner-brand { display: none; }
  .mobile-bar { display: flex; }
  main { left: 0; top: 74px; }
  .bg-art { left: 0; top: 74px; }
}

@media (max-width: 560px) {
  .section-inner { padding: 0 20px; }
  .gallery-grid { grid-template-columns: 1fr; }
}
