/* Livetree Landing Page — Premium cinematic design */

:root {
  --bg-deep: #0a0a0f;
  --bg-dark: #0f1117;
  --bg-card: #151820;
  --bg-gradient-start: #0d0e18;
  --bg-gradient-mid: #12141f;
  --bg-gradient-end: #08090d;
  --accent-pink: #ff01f0;
  --accent-coral: #ef335a;
  --accent-subtle: rgba(255, 1, 240, 0.15);
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

main {
  position: relative;
  z-index: 1;
}

/* ========== Hero Background ========== */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--bg-gradient-mid) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 1, 240, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(239, 51, 90, 0.04) 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 40%, var(--bg-gradient-end) 100%);
  pointer-events: none;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.particle-canvas.active {
  opacity: 1;
}

/* Fallback when canvas not supported / mobile */
.no-webgl .particle-canvas {
  display: none;
}

.no-webgl .hero-bg {
  background: 
    radial-gradient(ellipse 100% 60% at 50% 20%, rgba(255, 1, 240, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--bg-gradient-mid) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

/* ========== Hero Section ========== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 5rem;
  text-align: center;
}

@media (max-width: 480px) {
  .hero {
    padding: 1.5rem 1rem 4rem;
  }
}

.hero-content {
  max-width: 640px;
}

.hero-logo-wrap {
  margin: 0 0 1.5rem;
}

.hero-logo {
  width: min(360px, 75vw);
  height: auto;
  filter: drop-shadow(0 0 40px var(--accent-subtle));
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-logo {
    animation: heroLogoIn 1s var(--ease-out-expo) 0.2s both;
  }
}

.hero-subheadline {
  margin: 0 0 0.25rem;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-subheadline {
    opacity: 0;
    animation: heroSubheadIn 0.8s ease 0.5s forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-subheadline {
    opacity: 1;
  }
}

.hero-status {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-status {
    opacity: 0;
    animation: heroStatusIn 0.8s ease 0.7s forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-status {
    opacity: 1;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: max(2rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: #e4e4e7;
  text-decoration: none;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1;
  padding: 0.5rem;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: color 0.3s, transform 0.3s;
}

.scroll-indicator:hover,
.scroll-indicator:focus-visible {
  color: #fafafa;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-chevron {
    display: inline-block;
    animation: scrollBounce 2s ease-in-out infinite;
  }
}

/* ========== Sections ========== */
.section {
  padding: 4rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .section {
    padding: 3rem 1rem;
  }
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 3rem;
  text-align: center;
  color: var(--text-primary);
}

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.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; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
}

/* ========== Stats / Achievements ========== */
.section-achievements {
  padding-top: 6rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.stat-card {
  background: rgba(21, 24, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.3s;
}

@media (min-width: 768px) {
  .stat-card {
    padding: 2rem;
  }
}

.stat-card:hover {
  border-color: rgba(255, 1, 240, 0.2);
}

.stat-card-wide {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .stat-card-wide {
    grid-column: span 1;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card .stat-number,
.stat-card .stat-prefix,
.stat-card .stat-suffix {
  display: inline;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-prefix {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.1em;
}

.stat-suffix {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.stat-label {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== Platform Overview ========== */
.section-platform {
  padding-top: 4rem;
}

.platform-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.platform-block {
  padding: 1.5rem;
  background: rgba(21, 24, 32, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  transition: border-color 0.3s;
}

@media (min-width: 768px) {
  .platform-block {
    padding: 2rem;
  }
}

.platform-block:hover {
  border-color: rgba(255, 1, 240, 0.15);
}

.platform-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--accent-coral);
  opacity: 0.9;
}

.platform-icon svg {
  width: 100%;
  height: 100%;
}

.platform-block h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.platform-block p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== CTA Section ========== */
.section-cta {
  padding: 6rem 1.5rem;
}

.cta-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(255, 1, 240, 0.08) 0%, rgba(239, 51, 90, 0.05) 100%);
  border: 1px solid rgba(255, 1, 240, 0.2);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 60px rgba(255, 1, 240, 0.06);
}

@media (min-width: 480px) {
  .cta-card {
    padding: 2.5rem 2rem;
  }
}

@media (min-width: 768px) {
  .cta-card {
    padding: 3rem 2.5rem;
  }
}

.cta-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.cta-body {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  min-height: 48px;
  min-width: 200px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: white;
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-coral) 100%);
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
  transition: transform 0.2s, box-shadow 0.3s;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 1, 240, 0.35);
}

.cta-button:focus-visible {
  outline: 2px solid var(--accent-pink);
  outline-offset: 3px;
}

/* ========== Footer ========== */
.footer {
  padding: 2rem 1rem max(2rem, env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
  .footer {
    padding: 3rem 1.5rem 2rem;
  }
}

.footer-logo {
  width: 100px;
  height: auto;
  opacity: 0.5;
  margin-bottom: 1rem;
}

.footer-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

@keyframes heroSubheadIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes heroStatusIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* Reduced motion: disable animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-chevron {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
