/* ============================================
   ORCHIA — Design System
   ============================================ */

:root {
  --bg-primary: #06060f;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(138,100,255,0.4);

  --purple-100: #f3eeff;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-glow: rgba(139,92,246,0.3);

  --blue-400: #60a5fa;
  --cyan-400: #22d3ee;

  --text-primary: #f0eeff;
  --text-secondary: rgba(240,238,255,0.55);
  --text-muted: rgba(240,238,255,0.3);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

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

/* ============================================ Base */

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

html { scroll-behavior: smooth; }

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

::selection { background: var(--purple-glow); color: var(--purple-100); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--purple-600); border-radius: 3px; }

/* ============================================ Canvas Background */

#canvas-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================ Navigation */

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--purple-500), var(--blue-400));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px var(--purple-glow);
}

.nav-logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

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

.nav-cta {
  background: var(--purple-600) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--purple-500);
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
}

.nav-cta:hover {
  background: var(--purple-500) !important;
  box-shadow: 0 0 30px rgba(139,92,246,0.5) !important;
  transform: translateY(-1px);
}

/* ============================================ Hero */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.08);
  font-size: 13px;
  font-weight: 500;
  color: var(--purple-400);
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
  animation: fadeInDown 0.8s ease both;
}

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

.hero-title {
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -3px;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #ffffff 0%, var(--purple-400) 40%, var(--cyan-400) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 80px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(124,58,237,0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.6);
}

.btn-primary:hover::after { opacity: 1; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

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

/* Hero terminal preview */
.hero-preview {
  width: 100%;
  max-width: 900px;
  animation: fadeInUp 1s ease 0.4s both;
  position: relative;
}

.hero-preview::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse at center, rgba(139,92,246,0.15) 0%, transparent 70%);
  z-index: -1;
}

.preview-window {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red   { background: #ff5f57; }
.dot-yellow{ background: #febc2e; }
.dot-green { background: #28c840; }

.preview-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.preview-img {
  width: 100%;
  display: block;
}

/* ============================================ Sections */

section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple-400);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--purple-400);
}

.section-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 540px;
  line-height: 1.7;
}

/* ============================================ What section */

.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}

.what-text p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.what-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.what-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.stat-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
}

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

.stat-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--purple-400), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.what-visual .preview-window {
  transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
  transition: var(--transition-slow);
}

.what-visual .preview-window:hover {
  transform: perspective(1000px) rotateY(0) rotateX(0);
}

/* ============================================ Features */

.features-header {
  text-align: center;
  margin-bottom: 60px;
}

.features-header .section-subtitle {
  margin: 0 auto;
}

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

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

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, var(--card-glow, rgba(139,92,246,0.05)), transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

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

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

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

.feature-icon.purple { background: rgba(139,92,246,0.15); box-shadow: 0 0 20px rgba(139,92,246,0.2); }
.feature-icon.blue   { background: rgba(96,165,250,0.15);  box-shadow: 0 0 20px rgba(96,165,250,0.2); }
.feature-icon.cyan   { background: rgba(34,211,238,0.15);  box-shadow: 0 0 20px rgba(34,211,238,0.2); }
.feature-icon.green  { background: rgba(52,211,153,0.15);  box-shadow: 0 0 20px rgba(52,211,153,0.2); }
.feature-icon.orange { background: rgba(251,146,60,0.15);  box-shadow: 0 0 20px rgba(251,146,60,0.2); }
.feature-icon.pink   { background: rgba(244,114,182,0.15); box-shadow: 0 0 20px rgba(244,114,182,0.2); }

.feature-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

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

/* ============================================ Screenshots */

.screenshots-section {
  background: linear-gradient(180deg, transparent, rgba(139,92,246,0.03) 50%, transparent);
}

.screenshots-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-sans);
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.tab-btn.active {
  background: var(--purple-600);
  border-color: var(--purple-500);
  color: white;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.screenshot-display {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.screenshot-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.screenshot-panel.active {
  display: block;
}

.screenshot-desc {
  text-align: center;
  margin-top: 24px;
}

.screenshot-desc h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.screenshot-desc p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================ How it works */

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
  position: relative;
}

.how-grid::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple-600), var(--cyan-400), var(--purple-600), transparent);
  opacity: 0.4;
}

.step-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
}

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

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-600), var(--blue-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px var(--purple-glow);
  position: relative;
  z-index: 1;
}

.step-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================ Roles */

.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 50px;
}

.role-card {
  padding: 24px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.role-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.role-emoji {
  font-size: 32px;
  margin-bottom: 12px;
  display: block;
}

.role-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.role-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================ Tech Stack */

.tech-section {
  text-align: center;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 40px;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tech-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.tech-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ============================================ Contact */

.contact-section {
  text-align: center;
}

.contact-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 60px 40px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(96,165,250,0.05));
  border: 1px solid rgba(139,92,246,0.25);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.2), transparent 70%);
  pointer-events: none;
}

.contact-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-600), var(--blue-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px var(--purple-glow);
}

.contact-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-role {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(124,58,237,0.4);
}

.contact-email-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.6);
}

/* ============================================ Footer */

footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--purple-500), var(--blue-400));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.footer-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}

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

/* ============================================ Reveal animations */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================ Keyframes */

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.3); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ============================================ Responsive */

@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }

  .what-grid   { grid-template-columns: 1fr; gap: 40px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .how-grid    { grid-template-columns: 1fr 1fr; }
  .how-grid::before { display: none; }
  .roles-grid  { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
  section { padding: 70px 20px; }
  .hero { padding: 100px 20px 60px; }
  .features-grid { grid-template-columns: 1fr; }
  .roles-grid  { grid-template-columns: 1fr 1fr; }
  .how-grid    { grid-template-columns: 1fr; }
  .what-stats  { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
