/* ============================================================
   CloseOS Landing Page
   Dark, high-contrast, no generic SaaS vibes.
   Fonts: Syne (headings) + General Sans (body)
   ============================================================ */

/* ---- Variables ---- */
:root {
  --bg-base: #050912;
  --bg-surface: #0d1526;
  --bg-card: #111d35;
  --border: rgba(0, 210, 255, 0.1);
  --border-bright: rgba(0, 210, 255, 0.3);
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --accent-glow: rgba(0, 212, 255, 0.35);
  --text-primary: #f0f4ff;
  --text-secondary: #7a8fb5;
  --text-muted: #4a5d7a;
  --success: #00e5a0;
  --error: #ff4d6d;

  --font-display: 'Syne', sans-serif;
  --font-body: 'General Sans', 'DM Sans', sans-serif;

  --radius: 12px;
  --radius-sm: 7px;
  --shadow-card: 0 0 0 1px var(--border), 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow);

  --max-w: 1100px;
  --section-pad: 100px 24px;
}

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

html { scroll-behavior: smooth; }

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

/* ---- Grid BG ---- */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 100%);
}

.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 {
  width: 600px; height: 400px;
  top: -100px; left: -100px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
}
.orb-2 {
  width: 500px; height: 400px;
  top: 200px; right: -150px;
  background: radial-gradient(circle, rgba(0, 150, 255, 0.05) 0%, transparent 70%);
}

/* ---- Layout ---- */
.container {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--section-pad); }

/* ---- Nav ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 9, 18, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text-primary); background: var(--accent-dim); }
.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--border-bright) !important;
}
.nav-cta:hover { background: var(--accent-dim) !important; }

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  text-align: center;
}
.hero-inner { max-width: 800px; margin: 0 auto; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--accent-dim);
  border: 1px solid var(--border-bright);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero h1 .highlight {
  color: var(--accent);
  position: relative;
}
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ---- Demo Visual ---- */
.demo-wrapper {
  position: relative;
  max-width: 900px;
  margin: 60px auto 0;
}
.demo-window {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.demo-dot.r { background: #ff5f57; }
.demo-dot.y { background: #febc2e; }
.demo-dot.g { background: #28c840; }
.demo-bar-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}
.demo-content {
  padding: 32px;
  min-height: 320px;
  background: var(--bg-base);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 640px) {
  .demo-content { grid-template-columns: 1fr; }
  .demo-content > *:last-child { display: none; }
}

/* Demo pipeline visualization */
.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.pipeline-card h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}
.pipeline-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.88rem;
}
.pipeline-step:last-child { border-bottom: none; }
.pipeline-step .step-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.pipeline-step .step-icon.cyan { background: var(--accent-dim); color: var(--accent); }
.pipeline-step .step-icon.green { background: rgba(0, 229, 160, 0.12); color: var(--success); }
.pipeline-step .step-icon.amber { background: rgba(255, 196, 59, 0.12); color: #ffc43b; }
.pipeline-step.done { color: var(--text-secondary); text-decoration: line-through; }
.pipeline-step.active { color: var(--text-primary); }
.pipeline-step .step-status {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 100px;
}
.pipeline-step .step-status.done { background: rgba(0,229,160,0.12); color: var(--success); }
.pipeline-step .step-status.running { background: var(--accent-dim); color: var(--accent); animation: pulse 1.5s infinite; }

/* Demo metrics */
.metrics-panel { display: flex; flex-direction: column; gap: 12px; }
.metric-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metric-label { font-size: 0.8rem; color: var(--text-muted); }
.metric-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}
.metric-value.accent { color: var(--accent); }
.metric-value.green { color: var(--success); }
.metric-bar {
  margin-top: 8px;
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
}
.metric-bar-fill { height: 100%; border-radius: 2px; }

/* ---- Waitlist Form ---- */
.waitlist-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}
.waitlist-form input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.waitlist-form input::placeholder { color: var(--text-muted); }
.waitlist-form input:focus { border-color: var(--accent); }
.waitlist-form button {
  padding: 14px 24px;
  background: var(--accent);
  color: #050912;
  border: 1px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.waitlist-form button:hover {
  background: #00e5ff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.waitlist-form button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-message {
  margin-top: 16px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 24px;
}
.form-message.success { color: var(--success); }
.form-message.error { color: var(--error); }

@media (max-width: 480px) {
  .waitlist-form { flex-direction: column; }
  .waitlist-form input { border-right: 1px solid var(--border); border-radius: var(--radius-sm); }
  .waitlist-form button { border-radius: var(--radius-sm); padding: 14px; }
}

/* ---- App Link Button ---- */
.app-link-wrap { text-align: center; margin-top: 20px; }
.app-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.app-link:hover { color: var(--text-primary); border-color: var(--border-bright); background: var(--accent-dim); }

/* ---- Value Props ---- */
.props-section { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.props-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 768px) { .props-grid { grid-template-columns: 1fr; } }

.prop-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.prop-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 24px var(--accent-dim);
}
.prop-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.prop-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.prop-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ---- CTA Section ---- */
.cta-section {
  text-align: center;
  background: var(--bg-surface);
}
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
}
.cta-orbit {
  display: inline-block;
  position: relative;
  margin-bottom: 40px;
}
.orbit-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.orbit-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.orbit-dot:nth-child(2) { top: -4px; left: 50%; }
.orbit-dot:nth-child(3) { bottom: -4px; left: 50%; }
.orbit-dot:nth-child(4) { top: 50%; left: -4px; }
.orbit-dot:nth-child(5) { top: 50%; right: -4px; }

/* ---- Footer ---- */
footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
footer a { color: var(--text-secondary); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---- Scroll animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ---- Custom scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }