:root {
  --bg-canvas: #ffffff;
  --bg-surface: #f3f3f1;
  --bg-surface-hover: #eae8e4;
  --text-primary: #292724;
  --text-muted: #5c5852;
  --accent-primary: #b74426;
  --accent-secondary: #8f3219;
  --border-subtle: rgba(41, 39, 36, 0.14);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(41, 39, 36, 0.14);
  --glow-accent: 0 0 24px -4px rgba(183, 68, 38, 0.35);
  --glass-backdrop: blur(16px) saturate(180%);
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.75;
  overflow-wrap: anywhere;
  hyphens: auto;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; border-radius: 0; }
a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s ease; }
a:hover { color: var(--accent-secondary); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}
h1, h2, h3, h4 { line-height: 1.25; margin-top: 0; color: var(--text-primary); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.65rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: 70ch; margin: 0 auto; }
.prose p { margin-bottom: 1.4rem; }

/* Header - Normal Flow, Rounded Pill Box, Far-Left Brand */
.site-header-wrap { padding: 1.25rem 1.5rem 0.5rem; position: relative; z-index: 20; }
.site-header {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(41, 39, 36, 0.06);
  position: relative;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  margin-right: auto;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.main-nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  background: var(--accent-primary);
  color: #ffffff;
}
.nav-toggle {
  display: none;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Resonance Story Bands */
.band { padding: 4.5rem 0; border-radius: 0; position: relative; }
.band-white { background-color: var(--bg-canvas); }
.band-pale { background-color: var(--bg-surface); }
.band-glow {
  background-image: radial-gradient(circle at 80% 30%, rgba(183, 68, 38, 0.13) 0%, rgba(183, 68, 38, 0) 60%);
}
.band-glow-left {
  background-image: radial-gradient(circle at 18% 55%, rgba(183, 68, 38, 0.12) 0%, rgba(183, 68, 38, 0) 60%);
}

/* Hero Overlay */
.hero-frame { position: relative; border-radius: 0; overflow: hidden; background: #1a1816; }
.hero-img { width: 100%; height: 520px; object-fit: cover; opacity: 0.86; border-radius: 0; }
.hero-overlay-grid {
  position: relative;
  margin-top: -180px;
  z-index: 5;
  padding: 0 1.5rem;
}
.hero-panel {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-subtle);
  padding: 2.25rem;
  box-shadow: var(--shadow-elevation);
  border-radius: 0;
}
.facts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}
.fact-item {
  background: var(--bg-surface);
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent-primary);
}
.fact-label {
  display: inline-block;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

/* Buttons */
.btn-pill {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.65rem;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic), background-color 0.2s ease;
}
.btn-pill:hover {
  background-color: var(--accent-secondary);
  color: #ffffff;
  transform: translateY(-3px) scale(1.015);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}
.btn-secondary {
  background-color: var(--text-primary);
  color: #ffffff;
}
.btn-secondary:hover {
  background-color: #000000;
}

/* Story Cards with Crossing Badge */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.story-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}
.band-white .story-card { background: var(--bg-surface); }
.story-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}
.card-media { position: relative; }
.card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }
.edge-badge {
  position: absolute;
  bottom: -14px;
  left: 1.25rem;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.card-body { padding: 1.75rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-body p { color: var(--text-muted); margin-bottom: 1.25rem; flex: 1; }

/* Feature Split & Diagrams */
.split-story {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 2.5rem;
  align-items: center;
}
.phrase-diagram {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.band-white .phrase-diagram { background: var(--bg-surface); }
.diagram-title { font-weight: 700; font-size: 0.92rem; text-transform: uppercase; color: var(--accent-primary); margin-bottom: 0.75rem; }
.pitch-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.4rem;
  align-items: end;
  height: 110px;
  padding: 0.75rem 0;
  border-bottom: 2px solid var(--text-primary);
}
.pitch-bar {
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.72rem;
  text-align: center;
  padding-top: 0.25rem;
  font-weight: 700;
}
.timeline-stream {
  border-left: 3px solid var(--accent-primary);
  padding-left: 1.5rem;
  margin: 1.75rem 0;
}
.timeline-node { position: relative; margin-bottom: 1.5rem; }
.timeline-node::before {
  content: "";
  position: absolute;
  left: -1.95rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-primary);
}

/* Contributor / Editorial Avatar */
.contributor-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* FAQ Accordion / List */
.faq-list { display: grid; gap: 1rem; max-width: 820px; margin: 1.5rem auto 0; }
.faq-item {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
}
.band-white .faq-item { background: var(--bg-surface); }
.faq-item summary {
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  color: var(--text-primary);
}
.faq-item p { margin: 0.85rem 0 0; color: var(--text-muted); }

/* Listener Note Composer */
.note-form {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  max-width: 760px;
  margin: 0 auto;
}
.band-white .note-form { background: var(--bg-surface); }
.form-row { margin-bottom: 1.2rem; }
.form-row label { display: block; font-weight: 700; margin-bottom: 0.4rem; font-size: 0.95rem; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  border-radius: 0;
}
.form-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.25rem; }
.note-preview {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #ffffff;
  border-left: 4px solid var(--accent-primary);
  font-size: 0.92rem;
  white-space: pre-wrap;
  display: none;
}
.note-preview.active { display: block; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; background: var(--bg-canvas); }
th, td { padding: 0.85rem 1rem; border: 1px solid var(--border-subtle); text-align: left; }
th { background: var(--bg-surface); font-weight: 700; }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic); }
.reveal.reveal-visible { opacity: 1; transform: translateY(0); }

/* Footer */
.site-footer {
  background: var(--text-primary);
  color: #f3f3f1;
  padding: 3.5rem 0 2.5rem;
  font-size: 0.94rem;
}
.site-footer a { color: #f3f3f1; }
.site-footer a:hover { color: #ffffff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1.5rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
    box-shadow: var(--shadow-elevation);
    z-index: 40;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .hero-img { height: 360px; }
  .hero-overlay-grid { margin-top: -90px; }
  .band { padding: 3rem 0; }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
