/* ============================================================
   AIGP Landing Page — Light Modern Theme
   ============================================================ */

:root {
  --bg:          #ffffff;
  --bg-subtle:   #f7f8fa;
  --bg-muted:    #f0f1f4;
  --text:        #111827;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --accent:      #7C3AED;
  --accent-soft: #f3eefa;
  --accent-hover:#6D28D9;
  --border:      #e5e7eb;
  --border-light:#f3f4f6;
  --code-bg:     #1e1e2e;
  --code-text:   #cdd6f4;
  --code-key:    #89b4fa;
  --code-val:    #a6e3a1;
  --code-num:    #fab387;
  --code-comment:#6c7086;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;
  --shadow:      0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg:   0 10px 40px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:        'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.nav-logo-img {
  height: 56px;
  width: auto;
}
.logo-mark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--accent);
}
.logo-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}
.logo-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-github {
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.nav-github:hover { background: var(--bg-muted); }
.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

/* ============================================================
   Side Index
   ============================================================ */
.side-index {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  padding: 16px 0 16px 12px;
}
.side-index-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: var(--radius-lg);
  padding: 14px 18px 14px 18px;
  box-shadow: 0 4px 24px rgba(124,58,237,0.06), var(--shadow);
}
.side-index-link {
  font-size: 13.5px;
  font-weight: 500;
  color: #7e6b99;
  padding: 7px 14px 7px 14px;
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
}
.si-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.side-index-link:hover .si-icon {
  opacity: 0.85;
}
.side-index-link.active .si-icon {
  opacity: 1;
}
.side-index-link:hover {
  color: #6d49a1;
  background: rgba(124,58,237,0.05);
}
.side-index-home {
  font-weight: 600;
  color: #5b3d8f;
  margin-bottom: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(124,58,237,0.15);
  border-left: none;
}
.side-index-link.active {
  color: #7C3AED;
  font-weight: 600;
  border-left-color: #7C3AED;
  background: rgba(124,58,237,0.07);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-subtle) 100%);
}
.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  margin-bottom: 32px;
  letter-spacing: 0.2px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.3); }
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-subtle); border-color: var(--text-light); }

/* ============================================================
   Stats Bar
   ============================================================ */
.stats {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-number {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
}
.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 96px 24px;
}
.section-dark {
  background: var(--bg-subtle);
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.section-header p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================================
   Problem Section
   ============================================================ */
.callout {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  padding: 32px;
  margin: 0 auto 56px;
  max-width: 700px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.problem-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.problem-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.problem-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.problem-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.problem-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Code Showcase
   ============================================================ */
.code-showcase {
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.code-header {
  background: #181825;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.code-dots {
  display: flex;
  gap: 6px;
}
.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dots span:nth-child(1) { background: #f38ba8; }
.code-dots span:nth-child(2) { background: #f9e2af; }
.code-dots span:nth-child(3) { background: #a6e3a1; }
.code-filename {
  font-family: var(--mono);
  font-size: 12px;
  color: #6c7086;
}
.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.8;
  margin: 0;
}
.ck { color: var(--code-key); }
.cv { color: var(--code-val); }
.cn { color: var(--code-num); }
.cc { color: var(--code-comment); }

/* ============================================================
   Principles Grid
   ============================================================ */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.principle-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.principle-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.principle-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 16px;
}
.principle-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.principle-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Three Pillars
   ============================================================ */
.pillars {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}
.pillar {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}
.pillar-connector {
  display: flex;
  align-items: center;
  padding-top: 56px;
}
.pillar-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.pillar-aigp { background: var(--accent-soft); color: var(--accent); }
.pillar-otel { background: #fef3c7; color: #d97706; }
.pillar-ol { background: #dbeafe; color: #2563eb; }
.pillar h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pillar-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.pillar > p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.pillar-dest {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-muted);
  color: var(--text-muted);
}
.trace-id-bar {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px dashed var(--border);
}
.trace-id-bar code {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
}

/* ============================================================
   Event Types
   ============================================================ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.event-category {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}
.event-category h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.event-tags code {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}

/* ============================================================
   Use Cases
   ============================================================ */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.usecase-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.usecase-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.usecase-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}
.usecase-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.usecase-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.usecase-regs {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--mono);
}

/* ============================================================
   Features (v0.8.0)
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Get Started
   ============================================================ */
.getstarted-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ============================================================
   Contributing
   ============================================================ */
.contribute-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.contribute-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contribute-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.contribute-card svg {
  color: var(--accent);
}
.contribute-card h3 {
  font-size: 16px;
  font-weight: 700;
}
.contribute-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand {
  margin-bottom: 40px;
}
.footer-logo-img {
  height: 40px;
  width: auto;
  margin-bottom: 12px;
  display: block;
}
.footer-brand .logo-mark {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}
.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 400px;
}
.footer-brand a {
  color: var(--accent);
  font-weight: 500;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-light);
}
.footer-disclaimer {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-light);
  opacity: 0.7;
}

/* ============================================================
   Cryptographic Trust Section
   ============================================================ */
.trust-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.trust-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.merkle-tree-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}
.trust-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.trust-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.trust-item-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-item h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.trust-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.trust-item code {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--accent);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1280px) {
  .side-index { display: none; }
}

@media (max-width: 1024px) {
  .events-grid { grid-template-columns: repeat(3, 1fr); }
  .usecases-grid { grid-template-columns: repeat(2, 1fr); }
  .contribute-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-mobile-toggle { display: block; }

  .hero { padding: 64px 24px 48px; }
  .hero h1 { font-size: 32px; letter-spacing: -0.8px; }
  .hero-sub { font-size: 16px; }

  .stats-inner { gap: 24px; flex-wrap: wrap; }
  .stat-divider { display: none; }

  .section { padding: 64px 24px; }

  .problem-grid { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .usecases-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .contribute-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }

  .trust-layout { grid-template-columns: 1fr; gap: 40px; }
  .merkle-tree-svg { max-width: 400px; }

  .pillars { flex-direction: column; align-items: center; }
  .pillar { max-width: 100%; width: 100%; }
  .pillar-connector {
    padding-top: 0;
    transform: rotate(90deg);
  }

  .code-block { font-size: 12px; }
}

@media (max-width: 480px) {
  .events-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
