/* ============================================
   HPLovely Labs — Design System & Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg-primary: #08080d;
  --color-bg-secondary: #0e0e16;
  --color-bg-card: rgba(255, 255, 255, 0.03);
  --color-bg-card-hover: rgba(255, 255, 255, 0.06);
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(124, 58, 237, 0.3);

  --color-text-primary: #f4f4f5;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #71717a;

  --color-accent-purple: #7c3aed;
  --color-accent-blue: #3b82f6;
  --color-accent-cyan: #06b6d4;

  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #3b82f6 50%, #06b6d4 100%);
  --gradient-hero-bg: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
  --gradient-card-glow: radial-gradient(ellipse at 50% -20%, rgba(124, 58, 237, 0.08) 0%, transparent 70%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --fs-display: clamp(2.5rem, 6vw, 4.5rem);
  --fs-h1: clamp(2rem, 4vw, 3rem);
  --fs-h2: clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3: clamp(1.1rem, 2vw, 1.4rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.75rem;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;

  /* Effects */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.1);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::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-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-purple);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-full);
}

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

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

/* --- Background Grid Pattern --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition-base);
}

.nav.scrolled {
  background: rgba(8, 8, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo img {
  height: 36px;
  width: 36px;
  border-radius: var(--radius-sm);
}

.nav-logo-text {
  font-size: 1.1rem;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.nav-link {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transition: width var(--transition-base);
}

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

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  padding: var(--space-xs) var(--space-lg);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: white;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: var(--transition-base);
}

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

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero-bg);
  pointer-events: none;
}

/* Animated orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-orb--1 {
  top: 10%;
  left: 15%;
  width: 400px;
  height: 400px;
  background: rgba(124, 58, 237, 0.15);
  animation-delay: 0s;
}

.hero-orb--2 {
  top: 40%;
  right: 10%;
  width: 350px;
  height: 350px;
  background: rgba(59, 130, 246, 0.12);
  animation-delay: -3s;
}

.hero-orb--3 {
  bottom: 10%;
  left: 40%;
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.1);
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(20px, -30px) scale(1.05); }
  50% { transform: translate(-10px, 20px) scale(0.95); }
  75% { transform: translate(15px, 10px) scale(1.02); }
}

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

.hero-badge {
  margin-bottom: var(--space-xl);
}

.hero-title {
  font-size: var(--fs-display);
  font-weight: var(--fw-bold);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: var(--fw-regular);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  color: white;
  background: var(--gradient-primary);
  box-shadow: 0 2px 16px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
  color: var(--color-text-primary);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  margin-top: var(--space-4xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ============================================
   Section Common
   ============================================ */
section {
  position: relative;
  z-index: 1;
  padding: var(--space-5xl) 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-purple);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.section-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================
   Features Section
   ============================================ */
.features {
  background: var(--gradient-card-glow);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  position: relative;
  padding: var(--space-2xl);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.feature-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

.feature-desc {
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================
   Tech Stack Section
   ============================================ */
.tech-stack {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3xl) 0;
}

.tech-marquee {
  display: flex;
  gap: var(--space-3xl);
  animation: marquee 30s linear infinite;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
}

.tech-item .tech-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-purple);
  opacity: 0.5;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   About / Founder Section
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.about-text h3 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.about-text p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.about-highlight {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
}

.about-highlight:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card-hover);
}

.about-highlight-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.about-highlight-content h4 {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  margin-bottom: 4px;
}

.about-highlight-content p {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.about-visual {
  position: relative;
}

.about-card {
  padding: var(--space-2xl);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.about-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: white;
}

.about-card-name {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
}

.about-card-role {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.about-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.about-skill-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.about-skill-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  width: 100px;
  flex-shrink: 0;
}

.about-skill-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.about-skill-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.about-tag {
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

/* ============================================
   CTA / Contact Section
   ============================================ */
.cta {
  text-align: center;
}

.cta-box {
  position: relative;
  padding: var(--space-4xl) var(--space-2xl);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.cta-title {
  position: relative;
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.cta-desc {
  position: relative;
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto var(--space-2xl);
}

.cta-email {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  color: var(--color-accent-purple);
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
}

.cta-email:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
}

.cta-email-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: white;
  background: var(--color-accent-purple);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.cta-email.copied .cta-email-tooltip {
  opacity: 1;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
}

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

.footer-copy {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

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

.footer-link {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

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

/* ============================================
   Scroll Animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

  section {
    padding: var(--space-3xl) 0;
  }

  /* Nav mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
    background: rgba(8, 8, 13, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    min-height: auto;
    padding-bottom: var(--space-2xl);
  }

  .hero-stats {
    gap: var(--space-xl);
  }

  .hero-actions {
    flex-direction: column;
  }

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

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

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

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

  .hero-orb {
    display: none;
  }
}
