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

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

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

/* --- Animations --- */
@keyframes scan {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(50%);
  }
}

@keyframes spin-slow {
  0% {
    transform: translate(-50%, -50%) translateZ(-30px) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) translateZ(-30px) rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.4s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .animate-fadeIn {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* --- Layout Shell --- */

/* Radial glows */
.glow-1 {
  background: radial-gradient(circle at 20% 40%, rgba(255, 255, 255, 0.6) 0%, rgba(211, 228, 222, 0) 60%);
}

.glow-2 {
  background: radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.4) 0%, rgba(211, 228, 222, 0) 60%);
}

/* Grid overlay */
.grid-bg {
  background-image:
    linear-gradient(var(--bg-black) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-black) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Standby panel */
.panel-standby {
  padding-left: 1.5rem;
}

.standby-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent);
  margin-bottom: 1.5rem;
  border: 1px solid var(--accent-20);
  border-radius: 36px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.standby-badge i,
.standby-badge svg {
  width: 24px;
  height: 24px;
}

.standby-badge span {
  margin-left: 0.75rem;
  font-family: monospace;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

.standby-title {
  font-size: 2.25rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--bg-black);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.standby-title .accent {
  color: var(--accent);
}

.standby-prompt {
  color: var(--bg-teal);
  font-size: 0.875rem;
  font-family: monospace;
  line-height: 1.7;
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem 1.5rem;
  border: 1px solid var(--accent-20);
  border-radius: 36px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* --- Right 3D Panel --- */

/* 3D Container */
#right-container {
  position: relative;
  width: 500px;
  height: 550px;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: rotateX(55deg) rotateZ(-45deg) translateZ(-84px);
}

/* Central light column */
.axis-light {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 500px;
  background: linear-gradient(to top, transparent, var(--accent), transparent);
  opacity: 0.08;
  transform: translate(-50%, -50%) rotateX(90deg) rotateY(-45deg) translateY(-200px);
}

/* Base ring */
.base-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 450px;
  height: 450px;
  pointer-events: none;
  border: 1px solid var(--accent-20);
  border-radius: 50%;
  transform: translate(-50%, -50%) translateZ(-30px);
  background: radial-gradient(circle, rgba(23, 102, 82, 0.05) 0%, rgba(211, 228, 222, 0) 80%);
}

.base-inner-ring {
  position: absolute;
  inset: 40px;
  border: 1px dashed var(--accent-30);
  border-radius: 50%;
  animation: spin-slow 60s linear infinite;
}

/* --- 3D Layer Pieces --- */
.layer-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
}

.layer-top {
  position: absolute;
  inset: 0;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
  transform: translateZ(14px);
  transition: all 0.3s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 36px;
}

.layer-top:hover .layer-grid {
  border-color: var(--accent-40);
  background-color: var(--accent);
  opacity: 0.2;
}

/* HUD corners – arc-shaped to match the 36px radius */
.corner {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent-20);
  transition: border-color 0.3s;
  pointer-events: none;
}

.corner-tl {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
  border-radius: 36px 0 0 0;
}

.corner-tr {
  top: 0;
  right: 0;
  border-left: none;
  border-bottom: none;
  border-radius: 0 36px 0 0;
}

.corner-bl {
  bottom: 0;
  left: 0;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 36px;
}

.corner-br {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
  border-radius: 0 0 36px 0;
}

/* Inner micro-grid */
.layer-grid {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image:
    linear-gradient(var(--accent) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center center;
}

/* Scan sweep */
.scan-effect {
  position: absolute;
  inset: 0;
  height: 200%;
  background: linear-gradient(to bottom, transparent, rgba(23, 102, 82, 0.05), transparent);
  animation: scan 3s linear infinite;
  pointer-events: none;
  opacity: 0.8;
  display: none;
}

/* Label text */
.text-container {
  position: absolute;
  right: 24px;
  bottom: 24px;
  text-align: right;
  pointer-events: none;
  transition: transform 0.3s;
}

.layer-text {
  font-weight: 700;
  font-size: 1rem;
  white-space: pre-line;
  line-height: 1.35;
  display: block;
  transition: color 0.3s;
  color: var(--bg-teal);
}

/* --- Screen 2 Text Reveal --- */
.screen2-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* --- Pillar Cards --- */
.pillar-card {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(23, 102, 82, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  text-align: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(23, 102, 82, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  border-color: rgba(23, 102, 82, 0.2);
}

/* Accent top bar on pillar card */
.pillar-accent-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cta-green));
  opacity: 0;
  transition: opacity 0.35s;
}

.pillar-card:hover .pillar-accent-line {
  opacity: 1;
}

/* 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);
}

.pillar-reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.pillar-reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.pillar-reveal:nth-child(4) {
  transition-delay: 0.3s;
}

/* --- Stage Cards (Execution Path) --- */
.stage-card {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(23, 102, 82, 0.08);
  border-radius: 24px;
  padding: 2rem;
  width: 28vw;
  min-width: 300px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.stage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(23, 102, 82, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  border-color: rgba(23, 102, 82, 0.2);
}

/* Stage number disc */
.stage-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  transition: transform 0.3s, background-color 0.3s;
}

.stage-card:hover .stage-number {
  transform: scale(1.1);
  background: var(--cta-green);
  color: var(--bg-dark);
}

/* Arrow connector between stages */
.stage-connector {
  position: absolute;
  top: 50%;
  right: -1.5rem;
  width: 1.5rem;
  height: 2px;
  background: var(--accent-30);
  transform: translateY(-50%);
}

.stage-connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent-30);
}

@media (prefers-reduced-motion: reduce) {

  .pillar-card,
  .stage-card {
    transition: none;
  }

  .pillar-card:hover,
  .stage-card:hover {
    transform: none;
  }

  .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);
}



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

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

#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;
  }


}

/* ===================================================================
   Product Section — Logo Flow Scroll Animation
   =================================================================== */

.product-animation-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-dark);
  overflow: hidden;
  --svg-size: min(900px, 90vh, 100vw);
  --logo-half: calc(var(--svg-size) * 0.3125);
  --text-gap: clamp(20px, 3vw, 40px);
}

.product-animation-container svg {
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 90vh;
  overflow: visible;
}

#flow-svg {
  transform-origin: 50% 37.5%;
}

/* Base ghost track */
.base-path {
  fill: none;
  stroke-width: 36;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Active glow tracks */
.active-path {
  fill: none;
  stroke-width: 24;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 5 paths — mint green family */
#path-tail,
#path-ring1,
#path-ring2,
#path-ring3,
#path-ring4 {
  stroke: var(--bg-mint);
  filter: drop-shadow(0 0 14px rgba(211, 228, 222, 0.7));
}

/* Inner pill fill — accent mint */
.pill-fill {
  fill: var(--bg-mint);
  opacity: 0;
  filter: drop-shadow(0 0 24px rgba(211, 228, 222, 0.8));
}

/* Path annotation text overlay */
.text-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.path-text-block {
  position: absolute;
  max-width: min(340px, calc(50% - var(--logo-half) - var(--text-gap) - 20px));
  opacity: 0;
  font-family: var(--font);
}

.path-text-block.right {
  left: calc(50% + var(--logo-half) + var(--text-gap));
}

.path-text-block.left {
  right: calc(50% + var(--logo-half) + var(--text-gap));
  text-align: right;
}

#text-ring1,
#text-ring4 {
  top: calc(50% - var(--logo-half));
}

#text-ring2,
#text-ring3 {
  bottom: calc(50% - var(--logo-half));
}

.path-text-block h3 {
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--bg-mint);
}

.path-text-block h4 {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--bg-mint);
  opacity: 0.7;
}

.path-text-block p {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(211, 228, 222, 0.55);
  margin-bottom: 0.35rem;
}

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

  body {
    background: var(--bg-mint);
  }

  #platform-wrapper {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    padding: 6.5rem 1.25rem 4rem !important;
    overflow: hidden;
  }

  #platform-wrapper > .glow-1,
  #platform-wrapper > .glow-2,
  #platform-wrapper > .grid-bg,
  #platform-wrapper > .absolute.bg-ih-dark {
    display: none !important;
  }

  #platform-wrapper > .relative.z-10 {
    width: 100% !important;
    min-width: 0 !important;
    display: contents !important;
  }

  #left-panel {
    order: 1;
    height: auto !important;
    min-height: 0;
    display: block !important;
    padding: 0 !important;
  }

  .panel-standby {
    padding-left: 0;
  }

  .standby-badge {
    margin-bottom: 1rem;
    border-radius: 18px;
  }

  .standby-title {
    font-size: clamp(2rem, 12vw, 3.1rem);
    line-height: 1;
    letter-spacing: 0.03em;
  }

  .standby-prompt {
    width: 100%;
    border-radius: 18px;
  }

  #right-panel {
    order: 2;
    position: relative !important;
    top: auto !important;
    width: 100%;
    height: 20rem !important;
    margin-top: 2rem;
    overflow: hidden;
    perspective: 800px;
  }

  #right-container {
    width: 500px;
    height: 550px;
    transform: scale(0.58) rotateX(55deg) rotateZ(-45deg) translateZ(-84px);
    transform-origin: center center;
  }

  .layer-top {
    border-radius: 28px;
  }

  .text-container {
    right: 18px;
    bottom: 18px;
  }

  .layer-text {
    font-size: 0.9rem;
  }

  #screen-2-left {
    order: 3;
    height: auto !important;
    margin: 2rem -1.25rem 0;
    padding: 3rem 1.25rem;
    background: var(--bg-dark);
  }

  #screen2-sticky {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  .text-1-wrap,
  .text-2-wrap {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    padding: 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .text-2-wrap {
    margin-top: 2.25rem;
  }

  #tech-execution-driver {
    height: auto !important;
  }

  #technology-execution {
    position: relative !important;
    top: auto !important;
    min-height: auto !important;
    display: block !important;
    padding: 4rem 0;
  }

  #technology-execution > div {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  #execution-path {
    margin-top: 2.5rem !important;
  }

  #execution-path-scroll {
    height: auto !important;
  }

  #execution-sticky {
    height: auto !important;
    overflow: visible !important;
  }

  #execution-track {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1rem !important;
    transform: none !important;
  }

  .stage-card {
    width: 100%;
    min-width: 0;
    padding: 1.5rem;
    border-radius: 18px;
  }

  .stage-connector {
    display: none;
  }

  #product-section {
    display: none !important;
  }

  .product-animation-container {
    height: auto;
    min-height: 0;
    display: block;
    padding: 4.5rem 1.25rem;
    overflow: visible;
  }

  .product-animation-container svg {
    width: min(100%, 20rem);
    height: auto;
    max-height: none;
    margin: 0 auto 2rem;
    display: block;
  }

  #flow-svg {
    transform: none !important;
  }

  .text-overlay {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .path-text-block,
  .path-text-block.right,
  .path-text-block.left {
    position: static;
    max-width: none;
    opacity: 1 !important;
    transform: none !important;
    text-align: left;
    padding: 1.1rem;
    border: 1px solid rgba(211, 228, 222, 0.16);
    border-radius: 18px;
    background: rgba(13, 5, 14, 0.18);
  }

  .path-text-block h3 {
    font-size: 1.05rem;
  }

  .path-text-block h4 {
    font-size: 0.82rem;
  }

  .path-text-block p {
    font-size: 0.8rem;
  }

  #solution-section {
    margin-top: 0 !important;
    opacity: 1 !important;
  }

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

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

  .solution-showcase-frame {
    height: auto !important;
    display: block !important;
  }

  #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-nav {
    width: 100%;
    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;
  }
}
