/* ===========================
   TRACK YOUR REPS
   Raw Industrial Gym Aesthetic
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Core palette - dark industrial */
  --bg-deep: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #1a1a1a;
  --bg-muted: #252525;

  /* Brand colors */
  --primary: #7c78ff;
  --primary-glow: #605cff;
  --primary-dim: #4a47cc;
  --accent: #4eedc4;
  --accent-dim: #2dd4a8;

  /* Text hierarchy */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-tertiary: #666666;

  /* Utility */
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(124, 120, 255, 0.4);

  /* Typography */
  --font-display: 'Bebas Neue', Impact, 'Arial Black', sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1000;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===========================
   Hero Section
   =========================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: var(--space-xl) 0;
  background:
    radial-gradient(ellipse 80% 50% at 80% 0%, rgba(124, 120, 255, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(78, 237, 196, 0.08), transparent),
    var(--bg-deep);
}

/* Geometric accent lines */
.hero::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 0;
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-dim), transparent);
  opacity: 0.5;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 0;
  width: 30%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  opacity: 0.4;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Overline badge */
.hero-overline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(78, 237, 196, 0.1);
  border: 1px solid rgba(78, 237, 196, 0.2);
  border-radius: 100px;
  width: fit-content;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.1s;
}

.hero-overline::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.hero-title .highlight {
  color: var(--primary);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: 0;
  width: 100%;
  height: 0.08em;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  animation: expandLine 0.6s ease forwards;
  animation-delay: 1s;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 500px;
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.7s ease forwards;
  animation-delay: 0.4s;
}

/* Feature pills */
.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.5s;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.feature-pill:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.feature-pill svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* Download buttons */
.download-buttons {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.6s;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.download-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.download-btn:hover {
  transform: translateY(-4px) scale(1.02);
}

.download-btn:hover::before {
  opacity: 0.3;
}

.store-badge {
  height: 56px;
  width: auto;
  filter: brightness(1);
  transition: filter 0.3s ease;
}

.download-btn:hover .store-badge {
  filter: brightness(1.1);
}

/* No account badge */
.no-account-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-tertiary);
  opacity: 0;
  animation: slideUp 0.6s ease forwards;
  animation-delay: 0.7s;
}

.no-account-badge svg {
  color: var(--accent);
}

/* ===========================
   Phone Visual
   =========================== */

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  opacity: 0;
  transform: translateX(60px);
  animation: slideInRight 1s ease forwards;
  animation-delay: 0.4s;
}

.phone-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Glow effect behind phone */
.phone-group::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(124, 120, 255, 0.3), transparent 70%);
  filter: blur(60px);
  z-index: -1;
  animation: breathe 4s ease-in-out infinite;
}

.video-caption {
  margin-bottom: var(--space-md);
  z-index: 10;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 2rem;
}

.video-caption.hidden {
  opacity: 0;
  transform: translateY(10px);
}

.phone-frame-wrapper {
  position: relative;
  width: 280px;
  height: 600px;
  border-radius: 44px;
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  padding: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 100px rgba(124, 120, 255, 0.1);
  overflow: hidden;
  z-index: 1;
}

/* Inner bezel */
.phone-frame-wrapper::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 10;
}

/* Dynamic island notch */
.phone-frame-wrapper::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 20;
}

.video-container {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
}

.app-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   Footer
   =========================== */

.footer {
  padding: var(--space-lg) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-link {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ===========================
   Legal Pages
   =========================== */

body.legal-page {
  background: var(--bg-surface);
}

.legal-header {
  padding: var(--space-lg) 0 var(--space-md);
  border-bottom: 1px solid var(--border);
  background: var(--bg-deep);
}

.legal-header-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.legal-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legal-meta {
  color: var(--text-tertiary);
  font-size: 0.95rem;
}

.legal-back-link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.legal-back-link:hover {
  color: var(--accent);
}

.legal-content {
  flex: 1;
  padding: var(--space-lg) 0 var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.legal-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--space-md);
}

.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
}

.legal-list {
  list-style: disc;
  margin-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-section a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ===========================
   Animations
   =========================== */

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes expandLine {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

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

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

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

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 1024px) {
  .hero-container {
    gap: var(--space-xl);
  }

  .hero-title {
    font-size: clamp(3.5rem, 8vw, 6rem);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-lg) 0;
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .hero-content {
    align-items: center;
    order: 1;
  }

  .hero-visual {
    order: 2;
  }

  .hero-title {
    font-size: clamp(3rem, 12vw, 5rem);
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-features {
    justify-content: center;
  }

  .download-buttons {
    flex-direction: row;
    justify-content: center;
  }

  .no-account-badge {
    justify-content: center;
  }

  .phone-frame-wrapper {
    width: 260px;
    height: 560px;
  }

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

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .download-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 200px;
  }

  .store-badge {
    height: 48px;
  }

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

  .feature-pill {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

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