@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ═══ Synapxe Brand ═══ */
  --brand: #5B21B6;
  --brand-light: #7C3AED;
  --brand-bright: #A78BFA;
  --brand-glow: rgba(91,33,182,.08);
  --brand-glow-strong: rgba(91,33,182,.14);
  --brand-magenta: #D946EF;
  --gradient-brand: linear-gradient(135deg, #5B21B6, #7C3AED);
  --gradient-brand-vivid: linear-gradient(135deg, #5B21B6, #D946EF);

  /* ═══ Surfaces ═══ */
  --bg: #F8F7FC;
  --bg-white: #FFFFFF;
  --bg-hero: #0B0514;
  --bg-tinted: linear-gradient(145deg, #F5F3FF 0%, #FFFFFF 60%);

  /* ═══ Text ═══ */
  --text: #1E1B2E;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --text-heading: #0F0A1F;

  /* ═══ Accents ═══ */
  --green: #059669;
  --green-bg: #ECFDF5;
  --amber: #D97706;
  --amber-bg: #FFFBEB;
  --blue: #2563EB;
  --blue-bg: #EFF6FF;
  --red: #DC2626;
  --teal: #0D9488;
  --teal-bg: #F0FDFA;

  /* ═══ Borders & Shadows ═══ */
  --border: #E8E5F0;
  --border-hover: rgba(91,33,182,.35);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md: 0 4px 14px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.08);
  --shadow-glow: 0 0 30px rgba(91,33,182,.07);

  /* ═══ Layout ═══ */
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.4,0,.2,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── Hero — Solid dark, subtle radial glow ─── */
.hero {
  background: var(--bg-hero);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(91,33,182,0.15) 0%, rgba(217,70,239,0.05) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-bright), var(--brand-magenta), var(--brand-bright), transparent);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}
.hero h1 .highlight {
  background: linear-gradient(270deg, #C4B5FD, #E879F9, #A78BFA, #F0ABFC, #C4B5FD);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero .subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  color: rgba(203,213,225,0.85);
  font-weight: 400;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.8;
}
.hero .tagline {
  color: var(--brand-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero .tagline::before,
.hero .tagline::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--brand-bright);
  opacity: .4;
}

/* ─── Module Hero ─── */
.module-hero {
  background: var(--bg-hero);
  padding: 2.5rem 2.5rem 2rem;
  position: relative;
}
.module-hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 30%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(91,33,182,0.1) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}
.module-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--brand));
}
.module-hero > * { position: relative; z-index: 1; }
.module-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}
.module-hero .mod-subtitle { color: rgba(203,213,225,0.85); font-size: 0.95rem; max-width: 720px; }
.module-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(91,33,182,.12);
  color: var(--brand-bright);
  padding: 5px 14px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 14px;
  border: 1px solid rgba(91,33,182,.2);
}

/* ─── Container ─── */
.container { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

/* ─── Tab Navigation — Pill buttons ─── */
.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  padding: 12px 0;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  background: var(--bg-white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.tab-btn:hover {
  border-color: rgba(91,33,182,.35);
  background: rgba(91,33,182,.04);
  color: var(--brand);
}
.tab-btn.active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(91,33,182,.2);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Info Cards — Glassmorphism, NO left border ─── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 24px 0; }
.info-card {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow:
    0 4px 24px rgba(91,33,182,.04),
    inset 0 1px 0 rgba(255,255,255,0.8);
  transition: all 0.4s var(--ease);
}
.info-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(167,139,250,0.3), rgba(217,70,239,0.1), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.info-card:hover::before { opacity: 1; }
.info-card:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow:
    0 20px 40px rgba(91,33,182,.1),
    0 8px 16px rgba(91,33,182,.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
  border-color: rgba(167,139,250,0.3);
}
.info-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(91,33,182,.08), rgba(217,70,239,.06));
  border-radius: 14px;
  font-size: 24px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(91,33,182,.06);
}
.info-card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text-heading);
  font-weight: 700;
}
.info-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

/* ─── Content Sections ─── */
.section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: linear-gradient(135deg, var(--text-heading) 0%, var(--brand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 1.5rem 0 0.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(91,33,182,.06);
}
.section h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0.5rem;
}
.section p, .section li { font-size: 0.88rem; color: var(--text-body); }
.section ul { margin: 10px 0 10px 22px; }
.section li { margin-bottom: 5px; }
.section li::marker { color: var(--brand); }

/* ─── Steps Table ─── */
.steps-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.steps-table th {
  background: var(--bg-hero);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.steps-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-body);
}
.steps-table tr:last-child td { border-bottom: none; }
.steps-table tr:hover td { background: var(--brand-glow); }

/* ─── Summary Table ─── */
.summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.summary-table th {
  background: var(--bg-hero);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.summary-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-body);
}
.summary-table tr:last-child td { border-bottom: none; }
.summary-table tr:hover td { background: var(--brand-glow); }

/* ─── Prompt Block ─── */
.prompt-block {
  position: relative;
  background: rgba(245,243,255,0.6);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid rgba(91,33,182,.1);
  box-shadow: 0 2px 8px rgba(91,33,182,.04);
}
.prompt-label {
  background: linear-gradient(90deg, rgba(91,33,182,.06), rgba(167,139,250,.04));
  color: var(--brand);
  padding: 9px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: .5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(91,33,182,.08);
}
.prompt-text {
  color: var(--text);
  padding: 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 440px;
  overflow-y: auto;
  background: rgba(255,255,255,0.7);
}
.copy-btn {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
  box-shadow: 0 2px 8px rgba(91,33,182,.2);
}
.copy-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(91,33,182,.3); }

/* ─── Checkpoint ─── */
.checkpoint {
  background: linear-gradient(145deg, #F5F3FF 0%, #FFFFFF 60%);
  border: 1.5px solid rgba(91,33,182,.12);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.82rem;
  color: var(--text-body);
}
.checkpoint strong { color: var(--brand); }

/* ─── Notice — No left border line, use tinted background ─── */
.notice {
  background: linear-gradient(145deg, #FFFBEB 0%, #FFFFFF 60%);
  border: 1.5px solid rgba(217,119,6,.12);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-body);
}
.notice strong { color: var(--text-heading); }
.notice-blue {
  background: linear-gradient(145deg, #EFF6FF 0%, #FFFFFF 60%);
  border-color: rgba(37,99,235,.12);
}
.notice-teal {
  background: linear-gradient(145deg, #F0FDFA 0%, #FFFFFF 60%);
  border-color: rgba(13,148,136,.12);
}
.notice-purple {
  background: linear-gradient(145deg, #F5F3FF 0%, #FFFFFF 60%);
  border-color: rgba(91,33,182,.12);
}

/* ─── Nav List ─── */
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { border-bottom: 1px solid var(--border); }
.nav-list li:last-child { border-bottom: none; }
.nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text-body);
  font-size: 0.88rem;
  transition: all 0.2s ease;
  border-radius: 10px;
}
.nav-list a:hover { background: rgba(91,33,182,.04); color: var(--brand); }
.nav-list .nav-emoji { font-size: 20px; flex-shrink: 0; }
.nav-list .nav-title { font-weight: 600; display: block; }
.nav-list .nav-desc { font-size: 0.78rem; color: var(--text-muted); display: block; margin-top: 2px; }
.nav-list .nav-badge {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.nav-badge.hands-on { background: rgba(91,33,182,.06); color: var(--brand); border: 1px solid rgba(91,33,182,.1); }
.nav-badge.reference { background: rgba(37,99,235,.06); color: var(--blue); border: 1px solid rgba(37,99,235,.1); }
.nav-badge.demo { background: rgba(13,148,136,.06); color: var(--teal); border: 1px solid rgba(13,148,136,.1); }

/* ─── Footer ─── */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.footer .logo {
  font-family: 'Outfit', sans-serif;
  color: var(--brand);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 6px;
}

/* ─── Sidebar ─── */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 240px;
  height: 100vh;
  background: var(--bg-hero);
  padding: 24px 0;
  overflow-y: auto;
  z-index: 200;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar .sidebar-title {
  font-family: 'JetBrains Mono', monospace;
  color: var(--brand-bright);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  padding: 0 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 8px;
}
.sidebar a {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  font-size: 0.82rem;
  color: #94A3B8;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .2s var(--ease);
  font-weight: 500;
}
.sidebar a:hover { color: #fff; background: rgba(255,255,255,.04); }
.sidebar a.active {
  color: var(--brand-bright);
  border-left-color: var(--brand-light);
  background: rgba(91,33,182,.08);
  font-weight: 600;
}
.sidebar .home-link {
  color: var(--brand-bright);
  font-size: 0.75rem;
  padding: 10px 20px;
  margin-bottom: 4px;
  font-weight: 600;
}
.sidebar .home-link:hover { color: #DDD6FE; }
.sidebar .divider { height: 1px; background: rgba(255,255,255,.06); margin: 8px 20px; }
.sidebar a.step-link { font-size: 0.75rem; padding: 4px 20px 4px 28px; }

.has-sidebar .module-hero { margin-left: 240px; }
.has-sidebar .container { margin-left: 240px; max-width: calc(100% - 280px); padding: 2.5rem 2.5rem 4rem; }
.has-sidebar .footer { margin-left: 240px; }

/* ─── Page Nav ─── */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.page-nav a {
  color: var(--brand);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 24px;
  transition: all .25s var(--ease);
  background: var(--brand-glow);
  border: 1.5px solid rgba(91,33,182,.12);
}
.page-nav a:hover {
  background: var(--brand-glow-strong);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(91,33,182,.1);
}

/* ─── Scroll animations ─── */
.section, .info-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s var(--ease) forwards;
}
.section:nth-child(1) { animation-delay: .04s; }
.section:nth-child(2) { animation-delay: .08s; }
.section:nth-child(3) { animation-delay: .12s; }
.section:nth-child(4) { animation-delay: .16s; }
.info-card { animation-delay: var(--d, 0s); }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Ambient Glows ─── */
body::before {
  content: '';
  position: fixed;
  top: -150px; right: -150px;
  width: 500px; height: 500px;
  background: #5B21B6;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -100px; left: -100px;
  width: 350px; height: 350px;
  background: #D946EF;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .has-sidebar .module-hero,
  .has-sidebar .container,
  .has-sidebar .footer { margin-left: 0; max-width: 100%; padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (max-width: 768px) {
  .info-grid { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 1.5rem; }
  .hero h1 { font-size: 1.7rem; }
  .container { padding: 1.5rem 1rem 3rem; }
  .section { padding: 1.5rem 1.2rem; }
  .tab-nav { gap: 6px; }
  .tab-btn { padding: 0.4rem 0.9rem; font-size: 0.75rem; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
  .hero .subtitle { font-size: 0.88rem; }
  .section h2 { font-size: 1.1rem; }
  .page-nav { flex-direction: column; gap: 10px; }
  .page-nav a { text-align: center; }
}

/* ─── Touch-friendly ─── */
@media (hover: none) and (pointer: coarse) {
  .info-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  * { -webkit-tap-highlight-color: transparent; }
}

::selection { background: rgba(91,33,182,.15); color: var(--text-heading); }
