/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: 
    radial-gradient(circle at 20% 80%, rgba(0,0,0,0.3) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(0,0,0,0.4) 1px, transparent 1px),
    radial-gradient(circle at 40% 40%, rgba(0,0,0,0.2) 1px, transparent 1px),
    radial-gradient(circle at 60% 90%, rgba(0,0,0,0.3) 1px, transparent 1px),
    radial-gradient(circle at 90% 60%, rgba(0,0,0,0.2) 1px, transparent 1px),
    radial-gradient(circle at 10% 30%, rgba(0,0,0,0.4) 1px, transparent 1px),
    radial-gradient(circle at 70% 10%, rgba(0,0,0,0.3) 1px, transparent 1px),
    radial-gradient(circle at 30% 70%, rgba(0,0,0,0.2) 1px, transparent 1px),
    radial-gradient(circle at 85% 85%, rgba(0,0,0,0.3) 1px, transparent 1px),
    radial-gradient(circle at 15% 60%, rgba(0,0,0,0.4) 1px, transparent 1px),
    linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 15%, #1e1e1e 30%, #2a2a2a 45%, #1a1a1a 60%, #252525 75%, #1f1f1f 90%, #333333 100%);
  background-size: 
    200px 200px,
    150px 150px,
    180px 180px,
    220px 220px,
    160px 160px,
    190px 190px,
    170px 170px,
    210px 210px,
    140px 140px,
    230px 230px,
    100% 100%;
  overflow: hidden;
  padding: 0 40px; /* Always show side margins */
}

/* Main Card Container - Dynamic top/bottom margins only */
.main-card {
  height: 100vh;
  width: 100%;
  background: transparent;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 10px 25px rgba(0, 0, 0, 0.3),
    0 5px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  transition: all 0.6s ease;
  border-radius: 0; /* No rounded corners by default */
}

/* Show top margin and rounded corners only for first page */
.main-card.first-page {
  margin-top: 40px;
  height: calc(100vh - 40px);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

/* Show bottom margin and rounded corners only for last page */
.main-card.last-page {
  margin-bottom: 40px;
  height: calc(100vh - 40px);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

/* Show both top and bottom margins when both first and last */
.main-card.first-page.last-page {
  margin-top: 40px;
  margin-bottom: 40px;
  height: calc(100vh - 80px);
  border-radius: 20px;
}

/* Card Content Container - The long scroll/sheet of paper */
.main-card .card-content {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative;
  /* WebP with JPEG fallback */
  background-image: url('../assets/img/background/donkey_portrait.webp'), url('../assets/img/background/donkey_portrait.jpg');
  background-size: cover; /* Cover the entire card */
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Fixed so we can control movement with JS */
  border-radius: inherit; /* Inherit border radius from parent */
}

/* Subtle overlay to push background image back - using ::after to avoid conflicts */
.main-card .card-content::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3); /* Subtle dark overlay */
  z-index: 1;
  pointer-events: none;
}

/* Remove the dark overlay for the entire card content for readability */

/* Removed first-page edge styling to avoid overlay conflicts */

/* Bottom edge of the scroll - only visible on last page - using a different approach */
.main-card.last-page::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.1), transparent);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 10;
  pointer-events: none;
}

.card-content::-webkit-scrollbar {
  display: none;
}

/* Navigation Chevrons - More subtle with wider open chevrons */
.nav-chevron {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 400;
  opacity: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
  min-width: auto;
}

.nav-chevron.visible {
  opacity: 1;
}

.nav-up {
  top: 15px;
}

.nav-up .chevron-label {
  order: -1;
}

.nav-down {
  bottom: 15px;
}

.nav-down .chevron-label {
  order: 1;
}

.chevron-icon {
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 3px;
}

.chevron-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  opacity: 0.8;
}

.nav-chevron:hover {
  color: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%) scale(1.1);
}

/* Pages are sections of the long scroll - no individual backgrounds needed */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  position: relative;
  padding: 60px 40px;
  margin: 0;
  border: none;
  color: white;
  z-index: 2; /* Ensure content appears above background and overlay */
}

.page-content {
  width: 100%;
  max-width: 1200px;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* Text cards with backdrop blur for better readability */
.text-card {
  background: rgba(0, 0, 0, 0.7); /* Increased from 0.15 to 0.7 for more opacity */
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 40px;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Headers inside text cards */
.text-card h1,
.text-card h2 {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 40px;
  text-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Venture info card headers */
.venture-info-card h1,
.venture-info-card h2 {
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 25px;
  text-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Home content card - larger and more prominent */
.home-content-card {
  background: rgba(0, 0, 0, 0.7); /* Increased from 0.15 to 0.7 for more opacity */
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 6px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* Venture info card */
.venture-info-card {
  background: rgba(0, 0, 0, 0.7); /* Increased from 0.15 to 0.7 for more opacity */
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.2);
}



/* Home Page Styles */
.home-logo {
  width: 150px;
  height: 150px;
  border-radius: 20px;
  box-shadow: 
    0 15px 35px rgba(255, 255, 255, 0.4),
    0 8px 20px rgba(255, 255, 255, 0.3),
    0 4px 10px rgba(255, 255, 255, 0.2);
  object-fit: cover;
}

.company-name {
  font-size: 4rem;
  font-weight: 300;
  margin: 0;
  text-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

.tagline {
  font-size: 1.8rem;
  font-weight: 300;
  margin: 0;
  opacity: 0.9;
  text-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.4),
    0 1px 5px rgba(0, 0, 0, 0.2);
  max-width: 800px;
  line-height: 1.3;
}

/* About Page Styles */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content .text-card {
  text-align: center;
}

.large-text {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 30px;
  line-height: 1.6;
  text-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.4),
    0 1px 5px rgba(0, 0, 0, 0.2);
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 20px;
  opacity: 0.95;
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Venture Page Styles */
.venture-hero {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
}

.venture-image {
  width: 400px;
  height: 300px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 10px 25px rgba(0, 0, 0, 0.3),
    0 5px 15px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.venture-info {
  flex: 1;
  text-align: left;
}

.venture-info h1 {
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 25px;
  text-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.venture-description {
  font-size: 1.3rem;
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.4),
    0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Contact Page Styles */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-content .text-card {
  text-align: center;
}

.contact-content .large-text {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 30px;
  line-height: 1.6;
  text-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.4),
    0 1px 5px rgba(0, 0, 0, 0.2);
}

.contact-info {
  margin: 40px 0;
}

.contact-info h3 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 15px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

.email-link {
  font-size: 2rem;
  margin-bottom: 40px;
}

.email-link a {
  color: white;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  text-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.4),
    0 1px 5px rgba(0, 0, 0, 0.2);
}

.email-link a:hover {
  border-bottom-color: white;
  opacity: 0.8;
}

.social-links {
  margin-top: 50px;
}

.social-links h3 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 20px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.social-icons a {
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.2);
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.social-icons a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 18px rgba(0, 0, 0, 0.4),
    0 3px 9px rgba(0, 0, 0, 0.3);
}

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  z-index: 1000;
  transition: width 0.3s ease;
}

/* Single column layout for screens 1000px and below */
@media (max-width: 1000px) {
  .venture-hero {
    flex-direction: column;
    gap: 30px;
    text-align: center;
    max-width: 100%;
  }

  .venture-image {
    width: 100%;
    max-width: 400px;
    height: 300px;
  }

  .venture-info {
    text-align: center;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  html, body {
    padding: 0 10px; /* Smaller side margins on mobile */
  }

  /* Disable parallax on mobile for better performance and use static background */
  .main-card .card-content {
    background-attachment: scroll; /* Change from fixed to scroll on mobile */
    background-size: cover;
    background-position: center center; /* Center the background */
  }

  /* Increase overlay opacity on mobile for better text readability */
  .main-card .card-content::after {
    background: rgba(0, 0, 0, 0.4); /* Slightly darker overlay on mobile */
  }

  .main-card.first-page {
    margin-top: 10px;
    height: calc(100vh - 10px);
    border-radius: 15px 15px 0 0;
  }

  .main-card.last-page {
    margin-bottom: 10px;
    height: calc(100vh - 10px);
    border-radius: 0 0 15px 15px;
  }

  .main-card.first-page.last-page {
    margin-top: 10px;
    margin-bottom: 10px;
    height: calc(100vh - 20px);
    border-radius: 15px;
  }

  .page {
    padding: 30px 15px;
    min-height: 100vh;
  }

  /* Enhanced mobile navigation */
  .nav-chevron {
    padding: 8px 12px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 60px;
    /* Make navigation more touch-friendly */
    min-height: 44px; /* iOS recommended minimum touch target */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
  }

  .nav-chevron:active {
    transform: translateX(-50%) scale(0.95);
    background: rgba(0, 0, 0, 0.8);
  }

  .nav-up {
    top: 15px;
  }

  .nav-down {
    bottom: 15px;
  }

  .chevron-icon {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .chevron-label {
    font-size: 9px;
    font-weight: 500;
  }

  /* Home page mobile styles */
  .home-content-card {
    padding: 30px 20px;
    margin: 0 10px;
  }

  .company-name {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .tagline {
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .home-logo {
    width: 100px;
    height: 100px;
    box-shadow: 
      0 8px 20px rgba(255, 255, 255, 0.3),
      0 4px 12px rgba(255, 255, 255, 0.2);
  }

  /* Text cards mobile optimization */
  .text-card {
    padding: 25px 20px;
    margin: 15px 10px;
    border-radius: 12px;
  }

  .about-content .text-card h2,
  .contact-content .text-card h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
  }

  .venture-info-card {
    padding: 25px 20px;
    margin: 0 10px;
  }

  .venture-info-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  /* Venture pages mobile layout */
  .venture-hero {
    flex-direction: column;
    gap: 25px;
    text-align: center;
    max-width: 100%;
  }

  .venture-image {
    width: 100%;
    max-width: 320px;
    height: 220px;
    box-shadow: 
      0 12px 25px rgba(0, 0, 0, 0.4),
      0 6px 15px rgba(0, 0, 0, 0.3),
      0 3px 8px rgba(0, 0, 0, 0.2);
  }

  .venture-info {
    text-align: center;
  }

  .venture-description {
    font-size: 1.05rem;
    line-height: 1.5;
  }

  .large-text {
    font-size: 1.15rem;
    line-height: 1.5;
    margin-bottom: 25px;
  }

  .about-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 18px;
  }

  /* Contact page mobile styles */
  .contact-content {
    max-width: 100%;
  }

  .contact-info {
    margin: 30px 0;
  }

  .email-link {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }

  .social-links {
    margin-top: 40px;
  }

  .social-icons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .social-icons a {
    width: 180px;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    box-shadow: 
      0 3px 10px rgba(0, 0, 0, 0.3),
      0 2px 6px rgba(0, 0, 0, 0.2);
  }

  .social-icons a:hover {
    box-shadow: 
      0 5px 15px rgba(0, 0, 0, 0.4),
      0 3px 9px rgba(0, 0, 0, 0.3);
  }

  /* Progress bar mobile */
  .progress-bar {
    height: 2px;
  }
}

@media (max-width: 480px) {
  html, body {
    padding: 0 5px; /* Even smaller margins for very small screens */
  }

  .main-card.first-page {
    margin-top: 5px;
    height: calc(100vh - 5px);
  }

  .main-card.last-page {
    margin-bottom: 5px;
    height: calc(100vh - 5px);
  }

  .main-card.first-page.last-page {
    margin-top: 5px;
    margin-bottom: 5px;
    height: calc(100vh - 10px);
  }

  .page {
    padding: 20px 10px;
  }

  .home-content-card {
    padding: 20px 15px;
    margin: 0 5px;
  }

  .company-name {
    font-size: 1.8rem;
    line-height: 1.1;
  }

  .tagline {
    font-size: 1rem;
    line-height: 1.3;
  }

  .home-logo {
    width: 80px;
    height: 80px;
  }

  .text-card {
    padding: 20px 15px;
    margin: 10px 5px;
  }

  .about-content .text-card h2,
  .contact-content .text-card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .venture-info-card {
    padding: 20px 15px;
    margin: 0 5px;
  }

  .venture-info-card h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .venture-image {
    max-width: 280px;
    height: 180px;
  }

  .venture-description {
    font-size: 1rem;
    line-height: 1.4;
  }

  .large-text {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 20px;
  }

  .about-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
  }

  .email-link {
    font-size: 1.3rem;
    margin-bottom: 25px;
  }

  .social-icons a {
    width: 160px;
    padding: 8px 16px;
    font-size: 13px;
  }

  .nav-chevron {
    padding: 6px 10px;
    font-size: 10px;
    min-width: 50px;
  }

  .chevron-icon {
    font-size: 16px;
  }

  .chevron-label {
    font-size: 8px;
  }
}

/* Landscape mode adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .page {
    padding: 15px 10px;
  }

  .home-content-card {
    padding: 20px 15px;
  }

  .company-name {
    font-size: 1.8rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .home-logo {
    width: 80px;
    height: 80px;
  }

  .text-card {
    padding: 20px 15px;
  }

  .about-content .text-card h2,
  .contact-content .text-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .venture-info-card h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  .venture-image {
    height: 160px;
  }

  .large-text {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  .about-content p {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .nav-chevron {
    min-height: 36px;
    padding: 6px 10px;
  }
}

/* Smooth animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content > * {
  animation: fadeIn 0.6s ease-out;
}

/* Custom scrollbar for desktop */
@media (min-width: 769px) {
  .card-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  }

  .card-content::-webkit-scrollbar {
    display: block;
    width: 6px;
  }

  .card-content::-webkit-scrollbar-track {
    background: transparent;
  }

  .card-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
  }

  .card-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
  }
}
