/* ============================================
   Climbr Strength — Website Styles
   ============================================ */

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

:root {
  --granite: #121213;
  --granite-light: #1a1a1c;
  --granite-lighter: #242426;
  --climbing-green: #33A659;
  --sandstone-red: #C74520;
  --rope-amber: #E6871F;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a4;
  --text-muted: #6a6a6e;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Nunito', var(--font-body);
  --font-heading: 'Space Grotesk', var(--font-body);
  --max-width: 1120px;
  --section-padding: 100px 24px;
  color-scheme: dark;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--granite);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--climbing-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: #4dca73; }

img { max-width: 100%; display: block; }

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

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  background: rgba(18, 18, 19, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
}
.nav-logo svg { width: 28px; height: 28px; }
.brand-bold { font-weight: 900; }
.brand-light { font-weight: 300; opacity: 0.85; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 24px; height: 24px; }

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(51,166,89,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-content { z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(51,166,89,0.12);
  color: var(--climbing-green);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--climbing-green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--climbing-green); }
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-primary {
  background: var(--climbing-green);
  color: #fff;
  box-shadow: 0 4px 20px rgba(51,166,89,0.3);
}
.btn-primary:hover {
  background: #3dba66;
  box-shadow: 0 6px 28px rgba(51,166,89,0.4);
  transform: translateY(-1px);
  color: #fff;
}
.btn-secondary {
  background: var(--granite-lighter);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn-secondary:hover {
  background: #2e2e30;
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Phone Mockup */
.hero-phone { display: flex; justify-content: center; position: relative; }

.phone-frame {
  width: 280px;
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Floating glow behind phone */
.phone-glow {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.phone-glow.train { background: var(--climbing-green); }

/* ============================================
   Features
   ============================================ */
.features { padding: var(--section-padding); }
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--climbing-green);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--granite-light);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 32px 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.feature-card:hover {
  border-color: rgba(51,166,89,0.2);
  transform: translateY(-4px);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.3rem;
}
.feature-icon.green { background: rgba(51,166,89,0.12); color: var(--climbing-green); }
.feature-icon.amber { background: rgba(230,135,31,0.12); color: var(--rope-amber); }
.feature-icon.red { background: rgba(199,69,32,0.12); color: var(--sandstone-red); }
.feature-icon.white { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.coming-soon {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rope-amber);
  background: rgba(230,135,31,0.12);
  padding: 2px 8px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 6px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   How It Works
   ============================================ */
.how-it-works {
  padding: var(--section-padding);
  background: var(--granite-light);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(16.67% + 24px);
  right: calc(16.67% + 24px);
  height: 2px;
  background: linear-gradient(90deg, var(--climbing-green), var(--rope-amber), var(--sandstone-red));
  opacity: 0.3;
}
.step { text-align: center; position: relative; }
.step-number {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.step:nth-child(1) .step-number { background: linear-gradient(rgba(51,166,89,0.15), rgba(51,166,89,0.15)), var(--granite-light); color: var(--climbing-green); border: 2px solid rgba(51,166,89,0.3); }
.step:nth-child(2) .step-number { background: linear-gradient(rgba(230,135,31,0.15), rgba(230,135,31,0.15)), var(--granite-light); color: var(--rope-amber); border: 2px solid rgba(230,135,31,0.3); }
.step:nth-child(3) .step-number { background: linear-gradient(rgba(199,69,32,0.15), rgba(199,69,32,0.15)), var(--granite-light); color: var(--sandstone-red); border: 2px solid rgba(199,69,32,0.3); }
.step h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 260px;
  margin: 0 auto;
}

/* ============================================
   Screenshots
   ============================================ */
.screenshots { padding: var(--section-padding); overflow: hidden; }
.screenshots-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.screenshot-item { text-align: center; }
.screenshot-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.screenshot-phone {
  width: 220px;
  border-radius: 32px;
  border: 3px solid #2a2a2c;
  overflow: hidden;
  position: relative;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}
.screenshot-img {
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 847;
  display: block;
}

/* ============================================
   Newsletter / CTA
   ============================================ */
.newsletter {
  padding: var(--section-padding);
  background: var(--granite-light);
}
.newsletter-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.newsletter-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.newsletter-card p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.05rem;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--granite);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.newsletter-form input[type="email"]::placeholder { color: var(--text-muted); }
.newsletter-form input[type="email"]:focus { border-color: var(--climbing-green); }
.newsletter-form button {
  padding: 14px 24px;
  border-radius: 12px;
  background: var(--climbing-green);
  color: #fff;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: #3dba66; }
.newsletter-msg {
  margin-top: 12px;
  font-size: 0.85rem;
  min-height: 24px;
}
.newsletter-msg.success { color: var(--climbing-green); }
.newsletter-msg.error { color: var(--sandstone-red); }

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 48px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
}
.footer-brand svg { width: 24px; height: 24px; }
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-secondary); }
.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ============================================
   Legal Pages
   ============================================ */
.legal {
  padding: 120px 24px 80px;
  max-width: 720px;
  margin: 0 auto;
}
.legal h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.legal .last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 48px;
}
.legal h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.legal p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}
.legal ul {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
  line-height: 1.7;
}
.legal li { margin-bottom: 6px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  :root { --section-padding: 72px 20px; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(18,18,19,0.98);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .nav-toggle { display: block; }

  .hero { min-height: auto; padding: 100px 20px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-subtitle { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }

  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { display: none; }

  .screenshots-row { gap: 24px; }
  .screenshot-phone { width: 180px; border-radius: 26px; }

  .newsletter-form { flex-direction: column; }

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

@media (max-width: 480px) {
  .phone-frame { width: 240px; border-radius: 34px; }
  .features-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
