/*
  css/index.css
  Stylesheet for the Homepage (index.html)
  Author: Jules
*/

/* ------------------- */
/* --- Hero Section --- */
/* ------------------- */
.hero {
  /* Full viewport height for a dramatic landing page effect. */
  height: 90vh;
  /* Flexbox is used to center the content perfectly. */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* Adds padding for smaller screens where content might touch the edges. */
  padding: 0 var(--spacing-medium);
  /* Background image using IMG_0841.JPG */
  background-image: url('../collections/3d-works/archive-images/IMG_0841.JPG');
  background-size: cover; /* Ensures the image covers the entire section. */
  background-position: center; /* Centers the background image. */
  background-attachment: fixed; /* Creates a parallax-like effect on scroll. */
  color: var(--secondary-text-color); /* Sets the text color to white for contrast. */
}

.hero-content {
  /* Adds a semi-transparent overlay to ensure text is readable over the background. */
  background-color: rgba(4, 26, 47, 0.7);
  /* Adds padding inside the content box. */
  padding: var(--spacing-large) var(--spacing-xlarge);
  /* A thicker border that fits the brutalist aesthetic. */
  border: 5px solid var(--primary-accent-color);
}

.hero h1 {
  /* Overrides the default heading color to be white for this section. */
  color: var(--secondary-text-color);
  /* Larger font size for the main headline. */
  font-size: 3.5rem;
  /* Adds a subtle text shadow to make the text pop. */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  /* Larger font size for the sub-headline. */
  font-size: 1.25rem;
  /* Adds space above the call-to-action button. */
  margin-bottom: var(--spacing-large);
  /* Adds extra space between words. */
  word-spacing: 0.3rem;
}

/* ------------------- */
/* --- Mobile Hero Section --- */
/* ------------------- */
.mobile-hero {
  display: none; /* Hidden by default */
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, var(--background-color) 0%, #0a2547 50%, var(--background-color) 100%);
}

.mobile-hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/mobilehero.jpg?v=5');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 1;
  z-index: 1;
}

.mobile-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-large) var(--spacing-medium);
  text-align: center;
}

.mobile-hero-text {
  /* Add visible background box around text - matching website dark blue */
  background-color: rgba(4, 26, 47, 0.75);
  padding: var(--spacing-large) var(--spacing-medium);
  border-radius: 12px;
  border: 3px solid var(--primary-accent-color);
  margin-bottom: var(--spacing-xlarge);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  /* Ensure high z-index */
  position: relative;
  z-index: 10;
}

.mobile-hero-text h1 {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--secondary-text-color);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  margin-bottom: var(--spacing-medium);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.mobile-hero-text p {
  font-size: 1.1rem;
  color: var(--secondary-text-color);
  margin-bottom: 0; /* Remove bottom margin since we're in a contained box */
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.mobile-hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-medium);
  width: 100%;
  max-width: 280px;
}

.mobile-btn {
  display: inline-block;
  padding: var(--spacing-medium) var(--spacing-large);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mobile-btn.primary {
  background: var(--primary-accent-color);
  color: var(--background-color);
  border-color: var(--primary-accent-color);
}

.mobile-btn.primary:hover,
.mobile-btn.primary:active {
  background: transparent;
  color: var(--primary-accent-color);
  border-color: var(--primary-accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

.mobile-btn.secondary {
  background: transparent;
  color: var(--secondary-text-color);
  border-color: var(--secondary-text-color);
}

.mobile-btn.secondary:hover,
.mobile-btn.secondary:active {
  background: var(--secondary-text-color);
  color: var(--background-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.mobile-hero-swipe-indicator {
  position: absolute;
  bottom: var(--spacing-large);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--secondary-text-color);
  opacity: 0.7;
  z-index: 3;
  animation: pulse 2s infinite;
}

.mobile-hero-swipe-indicator span {
  font-size: 0.85rem;
  display: block;
  margin-bottom: var(--spacing-small);
}

.swipe-arrow {
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-3px); }
}

/* ------------------- */
/* --- Featured Work Section --- */
/* ------------------- */
.section-title {
  /* Center-aligns the title for the section. */
  text-align: center;
  /* Adds significant space below the title before the grid starts. */
  margin-bottom: var(--spacing-large);
  /* Increases font size for section titles. */
  font-size: 2.5rem;
}

.featured-grid {
  /* Uses CSS Grid for a flexible and responsive layout. */
  display: grid;
  /* Creates three equal-width columns. */
  grid-template-columns: repeat(3, 1fr);
  /* Adds significant gap between grid items. */
  gap: var(--spacing-large);
}

.featured-item {
  /* Defines the container for each piece of artwork. */
  position: relative;
  /* Hides any overflow from the child elements (like the info overlay). */
  overflow: hidden;
  /* Adds a border to frame the artwork. */
  border: 2px solid var(--secondary-accent-color);
}

.featured-item img {
  /* Ensures the image fills the container. */
  width: 100%;
  /* Vertical alignment for the image. */
  vertical-align: top;
  /* Smooth transition for the zoom effect on hover. */
  transition: transform 0.5s ease;
}

.featured-item:hover img {
  /* Creates a subtle zoom effect on the image when hovered. */
  transform: scale(1.05);
}

.item-info {
  /* Positions the info box over the image. */
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  /* Uses the main background color with some transparency. */
  background: rgba(4, 26, 47, 0.85);
  /* Adds padding inside the info box. */
  padding: var(--spacing-medium);
  /* Moves the box down, out of view, by default. */
  transform: translateY(100%);
  /* Smooth transition for the slide-up effect. */
  transition: transform 0.5s ease;
}

.featured-item:hover .item-info {
  /* Slides the info box into view on hover. */
  transform: translateY(0);
}

.item-info h3 {
  /* Uses the primary orange color for the series name. */
  color: var(--primary-text-color);
  margin-bottom: var(--spacing-small);
}

.item-info p {
  /* Uses the secondary white color for the artwork title. */
  color: var(--secondary-text-color);
  margin-bottom: 0;
}

/* ------------------- */
/* --- Media Queries --- */
/* ------------------- */

/* Hide mobile hero on desktop/tablet */
.desktop-hero {
  display: flex;
}

.mobile-hero {
  display: none;
}

@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.8rem; /* Reduces heading size on tablets. */
  }
  .featured-grid {
    grid-template-columns: repeat(2, 1fr); /* Two columns on tablets. */
  }
}

/* Mobile devices - show mobile hero, hide desktop hero */
@media (max-width: 768px) {
  /* Hide desktop hero on mobile */
  .desktop-hero {
    display: none;
  }
  
  /* Show mobile hero on mobile */
  .mobile-hero {
    display: flex;
    flex-direction: column;
  }
  
  /* Adjust mobile hero for smaller screens */
  .mobile-hero-text h1 {
    font-size: 2.8rem;
  }
  
  .mobile-hero-text p {
    font-size: 1rem;
  }
  
  .mobile-btn {
    font-size: 0.9rem;
    padding: calc(var(--spacing-medium) * 0.8) var(--spacing-medium);
  }
  
  .featured-grid {
    grid-template-columns: 1fr; /* Single column on mobile. */
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .mobile-hero-text h1 {
    font-size: 2.4rem;
  }
  
  .mobile-hero-actions {
    max-width: 260px;
  }
  
  .mobile-btn {
    font-size: 0.85rem;
  }
}

/* Specific targeting for mobile devices */
@media only screen 
  and (max-width: 768px) 
  and (-webkit-min-device-pixel-ratio: 1) {
  .mobile-hero {
    display: flex;
    flex-direction: column;
  }
  .desktop-hero {
    display: none;
  }
}

/* iPhone specific targeting */
@media only screen 
  and (max-width: 768px) 
  and (-webkit-min-device-pixel-ratio: 2) {
  .mobile-hero {
    display: flex;
    flex-direction: column;
  }
  .desktop-hero {
    display: none;
  }
}

/* Android specific targeting */
@media only screen 
  and (max-width: 768px) 
  and (-webkit-min-device-pixel-ratio: 1.5) {
  .mobile-hero {
    display: flex;
    flex-direction: column;
  }
  .desktop-hero {
    display: none;
  }
}

/* iOS specific - disable parallax for better performance */
@supports (-webkit-touch-callout: none) {
  .mobile-hero-background {
    background-attachment: scroll !important;
  }
}
