/* ==========================================================================
   JESTALT — Site Stylesheet
   Tokens, base, layout, components. See /design-notes.md (project root,
   not deployed) for the rationale behind these choices.
   ========================================================================== */

:root {
  /* Color -- sampled from the red-glitch artwork + brief constraints */
  --ink: #111622;          /* dark backdrop — never pure black, per brief */
  --ink-raised: #171d2c;   /* one step up from --ink, for cards on dark */
  --paper: #ffffff;        /* light backdrop, per brief */
  --paper-dim: #f2f2f0;    /* one step down from paper, for cards on light */
  --signal: #e4001a;       /* glitch red */
  --signal-dim: #a5000f;   /* pressed / border state */
  --cyan: #35b8ce;         /* glitch cyan streak */
  --gold: #e8b23b;         /* glitch warm streak */
  --ink-text: #c7ccd8;     /* body text ON --ink: light derivative of ink */
  --ink-text-dim: #8890a1; /* secondary text on --ink */
  --paper-text: #1b2030;   /* body text ON --paper: dark derivative of paper... actually dark navy derivative of ink family, used on paper */
  --paper-text-dim: #4c5266;

  --display-font: 'Futura', 'Futura PT', 'Century Gothic', 'Jost', Arial, sans-serif;
  --body-font: Arial, Helvetica, sans-serif;

  --seam-angle: -7deg;
  --container: 1180px;
  --nav-height: 76px;
}

/* -------------------------------------------------------------------- */
/* Reset / base                                                          */
/* -------------------------------------------------------------------- */

*, *::before, *::after { 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;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--paper-text);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin: 0 0 0.5em;
  line-height: 1.1;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.on-ink   { background: var(--ink); color: var(--ink-text); }
.on-paper { background: var(--paper); color: var(--paper-text); }

.eyebrow {
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--signal);
  margin: 0 0 0.75em;
  display: inline-block;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* -------------------------------------------------------------------- */
/* Buttons                                                              */
/* -------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 15px 28px;
  border: 2px solid currentColor;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--paper);
}
.btn-primary:hover { background: var(--signal-dim); border-color: var(--signal-dim); }

.btn-ghost-ink   { color: var(--ink-text); }
.btn-ghost-ink:hover   { background: var(--ink-text); color: var(--ink); }

.btn-ghost-paper { color: var(--paper-text); }
.btn-ghost-paper:hover { background: var(--paper-text); color: var(--paper); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* -------------------------------------------------------------------- */
/* Nav                                                                   */
/* -------------------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--ink);
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  position: relative;
  display: block;
  width: 260px;
  height: 100%; /* matches --nav-height; establishes the anchor's own
                    click/focus footprint even though the image inside
                    it is sized and positioned independently below */
}

.nav-logo img {
  position: absolute;
  top: 0;
  left: 0;
  height: calc(var(--nav-height) * 2); /* exactly double the nav bar:
                    top half sits in the nav's visual plane, bottom half
                    overhangs below it into the page content */
  width: auto;
  max-width: none;
  display: block;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,0.55));
  transition: height 0.25s ease, top 0.25s ease, transform 0.25s ease;
}

/* Added by js/main.js once the page has scrolled past a small threshold.
   Shrinks the logo back to fit fully inside the nav bar so it doesn't
   permanently float over scrolled content (the fixed nav means the
   full-size overhang would otherwise stay pinned on screen forever). */
.site-nav.is-scrolled .nav-logo img {
  height: calc(var(--nav-height) - 24px);
  top: 50%;
  transform: translateY(-50%);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0; padding: 0;
}

.nav-links a {
  position: relative;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-text);
  padding: 6px 2px;
}

.nav-links a[aria-current="page"] { color: var(--paper); }

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--signal);
}

/* glitch hover: two chromatic ghosts flick in and settle */
.nav-links a.glitching::before,
.nav-links a.glitching::after {
  content: attr(data-label);
  position: absolute;
  left: 0; top: 6px;
  width: 100%;
  pointer-events: none;
}
.nav-links a.glitching::before {
  color: var(--signal);
  clip-path: inset(0 0 55% 0);
  animation: glitch-shift-a 0.28s steps(2, end) 1;
}
.nav-links a.glitching::after {
  color: var(--cyan);
  clip-path: inset(55% 0 0 0);
  animation: glitch-shift-b 0.28s steps(2, end) 1;
}

@keyframes glitch-shift-a {
  0%   { transform: translate(0, 0); opacity: 0; }
  30%  { transform: translate(-3px, -1px); opacity: 1; }
  60%  { transform: translate(2px, 0); opacity: 0.7; }
  100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes glitch-shift-b {
  0%   { transform: translate(0, 0); opacity: 0; }
  30%  { transform: translate(3px, 1px); opacity: 1; }
  60%  { transform: translate(-2px, 0); opacity: 0.7; }
  100% { transform: translate(0, 0); opacity: 0; }
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--paper);
  font-size: 1.6rem;
  cursor: pointer;
}

/* -------------------------------------------------------------------- */
/* Glitch seam divider — the signature element                          */
/* A hairline diagonal cut between sections, echoing the JEST/ALT mark. */
/* -------------------------------------------------------------------- */

.seam {
  position: relative;
  height: 64px;
  overflow: hidden;
}

.seam::before {
  content: "";
  position: absolute;
  top: -20%; bottom: -20%;
  left: 46%;
  width: 3px;
  background: var(--signal);
  transform: rotate(var(--seam-angle));
  transform-origin: center;
}

.seam--from-ink { background: var(--ink); }
.seam--from-ink::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 100%, 100% 46%, 0 62%);
}

.seam--from-paper { background: var(--paper); }
.seam--from-paper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  clip-path: polygon(0 100%, 100% 100%, 100% 46%, 0 62%);
}

.seam.is-visible::before { animation: seam-flicker 0.6s ease-out; }

@keyframes seam-flicker {
  0% { opacity: 0; }
  15% { opacity: 1; }
  30% { opacity: 0.2; }
  45% { opacity: 1; }
  100% { opacity: 1; }
}

/* -------------------------------------------------------------------- */
/* Hero                                                                  */
/* -------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 92vh;
  margin-top: var(--nav-height);
  display: flex;
  align-items: flex-end;
  background: var(--ink) url('../images/album-artwork-red-glitch.jpg') center 30% / cover no-repeat;
}

.hero::before {
  /* legibility scrim, warms toward ink at the base where copy sits */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,22,34,0.15) 0%, rgba(17,22,34,0.55) 55%, rgba(17,22,34,0.94) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-bottom: 72px;
  width: 100%;
}

.hero-mark {
  max-width: 560px;
  width: 70%;
  height: auto;
  margin-bottom: 28px;
  opacity: 0;
  animation: hero-in 0.9s ease-out 0.15s forwards;
}

.hero-tagline {
  max-width: 560px;
  color: var(--ink-text);
  font-size: 1.05rem;
  opacity: 0;
  animation: hero-in 0.9s ease-out 0.4s forwards;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------------- */
/* Sections                                                              */
/* -------------------------------------------------------------------- */

section.block { padding: 88px 0; }

.block-head { max-width: 640px; margin-bottom: 48px; }
.block-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.block-head p { color: var(--paper-text-dim); }
.on-ink .block-head p { color: var(--ink-text-dim); }

/* -------------------------------------------------------------------- */
/* Release card (home + releases page)                                  */
/* -------------------------------------------------------------------- */

.release-feature {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
}

.release-art {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.release-art img { width: 100%; height: 100%; object-fit: cover; }

.release-art .unreleased-tag {
  position: absolute;
  top: 14px; left: -34px;
  background: var(--signal);
  color: var(--paper);
  font-family: var(--display-font);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  padding: 5px 40px;
  transform: rotate(-45deg);
  text-align: center;
}

.release-meta h3 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.2em;
}

.release-date {
  color: var(--ink-text-dim);
  font-family: var(--display-font);
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.release-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* Spotify-styled embed shell (placeholder until track is live) */
.spotify-shell {
  margin-top: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--ink-raised);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 420px;
}
.spotify-shell .dot {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #1ed760;
  display: flex; align-items: center; justify-content: center;
}
.spotify-shell .dot svg { width: 20px; height: 20px; fill: #0b0f16; }
.spotify-shell .copy { font-size: 0.85rem; color: var(--ink-text-dim); }
.spotify-shell .copy strong { color: var(--ink-text); display: block; font-family: var(--display-font); letter-spacing: 0.04em; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 2px; }

/* Real Spotify iframe embed (used once a release is live) */
.spotify-embed {
  margin-top: 28px;
  max-width: 420px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  line-height: 0;
}
.spotify-embed iframe { display: block; width: 100%; }

/* -------------------------------------------------------------------- */
/* Releases grid (past catalog, populated by JS from Spotify data)      */
/* -------------------------------------------------------------------- */

.releases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 8px;
}

.release-card {
  background: var(--paper-dim);
  border: 1px solid rgba(0,0,0,0.06);
}
.release-card .art { aspect-ratio: 1/1; overflow: hidden; background: var(--ink); }
.release-card .art img { width: 100%; height: 100%; object-fit: cover; }
.release-card .info { padding: 16px 18px 20px; }
.release-card .info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.release-card .info .type { color: var(--paper-text-dim); font-size: 0.78rem; }
.release-card a.card-link { display: block; }

.releases-status {
  font-size: 0.85rem;
  color: var(--paper-text-dim);
  margin-top: 18px;
}

/* -------------------------------------------------------------------- */
/* Newsletter / notify signup (used on releases page)                   */
/* -------------------------------------------------------------------- */

.notify-inline { margin-top: 28px; max-width: 420px; }

/* -------------------------------------------------------------------- */
/* About page                                                           */
/* -------------------------------------------------------------------- */

.about-hero {
  margin-top: var(--nav-height);
  padding: 96px 0 64px;
}
.about-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 780px; }

.about-copy {
  max-width: 700px;
}
.about-copy p { color: var(--ink-text); }
.about-copy p:first-of-type {
  font-size: 1.15rem;
  color: var(--paper);
}

.pull-quote {
  border-left: 3px solid var(--signal);
  padding-left: 24px;
  margin: 48px 0;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.3rem;
  line-height: 1.4;
  max-width: 620px;
}

.influence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0; margin: 0;
}
.influence-list li {
  font-family: var(--display-font);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--ink-text-dim);
  padding: 8px 14px;
}

.about-banner {
  width: 100%;
  aspect-ratio: 16/6;
  object-fit: cover;
  object-position: center 35%;
}

/* -------------------------------------------------------------------- */
/* Press page                                                            */
/* -------------------------------------------------------------------- */

.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.press-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--ink-raised);
  transition: border-color 0.15s ease;
}
.press-card:hover { border-color: var(--signal); }

.press-card .icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
}
.press-card .icon svg { width: 20px; height: 20px; fill: var(--ink-text); }

.press-card .handle { font-family: var(--display-font); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.95rem; }
.press-card .platform { font-size: 0.8rem; color: var(--ink-text-dim); }

.press-note {
  max-width: 620px;
  color: var(--paper-text-dim);
}

/* -------------------------------------------------------------------- */
/* Contact page                                                          */
/* -------------------------------------------------------------------- */

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-intro h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.contact-intro p { color: var(--ink-text); max-width: 420px; }

.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--display-font);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  margin-bottom: 8px;
  color: var(--ink-text-dim);
}
.field input, .field textarea {
  width: 100%;
  background: var(--ink-raised);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--paper);
  font-family: var(--body-font);
  font-size: 0.95rem;
  padding: 13px 14px;
}
.field input:focus, .field textarea:focus {
  border-color: var(--cyan);
  outline: none;
}
.field textarea { resize: vertical; min-height: 140px; }

/* honeypot: hidden from sighted users and screen readers, still tabbable-safe */
.field-trap {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 0.8rem;
  color: var(--ink-text-dim);
  margin-top: 10px;
}

.form-status {
  margin-top: 18px;
  font-size: 0.9rem;
  padding: 12px 14px;
  border-left: 3px solid var(--cyan);
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-error { border-color: var(--signal); }

/* -------------------------------------------------------------------- */
/* Footer                                                                 */
/* -------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--ink-text-dim);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-socials { display: flex; gap: 16px; }
.footer-socials a {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.footer-socials a:hover { border-color: var(--signal); color: var(--signal); }
.footer-socials svg { width: 17px; height: 17px; fill: currentColor; }

.footer-fine { font-size: 0.78rem; margin-top: 28px; opacity: 0.6; }

/* -------------------------------------------------------------------- */
/* Responsive                                                            */
/* -------------------------------------------------------------------- */

@media (max-width: 860px) {
  .release-feature { grid-template-columns: 1fr; }
  .release-art { max-width: 320px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.is-open { max-height: 320px; }
  .nav-links li { border-top: 1px solid rgba(255,255,255,0.06); }
  .nav-links a { display: block; padding: 16px 24px; }
  .nav-toggle { display: block; }
  .nav-logo { width: 200px; }
  .hero-mark { width: 88%; }
  section.block { padding: 64px 0; }
}
