/* =============================================
   RepGPT Landing Page — styles.css
   Neural/Techy dark theme
   ============================================= */

/* --- Custom Properties --- */
:root {
  --bg-deep: #080818;
  --bg-surface: #0f0f24;
  --bg-card: #141432;
  --bg-card-hover: #1a1a3e;

  --neon-blue: #0A84FF;
  --neon-blue-dim: rgba(10, 132, 255, 0.15);
  --neon-blue-glow: rgba(10, 132, 255, 0.4);
  --neon-purple: #AF52DE;
  --neon-purple-dim: rgba(175, 82, 222, 0.15);
  --neon-green: #34C759;
  --neon-green-dim: rgba(52, 199, 89, 0.15);
  --neon-pink: #FF2D55;
  --neon-pink-dim: rgba(255, 45, 85, 0.15);
  --neon-orange: #FF9500;
  --neon-orange-dim: rgba(255, 149, 0, 0.15);
  --neon-red: #FF3B30;
  --neon-red-dim: rgba(255, 59, 48, 0.15);

  --text-primary: #f0f0f0;
  --text-secondary: #8888aa;
  --text-muted: #555566;

  --border-subtle: rgba(10, 132, 255, 0.1);
  --border-hover: rgba(10, 132, 255, 0.3);

  --nav-height: 60px;
  --max-width: 1200px;
  --section-padding: 100px 40px;

  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-stack);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--neon-blue); text-decoration: none; }
a:hover { color: #fff; }

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(8, 8, 24, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(8, 8, 24, 0.95);
}

.nav-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--neon-blue);
  text-shadow: 0 0 20px var(--neon-blue-glow);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

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

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--neon-blue);
  border-radius: 1px;
}

.nav-cta {
  background: var(--neon-blue);
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(10, 132, 255, 0.3);
  transition: box-shadow 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.nav-cta:hover {
  color: #fff;
  box-shadow: 0 0 30px rgba(10, 132, 255, 0.5);
  transform: translateY(-1px);
}

/* Hamburger (mobile) */
.nav-toggle { display: none; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 40px 60px;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: var(--max-width);
  width: 100%;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero-text .text-glow {
  text-shadow: 0 0 40px rgba(10, 132, 255, 0.3);
}

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

.hero-text p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--neon-blue);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 0 30px rgba(10, 132, 255, 0.3);
  transition: all 0.2s;
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 0 40px rgba(10, 132, 255, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--neon-blue);
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(10, 132, 255, 0.3);
  transition: all 0.2s;
}
.btn-secondary:hover {
  border-color: var(--neon-blue);
  background: rgba(10, 132, 255, 0.08);
}

.btn-large {
  padding: 18px 36px;
  font-size: 18px;
  border-radius: 14px;
}

/* --- Phone Mockup --- */
.phone-mockup {
  flex-shrink: 0;
  width: 280px;
  height: 560px;
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-card));
  border: 2px solid rgba(10, 132, 255, 0.2);
  border-radius: 36px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 60px rgba(10, 132, 255, 0.15),
    0 20px 60px rgba(0, 0, 0, 0.5);
}

.phone-notch {
  width: 120px;
  height: 28px;
  background: var(--bg-deep);
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
}

.phone-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 28px);
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

.phone-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--neon-blue-dim), var(--neon-purple-dim));
  border: 1px dashed rgba(10, 132, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 20px;
}

/* --- Sections --- */
.section {
  padding: var(--section-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 40px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: rgba(15, 15, 36, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px rgba(10, 132, 255, 0.08);
  transform: translateY(-4px);
}

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

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

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

/* --- How It Works --- */
.steps-container {
  display: flex;
  gap: 24px;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.steps-container::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 64px;
  right: 64px;
  height: 2px;
  background: linear-gradient(90deg,
    var(--neon-blue-dim),
    var(--neon-purple-dim),
    var(--neon-green-dim));
}

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

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  background: var(--bg-deep);
  position: relative;
  z-index: 1;
}

.step:nth-child(1) .step-number {
  border: 2px solid var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(10, 132, 255, 0.2);
}
.step:nth-child(2) .step-number {
  border: 2px solid var(--neon-purple);
  color: var(--neon-purple);
  box-shadow: 0 0 20px rgba(175, 82, 222, 0.2);
}
.step:nth-child(3) .step-number {
  border: 2px solid var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 20px rgba(52, 199, 89, 0.2);
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* --- Screenshots --- */
.screenshot-gallery {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.screenshot-slot {
  width: 200px;
  height: 400px;
  background: linear-gradient(180deg, var(--bg-surface), var(--bg-card));
  border: 1px dashed rgba(10, 132, 255, 0.2);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 20px;
  transition: border-color 0.3s;
}

.screenshot-slot:hover {
  border-color: rgba(10, 132, 255, 0.4);
}

.screenshot-slot small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #444;
}

/* --- Download CTA --- */
.cta-section {
  padding: var(--section-padding);
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(10, 132, 255, 0.08) 0%, transparent 70%);
}

.cta-section h2 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 32px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  list-style: none;
  margin-bottom: 16px;
}

.footer-links a {
  color: #666;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--neon-blue); }

.footer .copyright {
  color: #444;
  font-size: 13px;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-on-scroll.visible .feature-card:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll.visible .feature-card:nth-child(2) { transition-delay: 0.08s; }
.animate-on-scroll.visible .feature-card:nth-child(3) { transition-delay: 0.16s; }
.animate-on-scroll.visible .feature-card:nth-child(4) { transition-delay: 0.24s; }
.animate-on-scroll.visible .feature-card:nth-child(5) { transition-delay: 0.32s; }
.animate-on-scroll.visible .feature-card:nth-child(6) { transition-delay: 0.4s; }

.features-grid .feature-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out,
              border-color 0.3s, box-shadow 0.3s;
}

.animate-on-scroll.visible .feature-card {
  opacity: 1;
  transform: translateY(0);
}

/* --- Legal Pages --- */
.legal-page {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 60px;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
}

.legal-content h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

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

.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--neon-blue);
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.legal-content ul, .legal-content ol {
  color: var(--text-secondary);
  margin-bottom: 16px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-content a {
  color: var(--neon-blue);
}
.legal-content a:hover {
  text-decoration: underline;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.legal-content th,
.legal-content td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 14px;
}
.legal-content th {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
  .hero-text h1 { font-size: 44px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 32px; }
}

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

  /* Nav mobile */
  .nav { padding: 0 20px; }
  .nav-hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8, 8, 24, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 100;
  }
  .nav-links a { font-size: 20px; }

  .nav-toggle:checked ~ .nav-links {
    opacity: 1;
    pointer-events: all;
  }
  .nav-toggle:checked ~ .nav-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle:checked ~ .nav-hamburger span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked ~ .nav-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .nav-cta-desktop { display: none; }

  /* Hero mobile */
  .hero { padding: calc(var(--nav-height) + 20px) 20px 40px; }
  .hero-inner { flex-direction: column; gap: 40px; text-align: center; }
  .hero-text h1 { font-size: 36px; letter-spacing: -1px; }
  .hero-text p { margin-left: auto; margin-right: auto; font-size: 16px; }
  .hero-buttons { justify-content: center; }
  .phone-mockup { width: 220px; height: 440px; }

  /* Features mobile */
  .features-grid { grid-template-columns: 1fr; }

  /* Steps mobile */
  .steps-container {
    flex-direction: column;
    gap: 32px;
  }
  .steps-container::before {
    top: 0; bottom: 0;
    left: 31px; right: auto;
    width: 2px; height: auto;
  }
  .step {
    text-align: left;
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  .step-number {
    margin: 0;
    flex-shrink: 0;
    width: 48px; height: 48px;
    font-size: 18px;
  }

  /* Screenshots mobile */
  .screenshot-gallery { gap: 16px; }
  .screenshot-slot { width: 160px; height: 320px; }

  /* Legal mobile */
  .legal-content { padding: 20px; }
  .legal-content h1 { font-size: 28px; }
}
