/* ============================================
   Squat Lock - Landing Page Styles
   Design: Dark, modern, fitness-focused
   ============================================ */

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

:root {
  --bg-primary: #0d0d1f;
  --bg-secondary: #111128;
  --bg-card: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.12);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --accent-cyan: #00d4aa;
  --accent-blue: #3366e6;
  --accent-green: #33cc66;
  --accent-orange: #ff9933;
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 960px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(13, 13, 31, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-badge span {
  color: var(--accent-cyan);
}

.hero h1 {
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-appstore {
  display: inline-block;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-appstore:hover {
  transform: scale(1.05);
  opacity: 1;
}

.btn-appstore img {
  height: 54px;
}

/* App Store badge fallback (CSS-only) */
.btn-appstore-fallback {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-appstore-fallback:hover {
  transform: scale(1.05);
  opacity: 1;
  color: var(--bg-primary);
}

.btn-appstore-fallback .apple-icon {
  font-size: 22px;
}

.btn-appstore-fallback .btn-text-small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  display: block;
  line-height: 1;
  text-align: left;
}

.btn-appstore-fallback .btn-text-large {
  font-size: 18px;
  font-weight: 600;
  display: block;
  line-height: 1.2;
  text-align: left;
}

/* --- Screenshot Showcase --- */
.showcase {
  padding: 40px 24px 100px;
  text-align: center;
}

.phone-frame {
  position: relative;
  display: inline-block;
  width: 280px;
  height: 580px;
  background: var(--bg-secondary);
  border-radius: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(0, 212, 170, 0.08);
  overflow: hidden;
  padding: 12px;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: var(--bg-primary);
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

/* Fade carousel */
.screenshot-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.screenshot-carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-carousel .slide.active {
  opacity: 1;
}

.screenshot-carousel .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder slides */
.screenshot-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.screenshot-placeholder .placeholder-icon {
  font-size: 40px;
  opacity: 0.4;
}

.screenshot-placeholder .placeholder-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}

.carousel-dots .dot.active {
  background: var(--accent-cyan);
  transform: scale(1.2);
}

/* --- Features Section --- */
.features {
  padding: 80px 24px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  text-align: center;
}

.section-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 56px;
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(0, 212, 170, 0.25);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.feature-icon.cyan   { background: rgba(0, 212, 170, 0.12); }
.feature-icon.blue   { background: rgba(51, 102, 230, 0.12); }
.feature-icon.orange { background: rgba(255, 153, 51, 0.12); }
.feature-icon.green  { background: rgba(51, 204, 102, 0.12); }
.feature-icon.purple { background: rgba(160, 100, 255, 0.12); }
.feature-icon.red    { background: rgba(255, 80, 80, 0.12); }

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- CTA Section --- */
.cta {
  padding: 80px 24px;
  text-align: center;
}

.cta-box {
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}

.cta-box p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  position: relative;
}

/* --- Footer --- */
.footer {
  padding: 40px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

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

/* --- Legal Pages --- */
.legal-page {
  padding: 120px 24px 80px;
  max-width: 720px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.legal-page .last-updated {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 40px;
}

.legal-page h2 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
}

.legal-page p,
.legal-page li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-page li {
  margin-bottom: 6px;
}

.legal-page a {
  color: var(--accent-cyan);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .nav-links {
    gap: 16px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 100px 20px 60px;
  }

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

  .phone-frame {
    width: 240px;
    height: 500px;
  }

  .cta-box {
    padding: 40px 24px;
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }
