/* AfterSync Landing Page Styles */

/* CSS Variables */
:root {
  --primary-color: #fbebef;
  --secondary-color: #d5335f;
  --border-radius: 4px;
  --grey-bg: #f0f1f3;
  --text-dark: #000000;
  --text-light: #2b2f38;
  --text-grey: #475467;
  --white: #ffffff;
  --black: #000000;
  --scroll-y-percent: 0;
  --scroll-y-overscroll: 0;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Athletics", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  overflow-x: hidden;
  background-color: var(--primary-color);
}

#faq,
.download {
  background-color: var(--white);
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1 {
  font-size: 72px;
  line-height: 1.1em;
  letter-spacing: -0.05em;
  font-weight: 700;
  color: var(--text-dark);
}

h2 {
  font-size: 16px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--secondary-color);
}

h3 {
  font-size: 48px;
  line-height: 1.2em;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-dark);
}

p {
  font-size: 18px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-light);
}

/* Header Styles */
.header {
  background-color: var(--primary-color);
  padding: 20px 0;
  position: relative;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  max-width: 170px;
  width: 100%;
  object-fit: contain;
}

.logo:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease-in-out;
}

.logo.glow,
.logo:hover {
  filter: drop-shadow(0 0 10px rgba(240, 55, 100, 0.4));
  transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}

.brand-text {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--secondary-color);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 999;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: var(--text-dark);
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger-line:nth-child(2) {
  width: 80%;
}
.hamburger-line:nth-child(3) {
  width: 60%;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease, visibility 0.1s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background-color: var(--white);
  transform: translateX(100%);
  transition: transform 0.1s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 1001;
}

.mobile-menu-overlay.active .mobile-menu {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  z-index: 1002;
  position: relative;
}

.mobile-menu-header .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.close-menu {
  background: none;
  border: none;
  font-size: 36px;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  position: relative;
}

.mobile-menu-links {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* .mobile-nav-link:nth-child(1) {
  transition-delay: 0.05s;
}
.mobile-nav-link:nth-child(2) {
  transition-delay: 0.1s;
}
.mobile-nav-link:nth-child(3) {
  transition-delay: 0.15s;
} */

.mobile-nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 18px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.3s ease, opacity 0.1s ease, transform 0.1s ease;
  opacity: 0;
  transform: translateX(30px);
}

.mobile-menu-overlay.active .mobile-nav-link {
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav-link:hover {
  color: var(--secondary-color);
}

.mobile-btn {
  margin-top: 20px;
  width: 100%;
}

/* Button Styles */
.btn {
  padding: 10px 40px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  line-height: 1.4em;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--black);
  color: var(--white);
}

.btn-app-store {
  border: none;
  background: none;
}

.btn-app-store img {
  max-height: 70px;
  width: auto;
  max-width: 220px;
}

.btn-app-store:hover img {
  transform: scale(1.05);
  transition: 0.2s ease-in-out;
}

/* Hero Section */
.hero {
  background-color: var(--primary-color);
  padding: 100px 0px 0px;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 750px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.hero-title {
  font-size: 72px;
  line-height: 1.1em;
  letter-spacing: -0.05em;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 40px;
}

/* Phone Mockups */
.phone-mockups {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  gap: 20px;
}

.phone-mockup {
  position: relative;
  margin-bottom: -210px; /* Adjust this to prevent layout shift if needed */
  opacity: 0; /* Start hidden */
  animation: phone-intro 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.phone-left {
  /* transform: rotate(-6deg); */
  z-index: 1;
  animation-delay: 0.7s;
}

.phone-mockup.phone-center {
  transform: scale(1.1);
  z-index: 3;
  animation-delay: 0.6s;
}

.phone-right {
  /* transform: rotate(6deg); */
  z-index: 1;
  animation-delay: 0.8s;
}

.phone-mockup img {
  max-width: 290px;
  height: auto;
  /* border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); */
}

.phone-mockup.phone-center img {
  max-width: 310px;
}

@keyframes phone-intro {
  to {
    opacity: 1;
  }
}

/* wave divider */
.wave-divider-arrow {
  max-width: 900px;
  margin: 0 auto;
  text-align: right;
}

.wave-divider-arrow img {
  max-height: 250px;
  width: auto;
  max-width: 100%;
  margin-right: 100px;
  margin-bottom: -100px;
}

/* How it Works Section */
.how-it-works {
  background-color: var(--white);
  padding: 100px 0;
  padding-top: 180px;
}

.section-header {
  text-align: center;
  margin-bottom: 16px;
}

.section-label {
  font-size: 16px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.section-title {
  font-size: 48px;
  line-height: 1.2em;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0;
}

.section-subtitle {
  font-size: 16px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-grey);
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  font-size: 16px;
  font-weight: 400;
  color: var(--secondary-color);
  margin-bottom: 5px;
  line-height: 1.5em;
}

.step-title {
  font-size: 24px;
  line-height: 1.5em;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 5px;
}

.step,
.section-header,
.faq-item,
.download-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.step.visible,
.section-header.visible,
.faq-item.visible,
.download-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays */
.steps .step:nth-child(2) {
  transition-delay: 0.1s;
}
.steps .step:nth-child(3) {
  transition-delay: 0.2s;
}
.steps .step:nth-child(4) {
  transition-delay: 0.3s;
}

.step {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step:hover {
  transform: translateY(-8px);
}
.step-phone {
  cursor: pointer;
}

.step-phone {
  background-color: var(--primary-color);
  margin-bottom: 10px;
  padding: 40px 22px 0px;
  height: 435px;
  overflow: hidden;
  border-radius: 12px;
}

.step-phone img {
  width: 100%;
  border-radius: 12px;
  object-fit: contain;
  max-width: 250px;
}

.step-text {
  font-size: 16px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-grey);
}

/* FAQ Section */
/* .faq {
  background-color: var(--grey-bg);
  padding: 100px 0;
} */

/* .faq .section-title {
  font-size: 48px;
  line-height: 1.2em;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 16px;
}

.faq .section-subtitle {
  font-size: 18px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 60px;
} */

.wave-divider-arrow.left-arrow {
  text-align: left;
}

.wave-divider-arrow.left-arrow img {
  max-width: 200px;
  margin: 0px;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--white);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  padding: 20px 24px;
}

.faq-item.active {
  background-color: var(--grey-bg);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: #101828;
  transition: color 0.3s ease;
  font-size: 18px;
}

.faq-question:hover {
  color: var(--secondary-color);
}

.faq-icon {
  font-size: 24px;
  font-weight: 300;
  color: var(--black);
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 16px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-grey);
}

/* .faq-item.active .faq-answer {
  max-height: 100%;
} */

.faq-item.active .faq-question span {
  margin-bottom: 12px;
}

/* .faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 24px 24px 24px;
} */

.faq-answer p {
  font-size: 16px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-grey);
}

.faq .container {
  padding-bottom: 80px;
}

/* Download Section */
.download .container .download-content {
  background-color: var(--grey-bg);
  padding: 96px 96px 0px;
  border-radius: 24px;
}

.download {
  padding: 64px 0px;
}

.download-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 80px;
  align-items: center;
}

.download-info .section-title {
  font-size: 30px;
  line-height: 1.2em;
  font-weight: 700;
  color: var(--text-dark);
  text-align: left;
  margin-bottom: 12px;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.download-or {
  display: flex;
  align-items: center;
  color: var(--text-dark);
  font-size: 18px;
  line-height: 1.5em;
  font-weight: 400;
  text-align: center;
  width: 100%;
  max-width: 600px; /* Or align with the App Store button width */
}

.download-or:before {
  content: "";
  flex-grow: 1;
  background-color: var(--text-light);
  height: 1px;
  margin-right: 0.5em;
}

.download-or:after {
  content: "";
  flex-grow: 1;
  background-color: var(--text-light);
  height: 1px;
  margin-left: 0.5em;
}

.qr-section {
  text-align: center;
  display: flex;
  align-content: center;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.qr-code {
  width: 120px;
  height: 120px;
  margin-bottom: 12px;
}

.qr-text {
  font-size: 16px;
  line-height: 1.5em;
  font-weight: 400;
  color: var(--text-dark);
  text-align: left;
}

.qr-text span {
  font-weight: 500;
  font-size: 24px;
  display: block;
}

.download-phone {
  width: auto;
  max-width: 100%;
  height: 500px;
  overflow: hidden;
}

.download-phone img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  padding: 60px 0 40px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.faq-list .faq-item:nth-child(2) {
  transition-delay: 0.05s;
}
.faq-list .faq-item:nth-child(3) {
  transition-delay: 0.1s;
}
.faq-list .faq-item:nth-child(4) {
  transition-delay: 0.15s;
}
.faq-list .faq-item:nth-child(5) {
  transition-delay: 0.2s;
}

.social-link img {
  width: 18px;
  height: auto;
}

.social-link:hover {
  background-color: var(--black);
  box-shadow: 0 0 15px 5px rgba(240, 55, 100, 0.2);
}

.footer-info {
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}

.footer-info p {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #94969c;
}

.footer-info a {
  color: var(--secondary-color);
}

.footer-info a:hover {
  color: var(--black);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    margin: 40px auto;
  }

  .hamburger {
    display: flex;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .phone-mockups {
    /* flex-direction: column;
    gap: 20px; */
    /* flex-wrap: wrap; */
    gap: 10px;
  }

  /* 
  .phone-left,
  .phone-center,
  .phone-right {
    transform: none;
  } */

  .phone-mockup img {
    max-width: 180px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .download-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  h1 {
    font-size: 48px;
  }

  h3 {
    font-size: 36px;
  }

  .section-title {
    font-size: 36px;
  }

  .phone-mockup img {
    width: 100%;
  }

  .phone-mockup.phone-center img {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 60px 0;
  }

  .hero-title {
    font-size: 56px;
  }

  .section-title {
    font-size: 32px;
  }

  h3 {
    font-size: 32px;
  }

  .how-it-works,
  .faq,
  .download {
    padding: 32px 0;
  }

  h1 {
    font-size: 56px;
  }

  /* wave divider */
  .wave-divider-arrow {
    max-width: 900px;
    margin: 0 auto;
    text-align: right;
  }

  .wave-divider-arrow img {
    max-height: 170px;
    width: auto;
    max-width: 100%;
    margin-right: 100px;
    margin-bottom: -10px;
    margin-top: 70px;
  }

  .step-phone {
    height: 380px;
  }
  .faq,
  .download {
    padding: 32px 0px;
  }

  .download .container .download-content {
    padding: 24px 16px 0px;
  }

  .faq .container {
    padding-bottom: 0px;
  }

  .btn.btn-primary.mobile-btn {
    text-align: center;
  }

  .step-phone img {
    max-width: 240px;
  }

  .download .download-info h2.section-title {
    font-size: 24px;
    text-align: center;
  }
  .download .download-info {
    text-align: center;
  }

  .download .download-info .btn-app-store {
    margin: 0 auto;
  }

  .download-options {
    align-items: center;
  }

  .download-phone {
    max-height: 350px;
  }

  .faq-item {
    padding: 12px 16px;
  }
  .faq-item.active .faq-question span:not(.faq-icon),
  .faq-question {
    font-size: 16px;
  }
  .faq-answer p {
    font-size: 14px;
  }

  .wave-divider-arrow.left-arrow img {
    max-height: 120px;
  }

  .wave-divider-arrow.left-arrow {
    margin-left: 50px;
  }

  .phone-mockup.phone-center img {
    max-width: 140px;
  }

  .phone-mockup img {
    max-width: 130px;
  }

  .steps {
    gap: 20px;
  }

  .step-text {
    font-size: 14px;
  }

  .step-title {
    font-size: 20px;
  }

  .section-subtitle {
    margin-bottom: 32px;
  }
}

/* Scroll to top button */
.to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0.8;
}
.to-top-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}
.to-top-btn svg {
  width: 24px; /* Adjust as needed */
  height: 24px; /* Adjust as needed */
  stroke: var(--white); /* Sets the arrow color to white */
}

/* Image Preview Modal */
.image-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-preview-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.image-preview-content {
  position: relative;
  max-width: 80vw;
  max-height: 80svh;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.image-preview-overlay.visible .image-preview-content {
  transform: scale(1);
}

.image-preview-content img {
  max-width: 100%;
  max-height: 80svh;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 36px;
  background: none;
  border: none;
  cursor: pointer;
}
