/* ============================================================
   JOE CERISANO — COMPLETE DESIGN SYSTEM
   style.css — All tokens, base, components, pages, responsive
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */

:root {
  /* Backgrounds */
  --bg-primary:    #000;
  --bg-secondary:  #0a0a0a;
  --bg-card:       #111;
  --bg-subtle:     #1a1a1a;

  /* Borders */
  --border:        #222;

  /* Accent */
  --accent:        #e63030;

  /* Text */
  --text-primary:  #fff;
  --text-body:     #888;
  --text-muted:    #666;
  --text-faint:    #444;

  /* Typography scale */
  --font-sans:  system-ui, -apple-system, sans-serif;
  --font-mono:  ui-monospace, "SFMono-Regular", "Courier New", monospace;

  /* Transitions */
  --transition: 0.3s ease;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1 {
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--text-primary);
  line-height: 1;
}

h2 {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1.1;
}

h3 {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1.2;
}

h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

p {
  color: var(--text-body);
  line-height: 1.6;
}

/* Page subtitle */
.subtitle {
  font-size: 18px;
  color: var(--text-body);
  margin-top: 12px;
  max-width: 700px;
  line-height: 1.5;
}

/* Label utility */
.label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
}

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */

.section {
  padding: 80px 0;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Alternating background sections */
.section--secondary {
  background-color: var(--bg-secondary);
}

.section--card {
  background-color: var(--bg-card);
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background-color: transparent;
  transition: background-color var(--transition);
}

/* Home page — transparent until scrolled */
body.page-home .nav {
  background-color: transparent;
}

body.page-home .nav.nav-scrolled {
  background-color: rgba(0, 0, 0, 0.95);
}

/* Non-home pages — always solid */
body:not(.page-home) .nav {
  background-color: rgba(0, 0, 0, 0.95);
}

/* Wordmark */
.nav-wordmark {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

/* Nav links list */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a.nav-active {
  opacity: 1;
  border-bottom: 1px solid var(--accent);
}

/* Hamburger button (hidden on desktop) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform var(--transition), opacity var(--transition);
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

body.nav-open .nav-overlay {
  display: flex;
}

.nav-overlay a {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.nav-overlay a:hover {
  color: var(--accent);
}

/* Close button inside overlay */
.nav-overlay-close {
  position: absolute;
  top: 24px;
  right: 40px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

/* ============================================================
   6. HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Gradient overlay */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 40%,
    rgba(0, 0, 0, 0.85) 100%
  );
  pointer-events: none;
}

.hero-text {
  position: absolute;
  bottom: 64px;
  left: 40px;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: -3px;
  color: var(--text-primary);
  line-height: 0.95;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  margin-bottom: 32px;
}

.hero .label {
  margin-bottom: 16px;
}

/* ============================================================
   7. QUOTE BAND
   ============================================================ */

.quote-band {
  width: 100%;
  background-color: var(--accent);
  padding: 48px 40px;
  text-align: center;
}

.quote-band blockquote,
.quote-band p {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto;
}

.quote-band cite,
.quote-band .attribution {
  display: block;
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ============================================================
   8. MINI-STORY BEATS
   ============================================================ */

.mini-story {
  width: 100%;
}

.beat {
  display: flex;
  flex-direction: row;
  gap: 0;
  min-height: 350px;
  overflow: hidden;
}

.beat-image {
  flex: 0 0 45%;
  min-height: 350px;
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.beat-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.beat-text {
  flex: 1;
  padding: 48px;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.beat-text .label {
  margin-bottom: 12px;
}

.beat-text h2 {
  margin-bottom: 16px;
}

.beat-text p {
  margin-bottom: 0;
}

/* Alternate photo side on even beats */
.beat:nth-child(even) {
  flex-direction: row-reverse;
}

/* ============================================================
   9. TIMELINE
   ============================================================ */

.timeline {
  position: relative;
  border-left: 2px solid var(--accent);
  margin-left: 8px;
  padding-left: 0;
}

.timeline-node {
  position: relative;
  padding-left: 32px;
  padding-bottom: 48px;
}

.timeline-node:last-child {
  padding-bottom: 0;
}

/* Red dot on the line */
.timeline-node::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  background-color: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

.timeline-label {
  /* inherits .label styles via class */
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 4px;
}

.timeline-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-top: 8px;
  margin-bottom: 0;
  line-height: 1.1;
}

.timeline-content {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-top: 20px;
}

.timeline-text {
  flex: 1;
}

.timeline-text p {
  margin-bottom: 16px;
}

.timeline-text p:last-child {
  margin-bottom: 0;
}

.timeline-photos {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-photos img {
  width: 100%;
  border-radius: 2px;
  display: block;
  background-color: var(--bg-subtle);
}

/* ============================================================
   10. ALBUM CARDS
   ============================================================ */

/* Featured album (large) */
.album-featured {
  display: flex;
  flex-direction: row;
  background-color: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.album-featured-art {
  flex: 0 0 250px;
  object-fit: cover;
  display: block;
  background-color: var(--bg-subtle);
}

.album-featured-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.album-featured-info h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.album-featured-info .album-year,
.album-featured-info .album-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.album-featured-info p {
  margin-bottom: 16px;
  font-size: 14px;
}

/* Album grid (smaller cards) */
.album-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.album-card {
  background-color: var(--bg-card);
  border-radius: 4px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  overflow: hidden;
}

.album-card-art {
  flex: 0 0 120px;
  height: 120px;
  border-radius: 2px;
  object-fit: cover;
  background-color: var(--bg-subtle);
}

.album-card-info {
  flex: 1;
  min-width: 0;
}

.album-card-info h3 {
  font-size: 15px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card-info .album-year,
.album-card-info .album-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.album-card-info p {
  font-size: 13px;
  line-height: 1.5;
}

/* Album quote (used in music.html featured album) */
.album-quote {
  font-style: italic;
  font-size: 14px;
  color: var(--text-body);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 12px 0 16px;
  line-height: 1.5;
}

.album-quote cite {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Bandcamp iframe */
.album-featured iframe,
.album-card iframe {
  width: 100%;
  border: 0;
  margin-top: 12px;
}

/* ============================================================
   11. BRAND CHIPS
   ============================================================ */

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

/* ============================================================
   12. VIDEO GRID
   ============================================================ */

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.video-grid iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  border: 0;
  display: block;
  background-color: var(--bg-subtle);
}

.video-grid figure {
  margin: 0;
}

.video-grid figcaption {
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.video-item {
  display: flex;
  flex-direction: column;
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  border: 0;
  display: block;
  background-color: var(--bg-subtle);
}

.video-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ============================================================
   13. CTA BUTTONS
   ============================================================ */

.btn-outline {
  display: inline-block;
  padding: 14px 32px;
  border: 2px solid var(--text-primary);
  color: var(--text-primary);
  background-color: transparent;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
  white-space: nowrap;
}

.btn-outline:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.btn-filled {
  display: inline-block;
  padding: 14px 32px;
  border: 2px solid var(--accent);
  color: #fff;
  background-color: var(--accent);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn-filled:hover {
  background-color: #f04040;
  border-color: #f04040;
}

/* ============================================================
   14. PHOTO GALLERY
   ============================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

.gallery-grid figcaption {
  padding: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   15. WORKED WITH
   ============================================================ */

.worked-with-list {
  column-count: 3;
  column-gap: 40px;
}

.worked-with-entry {
  margin-bottom: 12px;
  font-size: 14px;
  break-inside: avoid;
  color: var(--text-body);
}

.worked-with-entry .name {
  color: var(--text-primary);
  font-weight: 600;
}

.worked-with-entry .credit {
  color: var(--text-muted);
}

/* ============================================================
   16. HOME DISCOGRAPHY ROW
   ============================================================ */

.album-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
}

.album-thumb {
  flex: 0 0 auto;
  width: 160px;
}

.album-thumb img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  display: block;
  background-color: var(--bg-subtle);
}

.album-thumb-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 6px;
  line-height: 1.3;
}

.album-thumb-year {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   17. FOOTER
   ============================================================ */

.footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-wordmark {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copyright {
  font-size: 11px;
  color: var(--text-faint);
}

/* ============================================================
   18. MISC / SHARED COMPONENTS
   ============================================================ */

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Image placeholder */
.img-placeholder {
  display: block;
  background-color: var(--bg-subtle);
  width: 100%;
}

/* Spacer utility */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* Section header block */
.section-header {
  margin-bottom: 48px;
}

.section-header .label {
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  max-width: 600px;
  font-size: 15px;
}

/* Two-column content split */
.content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ============================================================
   19. RESPONSIVE — TABLET (max-width: 1199px)
   ============================================================ */

@media (max-width: 1199px) {
  .section-inner {
    padding: 0 32px;
  }

  .timeline-photos {
    flex: 0 0 200px;
  }

  .album-featured-art {
    flex: 0 0 200px;
  }

  .worked-with-list {
    column-count: 2;
  }

  .album-row {
    flex-wrap: wrap;
  }

  .content-split {
    gap: 32px;
  }
}

/* ============================================================
   20. RESPONSIVE — MOBILE (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {
  /* Navigation */
  .nav {
    padding: 16px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: 80vh;
  }

  .hero h1 {
    font-size: 48px;
    letter-spacing: -2px;
  }

  .hero-text {
    left: 20px;
    bottom: 40px;
    max-width: calc(100% - 40px);
  }

  /* Mini-story beats — stacked */
  .beat {
    flex-direction: column;
  }

  .beat:nth-child(even) {
    flex-direction: column;
  }

  .beat-image {
    flex: 0 0 auto;
    min-height: 250px;
    width: 100%;
  }

  .mini-story .beat-image {
    flex-basis: auto;
  }

  .beat-text {
    padding: 32px 24px;
  }

  /* Timeline */
  .timeline-content {
    flex-direction: column;
  }

  .timeline-photos {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .timeline-photos img {
    flex: 0 0 180px;
    width: 180px;
    height: auto;
  }

  /* Albums */
  .album-grid {
    grid-template-columns: 1fr;
  }

  .album-card {
    flex-direction: column;
  }

  .album-card-art {
    flex: 0 0 auto;
    width: 100%;
    height: 200px;
  }

  .album-featured {
    flex-direction: column;
  }

  .album-featured-art {
    flex: 0 0 auto;
    width: 100%;
    height: 250px;
  }

  /* Video grid */
  .video-grid {
    grid-template-columns: 1fr;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Worked with */
  .worked-with-list {
    column-count: 1;
  }

  /* Section spacing */
  .section {
    padding: 48px 0;
  }

  .section-inner {
    padding: 0 20px;
  }

  .section-header {
    margin-bottom: 32px;
  }

  /* Quote band */
  .quote-band {
    padding: 32px 20px;
  }

  .quote-band blockquote,
  .quote-band p {
    font-size: 16px;
  }

  /* Album row (home) */
  .album-row {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .album-thumb {
    flex: 0 0 120px;
    width: 120px;
  }

  /* Footer */
  .footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 32px 20px;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  /* Content split — stack */
  .content-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Nav */
  .nav-wordmark {
    font-size: 11px;
    letter-spacing: 2px;
  }
}

/* ============================================================
   21. RESPONSIVE — SMALL (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {
  .hero h1 {
    font-size: 36px;
    letter-spacing: -1px;
  }

  h2 {
    font-size: 22px;
  }

  .beat-text h2 {
    font-size: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    padding: 14px 16px;
  }

  .hero-text {
    left: 16px;
    bottom: 32px;
    max-width: calc(100% - 32px);
  }

  .timeline-node {
    padding-left: 24px;
  }

  .chips-container {
    gap: 8px;
  }

  .chip {
    padding: 8px 14px;
    font-size: 12px;
  }

  .btn-outline,
  .btn-filled {
    padding: 12px 24px;
    font-size: 10px;
  }
}
