/* ── MoatSquare Modern Design System ─────────────────────────────── */

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

:root {
  /* ── Color Palette (HEX) ── */
  --primary: #2563EB;
  --secondary: #3B82F6;
  --navy: #0D1B2E;
  --slate: #64748B;
  --light: #F8FAFC;
  --white: #ffffff;
  
  --bg-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  --navy-gradient: linear-gradient(135deg, #0D1B2E 0%, #1a2b4a 100%);
  
  /* ── Typography ── */
  --font-main: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-heading: 'Nunito', 'Arial Rounded MT Bold', system-ui, sans-serif;
  
  /* ── Spacing ── */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  
  /* ── Effects ── */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
  --glass: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* ── Transitions ── */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--white);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.01em;
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ── Typography Scale ── */
h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { font-size: 1.125rem; color: var(--slate); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition-base);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.btn-primary {
  background-color: var(--primary); /* Fallback */
  background: var(--bg-gradient);
  color: var(--white) !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ── Glass Cards ── */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
}

/* ── Animations ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

[data-reveal].active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

@keyframes stack-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes connect-path {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

@keyframes draw-path {
  to { stroke-dashoffset: 0; }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
  0% { filter: drop-shadow(0 0 5px var(--primary)); }
  50% { filter: drop-shadow(0 0 20px var(--primary)); }
  100% { filter: drop-shadow(0 0 5px var(--primary)); }
}

.svg-animate-stack g { animation: stack-in 0.8s ease-out forwards; opacity: 0; }
.svg-animate-stack g:nth-child(1) { animation-delay: 0.2s; }
.svg-animate-stack g:nth-child(2) { animation-delay: 0.4s; }
.svg-animate-stack g:nth-child(3) { animation-delay: 0.6s; }
.svg-animate-stack g:nth-child(4) { animation-delay: 0.8s; }

.svg-animate-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: connect-path 3s ease-in-out infinite; }
.svg-animate-rotate { transform-origin: center; animation: rotate-slow 20s linear infinite; }
.svg-animate-pulse { animation: pulse-glow 3s ease-in-out infinite; }

/* ── Utilities ── */
.text-gradient {
  color: var(--primary); /* Fallback */
  background: var(--bg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-padding {
  padding: var(--space-xl) 0;
}

.label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.bg-navy { background-color: var(--navy); }
.bg-navy-gradient { 
  background-color: var(--navy); /* Fallback */
  background: var(--navy-gradient); 
}
.bg-light { background-color: var(--light); }
.text-white { color: var(--white) !important; }
.text-primary { color: var(--primary) !important; }
.text-center { text-align: center; }
.w-full { width: 100%; }

.svg-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.svg-icon path {
  transition: stroke-dashoffset 0.6s ease;
}

.numbered-card:hover .svg-icon path {
  stroke-dashoffset: 0;
}

/* ── Layout Utilities ── */
.sticky-col {
  position: sticky;
  top: 120px;
  align-self: start;
}

@media (max-width: 1024px) {
  .sticky-col {
    position: static;
  }
}

/* ── Editorial & Legal ── */
.legal-body {
  max-width: 800px;
  margin: 0 auto;
  color: var(--navy);
  line-height: 1.8;
}

.legal-body h2 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--navy);
}

.legal-body h3 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--navy);
}

.legal-body ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
}

.insight-image-wrap {
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--light);
}

.insight-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.insight-card:hover .insight-image-wrap img {
  transform: scale(1.05);
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.author-info h4 {
  font-size: 0.875rem;
  margin: 0;
  color: var(--navy);
}

.author-info p {
  font-size: 0.75rem;
  margin: 0;
  color: var(--slate);
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 0.875rem;
  overflow: hidden;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── TOC Styles ── */
.toc-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.03);
  position: sticky;
  top: 120px;
}

.toc-card h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 0.5rem;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-item {
  margin-bottom: 0.75rem;
}

.toc-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate);
  display: block;
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
  padding-left: 0;
}

.toc-link:hover {
  color: var(--primary);
  padding-left: 8px;
}

.toc-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  padding-left: 12px;
}
.asymmetric-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: center;
}

.image-collage {
  position: relative;
  height: 500px;
}

.collage-img {
  position: absolute;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-slow);
}

.collage-img:hover {
  transform: scale(1.05) translateY(-10px);
  z-index: 10;
}

.collage-img-1 { width: 70%; top: 0; left: 0; }
.collage-img-2 { width: 60%; bottom: 0; right: 0; }

.decorative-num {
  font-size: 8rem;
  font-weight: 900;
  line-height: 0.8;
  opacity: 0.05;
  position: absolute;
  top: -2rem;
  left: -1rem;
  color: var(--navy);
  pointer-events: none;
}

.numbered-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.numbered-card:hover {
  border-color: var(--primary);
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.stat-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.stat-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: circle(50% at 50% 50%);
}

.testimonial-shape {
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%, 0 10%);
  border-radius: var(--radius-lg);
}

/* ── Full Width Hero Redesign ── */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 90vh;
  align-items: center;
  overflow: hidden;
  background: var(--white);
}

.hero-content-side {
  padding-left: max(var(--space-md), calc((100vw - 1280px) / 2 + var(--space-md)));
  padding-right: var(--space-lg);
  padding-top: 2rem;
  padding-bottom: 2rem;
  z-index: 2;
}

.hero-visual-side {
  position: relative;
  height: 100%;
  width: 100%;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-left: 1px solid rgba(0,0,0,0.03);
}

.hero-visual-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
}

.hero-visual-side .svg-container {
  width: 90%;
  max-width: 600px;
  transform: scale(1.1);
}

@media (max-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .hero-content-side {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
    padding-top: 6rem;
    padding-bottom: 4rem;
    text-align: center;
  }

  .hero-content-side h1 {
    margin-inline: auto;
  }

  .hero-content-side p {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual-side {
    height: 400px;
  }
}
