/* ==========================================================================
   OPEN GRAPH MEMORY (OGM) — 2026 ELEGANT BROWN, GREY & WHITE DESIGN SYSTEM
   Base Palette: Warm Espresso Brown (#5c3a2e), Cool Slate Grey (#475569), Pure White (#ffffff)
   Footer Palette: Deep Warm Espresso (#271711) with Warm Cream Text (#f5ede9)
   ========================================================================== */

:root {
  --bg-page: #ffffff;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-dark: #271711;
  --bg-terminal: #090706;

  --brown-deep: #3d2319;
  --brown-primary: #5c3a2e;
  --brown-bright: #8c533e;
  --brown-light: #fdf8f6;
  --brown-border: #e8d7cf;
  --brown-text: #4a2c20;

  --maroon-deep: #3d2319;
  --maroon-primary: #5c3a2e;
  --maroon-bright: #8c533e;
  --maroon-light: #fdf8f6;
  --maroon-border: #e8d7cf;
  --maroon-text: #4a2c20;

  --slate-900: #1e293b;
  --slate-700: #475569;
  --slate-500: #64748b;
  --slate-300: #e2e8f0;
  --slate-100: #f8fafc;

  --emerald-500: #10b981;
  --emerald-100: #ecfdf5;
  --rose-500: #f43f5e;
  --rose-100: #fff1f2;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(30, 41, 59, 0.04);
  --shadow-lg: 0 10px 30px rgba(30, 41, 59, 0.06);
  --shadow-brown: 0 12px 28px rgba(92, 58, 46, 0.14);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* --- Strict Reset & Zero Overflow Protection --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
  min-width: 0;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  background-color: var(--bg-page);
  color: var(--slate-900);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(circle at 50% 0%, var(--brown-light), var(--bg-page) 65%);
}

img, video, canvas, svg, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

pre, code {
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* --- Header Bar --- */
.header-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--slate-300);
  padding: 0.7rem 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--slate-900);
  flex-shrink: 0;
}

.brand-icon-box {
  width: 32px;
  height: 32px;
  background: var(--brown-primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.domain-tag {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  background: var(--brown-light);
  color: var(--brown-text);
  border: 1px solid var(--brown-border);
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--slate-700);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition-fast);
  white-space: nowrap;
}

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

.nav-btn-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.48rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  font-family: var(--font-sans);
  white-space: nowrap;
  max-width: 100%;
}

.portal-btn-maroon {
  background: var(--brown-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(92, 58, 46, 0.2);
}

.portal-btn-maroon:hover {
  background: var(--brown-deep);
}

.portal-btn-outline {
  background: #ffffff;
  color: var(--slate-900);
  border: 1px solid var(--slate-300);
}

.portal-btn-outline:hover {
  background: var(--brown-light);
  border-color: var(--brown-border);
  color: var(--brown-text);
}

/* ==========================================================================
   HERO MASTER SECTION
   ========================================================================== */

.hero-portal {
  padding: 5.75rem 0 2.5rem 0;
}

.hero-portal-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.ecosystem-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  background: var(--brown-light);
  border: 1px solid var(--brown-border);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brown-text);
  margin-bottom: 0.75rem;
  max-width: 100%;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald-500);
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-portal-title {
  font-size: clamp(1.75rem, 4.5vw + 0.8rem, 3rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  word-break: break-word;
}

.hero-portal-sub {
  font-size: clamp(0.88rem, 1.1vw + 0.6rem, 1rem);
  color: var(--slate-700);
  max-width: 680px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.55;
}

/* TOPOLOGY CANVAS BOX */
.hero-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

.topology-box {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-xl);
  padding: 1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow: hidden;
}

.topology-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--slate-300);
  flex-wrap: wrap;
  gap: 0.4rem;
}

.topology-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-900);
}

.text-maroon {
  color: var(--brown-primary) !important;
}

#topologyCanvas {
  width: 100%;
  max-width: 100%;
  height: 250px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-300);
  box-sizing: border-box;
}

/* STREAM TERMINAL BOX */
.terminal-portal {
  background: var(--bg-terminal);
  border: 1px solid #291d18;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-brown);
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.terminal-topbar {
  background: #19120f;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #291d18;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.mac-traffic-lights {
  display: flex;
  gap: 0.4rem;
}

.mac-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.mac-red { background: #ff5f56; }
.mac-yellow { background: #ffbd2e; }
.mac-light-green { background: #27c93f; }

.terminal-title {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: #a89a93;
}

.terminal-body-stream {
  padding: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.55;
  color: #f5ede9;
  flex-grow: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   LIVE SCENARIO KEYNOTE ANIMATION SECTION
   ========================================================================== */

.simulation-section {
  padding: 3.25rem 0;
  background: #ffffff;
  border-top: 1px solid var(--slate-300);
  border-bottom: 1px solid var(--slate-300);
}

.sim-box {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-xl);
  padding: 1.15rem;
  box-shadow: var(--shadow-md);
  max-width: 100%;
}

.sim-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--slate-300);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sim-stepper-badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.sim-badge {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--slate-500);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-300);
  transition: var(--transition-fast);
  cursor: pointer;
}

.sim-badge.active {
  background: var(--brown-light);
  color: var(--brown-text);
  border-color: var(--brown-border);
}

.sim-badge.bug {
  background: var(--rose-100);
  color: var(--rose-500);
  border-color: var(--rose-500);
}

.sim-badge.success {
  background: var(--emerald-100);
  color: var(--emerald-500);
  border-color: var(--emerald-500);
}

.sim-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.15rem;
  align-items: stretch;
}

#simCanvas {
  width: 100%;
  max-width: 100%;
  height: 380px;
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  box-sizing: border-box;
}

.sim-log-window {
  background: var(--bg-terminal);
  border: 1px solid #291d18;
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #f5ede9;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   ULTRA-CLEAN BROWN, GREY & WHITE SECTIONS BELOW ANIMATION
   ========================================================================== */

.compact-section {
  padding: 2.75rem 0;
  background: #ffffff;
  border-top: 1px solid var(--slate-300);
  border-bottom: 1px solid var(--slate-300);
}

.compact-title-group {
  margin-bottom: 1.25rem;
}

.compact-title-group h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate-900);
}

.compact-title-group p {
  font-size: 0.84rem;
  color: var(--slate-500);
}

.compact-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.compact-card {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: var(--transition-fast);
}

.compact-card:hover {
  border-color: var(--brown-primary);
  box-shadow: var(--shadow-sm);
}

.compact-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--brown-primary);
  color: #ffffff;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.compact-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 0.25rem;
}

.compact-card-desc {
  font-size: 0.78rem;
  color: var(--slate-700);
  line-height: 1.45;
}

/* COMPACT 21 TOOLS SUMMARY */
.compact-tools-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.compact-tool-pill {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 600;
  background: var(--brown-light);
  color: var(--brown-text);
  border: 1px solid var(--brown-border);
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-sm);
}

/* COMPACT MCP STUDIO BOX */
.studio-box-compact {
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

.studio-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.studio-tab-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--slate-300);
  color: var(--slate-700);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.studio-tab-btn.active {
  background: var(--brown-primary);
  color: #ffffff;
  border-color: var(--brown-primary);
}

/* FOOTER COMPACT — DEEP WARM ESPRESSO */
.footer-portal {
  background: #271711;
  color: #f5ede9;
  padding: 2.5rem 0 1.25rem 0;
  border-top: 1px solid #3d2319;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

.footer-sub {
  font-size: 0.78rem;
  color: #a89a93;
  max-width: 360px;
}

.footer-bottom {
  padding-top: 0.85rem;
  border-top: 1px solid #3d2319;
  font-size: 0.72rem;
  color: #a89a93;
  text-align: center;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 1024px) {
  .sim-grid { grid-template-columns: 1fr; }
  .compact-grid-3 { grid-template-columns: 1fr; }
  .hero-split-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .domain-tag { display: none; }
  .hero-portal-title { font-size: 1.75rem; }
  .header-bar { padding: 0.55rem 0; }
  .portal-btn-outline { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 0.75rem; }
  .brand-name { font-size: 0.88rem; }
}
