/* ═══════════════════════════════════════════════════════
   AIM Design System - Modern Google Style
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  /* Amy brand */
  --amy-blue: #2563eb;
  --amy-violet: #7c3aed;
  --amy-gradient: linear-gradient(135deg, var(--amy-blue), var(--amy-violet));

  /* Google Palette */
  --google-blue: #1a73e8;
  --google-red: #ea4335;
  --google-yellow: #fbbc04;
  --google-green: #34a853;
  
  /* Core palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f4;
  --surface: #ffffff;
  
  /* Text */
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-muted: #70757a;

  /* Accents */
  --primary: var(--google-blue);
  --success: var(--google-green);
  --warning: var(--google-yellow);
  --error: var(--google-red);

  /* Borders & lines */
  --border: #dadce0;
  --border-light: #e8eaed;

  /* Shadows - Material Style */
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15);
  --shadow-md: 0 1px 3px 0 rgba(60,64,67,.30), 0 4px 8px 3px rgba(60,64,67,.15);
  --shadow-lg: 0 4px 6px 0 rgba(60,64,67,.30), 0 8px 12px 6px rgba(60,64,67,.15);

  /* Typography */
  --font-mono: 'Roboto Mono', 'IBM Plex Mono', monospace;
  --font-sans: 'Inter', 'Google Sans', sans-serif;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 96px;

  /* Animation */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(26, 115, 232, 0.2);
  color: inherit;
}

/* ═══════════════════════════════════════════════════════
   Layout Shell
   ═══════════════════════════════════════════════════════ */

.site-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ═══════════════════════════════════════════════════════
   Header & Navigation
   ═══════════════════════════════════════════════════════ */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-sm);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
  font-size: 1.4rem;
  text-decoration: none;
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .site-brand {
    font-size: 1.05rem;
    gap: var(--space-xs);
  }
}

.site-logo {
  color: var(--google-blue);
}

.site-brand-name {
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-brand-tagline {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .site-brand-tagline {
    display: none;
  }
}

.site-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .site-nav {
    gap: var(--space-md);
    width: 100%;
    justify-content: space-between;
  }
  .site-nav a {
    font-size: 0.85rem;
  }
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav a.active {
  color: var(--primary);
}

.site-nav a.nav-cta {
  color: #fff;
  background: var(--amy-gradient);
  border-radius: 999px;
  padding: 7px 18px;
  margin-top: -7px;
  margin-bottom: -7px;
  transition: filter var(--transition), box-shadow var(--transition);
}

.site-nav a.nav-cta:hover {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 2px 8px 2px rgba(124, 58, 237, 0.25);
}

@media (max-width: 768px) {
  .site-nav a.nav-cta {
    margin-top: 0;
    margin-bottom: 0;
  }
}

/* ═══════════════════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════════════════ */

h1, h2, h3 {
  font-weight: 400; /* Google Sans style */
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1.15;
}

h2 {
  font-size: 1.75rem;
}

p {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════
   Components - Buttons
   ═══════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 8px; /* Google uses 4px-8px */
  transition: all var(--transition);
  cursor: pointer;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: white;
  color: var(--primary);
}

.btn:hover {
  background: var(--bg-secondary);
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.btn.primary {
  background: var(--primary);
  color: white;
  border: none;
}

.btn.primary:hover {
  background: #1967d2;
  box-shadow: 0 1px 3px 1px rgba(66,133,244,0.15), 0 1px 2px 0 rgba(66,133,244,0.3);
}

.btn.gradient {
  background: var(--amy-gradient);
  color: white;
  border: none;
}

.btn.gradient:hover {
  filter: brightness(1.06);
  box-shadow: 0 2px 8px 2px rgba(124, 58, 237, 0.25), 0 1px 3px 0 rgba(37, 99, 235, 0.3);
}

/* ═══════════════════════════════════════════════════════
   Components - Cards
   ═══════════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: var(--space-lg);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════════════════════════════
   Hero & Specialty Sections
   ═══════════════════════════════════════════════════════ */

.hero {
  text-align: center;
  padding: var(--space-2xl) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 800px;
}

.bootstrap-section {
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: var(--space-xl);
  margin: var(--space-xl) 0;
}

.bootstrap-prompt {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.copy-btn {
  border-radius: 8px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

/* ═══════════════════════════════════════════════════════
   Flow / Steps
   ═══════════════════════════════════════════════════════ */

.flow-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.flow-step {
  text-align: left;
  padding: var(--space-lg);
  border-radius: 12px;
  background: var(--bg-secondary);
}

.flow-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-md);
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════
   Grid Utilities
   ═══════════════════════════════════════════════════════ */

.grid {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   Code & Pre
   ═══════════════════════════════════════════════════════ */

pre {
  background: #202124;
  color: #e8eaed;
  padding: var(--space-lg);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ═══════════════════════════════════════════════════════
   Spec Content Styling (Markdown)
   ═══════════════════════════════════════════════════════ */

#spec-content {
  color: var(--text-primary);
  line-height: 1.7;
}

#spec-content h1 {
  font-size: 2.2rem;
  margin-top: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--space-sm);
}

#spec-content h2 {
  font-size: 1.6rem;
  margin-top: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: var(--space-xs);
}

#spec-content h3 {
  font-size: 1.3rem;
  margin-top: var(--space-lg);
  font-weight: 500;
}

#spec-content p {
  margin-bottom: var(--space-md);
}

#spec-content ul, 
#spec-content ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

#spec-content li {
  margin-bottom: var(--space-xs);
}

#spec-content blockquote {
  border-left: 4px solid var(--google-blue);
  background: var(--bg-secondary);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--text-secondary);
  border-radius: 0 8px 8px 0;
}

#spec-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  #spec-content table {
    display: block;
    overflow-x: auto;
  }
}

#spec-content th, 
#spec-content td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}

#spec-content th {
  background: var(--bg-tertiary);
  font-weight: 500;
}

#spec-content tr:nth-child(even) {
  background: var(--bg-secondary);
}

#spec-content code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #c5221f; /* Google style code color */
}

#spec-content pre {
  margin: var(--space-lg) 0;
  background: #202124;
  color: #e8eaed;
}

#spec-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
}

#spec-content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: var(--space-xl) 0;
}

#spec-content a {
  color: var(--google-blue);
  text-decoration: none;
}

#spec-content a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   Page Header (inner pages)
   ═══════════════════════════════════════════════════════ */

.page-header {
  padding: 56px 0 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.page-header h1 {
  font-weight: 400;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.page-header a {
  color: var(--google-blue);
  text-decoration: none;
}

.page-header a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════
   Code Window Component
   ═══════════════════════════════════════════════════════ */

.code-window {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #2a2d2e;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.code-window-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #9aa0a6;
  margin-left: 4px;
}

.code-window pre {
  margin: 0;
  border-radius: 0;
  padding: 24px;
  font-size: 0.82rem;
  line-height: 1.65;
  background: #202124;
  color: #e8eaed;
}

.code-window pre .k { color: #8ab4f8; }
.code-window pre .s { color: #81c995; }
.code-window pre .c { color: #9aa0a6; }

/* ═══════════════════════════════════════════════════════
   Step Number Circle
   ═══════════════════════════════════════════════════════ */

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e8f0fe;
  color: var(--google-blue);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   Inner page content card
   ═══════════════════════════════════════════════════════ */

.content-card {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 48px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .content-card { padding: 24px; }
  .page-header { padding: 40px 0 32px; margin-bottom: 32px; }
}

/* Footer */
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.9rem;
}
