/* ==========================================
   Project Page Styles
   ========================================== */

:root {
  --project-hero-height-desktop: 75vh;
  --project-hero-height-tablet: 50vh;
  --project-hero-height-mobile: 40vh;
}

/* Base Layout */
body {
  overflow: hidden;
  height: 100vh;
  font-family: var(
    --font-family-display,
    "Gabarito",
    "Helvetica Neue",
    Arial,
    sans-serif
  );
}

/* Ensure all text elements on project pages use Gabarito */
.main-container,
.main-container * {
  font-family: var(
    --font-family-display,
    "Gabarito",
    "Helvetica Neue",
    Arial,
    sans-serif
  );
}

.main-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 100vh;
}

/* Mobile Back Button - Hidden on desktop */
.mobile-back-button {
  display: none;
}

/* Sticky Sidebar */
.project-intro-container {
  width: var(--intro-width);
  height: 100vh;
  position: sticky;
  top: 0;
  padding: var(--spacing-xxl);
  background-color: var(--thicket-bauhaus-color-semantic-background-brand);
  display: flex;
  flex-direction: column;
}

.project-intro {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Navigation Elements */
.back-to-home {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--thicket-bauhaus-spacing-lg, 1.5rem);
  text-decoration: none;
  padding: var(--thicket-bauhaus-spacing-md, 1rem)
    var(--thicket-bauhaus-spacing-lg, 1.5rem);
  background-color: var(--thicket-bauhaus-color-zinc-50, #fafafa);
  color: var(--thicket-bauhaus-color-zinc-900, #18181b);
  border: 1px solid var(--thicket-bauhaus-color-zinc-900, #18181b);
  border-radius: var(--radius);
  font-family: var(--font-family-display);
  font-size: var(--thicket-bauhaus-text-sizes-base, 1rem);
  font-weight: var(--thicket-bauhaus-text-weights-medium, 500);
  cursor: pointer;
  margin-top: auto;
  transition: background-color 0.2s ease-in-out, border-radius 0.2s ease-in-out;
}

.back-to-home:hover {
  background-color: var(--thicket-bauhaus-color-zinc-900, #18181b);
  color: var(--thicket-bauhaus-color-zinc-50, #fafafa);
  border-radius: calc(var(--radius) * 1.5);
}

.back-to-home .link-icon {
  font-size: var(--thicket-bauhaus-text-sizes-lg, 1.125rem);
  transition: color 0.2s ease-in-out;
}

/* Content Area */
.content-scrollable {
  width: var(--content-width);
  overflow-y: auto;
  height: 100vh;
  background-color: var(--thicket-bauhaus-color-semantic-background-brand);
}

/* Hero Section */
.project-hero {
  padding: var(--spacing-sm);
  width: 100%;
  height: var(--project-hero-height-desktop);
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-hero .video-container {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.project-hero .project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Typography Hierarchy - Main Section Titles */
.project-content .section-title {
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 2rem;
  color: var(--thicket-bauhaus-color-semantic-foreground-on-brand, #18181b);
  letter-spacing: -0.02em;
}

/* Content Grid */
.content-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

/* Typography Hierarchy */
.content-column .section-title {
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--thicket-bauhaus-color-semantic-foreground-on-brand, #18181b);
  letter-spacing: -0.02em;
}

/* Override prose styles for section titles to maintain hierarchy */
.content-column.prose .section-title {
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

/* Body text hierarchy */
.content-column p {
  margin-bottom: 1.25rem;
  /* font-size removed to allow Tailwind classes to control it */
  line-height: 1.5;
  color: var(--thicket-bauhaus-color-semantic-foreground-on-brand, #18181b);
}

.content-column p:last-child {
  margin-bottom: 0;
}

/* Ensure prose doesn't override our paragraph spacing */
.content-column.prose p {
  margin-bottom: 1.25rem;
}

.content-column.prose p:last-child {
  margin-bottom: 0;
}

/* Typography hierarchy for prose content */
.content-column.prose h2 {
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.content-column.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-column.prose h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* List hierarchy */
.content-column.prose ul,
.content-column.prose ol {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.content-column.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Strong emphasis */
.content-column.prose strong {
  font-weight: 600;
  color: var(--thicket-bauhaus-color-semantic-foreground-on-brand, #18181b);
}

/* Links in prose */
.content-column.prose a {
  color: var(--thicket-bauhaus-color-semantic-foreground-on-brand, #18181b);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.content-column.prose a:hover {
  opacity: 0.7;
}

.content-column .role-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0;
}

.content-column .role-list li {
  margin-bottom: var(--spacing-md, 1rem);
  padding-left: 0.5rem;
}

.content-column .role-list li:last-child {
  margin-bottom: 0;
}

/* Gallery Layouts */
.gallery-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

/* Animation */
.fade-element {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-speed-medium) ease,
    transform var(--transition-speed-medium) ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 1200px) {
  .project-hero,
  .project-content,
  .project-intro-container,
  .artists-gallery,
  .screenshots-gallery {
    padding: var(--spacing-xl);
  }
}

@media (max-width: 1024px) {
  body {
    overflow-y: auto;
    height: auto;
  }

  .main-container {
    flex-direction: column;
  }

  .project-intro-container,
  .content-scrollable {
    width: 100%;
    height: auto;
    position: relative;
  }

  .project-hero {
    height: var(--project-hero-height-tablet);
  }

  /* Show mobile back button above project-intro-container and hide sidebar back button */
  .mobile-back-button {
    display: block;
    width: 100%;
    padding: var(--spacing-md, 1rem) var(--spacing-xl, 2rem);
    background-color: var(--thicket-bauhaus-color-semantic-background-brand);
    order: -1; /* Place it before project-intro-container */
    box-sizing: border-box;
  }

  .mobile-back-button .back-to-home {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .project-intro-container .back-to-home {
    display: none;
  }
}

@media (max-width: 768px) {
  .project-hero {
    height: var(--project-hero-height-mobile);
  }

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

  .project-intro {
    max-width: 100%;
  }

  /* Mobile back button styling */
  .mobile-back-button {
    padding: var(--spacing-md, 1rem);
    width: 100%;
  }

  .mobile-back-button .back-to-home {
    margin-top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Responsive typography hierarchy */
  .project-content .section-title {
    margin-bottom: 1.5rem;
  }

  .content-column .section-title {
    margin-bottom: 1.25rem;
  }

  .content-column.prose .section-title {
    margin-bottom: 1.25rem;
  }

  .content-column.prose h2 {
    font-size: 1.5rem;
  }

  .content-column.prose h3 {
    font-size: 1.25rem;
  }

  .content-column.prose h4 {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  .project-intro .project-title {
    font-size: var(--font-size-xl);
  }

  .project-hero,
  .project-content,
  .project-intro-container,
  .artists-gallery,
  .screenshots-gallery {
    padding: var(--spacing-md);
  }
}
