/* ============================================
   The Art of Ritchie Ramirez – Unfinished Business Vol. 1
   Portfolio Microsite Styles
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-dark: #0d0d0d;
  --bg-darker: #080808;
  --bg-card: #141414;
  --text-primary: #f5f5f5;
  --text-secondary: #a8a8a8;
  --text-muted: #6b6b6b;
  --accent: #c9a962;
  --accent-hover: #ddc078;
  --accent-subtle: rgba(201, 169, 98, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --transition-smooth: 0.3s ease;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-dark);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: flex;
  width: 733px;
  flex-wrap: wrap;
  margin-top: 0;
  padding-left: 0;
  padding-right: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

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

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Main Navigation ---------- */
/* Nav starts transparent, gets solid background after scroll (JS adds .scrolled) */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 1.5rem;
  transition: background-color var(--transition-smooth),
              box-shadow var(--transition-smooth);
}

.main-nav.scrolled {
  background-color: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

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

/* Mobile nav toggle - hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
}

/* ---------- Banner (below nav) ---------- */
.banner {
  width: 100%;
  margin-top: 60px; /* below fixed nav */
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
  max-width: 800px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-hint:hover {
  color: var(--accent);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(6px); }
}

/* ---------- Section Titles ---------- */
.section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  margin-bottom: 2rem;
}

.section-title--centered {
  text-align: center;
}

/* ---------- About Section ---------- */
.about {
  background-color: var(--bg-dark);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  width: 100%;
  border-radius: 4px;
}

.about-text p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.pull-quote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

/* ---------- Life Lessons Strip ---------- */
.lessons-strip {
  background-color: var(--bg-darker);
}

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.lesson-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  transition: transform var(--transition-smooth),
              border-color var(--transition-smooth),
              box-shadow var(--transition-smooth);
}

.lesson-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-subtle);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.lesson-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.lesson-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- The Process & Journey ---------- */
.process-journey-section {
  background-color: var(--bg-darker);
}

.process-journey-content p {
  color: var(--text-secondary);
  max-width: 100%;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.process-journey-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.process-journey-gallery .gallery-item img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 4px;
  transition: transform var(--transition-smooth);
}

.process-journey-gallery .gallery-item:hover img {
  transform: scale(1.05);
}

/* ---------- Purchase Section ---------- */
.purchase-section {
  background-color: var(--bg-dark);
  text-align: center;
}

.purchase-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.purchase-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 6px;
  transition: background var(--transition-smooth);
}

.purchase-btn:hover {
  background: var(--accent-hover);
  color: var(--bg-dark);
}

/* ---------- Book Preview (page flip) ---------- */
.book-preview-section {
  background-color: var(--bg-darker);
}

.preview-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 1188px;
}

.book-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.book-nav {
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition-smooth), border-color var(--transition-smooth);
}

.book-nav:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.book-pages {
  position: relative;
  max-width: 1100px;
  width: 100%;
}

.book-page {
  display: none;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.book-page.active {
  display: block;
}

.book-page-indicator {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Project Panels (legacy, kept for reference) ---------- */
/* Each project: full-width bg image, gradient overlay, content */
.project-panel {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

.project-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Highlander section: dim background to 5% visibility */
#remake .project-overlay {
  background: rgba(0, 0, 0, 0.95);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.project-panel .container {
  position: relative;
  z-index: 1;
}

.project-header {
  margin-bottom: 2rem;
}

.project-meta {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-lesson {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.project-content {
  max-width: 720px;
  margin-bottom: 3rem;
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Project gallery - horizontal strip with hover zoom */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 4px;
  overflow: hidden;
  transition: transform var(--transition-smooth);
}

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

.gallery-item figcaption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---------- Process & Sketches Section ---------- */
.process-section {
  background-color: var(--bg-darker);
}

.process-intro {
  max-width: 640px;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
}

/* Masonry-style staggered grid */
.sketch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.sketch-item {
  margin: 0;
}

/* Stagger heights for masonry feel */
.sketch-item:nth-child(1) { grid-row: span 2; }
.sketch-item:nth-child(3) { grid-row: span 2; }
.sketch-item:nth-child(5) { grid-row: span 2; }
.sketch-item:nth-child(7) { grid-row: span 2; }

.sketch-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  transition: transform var(--transition-smooth),
              box-shadow var(--transition-smooth);
}

.sketch-item:hover img {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ---------- About the Artist ---------- */
.artist-section {
  background-color: var(--bg-dark);
}

.artist-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.artist-portrait {
  flex-shrink: 0;
}

.artist-portrait img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}

.artist-text {
  width: 726px;
}

.artist-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.artist-location {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ---------- Podcast / Audio Section ---------- */
.podcast-section {
  background-color: var(--bg-darker);
  text-align: center;
}

.podcast-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 2000px;
}

.podcast-section .section-title,
.podcast-section .podcast-desc,
.podcast-section .audio-player-wrap {
  text-align: center;
}

.podcast-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.audio-player-wrap {
  max-width: 2000px;
}

.episode-title {
  font-size: 21px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  width: 802px;
  max-width: 900px;
  line-height: 52px;
}

.episode-filename {
  color: var(--accent);
  font-family: monospace;
}

.audio-player {
  width: 100%;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-card);
  outline: none;
}

/* Style HTML5 audio controls */
.audio-player::-webkit-media-controls-panel {
  background: var(--bg-card);
}

.audio-player::-webkit-media-controls-play-button {
  filter: invert(1);
}

/* ---------- Contact / Footer ---------- */
.footer {
  padding: 4rem 0 3rem;
  background-color: var(--bg-dark);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-book {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Scroll Animation Helpers ---------- */
/* JS adds .reveal when elements enter viewport */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive Layout ---------- */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .lessons-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-journey-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .sketch-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sketch-item:nth-child(1),
  .sketch-item:nth-child(3),
  .sketch-item:nth-child(5),
  .sketch-item:nth-child(7) {
    grid-row: span 1;
  }

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

  .artist-portrait {
    max-width: 200px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav.nav-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 13, 13, 0.98);
    padding: 1rem;
    gap: 0.5rem;
  }

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

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

  .process-journey-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }

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

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

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ---------- Lightbox (enlarged image preview) ---------- */
main .about-image img,
main .gallery-item img,
main .artist-portrait img {
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
}

.lightbox-img {
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition-smooth);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
