/* ============================================
   FRAMEX — DESIGN SYSTEM
   ============================================ */

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

:root {
  --bg:          #06060f;
  --bg-card:     #0d0d1f;
  --bg-card2:    #111128;
  --border:      rgba(255,255,255,0.07);
  --border-glow: rgba(168,85,247,0.3);
  --purple:      #a855f7;
  --blue:        #3b82f6;
  --indigo:      #6366f1;
  --text:        #f0f0ff;
  --text-muted:  #8888aa;
  --text-dim:    #555577;
  --radius:      16px;
  --radius-lg:   24px;
  --radius-pill: 999px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 3px; }

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

.gradient-text {
  background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--purple);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

.hidden { display: none !important; }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(6,6,15,0.85);
  backdrop-filter: blur(20px);
  border-color: var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 8px 20px;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-pill);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.nav-cta:hover {
  background: rgba(168,85,247,0.12);
  border-color: var(--purple);
  box-shadow: 0 0 20px rgba(168,85,247,0.2);
}

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 4px 30px rgba(168,85,247,0.35);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #c084fc 0%, #60a5fa 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(168,85,247,0.5); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary span, .btn-primary svg { position: relative; z-index: 1; }
.btn-arrow { width: 16px; height: 16px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

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

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168,85,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.glow-1 {
  width: 600px; height: 600px;
  background: rgba(168,85,247,0.18);
  top: -100px; left: -100px;
  animation: glowDrift 8s ease-in-out infinite alternate;
}
.glow-2 {
  width: 500px; height: 500px;
  background: rgba(59,130,246,0.15);
  bottom: -100px; right: 0;
  animation: glowDrift 10s ease-in-out infinite alternate-reverse;
}
@keyframes glowDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.1); }
}

.hero-content {
  max-width: 580px;
  position: relative;
  z-index: 2;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glow);
  background: rgba(168,85,247,0.08);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--purple);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  animation: fadeSlideUp 0.6s ease both;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--purple);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168,85,247,0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(168,85,247,0); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeSlideUp 0.6s 0.1s ease both;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 36px;
  animation: fadeSlideUp 0.6s 0.2s ease both;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeSlideUp 0.6s 0.3s ease both;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  animation: fadeSlideUp 0.6s 0.4s ease both;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.72rem; color: var(--text-dim); font-weight: 500; letter-spacing: 0.03em; }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* ---- PHONE MOCKUP ---- */
.phone-mockup {
  position: absolute;
  right: max(48px, calc(50% - 540px));
  top: 50%;
  transform: translateY(-48%) rotate(4deg);
  z-index: 2;
  animation: floatPhone 6s ease-in-out infinite;
}
@keyframes floatPhone {
  0%, 100% { transform: translateY(-48%) rotate(4deg); }
  50%       { transform: translateY(-52%) rotate(4deg); }
}

.phone-frame {
  width: 260px;
  background: #111;
  border-radius: 36px;
  padding: 10px;
  border: 1.5px solid rgba(255,255,255,0.12);
  box-shadow:
    0 40px 100px rgba(0,0,0,0.8),
    0 0 60px rgba(168,85,247,0.25),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}
.phone-screen {
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9/19;
  position: relative;
}
.cam-ui {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #070714 0%, #0a0a24 100%);
  display: flex;
  flex-direction: column;
  position: relative;
}
.cam-top-bar {
  display: flex;
  gap: 5px;
  padding: 10px 12px 0;
}
.cam-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}
.cam-dot.red    { background: #ff5f57; }
.cam-dot.yellow { background: #febc2e; }
.cam-dot.green  { background: #28c840; }

.cam-scene {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Skeleton SVG */
.pose-skeleton {
  width: 65%;
  height: auto;
  overflow: visible;
}
.sk-line {
  stroke: rgba(139,92,246,0.9);
  stroke-width: 1.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(139,92,246,0.7));
  animation: skPulse 3s ease-in-out infinite;
}
.sk-node {
  fill: none;
  stroke: #a78bfa;
  stroke-width: 1.8;
  filter: drop-shadow(0 0 5px rgba(167,139,250,0.9));
  animation: skPulse 3s ease-in-out infinite;
}
@keyframes skPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* AI chips */
.ai-chip {
  position: absolute;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  animation: chipBounce 4s ease-in-out infinite;
}
.chip-left {
  left: 8px; top: 28%;
  background: rgba(34,197,94,0.2);
  border: 1px solid rgba(34,197,94,0.4);
  color: #4ade80;
  animation-delay: 0s;
}
.chip-right {
  right: 8px; top: 55%;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.3);
  color: #fbbf24;
  animation-delay: 1s;
}
@keyframes chipBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* Corner brackets */
.corner {
  position: absolute;
  width: 14px; height: 14px;
  border-color: var(--purple);
  border-style: solid;
  opacity: 0.7;
}
.corner.tl { top: 10px; left: 10px; border-width: 1.5px 0 0 1.5px; border-top-left-radius: 3px; }
.corner.tr { top: 10px; right: 10px; border-width: 1.5px 1.5px 0 0; border-top-right-radius: 3px; }
.corner.bl { bottom: 36px; left: 10px; border-width: 0 0 1.5px 1.5px; border-bottom-left-radius: 3px; }
.corner.br { bottom: 36px; right: 10px; border-width: 0 1.5px 1.5px 0; border-bottom-right-radius: 3px; }

/* Capture ring */
.capture-ring {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
}
.capture-ring-inner {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  transition: transform 0.2s;
}

/* ============================================
   PROBLEM SECTION
   ============================================ */
.problem-section {
  padding: 120px 0;
  position: relative;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}
.problem-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(168,85,247,0.1);
}
.prob-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.problem-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.problem-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-section {
  padding: 120px 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(99,102,241,0.06), transparent);
}

.steps-list { display: flex; flex-direction: column; gap: 0; }

.step {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  border-radius: var(--radius);
  padding-left: 8px;
}
.step:last-child { border-bottom: none; }
.step:hover { background: rgba(255,255,255,0.02); }

.step-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  min-width: 36px;
  padding-top: 4px;
}
.step-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.step-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
}

/* ============================================
   FEATURES
   ============================================ */
.features-section { padding: 120px 0; }

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}
.feature-card.large { grid-column: span 2; }
.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(168,85,247,0.1);
}

.feat-icon-wrap {
  width: 48px; height: 48px;
  margin-bottom: 20px;
}
.feat-icon-wrap svg { width: 100%; height: 100%; }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   USE CASES
   ============================================ */
.usecases-section {
  padding: 120px 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(59,130,246,0.05), transparent);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.usecase-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}
.usecase-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(168,85,247,0.12);
}
.uc-emoji { font-size: 2.2rem; margin-bottom: 16px; }
.usecase-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.usecase-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   WAITLIST
   ============================================ */
.waitlist-section {
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
}
.waitlist-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(168,85,247,0.1), transparent);
  pointer-events: none;
}

.waitlist-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 60px 56px;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.5),
    0 0 0 1px rgba(168,85,247,0.1) inset;
}
.waitlist-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(59,130,246,0.15), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.waitlist-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.waitlist-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 40px;
}

/* Form */
.waitlist-form { display: flex; flex-direction: column; gap: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}
.input-wrap.full { grid-column: span 2; }

.input-wrap input,
.input-wrap select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
}
.input-wrap select { cursor: pointer; }
.input-wrap select option { background: #111128; color: var(--text); }

.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--purple);
  background: rgba(168,85,247,0.06);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}
.input-wrap input::placeholder { color: var(--text-dim); }
.input-wrap label {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 6px;
  padding-left: 4px;
  display: none;
}

/* Validation states */
.input-wrap.error input { border-color: #ef4444; }
.input-wrap.error label { display: block; color: #f87171; }
.input-wrap.error label::before { content: '⚠ '; }

.submit-btn {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 1rem;
}
.form-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success state */
.success-state {
  text-align: center;
  padding: 20px 0;
}
.success-icon { font-size: 3.5rem; margin-bottom: 16px; animation: bounceIn 0.5s ease; }
@keyframes bounceIn {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.success-state h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.success-state p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 28px; }
.success-share p { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 12px; }

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--border-glow);
  background: rgba(168,85,247,0.08);
  color: var(--purple);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.share-btn:hover { background: rgba(168,85,247,0.18); box-shadow: 0 0 20px rgba(168,85,247,0.2); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-copy { font-size: 0.8rem; color: var(--text-dim); }
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--purple); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Intersection observer reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding-top: 110px; }
  .phone-mockup {
    position: relative;
    right: auto; top: auto;
    transform: none;
    margin: 40px auto 0;
    animation: floatPhone 6s ease-in-out infinite;
  }
  @keyframes floatPhone {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50%       { transform: rotate(0deg) translateY(-10px); }
  }
  .hero-cta-group { justify-content: center; }
  .hero-stats { justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card.large { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .input-wrap.full { grid-column: span 1; }
  .waitlist-card { padding: 40px 28px; }
}

@media (max-width: 600px) {
  .phone-frame { width: 200px; }
  .section-title { margin-bottom: 36px; }
  .problem-grid { grid-template-columns: 1fr; }
  .usecases-grid { grid-template-columns: 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
}
