/* ============================================
   Lonely Pine AI - Sprint Landing Page
   Aesthetic: Dark premium tech + Pacific forest
   ============================================ */

:root {
  --bg-deep: #0a0e0d;
  --bg-surface: #0f1513;
  --bg-elevated: #141c19;
  --bg-card: #1a2420;
  --border: rgba(56, 199, 147, 0.12);
  --border-hover: rgba(56, 199, 147, 0.25);
  --text-primary: #e8ede9;
  --text-secondary: #8a9b92;
  --text-muted: #5a6b63;
  --accent: #38c793;
  --accent-dim: rgba(56, 199, 147, 0.15);
  --accent-glow: rgba(56, 199, 147, 0.08);
  --cyan: #4de8c2;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.logo-icon {
  width: 20px;
  height: 26px;
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--cyan);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(56, 199, 147, 0.25);
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease-out);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: 14px 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--accent-glow);
}

.btn-nav {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 500;
}

.btn-nav:hover {
  background: rgba(56, 199, 147, 0.22);
  color: var(--cyan) !important;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

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

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(56, 199, 147, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 199, 147, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 199, 147, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 20%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  margin-bottom: 32px;
  animation: fadeInUp 0.8s var(--ease-out) both;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-line {
  display: block;
  animation: fadeInUp 0.8s var(--ease-out) both;
}

.hero-line:nth-child(1) { animation-delay: 0.1s; }
.hero-line:nth-child(2) { animation-delay: 0.2s; }
.hero-line:nth-child(3) { animation-delay: 0.3s; }

.hero-line-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
  animation: fadeInUp 0.8s var(--ease-out) 0.5s both;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ---- Sections shared ---- */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.section-sub {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ---- Features ---- */
.features {
  padding: 120px 0;
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  transition: all 0.35s var(--ease-out);
  opacity: 0;
  transform: translateY(20px);
}

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

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 12px;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* ---- How It Works ---- */
.how-it-works {
  padding: 120px 0;
  background: var(--bg-surface);
  position: relative;
}

.how-it-works::before,
.how-it-works::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.how-it-works::before { top: 0; }
.how-it-works::after { bottom: 0; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  position: relative;
  padding: 32px;
  opacity: 0;
  transform: translateY(20px);
}

.step.visible {
  opacity: 1;
  transform: translateY(0);
}

.step-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: 20px;
}

.step-content h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ---- Pricing ---- */
.pricing {
  padding: 120px 0;
  position: relative;
}

.pricing-card {
  max-width: 440px;
  margin: 0 auto;
}

.pricing-card-inner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-out);
}

.pricing-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.pricing-card-inner:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.pricing-header {
  text-align: center;
  margin-bottom: 36px;
}

.pricing-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.pricing-header h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.price-currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  align-self: flex-start;
  margin-top: 8px;
}

.price-number {
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--text-primary);
}

.price-period {
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 36px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(56, 199, 147, 0.06);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.pricing-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ---- Testimonials ---- */
.testimonials {
  padding: 120px 0;
  background: var(--bg-surface);
  position: relative;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.testimonial-grid {
  max-width: 600px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.testimonial-quote {
  position: relative;
  margin-bottom: 24px;
}

.testimonial-quote svg {
  position: absolute;
  top: -8px;
  left: -4px;
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.testimonial-quote p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: italic;
  padding-left: 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonial-avatar svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.testimonial-author strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.testimonial-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Demo / Contact ---- */
.demo {
  padding: 120px 0;
  position: relative;
}

.demo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.demo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.demo-info h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 20px;
}

.demo-info > p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.demo-benefits {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.demo-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.demo-benefit svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.demo-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.925rem;
  transition: all 0.25s var(--ease-out);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ---- Footer ---- */
.footer {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}

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

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

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

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

/* ---- Form success state ---- */
.form-success {
  text-align: center;
  padding: 48px 24px;
}

.form-success-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-dim);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-success-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.form-success h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero {
    padding: 120px 0 60px;
    min-height: auto;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-num {
    font-size: 1.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .demo-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .nav-links a:not(.btn-nav) {
    display: none;
  }

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

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .pricing-card-inner {
    padding: 36px 28px;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .demo-form {
    padding: 28px 20px;
  }
}
