/* ============================= */
/*       BASE & GLOBAL RULES     */
/* ============================= */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden; /* This ensures no horizontal scrollbar appears */
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Global Typography */
body {
  font-family: 'Montserrat', sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Headings & Paragraphs */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 0.5em;
}
p {
  margin-bottom: 1em;
}

/* Anchor links */
a {
  color: inherit;
  text-decoration: none;
}

/* ============================= */
/*          HEADER & NAV         */
/* ============================= */

/* Header */
.site-header {
  background: #fff;
  padding: 30px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 10px;
}

/* Logo */
.logo img {
  width: 200px; /* Adjust as needed */
  height: auto;
}

/* Desktop Navigation */
.desktop-nav {
  display: flex;
  margin-left: 40px;
}
.desktop-nav ul {
  display: flex;
  list-style: none;
}
.desktop-nav li {
  margin: 0 15px;
}
.desktop-nav a {
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  font-weight: 700;
  color: #333;
}
.desktop-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #662773;
  transition: width 0.3s ease;
}
.desktop-nav a:hover::after {
  width: 100%;
}

/* Mobile Navigation */
.mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.mobile-nav.open {
  max-height: 100vh;
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style: none;
}
.mobile-nav li {
  margin: 10px 5px;
}
.mobile-nav a {
  display: inline-block;
  width: auto;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  font-weight: 700;
  color: #333;
}
.mobile-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #662773;
  transition: width 0.3s ease;
}
.mobile-nav a:hover::after {
  width: 100%;
}

/* Hamburger (Mobile) */
.hamburger {
  display: none;
  width: 30px;
  height: 24px;
  position: relative;
  cursor: pointer;
  margin-left: 20px;
}
.hamburger span {
  background: #333;
  width: 100%;
  height: 3px;
  display: block;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

/* CTA Button in Header */
.cta {
  margin-left: auto;
}

/* ============================= */
/*          BUTTONS              */
/* ============================= */

/* Reusable Button Styles */
.btn {
  background: #662773;
  color: #fff;
  padding: 12px 25px;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  text-align: center;
}
.btn:hover {
  background: #333;
  color: #fff;
}
.btn.secondary {
  background: #333;
  color: #fff;
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn.secondary:hover {
  background: #662773;
}

/* ============================= */
/*         FOOTER                */
/* ============================= */

.site-footer {
  background: #222;
  color: #fff;
  padding: 40px 0 20px;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-column {
  flex: 1;
  min-width: 250px;
  margin: 20px;
}
.footer-column h3 {
  margin-bottom: 15px;
  font-size: 20px;
}
.footer-column p,
.footer-column a,
.footer-column li {
  font-size: 16px;
  line-height: 1.5;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li {
  margin-bottom: 10px;
}
.footer-column ul li a {
  color: #fff;
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 20px;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
}

/* ============================= */
/*       Hover grid boxes        */
/* ============================= */
.hover-info-section {
  padding: 60px 0;
  background: #fff;
  text-align: center;
}
.hover-info-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.hover-info-section h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
}
.hover-info-section p.section-subtitle {
  font-size: 18px;
  color: #555;
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hover-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}
.hover-info-box {
  background: #fff;
  border-radius: 8px;
  text-align: center;
  padding: 30px 20px;
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-info-box img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}
.hover-info-box h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 10px;
}
.hover-info-box p {
  font-size: 15px;
  color: #666;
  line-height: 1.5;
}

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

/* HERO SECTION WITHOUT BTNS */
.common-hero {
  background: #f4f4f4;
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}
.common-hero h1 {
  font-size: 48px;
  color: #333;
  margin-bottom: 20px;
}
.common-hero p {
  font-size: 20px;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

/* HERO SECTION WITH BTNS */
.hero {
  background: #f4f4f4;
  padding: 80px 0;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: nowrap;
}

.hero-text-column {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.hero-image-slices {
  position: relative;
  width: 550px;
  height: 400px;
  overflow: visible;
}

/* Each slice is absolutely positioned. Default clip-path for slanted lines. */
.slice {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transition:
    transform 0.4s ease,
    filter 0.4s ease,
    clip-path 0.3s ease;  /* so we can animate out of the polygon if desired */
}

/* On hover of any slice, we blur all slices. Then unblur/scale the hovered slice. */
.hero-image-slices:hover .slice {
  filter: blur(3px);
  transform: none;
}
.hero-image-slices .slice:hover {
  z-index: 99;
  filter: blur(0);
  transform: scale(1.15);
  clip-path: none;
}

/* ================
   1) Single Image
   If only ONE image, no dividing lines or clip.
   ================ */
.slice1.only-image {
  clip-path: none;
  /* covers entire container with no dividing lines */
}

/* ================
   2) Two Images: slice1 and slice2
   ================ */
/* Slice1 covers left portion, with diagonal line on the right side. Example: */
.slice1.two-images {
  clip-path: polygon(
    /* top-left corner -> top somewhere -> bottom somewhere -> bottom-left corner */
    0% 0%,
    68% 0%,
    58% 100%,
    0% 100%
  );
}

/* Slice2 covers the right portion, from that diagonal to the right edge. */
.slice2.two-images {
  clip-path: polygon(
    68% 0%,
    100% 0%,
    100% 100%,
    58% 100%
  );
}

/* ================
   3) Three Images: slice1, slice2, slice3
   ================ */
/* Slice1: left region. We keep a gap between 0%..X% up top and a slightly narrower region at the bottom. */
.slice1.three-images {
  clip-path: polygon(
    0% 0%,
    36% 0%,
    28% 100%,
    0% 100%
  );
}

/* Slice2: middle region, with two diagonal boundaries. */
.slice2.three-images {
  clip-path: polygon(
    36% 0%,
    60% 0%,
    55% 100%,
    28% 100%
  );
}

/* Slice3: right region. */
.slice3.three-images {
  clip-path: polygon(
    60% 0%,
    100% 0%,
    100% 100%,
    55% 100%
  );
}

/* ------------- ROTATING TEXT ------------- */
.hero-rotating-title h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  color: #333;
  margin-bottom: 20px;
}

/* Subtitle under rotating text */
.main-subtitle {
  display: block;
  font-size: 1.8rem;
  font-weight: bold;
  color: #555;
  margin-top: 6px;
}

/* ------------- PARAGRAPH + BUTTONS ------------- */
.hero-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 35px;
  max-width: 600px;
  font-weight: 400;
}

/* Buttons Container */
.hero-buttons {
  display: flex;
  gap: 20px;
}

/* ============================= */
/*         UTILITY CLASSES       */
/* ============================= */

/* Fade Effects */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.hover-info-box:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.diagonal-text-container {
  position: relative;
  display: inline-block;
  width: 450px;
  height: 80px;
  perspective: 2000px;
  transform-style: preserve-3d;
}

.diagonal-word {
  position: absolute;
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  animation: diag3DWords 9s infinite;
  font-weight: 700;
  font-size: 3.5rem;
  font-family: "Pixelify Sans", sans-serif;
  opacity: 0;
}

/* Delays for each word in the rotation */
.diagonal-word-1 { animation-delay: 0s; }
.diagonal-word-2 { animation-delay: 3s; }
.diagonal-word-3 { animation-delay: 6s; }

/* Example 9s cycle.
   Each word is "center stage" from 10% to 30%.
   Start top-right behind the screen, come forward,
   then exit bottom-left.=
*/
@keyframes diag3DWords {
  /* 0%:  top-right, behind, smaller, partially transparent */
  0% {
    transform: translate3d(100px, -50px, -50px)
               scale(0.7)
               rotateY(-30deg);
    opacity: 0.3;
  }
  /* 10%: front & center, full size, fully opaque */
  10% {
    transform: translate3d(0, 30px, 0)
               scale(1)
               rotateY(0deg);
    opacity: 1;
  }
  /* 30%: stay center, fully visible */
  30% {
    transform: translate3d(0, 20px, 0)
               scale(1)
               rotateY(0deg);
    opacity: 1;
  }
  /* 40%: exit diagonally bottom-left, fade out a bit */
  40% {
    transform: translate3d(-200px, 50px, -100px)
               scale(0.7)
               rotateY(25deg);
    opacity: 0;
  }
  /* 100%: remain hidden off bottom-left */
  100% {
    transform: translate3d(-200px, 50px, -100px)
               scale(0.7)
               rotateY(25deg);
    opacity: 0;
  }
}

/* --------------- 3D Text Effects --------------- */
/* Black front with Purple behind */
.threeD-black-purple {
  color: #000;
  text-shadow:
    2px 2px 0 #662773;
}

/* Purple front with Black behind */
.threeD-purple-black {
  color: #662773;
  text-shadow:
    2px 2px 0 #000;
}

/* Dropdowns - Desktop */
.desktop-nav ul li.dropdown {
  position: relative;
}
.desktop-nav ul li .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  padding: 10px 0;
  min-width: 160px;
  z-index: 999;
}
.desktop-nav ul li .dropdown-content li {
  margin: 0;
  padding: 0;
}
.desktop-nav ul li .dropdown-content li a {
  display: block;
  padding: 8px 20px;
  color: #333;
  font-weight: 500;
  background: #fff;
  transition: background 0.3s;
}
.desktop-nav ul li .dropdown-content li a:hover {
  background: #f4f4f4;
}
.desktop-nav ul li.dropdown:hover .dropdown-content {
  display: block;
}

/* Dropdowns - Mobile */
.mobile-dropdown {
  width: 100%;
  position: relative;
}
.mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
  position: relative;
}
.mobile-dropdown-toggle a {
  text-align: center;
}
.mobile-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  line-height: 0.5;
  cursor: pointer;
}
.mobile-arrow::before {
  content: "▼";
}
.mobile-dropdown.open .mobile-arrow::before {
  content: "▲";
}
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 0.5rem;
}
.mobile-submenu li {
  margin: 0;
  padding: 0;
}
.mobile-submenu li a {
  font-size: 12px;
  border-bottom: 1px solid #eee;
  padding: 5px 0;
  display: block;
  text-align: center;
}
.mobile-submenu.open {
  max-height: 100px;
}

/* ============================= */
/*      Scrolling Logos          */
/* ============================= */

.scrolling-logo-section {
  background-color: #f9f9f9;
  padding: 40px 0;
  text-align: center;
  margin: 0;
}

.scrolling-logo-section h2 {
  font-size: 36px;
  color: #333;
  margin-bottom: 30px;
}

/* Logo slider container */
.logo-slider {
  position: relative;
  width: 100%;
  height: 80px; /* Adjust based on your logo sizes */
  margin: 0 auto;
  overflow: hidden;
}

/* Sliding track for infinite scroll effect */
.slide-track-about {
  display: flex;
  width: calc(200px * 14);
  animation: scrollLeft 30s linear infinite;
}

.slide-track-ios {
  display: flex;
  width: calc(200px * 12);
  animation: scrollLeft 30s linear infinite;
}

.slide-track-android {
  display: flex;
  width: calc(200px * 14);
  animation: scrollLeft 30s linear infinite;
}

.slide-track-web {
  display: flex;
  width: calc(200px * 20);
  animation: scrollLeft 30s linear infinite;
}

.slide {
  flex: 0 0 auto;   /* never shrink or grow */
  width: 200px;     /* narrower = less empty space */
  height: 80px;     /* consistent height matches .logo-slider */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* in case any logo is too tall/wide */
}

.slide img {
  display: block;
  max-height: 50px;  /* uniform height cap for logos */
  max-width: 70%;    /* scale down if it’s a wide logo */
  object-fit: contain;
  filter: grayscale(30%);
  transition: filter 0.3s;
}

.slide img:hover {
  filter: grayscale(0%);
}

/* Keyframes for horizontal scrolling */
@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Divider */
.section-divider {
  width: 60%;
  margin: auto;
  border: none;
  border-top: 1px solid #ccc;
}

/* ============================= */
/*      Final CTA Section        */
/* ============================= */
.cta {
  margin-left: auto;    /* push CTA to far right */
}

.about-final-cta {
  padding: 80px 0;
  background-color: #fff;
}

.cta-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.cta-content .text-side {
  flex: 1;
}

.cta-content .text-side h2 {
  font-size: 36px;
  margin-bottom: 20px;
  color: #333;
}

.cta-content .text-side p {
  font-size: 18px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.cta-content .text-side .btn {
  background-color: #662773;
  color: #fff;
  padding: 12px 25px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.about-final-cta .cta-content .text-side p {
  margin-bottom: 40px; /* ensure there's some space under the paragraph */
}

.cta-content .text-side .btn:hover {
  background-color: #333;
}

.cta-content .image-side {
  flex: 1;
  text-align: right;
}

.cta-content .image-side img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ============================= */
/* COMMON TYPOGRAPHY HELPERS     */
/* ============================= */

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5em;
}
p {
  margin-bottom: 1em;
}
