/* ==========================================================================
   JUST BRAINZ — "THE CORTEX IS IN SESSION"
   Stylesheet. Organized top-to-bottom the same way the page reads.
   ========================================================================== */

/* -------------------- Design tokens -------------------- */
:root {
  /* Palette pulled from the album artwork: near-black warm charcoal,
     rust/blood red, ember orange, bone/parchment ink. Never pure black,
     never pure red-on-black cliché — always slightly warm and desaturated. */
  --bg: #0c0908;
  --bg-raised: #14100e;
  --bg-elevated: #1b1512;
  --line: #2c231e;
  --line-strong: #473830;

  --ink: #ece3d6;         /* headlines, high-emphasis text */
  --ink-dim: #b6a996;     /* body copy on dark */
  --ink-faint: #7d6f61;   /* tertiary / meta text */

  --accent: #a8402c;      /* rust red */
  --accent-strong: #cf5638;
  --accent-ember: #e0864a;/* warm ember highlight, used sparingly */
  --accent-tint: rgba(168, 64, 44, 0.14);

  --focus: #e0864a;

  --font-display: 'Rammetto One', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --container: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 2px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

@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;
  }
}

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 13px;
  z-index: 100;
  transition: top 0.2s var(--ease);
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* -------------------- Brain imprint (atmospheric background watermark) --------------------
   Tune the effect here:
     --brain-opacity  → overall visibility (try 0.06–0.14)
     --brain-zoom     → 1 = exactly fills the viewport, >1 zooms in further
     --brain-position → background-position of the graphic (which part
                        of the brain shows/leans into view, e.g. "72% 45%")
   The source PNG already has a transparent background (only the faint
   linework has any opacity), so this needs nothing but a plain opacity —
   no blend-mode trickery, and no risk of a visible box/rectangle. It's a
   fixed full-viewport layer so it persists behind every section as you
   scroll, always covering the whole background. */
.brain-imprint {
  --brain-opacity: 0.1;
  --brain-zoom: 1.15;
  --brain-position: 72% 45%;

  position: fixed;
  inset: 0;
  transform: scale(var(--brain-zoom));
  transform-origin: center;
  background-image: url('../images/decor/brain-imprint.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--brain-position);
  opacity: var(--brain-opacity);
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .brain-imprint {
    --brain-opacity: 0.08;
    --brain-zoom: 1.6;
    --brain-position: 65% 35%;
  }
}

/* -------------------- Grain texture (subtle, no image request) -------------------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* -------------------- Layout helpers -------------------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 12vw, 160px) 0; position: relative; z-index: 2; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 6vw, 72px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ember);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

h2.title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.lede {
  margin-top: 18px;
  max-width: 56ch;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-dim);
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fbf3ea;
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn .btn-note {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: inherit;
  opacity: 0.75;
}

/* -------------------- Header / Nav -------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(12,9,8,0.9), rgba(12,9,8,0));
  transition: background-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(12,9,8,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 34px; width: auto; object-fit: contain; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.16em;
}

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); border-color: var(--accent); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle .bars::before { transform: translateY(-7px); }
.nav-toggle .bars::after { transform: translateY(5px); }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(0) rotate(-45deg); }

/* -------------------- Hero -------------------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  position: relative;
  z-index: 2;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 140px var(--gutter) 80px;
}
.hero-word {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 6.8vw, 92px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.hero-tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ember);
}
.hero-date {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
}
.hero-media {
  position: relative;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 0%, rgba(12,9,8,0) 18%);
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 52vh; order: -1; }
  .hero-media::after { background: linear-gradient(to bottom, rgba(12,9,8,0) 55%, var(--bg) 100%); }
  .hero-copy { padding: 40px var(--gutter) 64px; }
}

/* -------------------- Album -------------------- */
.album-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.album-art {
  position: sticky;
  top: 110px;
}
.album-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
}
.tracklist { border-top: 1px solid var(--line); }
.track {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.track-num {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-faint);
  width: 24px;
  flex: none;
}
.track-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink);
  flex: 1;
}
.track-feature {
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--accent-ember);
  white-space: nowrap;
}

.streaming {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.streaming-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}
.streaming-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.streaming-btn {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  border: 1px solid var(--line-strong);
  padding: 12px 18px;
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.streaming-btn:not([aria-disabled="true"]):hover { border-color: var(--accent); color: var(--ink); }
.streaming-btn[aria-disabled="true"] {
  color: var(--ink-faint);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

@media (max-width: 860px) {
  .album-grid { grid-template-columns: 1fr; }
  .album-art { position: static; max-width: 420px; }
}

/* -------------------- About -------------------- */
.about-text {
  max-width: 640px;
}
.bio-text { display: flex; flex-direction: column; gap: 20px; }
.bio-lede {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.35;
  color: var(--ink);
}
.bio-para {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-dim);
}
.bio-para strong, .bio-lede strong {
  color: var(--accent-ember);
  font-weight: inherit;
}
.members {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.member {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.member-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
}
.member-role {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: right;
}
.about-photo {
  margin-top: clamp(40px, 6vw, 64px);
}
.about-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: contain;
  border: 1px solid var(--line);
}

/* -------------------- Media / Video -------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.video {
  border: 1px solid var(--line);
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  overflow: hidden;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-facade {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}
.video-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12,9,8,0.28);
  transition: background-color 0.2s var(--ease);
}
.video-facade:hover::after { background: rgba(12,9,8,0.12); }
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(236,227,214,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,9,8,0.35);
}
.video-play svg { width: 18px; height: 18px; fill: var(--ink); margin-left: 2px; }
.video-title {
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.media-empty {
  border: 1px dashed var(--line-strong);
  padding: 40px;
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -------------------- Follow -------------------- */
.follow-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.follow-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.follow-list a:hover { background: var(--bg-raised); color: var(--accent-ember); }
.follow-arrow { opacity: 0.6; font-size: 15px; }

/* -------------------- Contact -------------------- */
.contact-email {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.contact-email:hover { color: var(--accent-ember); border-color: var(--accent-ember); }

/* -------------------- Footer -------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter);
  position: relative;
  z-index: 2;
}
.footer-row {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.footer-row img { height: 22px; width: auto; object-fit: contain; opacity: 0.85; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.footer-meta a { color: var(--ink-faint); text-decoration: none; }
.footer-meta a:hover { color: var(--accent-ember); }
.footer-social { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-social a {
  color: var(--ink-faint);
  text-decoration: none;
  text-transform: uppercase;
}
.footer-social a:hover { color: var(--accent-ember); }

/* -------------------- Scroll reveal -------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* -------------------- Mobile nav -------------------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateY(-110%);
    transition: transform 0.3s var(--ease);
    z-index: 40;
    pointer-events: none;
  }
  .nav-links.is-open { transform: translateY(0); pointer-events: auto; }
  .nav-links a { font-size: 15px; }
}

/* -------------------- Small screens fine-tuning -------------------- */
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
  .member { flex-direction: column; gap: 4px; }
  .member-role { text-align: left; }
}
