/* Home Page Specific Styles */

/* Cinematic Hero */
.cinematic-hero {
  position: relative;
  height: calc(100vh - 67px); /* Adjusting for nav height */
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: flex-end;
}

.hero-slides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  display: flex;
  align-items: flex-end;
  padding: 8vw;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: -1;
  transform: scale(1.05);
  transition: transform 6s ease-out;
}

.hero-slide.active .slide-bg {
  transform: scale(1);
}

.slide-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
}

.make-bg { background-image: url('../assets/images/hero_make.jpg'); }
.market-bg { background-image: url('../assets/images/hero_market.jpg'); }
.maintain-bg { background-image: url('../assets/images/hero_maintain.jpg'); }

.hero-content {
  position: relative;
  color: #fff;
  max-width: 850px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.8s ease 0.4s;
}

.hero-slide.active .hero-content {
  transform: translateY(0);
  opacity: 1;
}

.hero-content .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.hero-content h1 {
  font-size: clamp(50px, 8vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin: 15px 0 25px;
}

.hero-services {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.4;
  margin-bottom: 30px;
}

.hero-btn {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.hero-btn:hover {
  background: #fff;
  color: #000;
}

.hero-ui {
  position: absolute;
  bottom: 4vw;
  right: 5vw;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
}

.slide-counter {
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: bold;
}

.progress-bars {
  display: flex;
  gap: 8px;
}

.progress-bar {
  width: 40px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  position: relative;
  cursor: pointer;
}

.progress-bar .fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: #fff;
}

.progress-bar.active .fill {
  width: 100%;
  transition: width 5s linear;
}

/* Three M Section Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  border: 1px solid var(--border-card);
  padding: 35px 28px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: #fff;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.06);
  border-color: transparent;
}

.card h3 {
  font-size: 28px;
  line-height: 1.1;
  margin: 18px 0 10px;
}

.card .service-list {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: auto;
}

.card .btn {
  align-self: flex-start;
}

/* Selected Work */
.bg-alt {
  background: var(--bg-alt);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.work-item {
  position: relative;
  min-height: 450px;
  border: 1px solid var(--border-card);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.4s ease;
  overflow: hidden;
  color: var(--text-main);
}

.work-item:hover {
  transform: translateY(-6px);
}

.work-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform 0.6s ease;
}

.work-item:hover .work-bg {
  transform: scale(1.05);
}

/* Vertical Scrolling Mockup Variant */
.work-item.vertical-mockup .work-bg {
  background-position: top center;
  background-size: 100% auto;
  transition: background-position 8s ease-in-out, transform 0.6s ease;
}

.work-item.vertical-mockup:hover .work-bg {
  transform: none; /* No scale */
  background-position: bottom center; /* Scroll down to bottom */
}

.work-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.work-content h3 {
  font-size: 24px;
  margin: 5px 0;
}

.work-content p {
  color: var(--text-muted);
  margin: 0;
  font-size: 14px;
}

/* Case Study */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
  align-items: center;
}

.case-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.case-copy h2 {
  font-size: clamp(40px, 5vw, 80px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin: 10px 0;
}

/* 25+ Years */
.massive-text {
  font-size: clamp(120px, 20vw, 250px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: var(--text-main);
}

.sub-massive {
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: -0.02em;
  margin-top: 20px;
}

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

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Evolution Scroll Story */
.evolution-story {
  padding-bottom: 0;
}

.scroll-evolution-container {
  position: relative;
}

.evolution-sticky {
  height: calc(100vh - 67px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-color); /* Premium white */
  position: relative;
}

.evo-year-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(150px, 30vw, 400px);
  font-weight: 900;
  color: var(--text-main);
  opacity: 0.03;
  z-index: 0;
  white-space: nowrap;
  letter-spacing: -0.05em;
}

.evolution-visuals {
  width: 100%;
  max-width: 1200px;
  height: 100%;
  position: relative;
  z-index: 2;
  padding: 0 5vw;
  perspective: 2500px;
  transform-style: preserve-3d;
}

.evo-frame {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5vw;
  opacity: 0;
  visibility: hidden;
  padding: 5vw 0;
  will-change: transform, opacity, filter;
}

.evo-frame.active {
  opacity: 1;
  visibility: visible;
}

.evo-content {
  display: flex;
  flex-direction: column;
}

.evo-content h3 {
  font-size: clamp(35px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin: 10px 0 20px;
}

.evo-art {
  position: relative;
  width: 100%;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.evo-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.15);
  object-fit: cover;
}

@media (max-width: 850px) {
  .evo-frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    text-align: center;
  }
  .evo-content {
    align-items: center;
  }
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.step {
  padding: 40px 30px;
  border-right: 1px solid var(--border-dark);
}

.step:last-child {
  border-right: none;
}

.step h3 {
  font-size: 24px;
  margin: 15px 0;
}

.step .lead {
  font-size: 15px;
}

/* Responsive */
@media (max-width: 900px) {
  .cards, .work-grid, .case-grid {
    grid-template-columns: 1fr;
  }
  .timeline {
    grid-template-columns: 1fr 1fr;
  }
  .step:nth-child(2) {
    border-right: none;
  }
  .step:nth-child(-n+2) {
    border-bottom: 1px solid var(--border-dark);
  }
  .evo-image {
    width: 85%;
  }
}

@media (max-width: 550px) {
  .hero-content h1 {
    font-size: 14vw;
  }
  .hero-slide {
    padding: 10vw 6vw;
  }
  .hero-ui {
    bottom: 6vw;
  }
  .timeline {
    grid-template-columns: 1fr;
  }
  .step {
    border-right: none !important;
    border-bottom: 1px solid var(--border-dark);
  }
  .step:last-child {
    border-bottom: none;
  }
}
