/* ===================================================
   Agent Crew Systems — Dark Theme Design System
   =================================================== */

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0A0A0B;
  color: #A1A1AA;
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: #00D4FF; text-decoration: none; transition: color 200ms ease; }
a:hover { color: #33DFFF; }

ul { list-style: none; }

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

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

@media (max-width: 768px) {
  .container { padding: 0 24px; }
}

.center { text-align: center; }

/* ---------- TYPOGRAPHY ---------- */
.section-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.4);
  margin-bottom: 16px;
}

.section-headline {
  font-size: 48px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
}

.hero-headline {
  font-size: 80px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 840px;
  margin: 0 auto;
}

.hero-sub {
  font-size: 20px;
  color: #A1A1AA;
  max-width: 560px;
  margin: 28px auto 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .section-headline { font-size: 32px; margin-bottom: 48px; }
  .hero-headline { font-size: 40px; }
  .hero-sub { font-size: 18px; }
  .section-label { font-size: 12px; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
  border: none;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: #00D4FF;
  color: #0A0A0B;
  padding: 16px 32px;
  height: 52px;
  min-width: 200px;
}
.btn-primary:hover {
  background: #33DFFF;
  color: #0A0A0B;
  transform: scale(1.02);
}
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: transparent;
  color: #00D4FF;
  padding: 16px 32px;
  height: 52px;
  border: 1px solid rgba(0, 212, 255, 0.5);
}
.btn-ghost:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: #00D4FF;
  color: #00D4FF;
}

.btn-nav {
  background: transparent;
  color: #00D4FF;
  padding: 10px 20px;
  height: 40px;
  border: 1px solid #00D4FF;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.btn-large {
  font-size: 18px;
  height: 56px;
  min-width: 240px;
}

@media (max-width: 768px) {
  .btn-primary, .btn-ghost { width: 100%; min-width: unset; height: 48px; }
  .btn-large { height: 52px; min-width: unset; width: 100%; max-width: 340px; }
}

/* ---------- NAV ---------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  transition: background 300ms ease, border-color 300ms ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: #1E1E23;
}
#navbar.scrolled .btn-nav {
  background: #00D4FF;
  color: #0A0A0B;
  border-color: #00D4FF;
}

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

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}
.nav-logo:hover { color: #FFFFFF; }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: #6B6B76;
  letter-spacing: 0.01em;
  transition: color 200ms ease;
}
.nav-links a:hover { color: #FFFFFF; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 20px;
  position: relative;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #FFFFFF;
  position: absolute;
  left: 0;
  transition: all 200ms ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

@media (max-width: 768px) {
  .nav-inner { padding: 0 24px; }
  .nav-links, .nav-inner > .btn-nav { display: none; }
  .hamburger { display: block; }
  #navbar { height: 64px; }
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(10, 10, 11, 0.98);
  backdrop-filter: blur(12px);
  padding: 24px;
  display: none;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  border-bottom: 1px solid #1E1E23;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 16px;
  font-weight: 500;
  color: #A1A1AA;
  padding: 8px 0;
}
.mobile-nav a:hover { color: #FFFFFF; }

/* ---------- SECTIONS ---------- */
.section {
  padding: 140px 0;
  position: relative;
}

.section-hero {
  background: #0A0A0B;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 48px;
}

@media (max-width: 768px) {
  .section { padding: 96px 0; }
  .section-hero { padding: 100px 0 60px; }
  .hero-buttons { flex-direction: column; align-items: center; }
}

.section-shift { background: #0F0F10; }
.section-services { background: #141416; }
.section-usecases { background: #0F0F10; }
.section-process { background: #141416; }
.section-whyus { background: #0F0F10; }
.section-finalcta {
  background: #0A0A0B;
  padding: 160px 0;
  position: relative;
}

@media (max-width: 768px) {
  .section-finalcta { padding: 120px 0; }
}

/* ---------- BEFORE / AFTER ---------- */
.shift-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.shift-col {
  background: #16161A;
  border: 1px solid #242429;
  border-radius: 16px;
  padding: 40px;
}

.shift-with {
  border-color: rgba(0, 212, 255, 0.2);
  border-left: 3px solid #00D4FF;
}

.shift-header {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6B6B76;
  margin-bottom: 24px;
}
.shift-header-accent { color: #00D4FF; }

.shift-col li {
  font-size: 17px;
  line-height: 2.0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.shift-without li { color: #6B6B76; }
.shift-with li { color: #CDCDD6; }

.dash { color: #6B6B76; flex-shrink: 0; }
.check { color: #00D4FF; flex-shrink: 0; font-weight: 700; }

@media (max-width: 768px) {
  .shift-grid { grid-template-columns: 1fr; gap: 24px; }
  .shift-col { padding: 28px; }
}

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

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

@media (max-width: 1023px) {
  .cards-3 { grid-template-columns: 1fr; }
  .cards-2x2 { grid-template-columns: 1fr; }
}

.card {
  background: #16161A;
  border: 1px solid #242429;
  border-radius: 16px;
  padding: 40px;
  transition: all 300ms ease;
  position: relative;
}
.card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.06);
}

@media (max-width: 768px) {
  .card { padding: 28px; }
}

.tag {
  display: inline-block;
  background: rgba(0, 212, 255, 0.15);
  color: #00D4FF;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.card-icon {
  color: #00D4FF;
  margin-bottom: 20px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.card-desc {
  font-size: 17px;
  color: #A1A1AA;
  line-height: 1.6;
}

.card-outcome {
  font-size: 15px;
  color: #00D4FF;
  font-style: italic;
  margin-top: 20px;
}

/* Use Case card specifics */
.card-category {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #00D4FF;
  margin-bottom: 16px;
}

.card-metric {
  font-size: 32px;
  font-weight: 700;
  color: #00D4FF;
  line-height: 1.2;
  margin: 16px 0 12px;
}

.card-divider {
  width: 100%;
  height: 1px;
  background: #242429;
  margin: 24px 0 16px;
}

.card-callout {
  font-size: 14px;
  color: #6B6B76;
  font-style: italic;
}

/* Why Us cards */
.card-why .card-title { font-size: 20px; }
.card-why .card-desc { font-size: 15px; }
.card-why { padding: 32px; border-radius: 12px; }

/* Section intro (one-liner below headline) */
.section-intro {
  font-size: 18px;
  color: #CDCDD6;
  max-width: 600px;
  margin: -40px auto 64px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .section-intro { margin: -28px auto 48px; font-size: 16px; }
}

/* Trust line */
.trust-line {
  text-align: center;
  font-size: 18px;
  color: #CDCDD6;
  font-style: italic;
  margin-top: 48px;
}

/* ---------- STEPS (How It Works) ---------- */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

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

.step-number {
  font-size: 56px;
  font-weight: 700;
  color: rgba(0, 212, 255, 0.25);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 16px;
}

.step-title {
  font-size: 22px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 16px;
  color: #A1A1AA;
  line-height: 1.5;
}

.step-line {
  width: 80px;
  height: 1px;
  background: #242429;
  flex-shrink: 0;
  margin-top: 32px;
}

@media (max-width: 768px) {
  .steps { flex-direction: column; align-items: center; gap: 40px; }
  .step-line { width: 1px; height: 40px; margin-top: 0; }
  .step { max-width: 100%; }
}

/* ---------- FINAL CTA ---------- */
.finalcta-sub {
  font-size: 18px;
  color: #A1A1AA;
  max-width: 480px;
  margin: -44px auto 48px;
  line-height: 1.5;
}

.microcopy {
  font-size: 14px;
  color: #6B6B76;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .finalcta-sub { margin-top: 0; margin-bottom: 40px; font-size: 16px; }
}

/* ---------- FOOTER ---------- */
footer {
  background: #08080A;
  border-top: 1px solid #1E1E23;
  padding: 56px 0 24px;
}

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

.footer-logo {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 14px;
  color: #6B6B76;
}

.footer-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
}
.footer-nav a {
  font-size: 14px;
  color: #6B6B76;
  transition: color 200ms ease;
}
.footer-nav a:hover { color: #FFFFFF; }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-email {
  font-size: 14px;
  color: #6B6B76;
}
.footer-email:hover { color: #00D4FF; }

.footer-copy {
  text-align: center;
  font-size: 12px;
  color: #6B6B76;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .footer-nav { justify-content: center; flex-wrap: wrap; }
  .footer-right { align-items: center; }
}

/* ---------- FLOATING CTA (Desktop) ---------- */
.floating-cta {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(100%);
  width: 44px;
  height: 44px;
  background: rgba(0, 212, 255, 0.85);
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  transition: all 200ms ease;
  color: #0A0A0B;
}
.floating-cta.visible {
  transform: translateY(-50%) translateX(0);
}
.floating-cta:hover {
  opacity: 1;
  width: 48px;
}
.floating-cta:hover .floating-tooltip {
  opacity: 1;
  transform: translateX(-8px);
}

.floating-tooltip {
  position: absolute;
  right: 52px;
  background: #16161A;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 200ms ease;
  border: 1px solid #242429;
}

@media (max-width: 768px) {
  .floating-cta { display: none; }
}

/* ---------- MOBILE BOTTOM BAR ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #242429;
  padding: 6px 16px;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform 300ms ease;
}
.mobile-bar.visible {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .mobile-bar { display: flex; }
  .mobile-bar .btn { height: 44px; font-size: 15px; min-width: unset; }
  /* Add bottom padding to footer so content isn't hidden behind bar */
  footer { padding-bottom: 80px; }
}

/* ---------- EXIT-INTENT POPUP ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.popup-overlay.show {
  display: flex;
  opacity: 1;
}

.popup-modal {
  background: #1A1A1E;
  border: 1px solid #242429;
  border-radius: 16px;
  width: 480px;
  max-width: 90vw;
  padding: 48px;
  position: relative;
  transform: scale(0.95);
  transition: transform 300ms ease;
}
.popup-overlay.show .popup-modal {
  transform: scale(1);
}

.popup-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #6B6B76;
  font-size: 28px;
  cursor: pointer;
  transition: color 200ms ease;
  line-height: 1;
}
.popup-close:hover { color: #FFFFFF; }

.popup-headline {
  font-size: 28px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.popup-body {
  font-size: 17px;
  color: #A1A1AA;
  line-height: 1.6;
  margin-bottom: 32px;
}

.popup-trust {
  font-size: 14px;
  color: #6B6B76;
  text-align: center;
  margin-top: 12px;
}

.popup-dismiss {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  color: #6B6B76;
  font-size: 14px;
  cursor: pointer;
  transition: color 200ms ease;
  font-family: 'Inter', sans-serif;
}
.popup-dismiss:hover { color: #A1A1AA; }

@media (max-width: 768px) {
  .popup-overlay { display: none !important; }
}

/* ---------- SCROLL REVEAL ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Non-hero elements that animate on scroll */
.section-label,
.section-headline,
.shift-col,
.trust-line,
.finalcta-sub,
.steps {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.section-label.visible,
.section-headline.visible,
.shift-col.visible,
.trust-line.visible,
.finalcta-sub.visible,
.steps.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero elements: visible immediately, animate in on load */
.hero-headline,
.hero-sub,
.hero-buttons,
.section-hero .section-label {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 800ms ease forwards;
}
.section-hero .section-label { animation-delay: 100ms; }
.hero-headline { animation-delay: 200ms; }
.hero-sub { animation-delay: 400ms; }
.hero-buttons { animation-delay: 600ms; }

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
