/* Section Styles - Individual Section Layouts */

/* =====================
   FULLPAGE SCROLL CONTAINER (Apple-style)
===================== */

#fullpage-container {
  position: relative;
  overflow-x: hidden; /* Prevent horizontal scroll for all sections */
  /* Each section will create its own scroll height via pin-spacer */
}

/* Apple-style: Each section is sticky and stacks with z-index */
#fullpage-container > section {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  will-change: transform;
}

/* Mobile: Allow sections to have dynamic height for content */
@media (max-width: 768px) {
  #fullpage-container > section {
    min-height: 100vh;
    height: auto;
  }
}

/* Z-index stacking order (higher = on top) */
#hero {
  z-index: 1;
}

#company-intro {
  z-index: 2;
}

#business-areas {
  z-index: 3;
}

#core-values {
  z-index: 4;
}

#cta-contact {
  z-index: 5; /* Highest - should be on top */
}

/* =====================
   PARALLAX BACKGROUNDS (Apple-style)
===================== */

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: var(--z-behind);
  will-change: transform;
  /* Fallback gradient background if images don't load */
  background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.parallax-bg img,
.parallax-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 110%; /* Extra width for parallax movement */
  min-height: 110%; /* Extra height for parallax movement */
  width: auto;
  height: auto;
  object-fit: cover;
  will-change: transform;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay for readability */
  z-index: 1;
}

/* =====================
   HERO SECTION
===================== */

#hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  position: relative;
}

.hero__bg-static {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  z-index: 0;
}

.hero__content {
  text-align: center;
  z-index: 10; /* Above video and overlay */
  position: relative;
  padding: 2rem;
}

.hero__logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  opacity: 0;
}

.hero__title {
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
  opacity: 0;
}

.hero__subtitle {
  color: var(--color-text-gray);
  opacity: 0.9;
  font-size: var(--text-lg);
  font-weight: 300;
  opacity: 0;
}

/* =====================
   COMPANY INTRO SECTION
===================== */

#company-intro {
  padding: var(--space-2xl) 0;
  background-color: #FFFFFF; /* Solid white background */
  display: flex;
  align-items: center;
  position: relative;
  overflow-x: hidden; /* Prevent horizontal scroll */
  min-height: 100vh; /* Ensure minimum height */
  height: auto; /* Allow height to grow with content on mobile */
}

.section__bg-image {
  opacity: 0.15; /* Subtle background */
  /* Fallback gradient for intro section */
  background: radial-gradient(ellipse at center, #f0f0f0 0%, #ffffff 100%);
}

.section__bg-image img {
  filter: grayscale(30%) brightness(1.1);
}

.intro__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start; /* Align to top */
  position: relative;
  z-index: 10; /* Above parallax background */
}

.intro__content {
  /* Ensure consistent alignment for all text elements */
  text-align: left;
}

.intro__content h2 {
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  opacity: 0; /* Start hidden for GSAP animation */
  /* Exact alignment with body text */
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: left;
  letter-spacing: 0 !important; /* Remove any letter-spacing */
  text-indent: 0 !important; /* Remove any text-indent */
  transform: translateX(0) !important; /* Remove any transform offset */
}

.intro__text {
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  text-indent: 0;
}

.intro__text .word {
  display: inline-block;
  opacity: 0; /* Start hidden for word-by-word reveal */
}

.intro__highlight {
  color: var(--color-text-gray); /* Start as gray, animates to accent */
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

.intro__philosophy {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: #F5F5F5;
  border-left: 4px solid #000000;
  font-style: italic;
  opacity: 0; /* Start hidden for GSAP animation */
}

.intro__image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.intro__image-wrapper {
  opacity: 0; /* Start hidden for GSAP animation */
  margin-top: 6rem; /* Push image down to align with body text */
}

/* =====================
   BUSINESS AREAS SECTION
===================== */

#business-areas {
  background-color: #000000; /* Solid black background */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.business-card {
  position: absolute;
  bottom: -50%; /* Completely hidden below viewport */
  left: 50%;
  transform: translateX(-50%);
  width: 400px; /* Start small */
  height: 300px; /* Start small */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  border-radius: 24px; /* Rounded corners for small state */
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  will-change: transform, width, height, border-radius, bottom, opacity;
}

.business-card__bg {
  opacity: 0.4; /* Subtle background for each card */
  transition: opacity 0.3s ease;
}

/* Fallback gradients for each business card - Monochrome */
#card-consulting .business-card__bg {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

#card-franchise .business-card__bg {
  background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
}

#card-publishing .business-card__bg {
  background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
}

/* Video and image styles for business cards */
.business-card__bg video,
.business-card__bg img {
  filter: brightness(1.2) contrast(1.1);
}

.business-card__bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  z-index: 1;
}

/* Image fallback behind video */
.business-card__bg img {
  z-index: 0;
}

.business-card__content {
  max-width: 800px;
  text-align: center;
  padding: var(--space-lg);
  position: relative;
  z-index: 10; /* Above parallax background */
  opacity: 0; /* Start hidden, fade in when card expands */
  transition: opacity 0.3s ease;
}

.business-card h3 {
  color: var(--color-text-white);
  margin-bottom: var(--space-sm);
  transform-style: preserve-3d; /* Enable 3D rotation on title */
}

.business-card__subtitle {
  color: #999999;
  margin-bottom: var(--space-md);
}

.business-card__description {
  color: var(--color-text-light);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

/* =====================
   CORE VALUES SECTION
===================== */

#core-values {
  padding: 8rem 0; /* Much more vertical padding for longer scroll distance */
  background-color: #FFFFFF; /* Solid white background */
  display: flex;
  align-items: center;
  position: relative;
  min-height: 100vh;
  height: auto; /* Allow height to grow with content */
}

/* Allow scrolling within section on very small screens */
@media (max-height: 700px) {
  #core-values {
    overflow-y: auto;
    align-items: flex-start;
    padding-top: 2rem;
  }
}

#core-values .section__bg-image {
  opacity: 0.1; /* Very subtle for readability */
  /* Fallback gradient for values section */
  background: radial-gradient(circle at top right, #e0e0e0 0%, #f5f5f5 100%);
}

/* Ensure section content fits in viewport */
#core-values .section-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--container-padding);
}

.values__header {
  text-align: center;
  margin-bottom: 0.5rem; /* Much closer to cards */
  position: relative;
  z-index: 10;
  flex-shrink: 0; /* Prevent shrinking */
}

.values__header h2 {
  opacity: 0; /* Start hidden for GSAP animation */
}

.values__header .subtitle {
  opacity: 0; /* Start hidden for GSAP animation */
}

.values__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem; /* Increased gap for better spacing */
  max-width: 1100px; /* Increased for better spacing */
  margin: 0 auto;
  perspective: 1000px; /* Enable 3D for child cards */
  position: relative;
  z-index: 10;
  flex: 1; /* Take available space */
  align-content: center; /* Center cards vertically */
  padding: 2rem 0; /* Add vertical breathing room */
}

.value-card {
  position: relative;
  background: var(--color-bg-white);
  padding: 2rem; /* Increased for better readability */
  border-radius: 12px;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-in-out);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  opacity: 0; /* Start hidden for GSAP animation */
  transform-style: preserve-3d; /* Preserve 3D transforms */
  will-change: transform; /* Optimize for animations */
  overflow: hidden;
  min-height: 200px; /* Increased minimum height */
  max-height: 240px; /* Increased maximum height */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.value-card:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Background image for each card */
.value-card__bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.value-card__bg-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) brightness(0.6); /* Blur and darken */
  transform: scale(1.1); /* Prevent blur edge artifacts */
}

/* Dark overlay for readability */
.value-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85); /* White overlay for text readability */
  z-index: 1;
}

/* Text icon instead of emoji */
.value-card__icon {
  position: relative;
  z-index: 2;
  font-size: 2.5rem; /* Reduced from 3rem */
  font-weight: 800;
  margin-bottom: 0.75rem; /* Reduced from var(--space-md) */
  user-select: none;
  color: #000000;
  font-family: var(--font-primary);
  line-height: 1;
}

.value-card h4 {
  position: relative;
  z-index: 2;
  color: var(--color-primary);
  margin-bottom: 0.5rem; /* Reduced from var(--space-sm) */
  font-size: 1.25rem; /* Reduced from var(--text-xl) */
  line-height: 1.2;
}

.value-card__title {
  position: relative;
  z-index: 2;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.value-card__description {
  position: relative;
  z-index: 2;
  color: var(--color-text-gray);
  font-size: 0.875rem; /* Slightly smaller */
  line-height: 1.5;
}

/* =====================
   CTA/CONTACT SECTION
===================== */

#cta-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000; /* Black background */
  text-align: center;
  padding: var(--space-2xl) 0;
  min-height: 100vh; /* Ensure full viewport height */
  position: relative;
}

.cta__content {
  max-width: 800px;
}

.cta__title {
  color: var(--color-text-white);
  margin-bottom: var(--space-lg);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.02em;
}

.cta__button {
  margin-bottom: var(--space-xl);
}

.contact__info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  justify-content: center;
  margin-top: var(--space-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact__card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: var(--space-md);
  border-radius: 12px;
  color: var(--color-text-light);
  min-width: 200px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--duration-normal) var(--ease-in-out);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact__card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

.contact__icon {
  width: 32px;
  height: 32px;
  color: #FFFFFF;
  margin: 0 auto var(--space-sm);
  stroke-width: 2;
  display: block;
}

.contact__card h5 {
  color: #CCCCCC;
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
}

.contact__card p {
  color: rgba(255, 255, 255, 0.9);
}

/* =====================
   RESPONSIVE
===================== */

@media (max-width: 1024px) {
  /* Company Intro Section */
  .intro__grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .intro__image-wrapper {
    margin-top: 0; /* Reset margin when in single column */
  }

  .intro__image {
    height: 400px;
  }

  /* Core Values Grid - 2 columns maintained on tablet */
  .values__grid {
    gap: 1.5rem;
    max-width: 800px;
  }

  .value-card {
    padding: 1.75rem;
    min-height: 180px;
    max-height: 220px;
  }

  /* Business cards start smaller on tablets */
  .business-card {
    width: 350px;
    height: 250px;
  }
}

@media (max-width: 768px) {
  /* =====================
     MOBILE LAYOUT - KEEP ANIMATIONS, ADJUST CONTENT SIZE
  ===================== */

  /* Hero Section - Mobile */
  .hero__content {
    padding: 1rem;
  }

  .hero__logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
  }

  .hero__title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }

  .hero__subtitle {
    font-size: 1.125rem;
  }

  .scroll-indicator {
    bottom: 1rem;
    transform: scale(0.8) translateX(-50%);
  }

  /* Company Intro Section - Mobile */
  #company-intro {
    padding: 3rem 0 2rem; /* More top padding for better view */
    min-height: 100vh;
    height: auto; /* Allow content to flow naturally */
    align-items: flex-start; /* Align to top on mobile */
    overflow-y: auto; /* Allow scrolling if content is too tall */
  }

  .intro__grid {
    gap: 1.5rem; /* Adequate spacing between content and image */
    padding-top: 1rem;
  }

  .intro__content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .intro__text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .intro__philosophy {
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .intro__image-wrapper {
    margin-top: 1rem;
  }

  .intro__image {
    height: 250px; /* Smaller height to fit mobile viewport */
  }

  /* Business Areas Section - Mobile */
  .business-card {
    width: 320px; /* Smaller cards on mobile */
    height: 240px;
  }

  .business-card__content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .business-card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .business-card__subtitle {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }

  .business-card__description {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* Core Values Section - Mobile */
  #core-values {
    padding: 3rem 0 2rem; /* More padding for better visibility */
    min-height: 100vh;
    height: auto;
    align-items: center; /* Center content vertically */
  }

  #core-values .section-content {
    padding: 0 1rem;
  }

  .values__header {
    margin-bottom: 1.5rem;
  }

  .values__header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .values__header .subtitle {
    font-size: 1rem;
  }

  .values__grid {
    gap: 1rem; /* Better spacing on mobile */
    max-width: 100%;
    padding: 0;
  }

  .value-card {
    padding: 1.25rem;
    min-height: 160px; /* Ensure cards are tall enough */
    max-height: none; /* Allow natural height */
  }

  .value-card__icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .value-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
  }

  .value-card__title {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
  }

  .value-card__description {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  /* CTA/Contact Section - Mobile */
  #cta-contact {
    padding: 2rem 1rem;
  }

  .cta__title {
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .cta__button {
    margin-bottom: var(--space-md);
  }

  .btn {
    padding: 1rem 2rem;
    font-size: 1.125rem;
  }

  .contact__info {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 0 1rem;
  }

  .contact__card {
    padding: 1rem;
    min-width: auto;
    font-size: 1rem;
  }

  .contact__card h5 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .contact__icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0.5rem;
  }
}

/* Extra small devices (phones, less than 480px) */
@media (max-width: 480px) {
  /* Hero Section - Even smaller */
  .hero__logo {
    width: 70px;
    height: 70px;
    margin-bottom: 0.75rem;
  }

  .hero__title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  /* Company Intro - Smaller fonts */
  #company-intro {
    padding: 2.5rem 0 1.5rem;
  }

  .intro__grid {
    gap: 1rem;
  }

  .intro__content h2 {
    font-size: 1.625rem;
    margin-bottom: 0.75rem;
  }

  .intro__text {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }

  .intro__philosophy {
    padding: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
  }

  .intro__image {
    height: 200px; /* Even smaller on tiny screens */
  }

  /* Business Cards - Smaller */
  .business-card {
    width: 280px;
    height: 200px;
  }

  .business-card__content {
    padding: 1rem;
  }

  .business-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .business-card__subtitle {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .business-card__description {
    font-size: 0.9375rem;
    line-height: 1.4;
  }

  /* Core Values - More compact */
  #core-values {
    padding: 2rem 0 1.5rem;
  }

  #core-values .section-content {
    padding: 0 0.75rem;
  }

  .values__header {
    margin-bottom: 1rem;
  }

  .values__header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
  }

  .values__header .subtitle {
    font-size: 0.9375rem;
  }

  .values__grid {
    gap: 0.75rem;
    padding: 0;
  }

  .value-card {
    padding: 1rem;
    min-height: 140px;
  }

  .value-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
  }

  .value-card h4 {
    font-size: 1rem;
    margin-bottom: 0.375rem;
  }

  .value-card__title {
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
  }

  .value-card__description {
    font-size: 0.8125rem;
    line-height: 1.4;
  }

  /* CTA Section - Smaller */
  .cta__title {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  .contact__info {
    grid-template-columns: 1fr;
    gap: 0.875rem;
    padding: 0 0.75rem;
  }

  .contact__card {
    padding: 0.875rem;
    min-width: auto;
    font-size: 0.9375rem;
  }

  .contact__card h5 {
    font-size: 0.8125rem;
  }

  .contact__icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.5rem;
  }
}
