/**
 * Homepage Specific Styles
 * These styles apply only to the homepage and extend the global styles
 */

/* Homepage Sections - Common Styles */
.homepage section {
  padding: 0;
  text-align: left; /* Consistent text alignment */
}

/* Section Heights */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative; /* Required for absolute positioned logo carousel */
  background-color: transparent;
  color: var(--fam-text-light);
  /* height handled by .page-section */
  width: 100%;
  /* Horizontal padding handled by inner .container for consistent alignment */
  /* overflow: hidden removed to allow carousel to extend full viewport width */
}



.hero-section .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: left;
  text-align: left;
  width: 100%;
  /* Use global .container padding for alignment with header */
}

.hero-section .container .btn {
  margin-top: 16px;
  align-self: flex-start;
}

/* About Section */
.about-section {
  /* height handled by .page-section */
  background-image: url('assets/images/about_homepage.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Right align content */
  position: relative;
  width: 100%;
  /* Horizontal padding handled by inner .container for consistent alignment */
}

.about-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Split into left and right halves */
  width: 100%;
  /* Use global .container padding for alignment with header */
  align-items: center;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Left align content within right section */
  text-align: left; /* Left align text */
  padding: 0 2rem; /* Add some padding for spacing */
  grid-column: 2; /* Place in right column */
}

.about-section h2.about-headline {
  font-family: 'Aboreto', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  line-height: 60px;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #202126; /* Dark text color instead of white */
  margin: 0 0 8px 0; /* 8px gap to paragraph */
  padding: 0;
}

.about-section p.about-description {
  font-family: 'Reddit Sans', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.02em;
  color: #202126; /* Dark text color instead of white */
  margin: 0 0 32px 0; /* 32px gap to stats section */
  padding: 0;
}

/* Statistics Section */
.stats-section {
  display: grid;
  grid-template-columns: auto 1fr; /* Consistent grid for alignment */
  gap: 32px 16px; /* Increased row gap to 32px for consistent spacing with divider */
  margin: 0 0 32px 0; /* 32px gap to button */
  position: relative;
}

.stats-section .stat-number {
  grid-column: 1; /* Numbers in first column */
}

.stats-section .stat-text {
  grid-column: 2; /* Text stacks in second column - aligned */
}

/* Horizontal divider between statistics */
.stats-section::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  height: 1px;
  border-top: 1.88px solid #D9D9D9;
}

.stat-item {
  display: grid;
  grid-template-columns: auto 1fr; /* Auto width for number, remaining space for text */
  align-items: flex-start;
  gap: 16px; /* Space between number and text */
}

.stat-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-column: 2; /* All text stacks in the second column */
}

.stat-number {
  font-family: 'Aboreto', serif; /* Using same font as main H2 */
  font-weight: 400;
  font-size: 50px; /* Will be styled later as requested */
  line-height: 60px;
  color: #202126;
  margin: 0;
  padding: 0;
}

.stat-symbol {
  font-family: 'Aboreto', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #4E0004;
  position: relative;
  top: 0.1em; /* Slightly higher positioning */
}

.stat-title {
  font-family: 'Reddit Sans', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 2%;
  text-transform: uppercase;
  color: #202126;
  margin: 8px 0 4px 0;
  padding: 0;
}

.stat-subtitle {
  font-family: 'Reddit Sans', sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 2%;
  color: #616262;
  margin: 0;
  padding: 0;
}

/* Button styles now standardized globally via .btn-on-light-red */

/* Logo Carousel in Hero Section */
.hero-section .logo-carousel {
  margin-top: var(--fam-spacing-xl);
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* Logo Carousel Styles - Overlaid at bottom of hero section, full viewport width */
.hero-section .logo-carousel.full-bleed {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  margin: 0;
  padding: 0;
  z-index: 2; /* Above hero background */
}

.logo-carousel {
  background: transparent;
  padding: 0;
  margin-top: 0;
  overflow: hidden;
  position: relative;
}

/* Reference-based carousel */
.icon-track-container {
  position: relative;
  width: 100%;
  height: 120px;
  background: rgba(244, 244, 244, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}

.icon-track {
  display: flex;
  position: absolute;
  height: 100%;
  width: max-content;
  align-items: center;
}

.icon-container {
  display: flex;
  position: absolute;
  height: 100%;
  width: calc((200px + 120px) * 2);
  align-items: center;
  transition: transform 0.3s linear;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 0;
  will-change: transform, opacity;
}

.icon-container.repositioning {
  opacity: 0;
  visibility: hidden;
  z-index: -1;
  pointer-events: none;
  transition: none !important;
  display: none;
}

.track-icon {
  flex: 0 0 auto;
  margin: 0 60px;
  opacity: 0.8;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  pointer-events: none;
}

.track-icon img {
  height: 76px;
  width: auto;
  display: block;
  filter: brightness(1);
  max-width: 200px;
  object-fit: contain;
}

.logo-track:hover {
  animation-play-state: paused;
}

.logo-item {
  flex-shrink: 0;
  height: 40px;
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.logo-item:hover {
  opacity: 1;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Video Section */
.video-section {
  /* min-height handled by .page-section */
  background-color: #000;
  position: relative;
  width: 100%;
  padding: 0; /* No inner whitespace */
  display: flex;
}

/* Hide video section by default - set VIDEO_SECTION_DISPLAY constant to 'ON' in functions.php to show it */
.video-section {
  display: flex; /* Hidden by default - uncomment this line to show: display: flex; */
}

.video-section .section-video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fill section, crop as needed */
  display: block;
}

/* placeholder styles removed in favor of actual video */

/* Solutions Section */
.solutions-section {
  /* height handled by .page-section */
  background-color: var(--fam-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  /* Horizontal padding handled by inner .container for consistent alignment */
}

.solutions-section .container {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 100%;
  padding: 96px var(--fam-container-padding);
  /* Use global .container padding for alignment with header */
}

.solutions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.solutions-headline {
  font-family: Aboreto;
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  line-height: 60px;
  letter-spacing: 0px;
  vertical-align: middle;
  text-transform: uppercase;
  color: #202126;
  margin: 0;
  padding: 0;
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  width: 100%;
}

.solutions-headline {
  font-family: 'Aboreto', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  line-height: 60px;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #202126;
  margin: 0;
  padding: 0;
}

/* Work headline desktop styles - matching solutions headline */
.work-headline {
  font-family: 'Aboreto', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 50px;
  line-height: 60px;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #202126;
  margin: 0;
  padding: 0;
}

/* Button styles standardized globally; remove local overrides */

/* Solution Card Component */
.solution-card {
  background-color: transparent;
  border-top: 2px solid #D0D0D0;
  padding: 32px 0; /* Remove horizontal padding, keep vertical */
  transition: box-shadow 0.3s ease, border-top-color 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-decoration: none;
  color: inherit;
}

.solution-card:hover {
  border-top-color: #4E0004;
  box-shadow: inset 0 4px 0 0 #4E0004; /* Creates additional 4px red border effect without layout shift */
}

.card-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-icon,
.arrow-icon {
  transition: color 0.3s ease;
}

.main-icon-svg,
.arrow-icon-svg {
  transition: color 0.3s ease;
}

.main-icon-svg svg {
  color: #616262;
  transition: color 0.3s ease;
  width: 32px;
  height: 32px;
}

.arrow-icon-svg svg {
  color: #202126;
  transition: color 0.3s ease;
  width: 27px;
  height: 27px;
}

.solution-card:hover .main-icon-svg svg,
.solution-card:hover .arrow-icon-svg svg {
  color: #4E0004;
}

/* Masked bitmap icons should follow currentColor like SVGs */
.solution-card .icon-mask {
  display: inline-block;
  width: 32px;
  height: 32px;
  background-color: currentColor;
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.solution-card .main-icon .icon-mask { color: #616262; }
.solution-card:hover .main-icon .icon-mask { color: #4E0004; }

.card-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-title {
  font-family: 'Reddit Sans', sans-serif;
  font-weight: 600;
  font-style: normal;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #202126;
  margin: 0;
  padding: 0;
}

.card-description {
  font-family: 'Reddit Sans', sans-serif;
  font-weight: 300;
  font-style: normal;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0.02em;
  color: #616262;
  margin: 0;
  padding: 0;
}

/* Section 4: Explore our work */
.section-4 {
  background: #D9D9D9;
  padding: 80px 0;
  position: relative;
  width: 100%;
  /* Horizontal padding handled by inner .container for consistent alignment */
  overflow: hidden; /* Contain horizontal overflow within section */
}

.section-4 .container {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 100%;
  /* Use global .container padding for alignment with header */
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}



/* Button styles standardized globally; remove local overrides */

/* Carousel Setup - moved variables to global scope */

.projects-viewport {
  /* Fallback width first, then var-based width */
  width: calc((500px * 2.5) + (24px * 2));
  width: calc((var(--card-w, 500px) * 2.5) + (var(--gap, 24px) * 2));
  overflow: visible; /* allow peeking beyond container padding */
  margin-left: 0; /* aligned with left content edge */
  margin-right: calc(-1 * var(--fam-container-padding)); /* overflow on right only */
  position: relative;
  padding: 0;
}

.projects-row {
  display: flex;
  gap: 24px; /* fallback */
  gap: var(--gap, 24px); /* ensures exactly 24px if --gap=24px */
  transition: transform 300ms ease;
  will-change: transform;
  padding: 0;
  margin: 0;
}

.project-card {
  flex: 0 0 var(--card-w);
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  justify-content: flex-start; /* Left align navigation */
  gap: 16px;
  margin-top: 32px;
}

.carousel-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 82px;
  height: 82px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.carousel-btn:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.carousel-btn img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Responsive - same rule under 800px */
@media (max-width: 800px) {
  .video-section {
    height: 100vh;            /* Still full viewport height */
  }
  .video-section .section-video {
    object-fit: cover;
    object-position: center;
  }
}
/* Video Section */
.video-section {
  position: relative;
  width: 100%;
  height: 100vh;              /* Full viewport height */
  margin: 0;
  padding: 0;
  overflow: hidden;           /* Contain video bleed */
}

.video-section .section-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* Ensures video covers area, no black bars */
  object-position: center;    /* Center crop */
  display: block;
}

/* Flip the right arrow asset for the prev button */
.carousel-btn--prev img {
  transform: scaleX(-1);
}

/* Removed services and other sections - keeping only hero */

/* Typography Spacing */
.homepage h1 + p {
  margin-top: var(--fam-heading-p-gap); /* Space between H1 and P */
}

.homepage p + .button-container,
.homepage p + div,
.homepage p + section {
  margin-top: var(--fam-p-content-gap); /* Space between P and any other content */
}

/* Section Headings */
.homepage h2 {
  margin-bottom: var(--fam-heading-p-gap);
}

/* Container - Remove max-width to maintain consistent edge alignment */
.homepage .container {
  /* Removed max-width and margin: 0 auto to prevent centering on wide screens */
  box-sizing: border-box;
}

/* Override for hero section to match header alignment exactly - styles now handled by .homepage .container */

/* Removed Button Styles, now managed in style.css */

/* Removed grid layouts - keeping only hero section */

/* Header Styles: use global .coming-soon-header from style.css */

/* Navigation */
.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  margin-left: var(--fam-spacing-md);
}

.main-navigation a {
  font-family: var(--fam-font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--fam-text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-navigation a:hover {
  opacity: 0.8;
}

/* Hamburger Menu */
.menu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: none;
  padding: 0;
  width: 60px;
  height: 20px;
}

.menu-toggle img {
  width: 100%;
  height: auto;
}

/* Show hamburger on mobile */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .main-navigation ul {
    display: none;
  }
  
  .main-navigation.active ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: var(--fam-spacing-md) 0;
  }
  
  .main-navigation.active li {
    margin: var(--fam-spacing-xs) 0;
    text-align: center;
  }
}

/* Footer styles moved to style.css for reusability across all pages */

/* Responsive Styles */
@media (max-width: 768px) {
  .homepage .container {
    padding: 0 5rem; /* Keep consistent with desktop */
  }
  
  /* About section responsive */
  .about-section .container {
    grid-template-columns: 1fr; /* Single column on mobile */
    padding-top: 48px;
    padding-bottom: 48px;
  }
  
  .about-content {
    grid-column: 1; /* Reset to first column on mobile */
    padding: 2rem; /* Add padding on mobile */
  }
  
  .about-section h2.about-headline {
    font-size: 36px;
    line-height: 42px;
  }
  
  /* Video section responsive */
  .video-placeholder {
    min-height: 300px;
  }
  
  .play-icon {
    font-size: 36px;
  }
  
  .video-text {
    font-size: 16px;
  }
  
  /* Section 4 responsive */
  .section-4 {
    padding: 60px 0;
  }
  
  .work-headline {
    font-size: 36px;
    line-height: 42px;
    font-family: 'Aboreto', serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: #202126;
  }
  
  .work-header {
    flex-direction: column;
    gap: var(--fam-spacing-lg);
    text-align: left;
    align-items: flex-start;
  }
  
  /* Make project cards 44% smaller on mobile (30% + 20% more) */
  .project-card {
    flex: 0 0 calc(var(--card-w, 500px) * 0.56);
  }
  
  .projects-viewport {
    width: calc((var(--card-w, 500px) * 0.56 * 2) + var(--gap));
  }

  /* Solutions section responsive */
  .solutions-section .container {
    gap: var(--fam-spacing-xl);
    padding-top: 96px;
    padding-bottom: 96px;
  }
  
  .solutions-header {
    flex-direction: column;
    gap: var(--fam-spacing-lg);
    text-align: left;
    align-items: flex-start;
  }
  
  .solutions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .solutions-headline {
    font-size: 36px;
    line-height: 42px;
  }
  
  /* Solution cards responsive */
  .solution-card {
    padding: 24px 0; /* Remove horizontal padding, keep vertical */
    gap: 20px;
  }
  
  .card-title {
    font-size: 16px;
    line-height: 24px;
  }
  
  .card-description {
    font-size: 14px;
    line-height: 20px;
  }
  
/* Footer responsive styles moved to style.css */
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .homepage .container {
    padding-left: var(--fam-mobile-edge-padding);
    padding-right: var(--fam-mobile-edge-padding);
  }
  
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  /* Video section mobile */
  .video-placeholder {
    min-height: 250px;
  }
  
  .play-icon {
    font-size: 32px;
  }
  
  .video-text {
    font-size: 14px;
  }
  
  /* Section 4 mobile */
  .section-4 {
    padding: 40px 0;
  }
  
  .work-headline {
    font-size: 32px;
    line-height: 38px;
    font-family: 'Aboreto', serif;
    font-weight: 400;
    font-style: normal;
    text-transform: uppercase;
    color: #202126;
  }
  
  /* Make project cards 44% smaller on smaller mobile too (30% + 20% more) */
  .project-card {
    flex: 0 0 calc(var(--card-w, 500px) * 0.56);
  }
  
  .projects-viewport {
    width: calc((var(--card-w, 500px) * 0.56) + 50px); /* Single card + small peek */
  }
  
  .carousel-btn {
    width: 60px;
    height: 60px;
  }

  /* Solutions section mobile */
  .solutions-section .container {
    gap: var(--fam-spacing-lg);
  }
  
  .solutions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .solutions-headline {
    font-size: 32px;
    line-height: 38px;
  }
  
  /* Solution cards mobile */
  .solution-card {
    padding: 20px 0; /* Remove horizontal padding, keep vertical */
    gap: 16px;
  }
  
  .card-title {
    font-size: 14px;
    line-height: 20px;
  }
  
  .card-description {
    font-size: 13px;
    line-height: 18px;
  }
  
/* Footer mobile styles moved to style.css */
  
/* Footer ordering styles moved to style.css */
}
