/* ========================================
   Luna Tracker - Modern Website Styles
   ======================================== */

/* Custom Properties */
:root {
  --primary: #5e60ce;
  --primary-light: #7b7de5;
  --secondary: #d4a5b9;
  --accent: #e8a4c4;
  --bg-hero-start: #ede9fe;
  --bg-hero-end: #ffffff;
  --bg-body: #ffffff;
  --text: #3d3055;
  --text-muted: #6b5b7a;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-border: rgba(155, 123, 184, 0.2);
  --card-shadow: rgba(155, 123, 184, 0.15);
  --font-main: "Outfit", sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-body);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Stars hidden for light theme */
.stars {
  display: none;
}

/* Animated Stars Background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stars::before,
.stars::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow:
    100px 50px 0 rgba(255, 255, 255, 0.3),
    200px 150px 0 rgba(255, 255, 255, 0.4),
    300px 80px 0 rgba(255, 255, 255, 0.2),
    450px 200px 0 rgba(255, 255, 255, 0.5),
    550px 50px 0 rgba(255, 255, 255, 0.3),
    650px 180px 0 rgba(255, 255, 255, 0.2),
    750px 100px 0 rgba(255, 255, 255, 0.4),
    850px 220px 0 rgba(255, 255, 255, 0.3),
    950px 60px 0 rgba(255, 255, 255, 0.2),
    1050px 190px 0 rgba(255, 255, 255, 0.5),
    1150px 80px 0 rgba(255, 255, 255, 0.3),
    1250px 160px 0 rgba(255, 255, 255, 0.2),
    1350px 240px 0 rgba(255, 255, 255, 0.4),
    1450px 40px 0 rgba(255, 255, 255, 0.3),
    80px 300px 0 rgba(255, 255, 255, 0.2),
    180px 380px 0 rgba(255, 255, 255, 0.4),
    280px 450px 0 rgba(255, 255, 255, 0.3),
    380px 350px 0 rgba(255, 255, 255, 0.5),
    480px 420px 0 rgba(255, 255, 255, 0.2),
    580px 500px 0 rgba(255, 255, 255, 0.3),
    680px 380px 0 rgba(255, 255, 255, 0.4),
    780px 460px 0 rgba(255, 255, 255, 0.2),
    880px 520px 0 rgba(255, 255, 255, 0.3),
    980px 400px 0 rgba(255, 255, 255, 0.5),
    120px 600px 0 rgba(255, 255, 255, 0.2),
    220px 680px 0 rgba(255, 255, 255, 0.3),
    320px 750px 0 rgba(255, 255, 255, 0.4),
    420px 620px 0 rgba(255, 255, 255, 0.2),
    520px 700px 0 rgba(255, 255, 255, 0.5);
  animation: twinkle 4s ease-in-out infinite alternate;
}

.stars::after {
  animation-delay: 2s;
  transform: translate(50px, 100px);
}

@keyframes twinkle {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 0.8;
  }
}

/* Fonts */
@font-face {
  font-family: "Berlin Sans FB";
  src: url("assets/webfonts/BRLNSDB.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
  background: linear-gradient(
    135deg,
    var(--bg-hero-start) 0%,
    var(--bg-hero-end) 100%
  );
  border-bottom: 1px solid rgba(155, 123, 184, 0.1);
  overflow: hidden;
}

.hero-content {
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  width: 100%;
}

.hero-text {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-phone {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Splash Icon */
.splash-icon {
  width: 200px;
  height: auto;
  margin: 0 0 10px 0;
  display: block;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(94, 96, 206, 0.4));
  background: radial-gradient(
    ellipse at center,
    rgba(94, 96, 206, 0.2) 0%,
    rgba(94, 96, 206, 0.15) 30%,
    transparent 70%
  );
  padding: 30px;
}

/* Phone Mockup */
.phone-mockup {
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 0;
  display: block;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* Logo */
.logo {
  display: none;
}

.text-logo {
  font-family: "Berlin Sans FB", sans-serif;
  font-size: 78px;
  color: #5e60ce;
  margin-bottom: 0px;
  line-height: 1;
}

/* Hero Title */
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  background: linear-gradient(
    135deg,
    var(--text) 0%,
    var(--primary-light) 50%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #5e60ce;
  margin-bottom: 20px;
  font-weight: 500;
  margin-top: 4px;
  position: relative;
  width: fit-content;
}

/* Squiggly Underline */
.squiggle-underline {
  position: relative;
  display: inline-block;
  font-size: inherit;
  font-weight: inherit;
}

.squiggle-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 20px;
  /* Restoring the Cubic Bezier path from Step 393 that provided the best continuity */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M 0 8 C 5 8 5 12 10 12 S 15 8 20 8' stroke='%2318bbbb' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 20px 20px;
}

.handwritten-note {
  font-family: "Caveat", cursive;
  font-size: 2rem;
  color: var(--primary);
  position: absolute;
  left: 100%;
  top: -15px;
  width: max-content;
  transform: rotate(-10deg);
  margin-left: 15px;
}

/* Center Floating Elements */
.center-floats {
  position: relative;
  height: 300px;
  width: 60px;
  z-index: 1;
}

.center-float {
  font-size: 1.5rem;
  opacity: 0.4;
  position: absolute;
  animation: float-around 8s ease-in-out infinite;
}

.center-star {
  top: -5%;
  left: 0;
  color: #fbbf24;
  animation-delay: 0s;
}

.center-heart {
  top: 45%;
  right: 0;
  color: #ec4899;
  animation-delay: 2s;
}

.center-moon {
  bottom: -15%;
  left: -80%;
  color: var(--primary);
  animation: float-around-flipped 8s ease-in-out infinite;
  animation-delay: 4s;
}

.app-downloads-hero {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  margin-top: 30px;
}

.app-buttons {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0px;
}

.app-btn {
  display: inline-block;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.app-btn img {
  height: 54px;
  width: auto;
  border-radius: 12px;
}

.app-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.free-note {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  color: var(--primary);
  margin-top: 4px;
  text-align: center;
  width: 100%;
  display: block;
}

/* Adjust for footer */
.footer .free-note {
  margin-top: -20px;
  margin-bottom: 20px;
}

/* Scroll Button */
.scroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
  text-decoration: none;
}

.scroll-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(168, 85, 247, 0.4);
  color: white;
}

.scroll-btn .arrow {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(5px);
  }
  60% {
    transform: translateY(3px);
  }
}

/* ========================================
   Features Section
   ======================================== */
.features {
  padding: 100px 24px;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 16px;
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.4rem;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px var(--card-shadow);
  border-color: rgba(168, 85, 247, 0.3);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.feature-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.feature-image {
  width: 100%;
  max-width: 300px;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(155, 123, 184, 0.25);
}

/* ========================================
   About Section
   ======================================== */
.about {
  padding: 100px 24px;
  position: relative;
  z-index: 1;
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  padding: 60px 40px;
}

.about h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 24px;
  color: var(--text);
}

.about p {
  color: var(--text-muted);
  font-size: 1.15rem;
  margin-bottom: 24px;
  line-height: 1.8;
}

.about-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.about-link {
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--transition);
}

.about-link.primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
}

.about-link.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
  color: white;
}

.about-link.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid var(--card-border);
}

.about-link.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 60px 24px 40px;
  text-align: center;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--card-border);
}

.footer-apps {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-apps .app-btn img {
  height: 44px;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--primary-light);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 80px 20px 60px;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-text {
    align-items: center;
    text-align: center;
  }
  .handwritten-note {
    font-size: 1.8rem;
    margin-left: 12px;
    top: -20px;
  }
  .hero-phone {
    justify-content: center;
    margin-top: 0; /* Restored balanced gap (matches gap in .hero-content) */
  }

  .center-floats {
    display: none; /* Remove the 300px gap on mobile */
  }

  .splash-icon {
    width: 140px; /* Scale down icon */
    padding: 15px;
  }

  .text-logo {
    font-size: 56px; /* Scale down logo */
  }

  .hero-tagline {
    margin-bottom: 10px;
  }

  .app-downloads-hero {
    margin-top: 15px;
    margin-bottom: 20px;
  }

  .logo {
    max-width: 200px;
  }

  .app-btn img {
    height: 48px;
  }

  .features {
    padding: 60px 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-card {
    padding: 32px 24px;
  }

  .about {
    padding: 60px 20px;
  }

  .about-content {
    padding: 40px 24px;
  }

  .footer {
    padding: 40px 20px 30px;
  }
}

@media (max-width: 480px) {
  .hero-tagline {
    font-size: 1.6rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-top: 0px; /* Space for the note above */
  }

  .handwritten-note {
    font-size: 1.4rem;
    top: -25px;
    left: 90%;
    transform: rotate(-8deg);
    margin-left: 5px;
    width: max-content;
  }

  .squiggle-underline::after {
    bottom: -8px;
    height: 20px;
  }

  .app-buttons {
    flex-direction: column;
    align-items: center;
  }

  .scroll-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .about-links {
    flex-direction: column;
    align-items: center;
  }
}

/* Fix for very small screens (iPhone SE, etc.) */
@media (max-width: 406px) {
  .handwritten-note {
    left: 85%; /* Pull it in closer to the text */
    top: -25px; /* Keep it on top */
    transform: rotate(-8deg);
    margin-left: 0;
    margin-top: 0;
    width: max-content;
  }
}

/* ========================================
   Fun Visual Elements
   ======================================== */

/* Sparkles */
.sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0;
  animation: sparkle 3s ease-in-out infinite;
}

.sparkle:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}
.sparkle:nth-child(2) {
  top: 25%;
  left: 70%;
  animation-delay: 0.4s;
}
.sparkle:nth-child(3) {
  top: 50%;
  left: 10%;
  animation-delay: 0.8s;
}
.sparkle:nth-child(4) {
  top: 60%;
  left: 85%;
  animation-delay: 1.2s;
}
.sparkle:nth-child(5) {
  top: 80%;
  left: 30%;
  animation-delay: 1.6s;
}
.sparkle:nth-child(6) {
  top: 15%;
  left: 50%;
  animation-delay: 2s;
}
.sparkle:nth-child(7) {
  top: 70%;
  left: 60%;
  animation-delay: 2.4s;
}
.sparkle:nth-child(8) {
  top: 40%;
  left: 90%;
  animation-delay: 2.8s;
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Floating Elements */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.float-star,
.float-heart,
.float-moon {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.4;
  animation: float-around 8s ease-in-out infinite;
}

.float-star:nth-child(1) {
  top: 15%;
  left: 5%;
  color: #fbbf24;
  animation-delay: 0s;
}
.float-star:nth-child(4) {
  top: 75%;
  left: 95%;
  color: #fbbf24;
  animation-delay: 2s;
  font-size: 1rem;
}
.float-heart:nth-child(2) {
  top: 30%;
  left: 90%;
  color: #ec4899;
  animation-delay: 1s;
}
.float-heart:nth-child(5) {
  top: 85%;
  left: 15%;
  color: #ec4899;
  animation-delay: 3s;
  font-size: 1.2rem;
}
.float-moon:nth-child(3) {
  top: 60%;
  left: 8%;
  color: var(--primary);
  animation-delay: 1.5s;
}

.float-moon {
  animation: float-around-flipped 8s ease-in-out infinite !important;
}

@keyframes float-around {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(5deg);
  }
  50% {
    transform: translateY(-5px) rotate(-3deg);
  }
  75% {
    transform: translateY(-20px) rotate(3deg);
  }
}

@keyframes float-around-flipped {
  0%,
  100% {
    transform: translateY(0) rotate(180deg);
  }
  25% {
    transform: translateY(-15px) rotate(185deg);
  }
  50% {
    transform: translateY(-5px) rotate(177deg);
  }
  75% {
    transform: translateY(-20px) rotate(183deg);
  }
}

/* Blob Shapes */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  z-index: 0;
  animation: blob-float 12s ease-in-out infinite;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  top: -50px;
  right: -100px;
  animation-delay: 0s;
}

.blob-2 {
  width: 250px;
  height: 250px;
  background: linear-gradient(
    135deg,
    var(--secondary) 0%,
    var(--primary-light) 100%
  );
  bottom: 10%;
  left: -80px;
  animation-delay: 2s;
}

.blob-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  top: 40%;
  right: 5%;
  animation-delay: 4s;
}

@keyframes blob-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(20px, -30px) scale(1.05);
  }
  66% {
    transform: translate(-15px, 15px) scale(0.95);
  }
}

/* Wavy Divider */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  color: var(--bg-body);
}

.wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
