/* ==========================================================================
   00. RESET & BASE VARIABLE CONFIGURATIONS (LIGHT MODE)
   ========================================================================== */
:root {
  /* Color Palette - Premium Light Slate */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: rgba(15, 23, 42, 0.08);
  --border-hover: rgba(15, 23, 42, 0.15);
  
  /* Layer Theme Colors */
  --color-blue: #2563eb;
  --color-green: #16a34a;
  --color-orange: #ea580c;
  --color-purple: #7c3aed;
  --color-pink: #db2777;
  --color-teal: #0d9488;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Utilities */
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   01. REUSABLE SECTION HEADERS & COMPONENTS
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-blue);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1rem;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Global Button Styles */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--text-main);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(15, 23, 42, 0.04);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Scroll Animation Utilities */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   02. HERO GATEWAY LAYER
   ========================================================================== */
.hero-gateway {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.03) 0%, var(--bg-main) 70%);
}

#ecosystemCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 2;
}

.hero-container {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.hero-gateway h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.hero-sub {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: #1e293b;
  max-width: 800px;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 3rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   03. OVERVIEW & MANDATE LAYERS
   ========================================================================== */
.overview-section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border-color);
}

.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  display: flex;
  gap: 2.5rem;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
}

.overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.08);
}

.overview-icon {
  font-size: 3rem;
  color: var(--color-blue);
  background: rgba(37, 99, 235, 0.06);
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  flex-shrink: 0;
}

.overview-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.overview-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ==========================================================================
   04. ARCHITECTURE LAYER (5 CORES)
   ========================================================================== */
.architecture-section {
  padding: 8rem 0;
  background: radial-gradient(ellipse at bottom, rgba(37, 99, 235, 0.02) 0%, transparent 70%);
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.stack-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.stack-card:hover {
  transform: translateY(-5px);
  background-color: var(--bg-card);
  border-color: var(--border-hover);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
}

.layer-top {
  font-size: 0.875rem;
  font-weight: 800;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  margin-bottom: 2rem;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Layer Theme Dynamic Mappings */
.layer-top.blue { background: rgba(37, 99, 235, 0.1); color: var(--color-blue); }
.layer-top.green { background: rgba(22, 163, 74, 0.1); color: var(--color-green); }
.layer-top.orange { background: rgba(234, 88, 12, 0.1); color: var(--color-orange); }
.layer-top.purple { background: rgba(124, 58, 237, 0.1); color: var(--color-purple); }
.layer-top.pink { background: rgba(219, 39, 119, 0.1); color: var(--color-pink); }

.stack-card:hover .layer-top.blue { background: var(--color-blue); color: #ffffff; }
.stack-card:hover .layer-top.green { background: var(--color-green); color: #ffffff; }
.stack-card:hover .layer-top.orange { background: var(--color-orange); color: #ffffff; }
.stack-card:hover .layer-top.purple { background: var(--color-purple); color: #ffffff; }
.stack-card:hover .layer-top.pink { background: var(--color-pink); color: #ffffff; }

.stack-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.stack-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.tag-cloud span {
  font-size: 0.8rem;
  font-weight: 500;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   05. VISITOR TARGETED PORTALS MAPPING
   ========================================================================== */
.benefits-section {
  padding: 8rem 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.benefit-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.benefit-card:hover {
  border-color: var(--border-hover);
  background-color: #f8fafc;
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.06);
}

.benefit-icon {
  font-size: 1.75rem;
  color: var(--color-blue);
  background: rgba(37, 99, 235, 0.06);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.benefit-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.benefit-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ==========================================================================
   06. WORKFLOW SEQUENCE LAYER
   ========================================================================== */
.workflow-section {
  padding: 8rem 0;
  background-color: rgba(15, 23, 42, 0.01);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.workflow-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.flow-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  border-radius: 16px;
  text-align: center;
  flex: 1;
  min-width: 170px;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.flow-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.05);
}

.flow-number {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-blue);
  background: rgba(37, 99, 235, 0.08);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.flow-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.flow-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.flow-arrow {
  font-size: 1.25rem;
  color: rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   07. CALL TO ACTION (CTA) LAYER
   ========================================================================== */
.cta-section {
  padding: 4rem 0 10rem 0;
}

.cta-box {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 1.5rem 0;
  color: var(--text-main);
}

.cta-box p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

.cta-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   08. ADAPTIVE MEDIA QUERY BREAKPOINTS
   ========================================================================== */
@media (max-width: 1100px) {
  .workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
  }
  .flow-arrow {
    display: none; /* Hides horizontal inline icons on multi-row wraps */
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .section-header {
    margin-bottom: 3rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .overview-card {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
  
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .cta-box {
    padding: 4rem 1.5rem;
  }
}