@import url("./common.css");

body {
  font-family: 'Outfit', -apple-system, sans-serif;
}

::selection {
  background-color: var(--accent);
  color: #fff;
}

/* Staggered reveal for pillars */
.pillar-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pillar-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .pillar-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Solutions Showcase --- */

/* Scene images: stacked absolutely, default offscreen right */
.sol-scene-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  will-change: transform;
  transform: translateX(100%);
}

/* Applied by JS to trigger the slide-in animation */
.sol-slide-transition {
  transition: transform 700ms cubic-bezier(0.25, 1, 0.5, 1);
}

/* Navigation buttons */
.sol-nav-btn {
  background: transparent;
  border: none;
  color: #40514d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
  z-index: 10;
  white-space: nowrap;
  transition: color 0.3s;
}

.sol-nav-btn:hover {
  color: var(--bg-black, #0d050e);
}

.sol-nav-btn.active {
  color: #fff;
}

/* Text panels: stacked absolutely, slide right-to-left on switch */
.sol-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateX(60px);
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.sol-panel.active {
  opacity: 1;
  transform: translate(-50%, -50%) translateX(0);
  pointer-events: auto;
}

.sol-panel.leaving {
  opacity: 0;
  transform: translate(-50%, -50%) translateX(-60px);
  pointer-events: none;
}

.sol-panel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--bg-dark);
  color: #fff;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.sol-panel-cta:hover {
  background: var(--accent);
}

/* Image wrapper is visible immediately (no init reveal animation) */
.sol-image-reveal {
  transform: none;
  opacity: 1;
}

/* Scroll-driven solution switching */
#sol-scroll-track {
  position: relative;
  height: 400vh;
}

#sol-sticky-frame {
  position: sticky;
  top: 100px;
}

#sol-sticky-frame > .w-full.flex.items-center {
  position: relative;
  z-index: 20;
}

#sol-nav {
  display: flex;
  visibility: visible;
  opacity: 1;
  max-width: calc(100vw - 2rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#sol-nav::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .sol-slide-transition {
    transition: none;
  }

  .sol-panel {
    transition: none;
  }

  .sol-image-reveal {
    transition: none;
  }
}

@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  #solutions-showcase {
    margin-top: 7rem !important;
  }

  #sol-scroll-track {
    height: auto;
  }

  #sol-sticky-frame {
    position: relative;
    top: auto;
  }

  .solution-showcase-frame {
    height: auto !important;
    min-height: 0;
    display: block !important;
    overflow: visible;
  }

  #solution-left {
    width: 100% !important;
    height: 15rem !important;
  }

  #sol-image-wrapper {
    border-radius: 0 0 2rem 2rem !important;
  }

  #solution-right {
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    padding: 2rem 1.25rem 1rem !important;
    text-align: left !important;
  }

  #solution-right > div {
    min-height: 0 !important;
  }

  .sol-panel,
  .sol-panel.active,
  .sol-panel.leaving {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sol-panel {
    display: none;
  }

  .sol-panel.active {
    display: block;
  }

  #sol-sticky-frame > .w-full.flex.items-center {
    justify-content: flex-start;
    overflow: hidden;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  #sol-nav {
    width: calc(100% - 2.5rem);
    max-width: calc(100vw - 2.5rem);
    margin: 0 1.25rem;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #sol-nav::-webkit-scrollbar {
    display: none;
  }

  #sol-nav-slider {
    display: none;
  }

  .sol-nav-btn {
    flex: 0 0 auto;
    padding: 0.65rem 0.9rem;
  }

  .sol-nav-btn.active {
    background: var(--bg-teal);
    color: #fff;
  }

  footer {
    padding-top: 5rem !important;
  }
}
