/* ============================================
   InsightfulAgents.AI — Shared Design System
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500;600&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --navy-900: #050a14;
  --navy-800: #0a1222;
  --navy-700: #0d1b3e;
  --navy-600: #132752;
  --navy-500: #1a365d;
  --cyan-400: #00d4ff;
  --cyan-300: #33ddff;
  --cyan-200: #80eaff;
  --cyan-glow: rgba(0, 212, 255, 0.15);
  --cyan-glow-strong: rgba(0, 212, 255, 0.3);

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f7fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;

  /* Semantic */
  --success: #48bb78;
  --warning: #f6ad55;
  --danger: #fc8181;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 7rem);
  --container-max: 1140px;
  --container-narrow: 800px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-med: 0.4s var(--ease-out);
  --transition-slow: 0.7s var(--ease-out);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gray-300);
  background: var(--navy-900);
  overflow-x: hidden;
}

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

a {
  color: var(--cyan-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--cyan-300);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
}

h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan-400);
}

p {
  margin-bottom: 1rem;
  color: var(--gray-400);
}

.text-cyan { color: var(--cyan-400); }
.text-white { color: var(--white); }
.text-muted { color: var(--gray-500); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section--dark {
  background: var(--navy-800);
}

.section--gradient {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 50%, var(--navy-900) 100%);
}

.section--accent {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-800) 100%);
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

/* Section header pattern */
.section__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--cyan-400);
  margin-bottom: 1rem;
  padding: 0.35rem 1rem;
  background: var(--cyan-glow);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 100px;
}

.section__title {
  margin-bottom: 1.25rem;
}

.section__subtitle {
  font-size: 1.1rem;
  color: var(--gray-400);
  max-width: 620px;
  line-height: 1.8;
}

.text-center { text-align: center; }
.text-center .section__subtitle { margin: 0 auto; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background var(--transition-med), box-shadow var(--transition-med);
}

.nav.scrolled {
  background: rgba(5, 10, 20, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 212, 255, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  text-decoration: none;
}

.nav__logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav__logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan-400), #0099cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy-900);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

.nav__links a:hover {
  color: var(--white);
}

.nav__cta {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--navy-900) !important;
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-300));
  padding: 0.55rem 1.4rem;
  border-radius: 8px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast) !important;
}

.nav__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
  color: var(--navy-900) !important;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-300);
  margin: 5px 0;
  transition: var(--transition-fast);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  color: var(--navy-900);
  background: linear-gradient(135deg, var(--cyan-400), var(--cyan-300));
  box-shadow: 0 2px 12px rgba(0, 212, 255, 0.2);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 212, 255, 0.35);
  color: var(--navy-900);
}

.btn--outline {
  color: var(--cyan-400);
  background: transparent;
  border: 1.5px solid rgba(0, 212, 255, 0.3);
}

.btn--outline:hover {
  background: var(--cyan-glow);
  border-color: var(--cyan-400);
  color: var(--cyan-300);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--gray-300);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.btn--lg {
  padding: 1.05rem 2.5rem;
  font-size: 1.05rem;
}

/* --- Cards --- */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 2rem;
  transition: transform var(--transition-med), border-color var(--transition-med), box-shadow var(--transition-med);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.15);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--cyan-glow);
  border: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card__title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.card__text {
  font-size: 0.95rem;
  color: var(--gray-400);
  line-height: 1.7;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* --- Feature rows --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 3rem 0;
}

.feature-row--reverse {
  direction: rtl;
}

.feature-row--reverse > * {
  direction: ltr;
}

.feature-visual {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

.feature-visual::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, var(--cyan-glow) 0%, transparent 60%);
  pointer-events: none;
}

/* --- Stat blocks --- */
.stats {
  display: flex;
  gap: 3rem;
  padding: 2rem 0;
}

.stat__number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--cyan-400);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Dividers --- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), transparent);
  border: none;
  margin: 0;
}

/* --- Quote block --- */
.quote-block {
  border-left: 3px solid var(--cyan-400);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: var(--cyan-glow);
  border-radius: 0 12px 12px 0;
}

.quote-block p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gray-200);
  margin-bottom: 0.5rem;
}

.quote-block cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* --- Footer --- */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--navy-900);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer__brand p {
  font-size: 0.9rem;
  color: var(--gray-500);
  max-width: 300px;
  margin-top: 0.75rem;
}

.footer__links {
  display: flex;
  gap: 3rem;
}

.footer__col h5 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.footer__col ul {
  list-style: none;
}

.footer__col li {
  margin-bottom: 0.6rem;
}

.footer__col a {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.footer__col a:hover {
  color: var(--cyan-400);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--gray-600);
}

.footer__bottom a {
  color: var(--gray-500);
  margin-left: 1.5rem;
}

/* --- Glow effects --- */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.glow-orb--cyan {
  background: rgba(0, 212, 255, 0.08);
}

.glow-orb--navy {
  background: rgba(26, 54, 93, 0.4);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; gap: 2rem; }
  .feature-row--reverse { direction: ltr; }
  .stats { flex-wrap: wrap; gap: 2rem; }
  .footer__inner { flex-direction: column; }
  .footer__links { flex-direction: column; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer__bottom a { margin-left: 0; margin: 0 0.75rem; }
}

@media (max-width: 768px) {
  .nav__links { 
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 10, 20, 0.97);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.08);
  }
  .nav__links.open { display: flex; }
  .nav__toggle { display: block; }
}
