@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ==============================================
   CSS RESET & BASE
   ============================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #334155;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: 'Inter', sans-serif; }

/* ==============================================
   VARIABLES (Adapted for Cloudloop)
   ============================================== */
:root {
  --white: #FFFFFF;
  --bg-alt: #F8FAFF;
  --bg-card: #F1F5F9;
  
  /* Primary Brand Color: Indigo / Blue */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --secondary: #6366f1;
  --blue-soft: rgba(79, 70, 229, 0.08);
  --blue-soft2: rgba(79, 70, 229, 0.12);
  
  --border: #E2E8F0;
  --heading: #0F172A;
  --body: #334155;
  --muted: #64748B;

  --hero-grad: linear-gradient(160deg, #eef2ff 0%, #F8FAFF 45%, #FFFFFF 100%);
  --btn-grad: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.1);
  --shadow-blue: 0 8px 32px rgba(79, 70, 229, 0.25);

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

/* ==============================================
   LAYOUT & TYPOGRAPHY
   ============================================== */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

.label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.h1 {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  color: var(--heading);
}

.h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.2px;
  color: var(--heading);
}

.subhead {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 400;
  max-width: 520px;
}

.grad-text {
  background: linear-gradient(90deg, var(--primary) 0%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==============================================
   BUTTONS
   ============================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: none;
  transition: all .22s cubic-bezier(.4, 0, .2, 1);
}

.btn-primary {
  background: var(--btn-grad);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--blue-soft);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--body);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--heading);
}

/* ==============================================
   BADGES & ANIMATIONS
   ============================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-blue { background: var(--blue-soft); color: var(--primary); border: 1px solid rgba(79, 70, 229, 0.2); }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ==============================================
   NAVBAR
   ============================================== */
#navbar {
  position: fixed;
  top: 0; width: 100%; z-index: 1000;
  padding: 16px 0;
  transition: all .3s ease;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border), var(--shadow-xs);
  padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 18px; font-weight: 800; color: var(--heading); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); transition: .2s; }
.nav-links a:hover { color: var(--heading); }
.nav-actions { display: flex; gap: 10px; }

/* ==============================================
   HERO SECTION
   ============================================== */
.hero {
  padding: 140px 0 80px;
  background: var(--hero-grad);
  position: relative;
  overflow: hidden;
}

/* Background Blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  animation: blobFloat 8s ease-in-out infinite;
}
.hero-blob-1 { width: 500px; height: 500px; background: rgba(79, 70, 229, 0.15); top: -150px; right: -100px; }
.hero-blob-2 { width: 350px; height: 350px; background: rgba(99, 102, 241, 0.1); bottom: -100px; left: -80px; animation-delay: -2s; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.05); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
  position: relative;
  z-index: 10;
}

.hero-mockup {
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: #fff;
  overflow: hidden;
  animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-card {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px;
  animation: cardFloat 5s ease-in-out infinite;
}
.hero-card-left { left: -30px; bottom: 80px; animation-delay: -.5s; }
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hcard-icon { width: 34px; height: 34px; background: var(--blue-soft); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.hcard-label { font-size: 11px; color: var(--muted); font-weight: 500; }
.hcard-value { font-size: 14px; font-weight: 700; color: var(--heading); }

/* ==============================================
   FEATURES GRID
   ============================================== */
.features-section { padding: 100px 0; background: #fff; }
.section-head { text-align: center; max-width: 600px; margin: 0 auto 60px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.feat-card {
  padding: 32px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: #fff;
  transition: all .25s ease;
  position: relative;
}
.feat-card::before {
  content: ''; position: absolute; top:0; left:0; width: 100%; height: 2px; background: var(--btn-grad);
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.feat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #CBD5E1; }
.feat-card:hover::before { transform: scaleX(1); }
.feat-icon {
  width: 48px; height: 48px; border-radius: var(--r-md); background: var(--blue-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 20px;
}

/* ==============================================
   HOW IT WORKS
   ============================================== */
.hiw-section { padding: 100px 0; background: var(--bg-alt); }
.hiw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.hiw-step {
  background: #fff; padding: 40px; border-radius: var(--r-lg); border: 1px solid var(--border);
}
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 20px; }

/* ==============================================
   FOOTER
   ============================================== */
footer { padding: 60px 0 20px; border-top: 1px solid var(--border); background: #fff; }
.footer-grid { display: flex; justify-content: space-between; margin-bottom: 40px; }
.footer-brand { max-width: 300px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 15px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero .subhead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-card { display: none; }
  .hiw-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
