/* ============================================================
   Vector Foundry Landing Page
   ============================================================ */

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

:root {
  --primary: #ea580c;
  --primary-hover: #f97316;
  --primary-dark: #c2410c;
  --primary-glow: rgba(234, 88, 12, 0.15);
  --primary-a20: rgba(234, 88, 12, 0.2);
  --primary-a30: rgba(234, 88, 12, 0.3);
  --primary-a50: rgba(234, 88, 12, 0.5);

  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1e1e1e;

  --text: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;

  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

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

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

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
.accent {
  color: var(--primary);
}

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

.section-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-a20);
  border: 1px solid var(--primary-a30);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(234, 88, 12, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-hover);
  padding: 12px 24px;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: all 0.3s ease;
}

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

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

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

.nav-logo-icon {
  width: 32px;
  height: 32px;
}

.nav-logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

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

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.3s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0 8px;
  max-width: 1200px;
  margin: 0 auto;
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-mobile-toggle {
    display: flex;
  }
}

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

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

.hero-bg canvas {
  width: 100%;
  height: 100%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(transparent, var(--bg));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 400px;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-a20);
  border: 1px solid var(--primary-a30);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.hero-formats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.format-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}

.format-tag-output {
  color: var(--primary);
  border-color: var(--primary-a30);
  background: var(--primary-a20);
}

.hero-visual {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

/* --- App Preview Window --- */
.preview-window {
  background: #1a1a1a;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-hover);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 120px rgba(234, 88, 12, 0.06);
  width: 100%;
  max-width: 540px;
  animation: float 6s ease-in-out infinite;
}

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

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #111;
  border-bottom: 1px solid var(--border);
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.preview-dots span:nth-child(1) { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #ffbd2e; }
.preview-dots span:nth-child(3) { background: #28c840; }

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

.preview-body {
  padding: 16px;
  display: flex;
  gap: 12px;
  min-height: 300px;
}

.preview-layers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 64px;
  flex-shrink: 0;
}

.preview-layer {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.preview-layer.active {
  border-color: var(--primary-a50);
  background: var(--primary-a20);
}

.layer-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  margin-bottom: 4px;
}

.layer-original {
  background: linear-gradient(135deg, #4a6741 0%, #7a9b6e 30%, #c4a265 60%, #8b6914 100%);
}

.layer-processed {
  background: linear-gradient(135deg, #5a7751 0%, #8aab7e 30%, #d4b275 60%, #9b7924 100%);
  filter: contrast(1.1) saturate(1.2);
}

.layer-segments {
  background: linear-gradient(135deg, #5b8a4e 0%, #5b8a4e 25%, #d4a843 25%, #d4a843 50%, #8b6b2a 50%, #8b6b2a 75%, #3d6b34 75%);
}

.layer-vector {
  background: linear-gradient(135deg, #5b8a4e 0%, #5b8a4e 33%, #d4a843 33%, #d4a843 66%, #8b6b2a 66%);
  filter: saturate(1.3);
}

.layer-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.preview-layer.active .layer-label {
  color: var(--primary);
}

.preview-canvas {
  flex: 1;
  background: #0d0d0d;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-canvas-image {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #4a6741 0%, #7a9b6e 30%, #c4a265 60%, #8b6914 100%);
  transition: all 0.8s ease;
}

.preview-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.05);
}

.preview-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0%;
  animation: progress 2.5s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 100%; }
  51% { width: 0%; opacity: 0; }
  52% { opacity: 1; }
  100% { width: 0%; }
}

.preview-sidebar {
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.sidebar-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.sidebar-slider {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.sidebar-slider-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s;
}

/* --- Social Proof --- */
.social-proof {
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.social-proof-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.proof-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.proof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.proof-number {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.proof-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* --- Features --- */
.features {
  padding: 120px 24px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
}

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

.feature-card-large {
  grid-column: span 3;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 0 24px;
  padding: 40px;
}

.feature-card-large .feature-icon-wrap {
  grid-row: 1 / 3;
}

.feature-card-large .feature-layers-demo {
  grid-column: 1 / -1;
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-a20);
  border: 1px solid var(--primary-a30);
  border-radius: var(--radius-md);
  color: var(--primary);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

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

.feature-layers-demo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.demo-layer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.demo-arrow {
  color: var(--text-muted);
  font-size: 16px;
}

/* --- How It Works --- */
.how-it-works {
  padding: 120px 24px;
  background: var(--bg-elevated);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  flex: 1;
  max-width: 320px;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-a20);
  border: 2px solid var(--primary-a50);
  border-radius: 50%;
  margin: 0 auto 24px;
}

.step-visual {
  margin-bottom: 24px;
}

.step-icon-large {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  margin: 0 auto;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 280px;
  margin: 0 auto;
}

.step-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 56px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.connector-arrow {
  opacity: 0.3;
}

/* --- App Showcase --- */
.app-showcase {
  padding: 120px 24px;
}

.showcase-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.showcase-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.showcase-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.showcase-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-a20);
  border-radius: var(--radius-sm);
  color: var(--primary);
  flex-shrink: 0;
}

.showcase-item-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.showcase-item-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* --- Pricing --- */
.pricing {
  padding: 120px 24px;
  background: var(--bg-elevated);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 740px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  position: relative;
  transition: all 0.3s;
}

.pricing-card:hover {
  border-color: var(--border-hover);
}

.pricing-card-pro {
  border-color: var(--primary-a50);
  background: linear-gradient(to bottom, rgba(234, 88, 12, 0.05), var(--bg-card));
}

.pricing-card-pro:hover {
  border-color: var(--primary);
}

.pricing-card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
  background: var(--primary);
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-card-header {
  margin-bottom: 32px;
}

.pricing-plan {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-amount {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.pricing-period {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-features li svg {
  flex-shrink: 0;
}

.feature-highlight {
  color: var(--text) !important;
}

/* --- Final CTA --- */
.final-cta {
  padding: 120px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(234, 88, 12, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  position: relative;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  position: relative;
}

.final-cta .btn {
  position: relative;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 280px;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

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

.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; }
.fade-up-delay-2 { animation-delay: 0.2s; }
.fade-up-delay-3 { animation-delay: 0.3s; }
.fade-up-delay-4 { animation-delay: 0.4s; }

/* --- Scroll animations --- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hero-text {
    min-width: 0;
    max-width: none;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 80px;
  }

  .preview-window {
    max-width: 480px;
    margin: 0 auto;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card-large {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .hero-visual {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card-large {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .feature-card-large .feature-icon-wrap {
    grid-row: auto;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .step-connector {
    padding-top: 0;
    transform: rotate(90deg);
  }

  .showcase-features {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .proof-stats {
    gap: 24px;
  }

  .proof-divider {
    display: none;
  }

  .preview-body {
    flex-direction: column;
  }

  .preview-layers {
    flex-direction: row;
    width: 100%;
  }

  .preview-layer {
    flex: 1;
  }

  .preview-sidebar {
    width: 100%;
    flex-direction: row;
  }

  .sidebar-control {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }

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

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

  .feature-layers-demo {
    flex-direction: column;
    align-items: flex-start;
  }

  .demo-arrow {
    transform: rotate(90deg);
    align-self: center;
  }
}
