/* ============================================
   Skyfolder - Global Styles
   Dark theme, modern SaaS marketing site
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-bg: #0a0a0f;
  --color-bg-alt: #101018;
  --color-surface: #16161f;
  --color-surface-hover: #1e1e2a;
  --color-border: #2a2a3a;
  --color-text: #e4e4ec;
  --color-text-muted: #8888a0;
  --color-text-dim: #5a5a72;
  --color-primary: #6c5ce7;
  --color-primary-light: #a29bfe;
  --color-primary-glow: rgba(108, 92, 231, 0.3);
  --color-accent: #00cec9;
  --color-accent-glow: rgba(0, 206, 201, 0.3);
  --color-orbit: #fd79a8;
  --color-orbit-glow: rgba(253, 121, 168, 0.25);
  --color-video: #fdcb6e;
  --color-ai: #55efc4;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 40px var(--color-primary-glow);
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 600ms ease;
  --max-width: 1200px;
  --header-height: 72px;
}

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

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

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

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

p {
  color: var(--color-text-muted);
  max-width: 65ch;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header p {
  margin: 16px auto 0;
  font-size: 1.125rem;
}

/* --- Animated Background --- */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 92, 231, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 92, 231, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb--1 {
  width: 500px;
  height: 500px;
  background: var(--color-primary);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.bg-orb--2 {
  width: 400px;
  height: 400px;
  background: var(--color-accent);
  top: 40%;
  right: -10%;
  animation-delay: -7s;
  animation-duration: 25s;
}

.bg-orb--3 {
  width: 350px;
  height: 350px;
  background: var(--color-orbit);
  bottom: -5%;
  left: 30%;
  animation-delay: -14s;
  animation-duration: 22s;
}

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

/* Particle canvas */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Header / Nav --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.header.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--color-border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
}

.logo svg {
  width: 32px;
  height: 32px;
}

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

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 20px var(--color-primary-glow);
}

.btn-primary:hover {
  background: #7c6cf0;
  color: #fff;
  box-shadow: 0 0 30px var(--color-primary-glow);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-text-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary-light);
  padding: 8px 0;
}

.btn-ghost:hover {
  color: var(--color-accent);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

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

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.card-icon--purple { background: rgba(108, 92, 231, 0.15); color: var(--color-primary-light); }
.card-icon--teal { background: rgba(0, 206, 201, 0.15); color: var(--color-accent); }
.card-icon--pink { background: rgba(253, 121, 168, 0.15); color: var(--color-orbit); }
.card-icon--yellow { background: rgba(253, 203, 110, 0.15); color: var(--color-video); }
.card-icon--green { background: rgba(85, 239, 196, 0.15); color: var(--color-ai); }

.card h3 {
  margin-bottom: 12px;
}

.card p {
  font-size: 0.95rem;
}

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

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding-top: var(--header-height);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

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

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

.hero h1 {
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin: 0 auto 36px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Stats Row --- */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-top: 4px;
}

/* --- Feature Blocks --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.feature-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 206, 201, 0.05));
}

.feature-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.feature-tag--orbit {
  background: rgba(253, 121, 168, 0.15);
  color: var(--color-orbit);
}

.feature-tag--video,
.feature-tag--prism {
  background: rgba(253, 203, 110, 0.15);
  color: var(--color-video);
}

.feature-tag--ai {
  background: rgba(85, 239, 196, 0.15);
  color: var(--color-ai);
}

.feature-text h2 {
  margin-bottom: 16px;
}

.feature-text p {
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 28px;
}

.feature-list li {
  padding: 6px 0;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

/* --- Mock UI Elements (for visuals) --- */
.mock-dashboard {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.mock-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--color-border);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.mock-bar-fill {
  height: 100%;
  border-radius: 4px;
  animation: barGrow 2s ease-out forwards;
}

@keyframes barGrow {
  from { width: 0; }
}

.mock-bar-fill--1 { width: 85%; background: var(--color-primary); }
.mock-bar-fill--2 { width: 62%; background: var(--color-accent); }
.mock-bar-fill--3 { width: 74%; background: var(--color-orbit); }
.mock-bar-fill--4 { width: 50%; background: var(--color-video); }

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  margin-top: 20px;
}

.mock-chart-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  animation: chartBarGrow 1.5s ease-out forwards;
  transform-origin: bottom;
}

@keyframes chartBarGrow {
  from { transform: scaleY(0); }
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.cta-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 64px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-orbit));
}

.cta-box h2 {
  margin-bottom: 16px;
}

.cta-box p {
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 36px;
  transition: all var(--transition-base);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.pricing-card.featured::before {
  content: 'Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-card h3 {
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 16px 0;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.pricing-features {
  list-style: none;
  margin: 24px 0;
}

.pricing-features li {
  padding: 8px 0;
  color: var(--color-text-muted);
  font-size: 0.925rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(42, 42, 58, 0.5);
}

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

.pricing-features .check {
  color: var(--color-accent);
  font-weight: 700;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 64px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-dim);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-dim);
}

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

.footer-bottom-links a {
  color: var(--color-text-dim);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Page Banner --- */
.page-banner {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-banner h1 {
  margin-bottom: 16px;
}

.page-banner p {
  font-size: 1.15rem;
  margin: 0 auto;
}

/* --- Contact Form --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

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

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-bg);
}

.timeline-item h3 {
  margin-bottom: 4px;
}

.timeline-item .year {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  margin-bottom: 8px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
  }

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

  .nav-toggle {
    display: flex;
  }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.reverse { direction: ltr; }
  .stats-row { flex-wrap: wrap; gap: 32px; }
  .hero-content { padding: 0 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .cta-box { padding: 40px 24px; }

  .section {
    padding: 64px 0;
  }
}
